How to clone a GRIDSEED site
- 1. Introduction
- 2. Expand a existing Site
- 3. Clone a gridseed site
- 3.1 First step - Import the ovf file (COMMON FOR ALL VMs)
- 3.2 Second step - Reconfigure the network (COMMON FOR ALL VMs)
- 3.3 Third step - Reconfigure the gridseed environment (COMMON FOR ALL VMs
- 3.4 Reconfigure the glite and torque environment - Computing element
- 3.5 Reconfigure the glite/dpm/storm environment - Storage element
- 3.6 Reconfigure the the glite and torque environment - Worker node
- 3.7 Add the new site to top bdii
1. Introduction
Once you have downloaded a Gridseed site (example, ce-2,grid.seed ce-2wn1.grid.seed and se-2.grid.seed) maybe you want to add another one or to expand the exists one. To do that you have to follow the following instructions
2. Expand a existing Site
When you want to expand a existing site you want to add one (or more) worker node.
2.1 First step - Import the ovf file
- Run virtualbox graphical interface, go to File -> Import Appliance, locate the ovf file that you want to import (for example if you want to add another worker node to gridseed-2 site, find the ce-2wn1.ovf file).
- When the wizard presents you the "Appliance Import Settings" change the "Name" and the "Virtual Disk Image" to the desidered one. In our example change:
- "Name" from ce-2wn1 to ce-2wn2
- "Virtual Disk Image" from ...something../ce-2wn1.vmdk to ...something../ce-2wn2.vmdk
- Finish the importing procedure by clicking on "import" button
2.2 Second step - Reconfigure the network
- Run the imported worker node in virtualbox graphical mode
- During the boot process "disconnect" the network. This because the machine is booting with the same ip of a running one.
- Login and change the following files:
/etc/sysconfig/network-scripts/ifcg-eth0/etc/sysconfig/network
In the first file change the ip number of the machine (in our example change from 10.10.2.1 to 10.10.2.2), in the second one change the hostname (from ce-2wn1.grid.seed to ce-2wn2.grid.seed).
- Restart the network with
service network restart
- Check if the network is working, ping the master
- If everything is working fine shutdown the node and run it again in headless mode
2.3 Third step - Reconfigure the gridseed environment
- 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 (check if the host already has cfengine installed, if this is true the you can skip the following command!!)
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
- Insert the virtual machine hostname in
/etc/c3.conf - On the master create a directory for the host ssh keys
mkdir /srv/cfengine/private/ssh/<VM_NAME>
- on the NEW host copy the ssh keys to the master
scp -r /etc/ssh/ssh_host_* master:/srv/cfengine/private/ssh/<VM_NAME>/
- on master execute this script to regenerate the ssh known hosts file
/srv/cfengine/scripts/new_known_hosts
- Force the propagation of the ssh_known_hosts on all hosts
cexec cfagent -q
2.4 Forth step - Reconfigure pbs/glite
- On the computing element of the site you wish to expand (in our case ce-2) edit the file
/var/spool/pbs/server_priv/nodesand add the new worker node and restart the pbs server withservice pbs_server restart - On the computing element of the site you wish to expand (in our case ce-2) edit the file
/root/config/wn-listand add the new worker node - On the new worker node of the site you wish to expand (in our case ce-2) edit the file
/root/config/wn-listand add the new worker node (be sure that in this file are presents all the nodes which belong to the site) - On the new worker node execute ig_yaim
/opt/glite/yaim/bin/ig_yaim -c -s /root/config/ig-site-info.def -n ig_WN_torque
3. Clone a gridseed site
If you want to add a new site you must have at least the images of a CE, WN and a SE.
3.1 First step - Import the ovf file (COMMON FOR ALL VMs)
Follow the istructions of how to import a virtualbox image
3.2 Second step - Reconfigure the network (COMMON FOR ALL VMs)
Follow the istructions of how to configure network.
3.3 Third step - Reconfigure the gridseed environment (COMMON FOR ALL VMs
Follow the istructions of how to configure the gridseed environment.
3.4 Reconfigure the glite and torque environment - Computing element
- Go in the /root/config directory and edit the files present there.
- ig-site-info.def Main configuration file, change the values which belongs to the CE. For example if you are cloning a VM that previously was ce-2.grid.seed change all the occurrences you find in site-info file (and in the following files)
- services direcotry As in site-info, change all the values related to the new site/machines. Remember to change the SITE_NAME variabile to the new site name.
- wn-list.conf Add to this file the list of the worker nodes that belongs to the site.
- REMEMBER to copy the files above on your worker nodes before run ig_yaim on them!
- Run ig_yaim on the Computing Element, with the correct CE type:
- ig_CREAM_torque for CREAM computing element
- ig_CE_torque for lcg computing element
/opt/glite/yaim/bin/ig_yaim -c -s /root/config/ig-site-def.conf -n <CE_type> -n ig_BDII_site
3.5 Reconfigure the glite/dpm/storm environment - Storage element
- More or less the procedure is the same as for computing element, you have to edit the file under the /root/config directory, replacing the occurrences of the old storage element name with the new.
- To configure a StoRM storage element (as you can find on se-1.grid.seed) you have to use this command:
/opt/glite/yaim/bin/ig_yaim -c -s /root/config/ig-site-info.def \ -n ig_SE_storm_backend -n ig_SE_storm_frontend
- To configure a DPM storage element (as you can find on se-2.grid.seed) you have to use this command:
/opt/glite/yaim/bin/yaim -c -s /root/config/site-info.def -n SE_dpm_mysql
3.6 Reconfigure the the glite and torque environment - Worker node
Follow the istructions of how to configure the worker node environment. Remember to configure previously the computing element!
3.7 Add the new site to top bdii
To add a new site in top bdii you have to edit on master the file /var/www/html/configuration/bdii-sites.conf
GRIDSEED-1 ldap://ce-1.grid.seed:2170/Mds-Vo-name=GRIDSEED-1,o=grid GRIDSEED-2 ldap://ce-2.grid.seed:2170/Mds-Vo-name=GRIDSEED-2,o=grid .... <your_new_site> ldap://<your_CE>:2170/Mds-Vo-name=<your_new_site,o=grid

