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.

  1. 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 named centos5 and sl4, depending on the OS they are running.
    • Edit the new_vm/vmware.vmx file and change the VM display name.
  2. Assign a new hostname/IP pair to the new VM. You can review assigned hostname/IP pairs in the named configuration on host master.
    • Edit both /var/named/data/db.grid.seed and /var/named/data/db.10.10 inserting the new hostname/IP pair.
    • Restart named with service named reload at the root prompt.
  3. 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 root to the console
    • Edit file /etc/sysconfig/network and insert the new hostname
    • Edit file /etc/sysconfig/networking-scripts/ifcfg-eth0 and insert the new IP address
    • Edit file /etc/hosts and insert the new IP address, the fully-qualified hostname and the (short) hostname, as in 10.10.0.254 test.grid.seed test
    • Reboot the VM (issue command reboot at the root prompt)
  4. Generate cfengine keys for the new VM. (this is done on host master)
    • At master root prompt, run command cfkey -f /var/cfengine/ppkeys/root-IP.ADDRESS.OF.VM
    • Copy the keys where getPrivateKeys.cgi can find them:
         install -o root -g apache -m 0440 /var/cfengine/ppkeys/root-IP.ADDRESS.OF.VM.* /srv/cfengine/ppkeys/
      
  5. Install cfengine on the new VM. At the root prompt on the new VM, execute the following commands:
    • Copy the cfengine bootstrap script to the new VM:
         scp -p master:/srv/cfengine/scripts/cfbootstrap /root/cfbootstrap
      
    • Run the cfengine installation script:
         /root/cfbootstrap
      
      If cfengine complains about actionsequence being empty, permissions on the keys are wrong (either on the new VM or on the master server).
  6. 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)
  7. Insert the virtual machine hostname in /etc/c3.conf