Richard Jones' Log: Easy installation of a new stack with OpenStack Ansible Deployment (OSAD)

Fri, 15 May 2015

Update: this blog post has been superseded by new instructions.

OSAD is a project that deploys OpenStack using Ansible ("OpenStack Ansible Deployment") and I decided to see whether I could use it to create the development stack I needed behind my Horizon work.

OSAD Simple Installation

The absolute simplest installation is the one the OSAD project uses for its testing using Tempest. It sets up a moderately complex stack environment (multiple Keystones, Horizons, rabbitmq backends, etc all load balanced through a configured HAProxy). You'll need a system with 8GB of RAM and 40GB of disk. You don't want it to run the actual Tempest suite though, so include RUN_TEMPEST=hellno (anything that's not "yes" will do):

apt-get update && apt-get install -y git # Clone the source code git clone https://github.com/stackforge/os-ansible-deployment /opt/os-ansible-deployment # Change your directory cd /opt/os-ansible-deployment # Checkout your desired branch (master for bleeding edge) git checkout kilo # Run the script from the root directory of the cloned repository RUN_TEMPEST=no ./scripts/gate-check-commit.sh

For my purposes, I need the following setup:

So, I need my local Horizon to talk to a remote stack, and the default OSAD install has all of the Admin services accessed locally-only. We need to reconfigure it just a little to have it expose the public interface for all of those services. We can also edit the configuration to reduce the number of services started: I don't need to set up Horizon at all, and don't need a large mysql and rabbitmq cluster either.

So, the initial steps are very similar:

# Clone the source code git clone https://github.com/stackforge/os-ansible-deployment /opt/os-ansible-deployment # Change your directory cd /opt/os-ansible-deployment # Checkout your desired branch. git checkout master # Bootstrap the env ./scripts/bootstrap-aio.sh # Bootstrap Ansible ./scripts/bootstrap-ansible.sh # Set the internal address to the external sed -i "s/internal_lb_vip_address:.*/internal_lb_vip_address: \"{{ external_lb_vip_address }}\"/" \ /etc/openstack_deploy/openstack_user_config.yml​

Now we're going to edit the configuration so we don't set up all those unnecessary services. Open /etc/openstack_deploy/openstack_user_config.yml in an editor and turn off the Horizon container creation by editing:

os-infra_hosts: aio1: # Horizon is set to multiple to test clustering. This test only requires x2. affinity: horizon_container: 2 ip: 172.29.236.100

to:

os-infra_hosts: aio1: # Horizon is set to multiple to test clustering. This test only requires x2. affinity: horizon_container: 0 ip: 172.29.236.100

Similar edits can be made to reduce the size of the Galera and RabbitMQ clusters from 3 to 1 in the "galera_container" and "rabbit_mq_container" settings.

Now we can continue on and create the stack:

# Enter the playbooks directory pushd playbooks # Setup all the things openstack-ansible haproxy-install.yml openstack-ansible setup-everything.yml popd

The stack will be empty (no networks, flavours or images) so to add some, I run:

pushd playbooks openstack-ansible os-tempest-install.yml popd

This sets up the tempest environment but does not run the tests.

A Keystone endpoint will be created on port 5000 on the public IP of the host you set OSAD up on. This is the HAProxy (load-balancer) endpoint, so it's there no matter how many actual Keystones are set up by the OSAD setup.