- Table of contents
- Gaining access to the code
- Creating GlideinWMS VM to run in Cloud
- Creating a GlideinWMS VM to run in FermiCloud (Updated: March 24, 2016)
Gaining access to the code¶
To gain write access to the code, you need -
- A valid Fermilab Kerberos principle * A valid services account * Developer level access to the glideinwms project in redmine.fnal.gov
Once you have the access you can checkout the code using
git clone ssh://p-gwms-cloud-vms@cdcvs.fnal.gov/cvs/projects/gwms-cloud-vms
Creating GlideinWMS VM to run in Cloud¶
Creating a VM using oz (Aeolus project)¶
- Install oz on the host.
[parag@cd-109337 glideinwms]$ yum install oz
- Based on the OS version selected, you may need to do some minor tweaking for oz-install to create the image for you. For SL6 & recent Fedora based OS, openssh-server is not part of the yum groups base and core. So you need to openssh-server to the kickstart file as below.
[parag@cd-109337 glideinwms]$ cat /usr/lib/python2.7/site-packages/oz/auto/rhel-6-jeos.ks install text key --skip keyboard us lang en_US.UTF-8 skipx network --device eth0 --bootproto dhcp rootpw %ROOTPW% firewall --disabled authconfig --enableshadow --enablemd5 selinux --enforcing timezone --utc America/New_York bootloader --location=mbr --append="console=tty0 console=ttyS0,115200" zerombr yes clearpart --all part /boot --fstype ext4 --size=200 part pv.2 --size=1 --grow volgroup VolGroup00 --pesize=32768 pv.2 logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow --maxsize=1536 logvol / --fstype ext4 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow reboot %packages @core @base openssh-server %post
- Download the attached image template to create an image is attached: https://cdcvs.fnal.gov/redmine/attachments/download/9502/sl6-gwms-image.tdl
- MODIFY THE SECURITY SETTINGS IN THE TEMPLATE
- Change the root password
* To enable root password randomization, un-comment following lines
#echo "-----RANDOMISING ROOT PASSWORD-----" #dd if=/dev/urandom count=128 2>/dev/null|md5sum|passwd --stdin root >/dev/null 2>&1
* Change the download URL specified in following line to download ssh public key for root accesscurl -f http://home.fnal.gov/~parag/keys/id_dsa.pub > /tmp/aws-key 2>/dev/null
* Make changes to rc.local in the template as needed.
- Change the root password
* To enable root password randomization, un-comment following lines
- Run oz-install
oz-install -d 4 -p -u sl6-gwms-image.tdl
- Once the VM is created successfully, save the xml configuration from the output of oz-install. You can use it to launch the VM using virsh
virsh create xml_file
Customizing the VM to work with glideinwms¶
NOTE: This should be the final in the image creation process. Once glideinwms related rpms are installed, you will not be able to bootup the VM outside of glideinwms context.
- Follow the instructions above to create a working image.
- Once you are convinced the image created is working correctly, install the glideinwms related rpms. Required rpms are mentioned in the template but commented out.
Automating the image creation using template¶
- Follow the instructions to create a working glideinwms VM
- Retrofit any manual customization into the oz template
Creating a GlideinWMS VM to run in FermiCloud (Updated: March 24, 2016)¶
- Start a FermiCloud VM from the image slf6_prvm image
- Login into the VM as root
- service glideinwms-pilot stop
- Install the new rpm by hand
- Login into fermucloudui.fnal.gov, save the image and let Steve Timm know the image number
onevm disk-snapshot VMID 0 “name of new image to be created" onevm shutdown VMID
- Steve will send you what the magic incantation is (econe-register-image) to make it usable from OpenNebula econe interface.