Work flow
-
Install packages: tree, curl, git;
-
Create user chad, add it to sudoers;
-
Install Meteor:
curl https://install.meteor.com | /bin/sh
; -
download mongoDB package (mongodb-linux-x86_64-rhel62-3.0.0.tgz for now) from mongoDB;
-
Extract mongoDB package to $HOME/apps, add $MONGO_HOME/bin to $PATH (in file ~/.bash_profile);
-
Config mongoDB: save the following codes into $HOME/docs/mongoRepo/mongo.conf:
net: bindIp: 127.0.0.1 port: 27017 storage: dbPath: dbHome systemLog: destination: file path: "mongodb.log" logAppend: true
-
Start mongod:
mongod --config mongo.conf
, or in background:nohup mongod --config mongo.conf &
;
Ansible
Managing Node
Install ansible with sudo pip install ansible
.
Provision of remote host
On remote host, create user with sudo useradd -m chad
and set password: sudo passwd chad
.
On manging node, add ssh automatic login of chad and root on remote host with ssh-copy-id
.
For a vagrant host, run the following commands in project's root directory:
vagrant ssh
sudo passwd
// set password for root ...
sudo useradd -m chad
sudo passwd chad
// set password for chad ...
exit
ssh-copy-id chad@localhost -p 2222
ssh-copy-id root@localhost -p 2222
// Install Node.js, MongoDB,
Install mms with installing its rpm package, you can remove it later with:
# service --status-all
# rpm -qa|grep mongo
mongodb-mms-automation-agent-manager-1.6.2.960-1.x86_64
# rpm -e mongodb-mms-automation-agent-manager-1.6.2.960-1.x86_64
# service --status-all
Change host name:
Add "newfairs.biz" after "127.0.0.1 ", before "localhost" in /etc/hosts.
Restart mms agent: service mongodb-mms-automation-agent restart
.