The following set of files can be used to create a new salt master to replicate WebPlatform.org.
Full states and non private pillars are publicly available.
- Will this deployment to use webplatform.org (production) or webplatformstaging.org (staging)?
- Edit the salt-userdata.yml to the environment you want to setup.
-
Instantiate using python-novaclient CLI utility and use salt-userdata.yml
nova boot --image Ubuntu-14.04-Trusty \ --user-data salt-userdata.yml \ --key_name salt-renoirb \ --flavor lightspeed \ --security-groups default,all,dns,log-dest,mw-eventlog,salt-master \ salt
-
Wait and get the new VM IP address
nova list | grep salt
-
Copy init script to the new VM
scp init.sh [email protected]:~
-
IMPORTANT, in order to access private data make sure source.webplatform.org gitolite config has your salt-master SSH key.
- Ask an administrator to add your salt-master SSH key in
[email protected]:gitolite-admin.git
- Access to the group
@wpdci
is enough for read-only actions
ABOUT YOUR SSH KEYS Note that its strongly recommended that you don’t use your OWN main SSH key, but that you create a passphrase protected one specifically to work on our servers. One per environment.
- Make sure your new VM has your salt-master SSH key*.
Scripts in this folder expects the file in the new VM as /home/dhc-user/.ssh/id_rsa*
explicitly.
Format doesn’t matter, as long as source.webplatform.org has your key!
scp -r .ssh [email protected]:~
-
On the new VM
ssh [email protected] sudo -s RUNAS=dhc-user GROUP=dhc-user bash init.sh
To get a more detailed procedure, refer to the comments in init.sh.