Ansible playbooks for deploying OpenStack.
Go to file
Kevin Carter 456d5f2ee2
Added LC_ALL to openrc
This commit adds the LC_ALL export to the openrc file to ensure that
the openstack clients and system work with different preset local
settings.

Change-Id: I9f62b9b3db50b70ebdddc724215ebd3b0a138e42
Closes-Bug: #1408935
2015-10-06 17:58:24 -05:00
doc Horizon docs have HAProxy headings 2015-10-02 07:37:27 -05:00
etc Add SSL/TLS listener to RabbitMQ 2015-09-25 08:11:54 -05:00
playbooks Added LC_ALL to openrc 2015-10-06 17:58:24 -05:00
scripts Merge "Add confirmation to teardown.sh" 2015-10-01 15:08:54 +00:00
.gitignore Fix the path of build docs in .gitignore 2015-09-22 16:32:06 +05:30
.gitreview Update .gitreview for project rename 2015-09-11 20:58:10 +00:00
ansible-role-requirements.yml.example Convert existing roles into galaxy roles 2015-02-18 10:56:25 +00:00
CONTRIBUTING.rst Rename everything for the osad to osa name change 2015-09-12 02:31:21 +01:00
dev-requirements.txt Adds a pep8 target to tox.ini 2015-08-14 11:42:26 +00:00
development-stack.rst Rename everything for the osad to osa name change 2015-09-12 02:31:21 +01:00
LICENSE.txt Add profiling for Ansible tasks 2015-09-09 15:40:24 +00:00
README.rst Add profiling for Ansible tasks 2015-09-09 15:40:24 +00:00
requirements.txt Update how neutron migrations are handled 2015-09-03 05:45:35 +00:00
setup.cfg Rename everything for the osad to osa name change 2015-09-12 02:31:21 +01:00
setup.py Uses tox for automating documentation builds 2015-08-12 06:32:40 +01:00
tox.ini Fix incorrect tox.ini config 2015-10-02 09:58:19 +01:00

OpenStack Ansible Deployment

date

2015-02-02 22:00

tags

lxc, openstack, cloud, ansible

category

*nix

Playbooks

There are several playbooks within that will setup hosts for use in OpenStack Cloud. The playbooks will enable LXC on hosts and provides the ability to deploy LXC containers for use within openstack.

Plays:
  • setup-hosts.yml Performs host setup for use with LXC in the OpenStack hosts.
  • setup-infrastructure.yml Performs all of the setup for all infrastructure components.
  • setup-openstack.yml Performs all of the setup for all of the OpenStack components.
  • If you dont want to run plays individually you can simply run setup-everything.yml which will perform all of the setup and installation for you.
Basic Setup:
  1. If you have any roles that you'd like to have pulled in that are outside the scope and or replace modules within this repository please add them to the ansible-role-requirements.yml file. In this file you will want to fill in the details for the role you want to pull in using standard ansible galaxy format.
- name: SuperAwesomeModule
  src: https://github.com/super-user/SuperAwesomeModule
  version: master
  1. Run the ./scripts/bootstrap-ansible.sh script, which will install, pip, ansible 1.9.x, all of the required python packages, and bring in any third party ansible roles that you may want to add to the deployment.
  2. Copy the etc/openstack_deploy directory to /etc/openstack_deploy.
  3. Fill in your openstack_deploy/openstack_user_config.yml, openstack_deploy/user_secrets.yml and openstack_deploy/user_variables.yml files which you've just copied to your /etc/ directory.
  4. Generate all of your random passwords executing scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml.
  5. Accomplish all of the host networking that you want to use within the deployment. See the etc/network directory in this repository for an example network setup.
  6. When ready change to the playbooks/ directory and execute your desired plays. IE:
openstack-ansible setup-everything.yml

Notes

  • If you run the ./scripts/bootstrap-ansible.sh script a wrapper script will be added to your system that wraps the ansible-playbook command to simplify the arguments required to run openstack ansible plays. The name of the wrapper script is openstack-ansible.
  • The lxc network is created within the lxcbr0 interface. This supports both NAT networks as well as more traditional networking. If NAT is enabled (default) the IPtables rules will be created along with the interface as a post-up processes. If you ever need to recreate the rules and or restart the dnsmask process you can bounce the interface IE: ifdown lxcb0; ifup lxcbr0 or you can use the lxc-system-manage command.
  • The tool lxc-system-manage is available on all lxc hosts and can assist in recreating parts of the LXC system whenever its needed.
  • Inventory is generated by executing the playbooks/inventory/dynamic_inventory.py script. This is configured in the playbooks/ansible.cfg file.
  • If you don't use the pw-token-gen.py script you will want to ensure the permissions on /etc/openstack_deploy/user_secrets.yml are more secure. chmod 0600 /etc/openstack_deploy/user_secrets.yml
  • Finding slow Ansible tasks is easier with the profile_tasks callback plugin. Review the notes in playbooks/plugins/callbacks/profile_tasks.py to enable it.

Bugs and Blueprints

Everything we do is in launchpad and gerrit. If you'd like to raise a bug, feature request, or are looking for ways to contribute please go to "https://launchpad.net/openstack-ansible".

Documentation

To build the docs make sure that you have installed the python requirements as found within the dev-requirements.txt file and then run the following command from within the doc directory.

make html