OpenStack-Multa Part 3: Installing OpenStack using OpenStack-Ansible

In part 1 and 2 of this series, I covered how to deploy the VMs we’ll use to run a nested virtualisation version of OpenStack and how to prepare them for the installation. This instalment will provide more detail around the key steps to a successful OpenStack installation using OpenStack-Ansible.

There are two main files which OpenStack-Ansible uses to understand how we want OpenStack to be deployed, these are:

openstack_user_config.yml

user_variables.yml

  • specifies container networking parameters
  • specifies container settings
  • allocates which nodes services will run on
  • contains settings for Ceph
  • specifies security settings
  • specifies RAM and CPU allocation ratios
  • contains Glance and Ceph settings
  • contains neutron mode
  • contains HAProxy settings

 

When modifying this repo to run on a different environment, these two files, along with other variable files in /group_vars and /hosts_vars, and all files within the /files directory will need to be carefully examined and updated to reflect any changes you might’ve made. The final playbooks required to complete the installation and configuration of OpenStack are as follows:

OSA Git

OSA Git downloads the configured version of OpenStack onto the deployment server, which by default is controller1.  The version of OpenStack to install is defined by the osa_version variable in /group_vars/general/vars.yml

To clone your chosen version of OpenStack onto controller1, run the following command from your deployment host:

ansible-playbook osa-git.yml

OSA Deploy

This is the big play which actually installs OpenStack. The configuration process takes a couple of hours to complete – this is where the email progress alerts become incredibly helpful.  The process starts by bootstrapping various host nodes, and then generates the openstack_user_config.yml and user_variables.yml files, which control the deployment of OpenStack.

The swift.yml file which specifies the configuration for Swift is also pushed out to the deployment server. After running setup-hosts.yml on the deployment server, you then need to tweak the configuration of nova to fix a bug with services not reloading, before running setup-infrastructure.yml and setup-openstack.yml

To start the installation, run the following command from your deployment host:

ansible-playbook osa-deploy.yml

Console

If everything went without a hitch, you should have achieved a clean installation of OpenStack, running in a nested virtualisation layer on top of an OpenStack IaaS platform. The console role will create a Console VM which can be used for ‘local management’ of the environment, but also automation of initial configuration, images, and several test ‘projects’ and ‘users’.

To deploy the console and then setup OpenStack, run the following command from your deployment host:

ansible-playbook console-vm.yml

Summary

You should now have a fully functioning deployment of OpenStack, configured with test projects, users and images you can leverage for testing the environment. You should also be able to access the Horizon UI by using the Public IP address assigned to the ‘lb’ VM, from your remote deployment workstation, or utilise the ‘console’ VM for access from within the Public Cloud.

Keep an eye out for the final instalment of this series, where I’ll cover how to use OpenVPN to connect to VMs running in the environment. In the meantime, go ahead and check out part 1 and part 2 of the series.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here