I found this lesson a little confusing for many reasons. One of them, as I recognized now, is this difference. In the video, the name of the config files is “mongod_n” where n is a number. In the lecture notes I read this:
Deploying MongoDB with mongod1-auth.conf:
mongod -f mongod1-auth.conf
I didn’t understand what meaning had “mongod1-auth”. Until now; I think is an error instead of “mongod_1.conf”. In any case, I don’t know what -f is for, nor do I know very well what we are doing during part of the process, which seems to me not very well explained and maybe too fast with copy-paste.
Another reason for me to be confused is that I don’t understand the relation between this internal authentication and repeating the proccess of creating first user (localhost exception) in order to create new users again. And why we use ls /var/mongodb/pki/1/mongod-keyfile
? It’s a double check about information we already know? Later, I saw that it’s not a fixed path (in exercise: “/var/mongodb/pki/node1/keyfile”), but in the lesson I didn’t know that.
Maybe I was in low energy in this lesson and it’s me, or maybe this lesson needs more explanation.