
The rabbitmq playbook is designed to run in parallel across the cluster. This causes an issue when upgrading rabbitmq to a new major or minor version because RabbitMQ does not support doing an online migration of datasets between major versions. while a minor release can be upgrade while online it is recommended to bring down the cluster to do any upgrade actions. The current configuration takes no account of this. Reference: https://www.rabbitmq.com/clustering.html#upgrading for further details. * A new variable has been added called `rabbitmq_upgrade`. This is set to false by default to prevent a new version being installed unintentionally. To run the upgrade, which will shutdown the cluster, the variable can be set to true on the commandline: Example: openstack-ansible -e rabbitmq_upgrade=true \ rabbitmq-install.yml * A new variable has been added called `rabbitmq_ignore_version_state` which can be set "true" to ignore the package and version state tasks. This has been provided to allow a deployer to rerun the plays in an environment where the playbooks have been upgraded and the default version of rabbitmq has changed within the role and the deployer has elected to upgraded the installation at that time. This will ensure a deployer is able to recluster an environment as needed without effecting the package state. Example: openstack-ansible -e rabbitmq_ignore_version_state=true \ rabbitmq-install.yml * A new variable has been added `rabbitmq_primary_cluster_node` which allows a deployer to elect / set the primary cluster node in an environment. This variable is used to determine the restart order of RabbitMQ nodes. IE this will be the last node down and first one up in an environment. By default this variable is set to: rabbitmq_primary_cluster_node: "{{ groups['rabbitmq_all'][0] }}" scripts/run-upgrade.sh has been modified to pass 'rabbitmq_upgrade=true' on the command line so that RabbitMQ can be upgraded as part of the upgrade between OpenStack versions. DocImpact Change-Id: I17d4429b9b94d47c1578dd58a2fb20698d1fe02e Closes-bug: #1474992
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:
-
- 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.
- 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 part ansible roles that you may want to add to the deployment. - Copy the
etc/openstack_deploy
directory to/etc/openstack_deploy
. - Fill in your
openstack_deploy/openstack_user_config.yml
,openstack_deploy/user_secrets.yml
andopenstack_deploy/user_variables.yml
files which you've just copied to your/etc/
directory. - Generate all of your random passwords executing
scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml
. - 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. - When ready change to the
playbooks/
directory and execute your desired plays. IE:
- 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
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 thelxc-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 theplaybooks/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
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.
Description
Languages
Python
61.6%
Shell
26.9%
Jinja
11.4%
Smarty
0.1%