[one-users] Picking certain fields /USER/NAME out of $USER[TEMPLATE]

Steven Timm timm at fnal.gov
Thu Nov 13 07:34:08 PST 2014

Under OpenNebula 3.2 we would include in the
contextualization section the field $USER[TEMPLATE]
and then add a contextualization script such that
we would grab the field /USER/NAME out of the base64 encoded
template information.

In Opennebula 4.8 you can still put $USER[TEMPLATE]
into your contextualization but now there is a lot more junk
in $USER[TEMPLATE], namely all the key pairs that have been
created via ec2CreateKeyPair for each user.  At first we
did not know what was happening because $USER[TEMPLATE]
grew to over 300kb, a size that actually breaks bash! 
(you can't assign a shell variable to a value that big).

So now the question is--is there a way to include only the
user name field of the template in the contextualization section,
and nothing else, through some combination of ruby syntax.
If so, how?

Steve Timm

Steven C. Timm, Ph.D  (630) 840-8525
timm at fnal.gov  http://home.fnal.gov/~timm/
Office:  Wilson Hall room 804
Fermilab Scientific Computing Division,
Currently transitioning from:
Scientific Computing Services Quadrant
Grid and Cloud Services Dept., Associate Dept. Head for Cloud Computing

Scientific Computing Facilities Quadrant.,
Experimental Computing Facilities Dept.,
Project Lead for Virtual Facility Project.

More information about the Users mailing list