Note: this is an xCAT design document, not an xCAT user document. If you are an xCAT user, you are welcome to glean information from this design, but be aware that it may not have complete or up to date procedures.
Note: this is a very rough strawman for this mini-design. Still needs work.
In order for xCAT to automate some of the steps of setting up a cloud based on openstack, it needs some information about the cloud and the chef/puppet configuration that should be set up. This design describes the tables that should exist in xcat for this purpose and a little bit about what each attribute will be used for. The assumption is that the user would fill out these tables before using xcat and chef/puppet to set up the cloud.
Add the new table cfgmgt in xCAT, and it will be in xCAT by default. It's not in the xCAT-Openstack-xx.rpm This table is used for puppetserver and chefserver .
We need to support xcat setting up more than one cloud. A typical case would be they have a production cloud and a test cloud. So we will list the clouds in the clouds table:
This is a node oriented table, storing cloud info for each node.
The xCAT-openstack rpm will be a meta-meta rpm. It would include the cloud tables and chef & puppet recipes specific to openstack and then require the xCAT rpm so it would pull in all of xcat.
When nodeset or updatenode is run, xcat will pull info from these tables and plug the info in the correct places in the chef/puppet recipes.
In addition, the mypostscript.tmpl file will include environment variables for the chef/puppet server (from the noderes table), so that the chef/puppet postscript will no who to contact.
1 Install the chef-server/chef-client:
1.1 If the chefserver node is not installation, install the chef-server during postbootscripts when OS provision; otherwise, just need to run "updatenode" to install the chef-server
1.2 If the chefclient node is not installation, install the chef-client during postbootscripts when OS provision; otherwise, just need to run "updatenode" to install the chef-client.
Refer to [Adding_Chef_in_xCAT_Cluster] to get more information.
2. Configure the chef-server
2.1 Prepare the chef-cookbooks
The chef-cookbooks will be on the MN firstly, and then distribute them to each chef-server. The users can use scp or xdcp to do the distribution. After that, the cfgmgt.path which is used to specify the cookbooks/recipes paths on the chef-server should be updated. (jjh: I think we can put the chef-cookbooks in the /install/chef directory on MN. And the distribution could be done by the script config_ops_chef_server automatically . Considering there are not so much chef-server, so the performance will not be an issue. What do you think of it?)
And the mypostscript.tmpl file will include environment variables for the chef server.
publicnet, novanet, mgtnet,vmnet,adminpw,dbpw, cfgmtgpath, chef-client-list, roles_of_<each_chef_client>
Run "updatenode <chef-server-noderange> -P config_ops_chef_server" . The script config_ops_chef_server will
(1)generate chef environment file
(2)use knife command to load the environment file
(3)apply the environment name to the chef-client nodes
(4)upload the cookbooks/roles
(5)assign the roles to the chef-client.
If we want to do only one action, we can specify the argument for config_ops_chef_env.
3. Run "chef-client" on each client node to deploy the openstack.
xdsh <controller-noderange> -s chef-client
xdsh <computer-noderange> -s chef-client
Currently, there are many outputs of chef-client. If there are many nodes, the output of xdsh may be not easy to read directly.
Under construction.