Ansible role to deploy multiple clouds resources
Go to file
Ricardo Carrillo Cruz 205f4d31de Add support for clustered servers
Certain services are expected to be served by more than one server,
think of git mirrors, zuul workers etc.
While we could define all of them with numbered pattern manually
in the resources.yaml file, this gets unwieldy and boring
if the count is large, repeating on and on the same
server stanzas with just <service_name><$NODE_COUNT>.
This change allows to put a 'node_count' attribute to the server
resource. With it, the role will create as many servers as
'node_count' by numbering the servers as <server_name><$NODE_COUNT>.
e.g.

servers:
  - name: logstash-worker.openstack.org
    image: ubuntu-trusty
    flavor: d1
    node_count: 2

That would make the role to create two server instances named
'logstash-worker01.openstack.org' and 'logstash-worker02.openstack.org'

Change-Id: I220a2786efe56187f60f1eed2f32e661e6d3ed3f
2016-07-20 14:49:03 +02:00
defaults Add ability to generate keypair on-the-fly 2016-06-22 13:14:03 +00:00
doc/source Add doc folder 2016-05-04 13:41:57 +02:00
meta Add metadata to role 2016-04-29 22:41:47 +02:00
tasks Add support for clustered servers 2016-07-20 14:49:03 +02:00
tests Add support for clustered servers 2016-07-20 14:49:03 +02:00
.gitignore Add .gitignore 2016-05-04 13:39:21 +02:00
.gitreview Add .gitreview file 2016-05-04 13:06:30 +02:00
LICENSE Add Apache license file 2016-05-04 13:07:36 +02:00
README.rst Switch README from markdown to rst 2016-05-04 13:31:43 +02:00
requirements.txt Pull shade from master on venv 2016-07-20 12:15:51 +02:00
resources.yml.sample Add initial documentation 2016-04-04 11:51:10 +00:00
setup.cfg Add setup.py and setup.cfg 2016-05-04 13:35:32 +02:00
setup.py Add setup.py and setup.cfg 2016-05-04 13:35:32 +02:00
test-requirements.txt Add test-requirements.txt for tox venvs 2016-05-05 09:08:45 +00:00
tox.ini Add ability to generate keypair on-the-fly 2016-06-22 13:14:03 +00:00

README.rst

ansible-role-cloud-launcher

Ansible role to launch multiple OpenStack Clouds resources

Description

ansible-role-cloud-launcher is an Ansible role that allows to launch multiple OpenStack clouds resources. Resources can be defined in a cloud by cloud basis or defined in a profile, which may be reused by more than one cloud.

Requirements

shade library needs to be installed, as that is required by the OpenStack Ansible modules.

Role Variables

The role expects variables fed by ansible-playbook on the CLI, for example:

ansible-playbook -i inventory play.yml -e "@resources.yml"

The role expects the resources variables file to have two dict variables, profiles and clouds.

profiles contains a list of OpenStack resources definitions that are meant to be reused by one or more clouds.

clouds contains a list of clouds the role will launch resources on. Each cloud definition will have the OSCC cloud name, a list of profiles the cloud will reuse and a list of resources specific to that cloud.

Please check resources.yml.sample on this repository for a full-blown example.

Dependencies

None

Example playbook

---
- hosts: localhost
  connection: local
  gather_facts: false
  roles:
    - { role: ansible-role-cloud-launcher }