Remove bootstrap.yml abstraction for rabbitmq

Change-Id: I5b163b6a5c0e084deec5937e4fbf04d11fdde01f
Partially-Implements: blueprint remove-abstraction-ansible
This commit is contained in:
Sam Yaple 2015-08-13 10:29:59 +00:00 committed by Steven Dake
parent 759cc41647
commit 8419902e8e
3 changed files with 56 additions and 37 deletions

View File

@ -4,15 +4,9 @@ project_name: "rabbitmq"
####################
# Docker
####################
docker_message_broker_registry: "{{ docker_registry ~ '/' if docker_registry else '' }}"
docker_message_broker_namespace: "{{ docker_namespace }}"
kolla_message_broker_base_distro: "{{ kolla_base_distro }}"
kolla_message_broker_install_type: "{{ kolla_install_type }}"
kolla_message_broker_container_name: "rabbitmq"
docker_message_broker_image: "{{ docker_message_broker_registry }}{{ docker_message_broker_namespace }}/{{ kolla_message_broker_base_distro }}-{{ kolla_message_broker_install_type }}-{{ kolla_message_broker_container_name }}"
docker_message_broker_tag: "{{ openstack_release }}"
docker_message_broker_image_full: "{{ docker_message_broker_image }}:{{ docker_message_broker_tag }}"
rabbitmq_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-rabbitmq"
rabbitmq_tag: "{{ openstack_release }}"
rabbitmq_image_full: "{{ rabbitmq_image }}:{{ rabbitmq_tag }}"
####################

View File

@ -7,32 +7,48 @@
failed_when: False
always_run: True
- include: ../../start.yml
vars:
container_command: "/bin/sleep infinity"
container_image: "{{ docker_message_broker_image_full }}"
container_name: "rabbitmq_data"
container_volumes:
- "/var/lib/rabbitmq/"
- name: Starting RabbitMQ data container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: rabbitmq_data
image: "{{ rabbitmq_image_full }}"
command: "/bin/sleep infinity"
volumes: "/var/lib/rabbitmq/"
- include: ../../start.yml
vars:
container_detach: "False"
container_environment:
- name: Starting RabbitMQ bootstrap container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "no"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: rabbitmq_bootstrap
image: "{{ rabbitmq_image_full }}"
volumes: "{{ node_config_directory }}/rabbitmq/:/opt/kolla/rabbitmq/:ro"
volumes_from:
- "rabbitmq_data"
env:
KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
RABBITMQ_CLUSTER_COOKIE: "{{ rabbitmq_cluster_cookie }}"
container_image: "{{ docker_message_broker_image_full }}"
container_name: "rabbitmq_bootstrap"
container_restart_policy: "no"
container_volumes:
- "{{ node_config_directory }}/rabbitmq/:/opt/kolla/rabbitmq/:ro"
container_volumes_from:
- "rabbitmq_data"
when: exists.rc != 0
- name: Cleaning up boostrap container
docker:
image: "{{ docker_message_broker_image_full }}"
image: "{{ rabbitmq_image_full }}"
name: "rabbitmq_bootstrap"
state: "absent"

View File

@ -1,11 +1,20 @@
---
- include: ../../start.yml
vars:
container_environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
container_image: "{{ docker_message_broker_image_full }}"
container_name: "rabbitmq"
container_volumes:
- "{{ node_config_directory }}/rabbitmq/:/opt/kolla/rabbitmq/:ro"
container_volumes_from:
- name: Starting RabbitMQ bootstrap container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: rabbitmq
image: "{{ rabbitmq_image_full }}"
volumes: "{{ node_config_directory }}/rabbitmq/:/opt/kolla/rabbitmq/:ro"
volumes_from:
- "rabbitmq_data"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"