diff options
| author | Sam Yaple <sam@yaple.net> | 2015-03-28 17:16:24 -0500 |
|---|---|---|
| committer | Sam Yaple <sam@yaple.net> | 2015-03-28 17:56:21 -0500 |
| commit | 0f5af771ef8f68b2da0909ff4213c69af6a633d5 (patch) | |
| tree | 0547f3f5650cf1f22be6e8d6f4ce2012f04d08e9 | |
| parent | 62dbf832adfc220a0071bd928fd905d6781374dd (diff) | |
| download | kolla-0f5af771ef8f68b2da0909ff4213c69af6a633d5.tar.gz kolla-0f5af771ef8f68b2da0909ff4213c69af6a633d5.zip | |
Initial commit for adding ansible support
This adds a very basic structure to begin supporting ansible in Kolla.
Ansible can support complete idempotency, but wrapping docker-compose
does not allow idempotency at this time. These playbooks will be
extended to compensate for that in future patches.
Change-Id: I1c9e8d32321e2733f5a9b752edf74b4fe90317ed
| -rw-r--r-- | ansible/README.md | 42 | ||||
| -rw-r--r-- | ansible/inventory/all-in-one | 8 | ||||
| -rw-r--r-- | ansible/inventory/multinode | 14 | ||||
| -rw-r--r-- | ansible/roles/database/tasks/main.yml | 3 | ||||
| -rw-r--r-- | ansible/roles/message-broker/tasks/main.yml | 3 | ||||
| -rw-r--r-- | ansible/site.yml | 10 |
6 files changed, 80 insertions, 0 deletions
diff --git a/ansible/README.md b/ansible/README.md new file mode 100644 index 000000000..d1734ea30 --- /dev/null +++ b/ansible/README.md @@ -0,0 +1,42 @@ +Koalla - Kolla with ansible! +============================ + +Koalla extends the Kolla project past [TripleO][] into its own bonified +deployment system using [Ansible][] and [docker-compose][]. + +[TripleO]: https://wiki.openstack.org/wiki/TripleO +[Ansible]: https://docs.ansible.com +[docker-compose]: http://docs.docker.com/compose + + +Getting Started +=============== + +To run the ansible playbooks, you must specify an inventory file which tracks +all of the available nodes in your environment. With this inventory file +ansible will log into each node via ssh (configurable) and run tasks. Ansible +does not require password less logins via ssh, however it is highly recommended +to setup ssh-keys. More information on the ansible inventory file can be found +[here][]. + +[here]: https://docs.ansible.com/intro_inventory.html + + +Deploying +========= + +For AIO deploys, you can run the following commands. These will setup all of +the containers on your localhost. + +``` +$ cd ./kolla/ansible +$ ansible-playbook -i inventory/all-in-one site.yml +``` + + +Further Reading +=============== + +Ansible playbook documentation can be found [here][]. + +[here]: http://docs.ansible.com/playbooks.html diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one new file mode 100644 index 000000000..246ce4e92 --- /dev/null +++ b/ansible/inventory/all-in-one @@ -0,0 +1,8 @@ +[support] +localhost ansible_connection=local + +[database:children] +support + +[message-broker:children] +support diff --git a/ansible/inventory/multinode b/ansible/inventory/multinode new file mode 100644 index 000000000..a14fc6726 --- /dev/null +++ b/ansible/inventory/multinode @@ -0,0 +1,14 @@ +[support] +# These hostname must be resolvable from your deployment host +support01 ansible_ssh_user=sam +support02 ansible_ssh_user=sam +support03 ansible_ssh_user=sam + +# The above can also be specified as follows: +#support[01:03] ansible_ssh_user=sam + +[database:children] +support + +[message-broker:children] +support diff --git a/ansible/roles/database/tasks/main.yml b/ansible/roles/database/tasks/main.yml new file mode 100644 index 000000000..c624649c2 --- /dev/null +++ b/ansible/roles/database/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- name: Bringing up mariadb service(s) + command: docker-compose -f /root/kolla/compose/mariadb.yml up -d diff --git a/ansible/roles/message-broker/tasks/main.yml b/ansible/roles/message-broker/tasks/main.yml new file mode 100644 index 000000000..bec1f11d8 --- /dev/null +++ b/ansible/roles/message-broker/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- name: Bringing up rabbitmq service(s) + command: docker-compose -f /root/kolla/compose/rabbitmq.yml up -d diff --git a/ansible/site.yml b/ansible/site.yml new file mode 100644 index 000000000..feccbb0b3 --- /dev/null +++ b/ansible/site.yml @@ -0,0 +1,10 @@ +--- +- hosts: database + roles: + - database + tags: database + +- hosts: message-broker + roles: + - message-broker + tags: message-broker |
