The directory structure of a COE install will look like this:
/etc/puppet /etc/puppet/files /etc/puppet/manifests /etc/puppet/modules /etc/puppet/templates
Is created when puppet is installed. It should essentially contain this on the appropriate branch (usually multi-node). This repo contains the manifests and templates directories where the one part of COE will reside.
Contains the site.pp, which is used to customise the install in common ways, such as configuring the network settings and defining which nodes to manage. Site.pp is internally documented and will be different for each site. This directory also has core.pp and cobbler_node.pp: core.pp is used to provide a clean interface between the Openstack puppet modules and the user-facing site.pp; cobbler_node.pp is specifically targeted at managing the cobbler module. The scripts in the directory are helpers that perform the following functions:
clean_node.shIs used to wipe the puppet cert of a node and set it to install on next boot. Usage:
puppet-modules.shIs used to install all the modules in modules.list via apt. Usage
reset_build_node.shWill clean up the build node so that a subsequent puppet apply will test with a (roughly) clean slate. Purges installed packages, removes var directories and some config files. Usage:
reset_nodes.shRemoves all nodes from cobbler db and then runs puppet to insert them again. Usage:
Contains a template for
/etc/network/interfaces. This can be modified by sites that have complex networks to meet their requirements. It is applied via a late command and not directly managed by puppet.
The second file in this directory can be used to move IP addresses between physical nics and Openvswitch ports and is not needed in the majority of cases. It is controlled by
numbered_vs_port in site.pp.
Either of these locations can be used to house the puppet modules. The COE apt packages will install them to
apache cobbler concat drbd horizon memcached naginator openstack puppet rsync sysctl apt coe corosync glance inifile monit nova openstack_admin quantum ssh vswitch apt-cacher-ng collectd dnsmasq graphite keystone mysql ntp pip rabbitmq stdlib xinetd
Understanding the install sequence
Because COE handles both provisioning of the base OS and deployment of applications the install sequence for a node is quite long. The install takes the following steps:
- COE puppet modules and manifests are installed on the build node from either git or apt
- Puppet apply is run on the build node, which does the following:
- Cobbler is installed on the build node
- The Ubuntu 12.04 install image is loaded into cobbler using
- The out-of-band information for the target node is inserted into the cobbler database
- A preseed file is created to automate the install, which has the following in the late command:
- Sets puppet to run after the node has booted, depending on whether
autostart_puppethas been set
- Sets the puppetmaster address and sync interval in
- Syncs to the build node ntp server
- Optionally disables IPv6 router advertisement
- Optionally installs the ethernet bonding module
/etc/puppet/templates/interfaces.erbin the late command
- HTTP posts to cobbler on the build node to say that the install completed successfully
- HTTP posts to cobbler on the build node to request no more install boots (so the machine will receive a PXE command to boot from local disk instead)
- The target node is rebooted using the clean_node.sh script on the build node, or by hand, which will install ubuntu and run everything in step 2.4
- The target node will finish the install, reboot, then boot into the newly installed OS
autostart_puppethas been set, the node will run puppet agent, and install everything needed for either a control or a compute node.
Most of the complexity here is tied up in the late command. If you need to add a system module and want it to be available as soon as the system reboots then this is the place to put it. The easiest way to do this is by modifying cobbler_node.pp and adding lines to the late command there. This is an example of a general guideline: try to avoid modifying the puppet modules, and instead change things from the manifests folder where possible.