An ansible playbook to deploy openstack components to the cluster
The playbook is composed according to official openstack guides with a primary purpose to learn openstack deployment in a nutshell. Another reason is to fill the gap between official full-fledged and devel deployment guides. At the current state the playbook is able to deploy a fully functional openstack cluster. Also it's possible to deploy everything on a single(VM) host. Work on HA deployment is in progress. So if you are looking for a simple setup and can afford the lack of HA - than you are on the right place. Also please read requirements section carefully.
The playbook is able to setup the core services described in the official guide:
- keystone
- glance
- cinder
- nova
- neutron
- heat
- swift
- ceilometer
- horizon
The configuration is very simple:
It’s only required to place hostname(s) to the controller and compute groups in hosts file and carefully fill the required group_vars parameters.
The playbook contains configuration files in roles directories. If you need to add or change any parameter you can edit the configuration file which can be found in roles/service/[files|templates] directory.
Besides of cluster( or single host ) setup, the playbook also generates cluster manager configuration file located at workdir/services.xml. Please visit clinit manager home page and see manual. The rpm package can be downloaded from clinit-1.0-ssv1.el6.noarch.rpm. After clinit package installed you’ll be able to stop, start and see status of services on the cluster.
Service configuration performed using the hosts file. The empty hosts file is supplied with the playbook. You must not remove any existing group. Leave the group empty if you don't need services the group configures. The same hostname can be placed to any hosts group. As an instance if you want setup everything on one host, just put the same hostname to each hosts group. As far, only controller and compute groups are well tested and supported.
Please see group_vars/all and supply appropriate configuration for the required networking and disk partition parameters.
To start deployment run:
ansible-playbook -i hosts site.yml
if you have installed clinit, after deployment you can also run:
clinit -S workdir/services.xml status
clinit -S workdir/services.xml tree
- package : install rpm packages
- config : deploy configuration files, useful if you want just change configuration on hosts.
- test : run test actions
Also most hostgroups have the tag with similar name.
- Ansible >= 2.1.1.0 is required. Please read official documentation to install it.
- Openstack version: liberty or mitaka - please use appropriate branch, mitaka is currently at the master branch.
- remote_user = root must be configured for ansible.
- OS version: Redhat/CentOS 7
- The required for Openstack repositories have to be properly configured.
- SSH key passwordless authentication must be configured for root account.
- se_linux must be disabled.
- requiretty should be switched off in /etc/sudoers file.
- 2 interfaces must be present: one for private and one for provider(public) network.
- at least one spare partition must be available for cinder( block storage ) service.