Am I a nonresident alien or resident alien? Also, am I supposed to file FBAR form?

I am on H1B visa and lived in US for the whole 2017. Am I a nonresident alien or resident alien? Also, am I supposed to file FBAR form?