How to add a new host to the GRIDSEED network
This is a checklist of steps to be performed for creating a new host in the GRIDSEED network.
- Copy a template virtual machine to a new directory.
- Copy all the files under a new directory name:
rsync -a neon:/vmware/template /vmware/new_vm. The template VMs are namedcentos5andsl4, depending on the OS they are running. - Edit the
new_vm/vmware.vmxfile and change the VM display name.
- Copy all the files under a new directory name:
- Assign a new hostname/IP pair to the new VM. You can review assigned hostname/IP pairs in the
namedconfiguration on hostmaster.- Edit both
/var/named/data/db.grid.seedand/var/named/data/db.10.10inserting the new hostname/IP pair. - Restart
namedwithservice named reloadat the root prompt.
- Edit both
- Change the hostname and IP address of the new VM. You do this by logging in to the VM console:
- Power-up the VM with the VMware GUI; if asked whether the VM should be given a new UUID, answer yes.
- After boot, log in as
rootto the console - Edit file
/etc/sysconfig/networkand insert the new hostname - Edit file
/etc/sysconfig/networking-scripts/ifcfg-eth0and insert the new IP address - Edit file
/etc/hostsand insert the new IP address, the fully-qualified hostname and the (short) hostname, as in10.10.0.254 test.grid.seed test - Reboot the VM (issue command
rebootat the root prompt)
- Generate
cfenginekeys for the new VM. (this is done on hostmaster)- At
masterroot prompt, run commandcfkey -f /var/cfengine/ppkeys/root-IP.ADDRESS.OF.VM - Copy the keys where
getPrivateKeys.cgican find them:install -o root -g apache -m 0440 /var/cfengine/ppkeys/root-IP.ADDRESS.OF.VM.* /srv/cfengine/ppkeys/
- At
- Install
cfengineon the new VM. At therootprompt on the new VM, execute the following commands:- Copy the
cfenginebootstrap script to the new VM:scp -p master:/srv/cfengine/scripts/cfbootstrap /root/cfbootstrap
- Run the
cfengineinstallation script:/root/cfbootstrap
Ifcfenginecomplains about actionsequence being empty, permissions on the keys are wrong (either on the new VM or on themasterserver).
- Copy the
- Copy the known host
- on master create the new host dir
mkdir /srv/cfengine/private/ssh/<VM_NAME>
- on the NEW host:
scp -r /etc/ssh/ssh_host_* master:/srv/cfengine/private/ssh/<VM_NAME>/
- on master execute:
/srv/cfengine/scripts/new_known_hosts
(to create the new known_hosts file)cexec cfagent -q
(to force the known_hosts file distribution on all nodes) - Insert the virtual machine hostname in
/etc/c3.conf

