Multi-node OpenStack folsom
installation notes (on ubuntu
using puppet Openstack modules).
Most of this was culled from the following article:
Openstack Folsom Deploy by Puppet on Ubuntu 12.04 HOWTO
Please note also: in order for the puppet manifests to work all host names must be fully qualified (use .e.g. .local
for a FQDN).
The machines we'll be using are as follows:
- puppet master:
pm
at172.24.0.10
(not part of the resulting cloud) - OpenStack controller node:
osc
at172.24.0.11
- OpenStack compute node #1:
oscn1
at172.24.0.12
- OpenStack compute node #2:
oscn2
at172.24.0.13
- install
ubuntu 12.04 LTS server
- add the puppetlabs repo
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb sudo dpkg -i puppetlabs-release-precise.deb sudo apt-get update
- install
puppetmaster
andgit
sudo apt-get install puppetmaster git
- install
puppetlabs-openstack
git clone https://github.com/puppetlabs/puppetlabs-openstack (cd puppetlabs-openstack/ && git checkout folsom) sudo cp -r puppetlabs-openstack /etc/puppet/modules/openstack (cd puppetlabs-openstack && sudo rake modules:clone)
- give the puppet master machine a fixed IP i.e. include the following
stanza in
/etc/network/interfaces
:auto eth1 iface eth1 inet static address 172.24.0.10 netmask 255.255.255.0 network 172.24.0.0 broadcast 172.24.0.255 gateway 172.24.0.1 dns-nameservers 172.24.0.1
- add the OpenStack controller and compute nodes to
/etc/hosts
172.24.0.11 osc.FQDN osc 172.24.0.12 oscn1.FQDN oscn1 172.24.0.13 oscn2.FQDN oscn2
- copy the the example site manifest into place
sudo cp /etc/puppet/modules/openstack/examples/site.pp /etc/puppet/manifests/
- apply this patch
- install
ubuntu 12.04 LTS server
- the
/etc/network/interfaces
file should look as follows:auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 172.24.0.11 netmask 255.255.255.0 network 172.24.0.0 broadcast 172.24.0.255 gateway 172.24.0.1 dns-nameservers 172.24.0.1 auto eth1 iface eth1 inet manual up ifconfig eth1 up
- add the puppetmaster machine to
/etc/hosts
like so127.0.0.1 osc.FQDN osc 172.24.0.10 pm.FQDN pm
- name the
openstack_controller
machine in/etc/hostname
like soosc.FQDN
- add the puppetlabs repo
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb sudo dpkg -i puppetlabs-release-precise.deb sudo apt-get update
- install
puppet
sudo apt-get install puppet
- configure the puppet agent as follows (in
/etc/puppet/puppet.conf
)[agent] server=pm.FQDN certname=openstack_controller
- add the ubuntu/folsom repository:
cat >> /etc/apt/sources.list <<-EOF deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main EOF aptitude install -y ubuntu-cloud-keyring aptitude update
- invoke the puppet agent
sudo puppet agent -vt
- switch to a terminal on the puppet master machine and sign the agent's certificate
sudo puppet cert list sudo puppet cert sign osc.FQDN
The step above is only necessary after the very firstpuppet agent
call on the controller node. - re-run the puppet agent
sudo puppet agent -vt
- install
ubuntu 12.04 LTS server
- the
/etc/network/interfaces
file should look as follows:auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 172.24.0.12 netmask 255.255.255.0 network 172.24.0.0 broadcast 172.24.0.255 gateway 172.24.0.1 dns-nameservers 172.24.0.1 auto eth1 iface eth1 inet manual up ifconfig eth1 up
- add the puppetmaster machine to
/etc/hosts
like so127.0.0.1 oscn1.FQDN oscn1 172.24.0.10 pm.FQDN pm
- name the
openstack_compute
machine in/etc/hostname
like sooscn1.FQDN
- add the puppetlabs repo
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb sudo dpkg -i puppetlabs-release-precise.deb sudo apt-get update
- install
puppet
sudo apt-get install puppet
- configure the puppet agent as follows (in
/etc/puppet/puppet.conf
)[agent] server=pm.FQDN # omit certname, machine name will be assumed automatically
- add the ubuntu/folsom repository:
cat >> /etc/apt/sources.list <<-EOF deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main EOF aptitude install -y ubuntu-cloud-keyring aptitude update
- invoke the puppet agent
sudo puppet agent -vt
- switch to a terminal on the puppet master machine and sign the agent's certificate
sudo puppet cert list sudo puppet cert sign oscn1.FQDN
The step above is only necessary after the very firstpuppet agent
call on the compute node. - re-run the puppet agent
sudo puppet agent -vt
Repeat the openstack_compute
setup for the second worker machine (oscn2
) with the appropriate IP (172.24.0.13
).
In order to be able to start intances on the newly installed cloud we'll need an image. Please add it by running the following commands on the controller node:
sudo su - source openrc wget http://uec-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img glance image-create --name ubuntu.12.04.server --disk-format=qcow2 --container-format=bare --file precise-server-cloudimg-amd64-disk1.img
Please see this page for a list of images.