To manage configuration on TryStack (http://trystack.org) we use foreman, which uses puppet under the covers.
TryStack is a public OpenStack cloud that anyone with a Facebook account can get access to and try out using OpenStack. Last year Red Hat donated RHEL subscriptions for the x68_64 cluster and commited my team’s time to maintain this cluster. We’re currently in the process of upgrading the Cluster to RDO Havana and we are backing glance and cinder with GlusterFS.
In our TryStack deployment Foreman mainly supplies a puppet master, configuration key value pairs (foreman global variables) and the host groups which assign a role to a node in the cluster. Right now there are two host groups, more will come as we expand monitoring and storage.
Havana Control Node
Havana Compute node
The two host groups are currently “Havana Control Node” and “Havana Compute node”. Each of these host groups include just a couple puppet classes as listed above. The number of these classes has been deliberately kept low in each host group. The complexity is wired together in the trystack puppet module which has now been posted in its current form to github: https://github.com/trystack/puppet-trystack
This puppet module consumes two things: 1. variables (foreman global variables) 2. the puppet modules that to do the OpenStack configuration.
First the puppet modules, in the RDO package set there is a package named openstack-puppet-modules. We’ve simply used the puppet modules that this package provides to populate the puppet module path, along with the trystack module.
Second the variables. There’s a small script included in the puppet module repo called api.py. This script simply uses the foreman api to read a config file and populate these variables into foreman. You can use this script by following these steps:
- change the 0 to 1 on the line “if 0″ by the comment “# generate”
- run ‘python api.py’ this will generate a trystack.cfg file with empty values
- switch the 1 back to a 0
- edit the trystack.cfg file with appropriate values
- edit the user and password and url around line 40 to point to foreman
- run ‘python api.py’
you can update the cfg file and run the script over and over and it will update your config values for you. I’ve also been made aware of hammer which is a cli client for the foreman api, though I’ve not used it a few of my team mates have. Do a ‘yum search hammer’ on the foreman yum repo to find this package.
To summarize this, we have 5 pieces to this puzzle: Foreman, Foreman Host Groups, Foreman Global Variables, TryStack Puppet Modules, RDO openstack-puppet-modules
Once they are all in place we install a host, add puppet client have the agent check in and sign its cert, assign the host to a host group and rerun puppet agent to configure the node.
Red Hat: http://redhat.com
Unrelated Hammer: http://www.youtube.com/watch?v=NyEE0qpfeig