spiiph/atlasgce-modules — pull request #25 by MadMalcolm (2013-10-17 22:00:33+00:00)
Title: Cloud Scheduler Related Additions

Hi Henrik,

These additions concern virtual machines launched by cloud scheduler, most importantly they ensure that the csnode connects to the condor host associated with the cloud scheduler which launched the VM.

Context Helper
--------------
Cloud scheduler hands the VMs some information to help with the contextualization. Unfortunately the format in which this information may be made avaiable depends on the cloud type the VM resides on. Nimbus clouds (which we have been using historically) allow cloud scheduler to write files into the image before the image is booted. Openstack allow cloud scheduler to put informatio into a metadata server (similar to GCE, but more limited since OpenStakc only allows a single field with information hence our xml). Currently I ensure that [context helper](https://github.com/hep-gc/cloud-scheduler/blob/dev/scripts/ec2contexthelper) runs before puppet manually. It quits gracefully on Nimbus and inserts info from the metadata server into the image on OpenStack. In the future the role of context helper should be played fully by puppet (I'm happy to work on this once we are caught up to each other :)

Condor Configuration
--------------------
The central_manager fact reads the content of the similarly named file in /etc/condor and puppet uses it to set the CONDOR_HOST. The grid security module currently only creates the directory structure to contain the certificates the condor client uses to identify itself to the condor host. Again these are handled by cloud scheduler and context helper, int he future this should all be managed by puppet.

Cloud Type
----------
The way clouds manage ephemeral storage varies from cloud type to cloud type. First off I've added a cloud_type fact that will communicate whether the VM is on a Nimbus, OpenStack, or GCE cloud (again for cloud scheduler VMs using contect helper). This fact is only used to configure the storage set up for csnodes on Nimbus and OpenStack right now. If we move to a master/agent setup with puppet this intelligence could be handled by the puppet master's site manifest.

Cheers,
-Frank