Merge "Rabbitmq bootstrap enhancement"

This commit is contained in:
Zuul 2018-06-01 16:56:11 +00:00 committed by Gerrit Code Review
commit f7950466e3
2 changed files with 11 additions and 10 deletions

View File

@ -7,6 +7,11 @@ rabbitmq_services:
group: "{{ role_rabbitmq_groups }}" group: "{{ role_rabbitmq_groups }}"
enabled: true enabled: true
image: "{{ rabbitmq_image_full }}" image: "{{ rabbitmq_image_full }}"
bootstrap_environment:
KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
RABBITMQ_CLUSTER_COOKIE: "{{ role_rabbitmq_cluster_cookie }}"
RABBITMQ_LOG_DIR: "/var/log/kolla/{{ project_name }}"
environment: environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
RABBITMQ_CLUSTER_COOKIE: "{{ role_rabbitmq_cluster_cookie }}" RABBITMQ_CLUSTER_COOKIE: "{{ role_rabbitmq_cluster_cookie }}"

View File

@ -7,22 +7,18 @@
register: rabbitmq_volume register: rabbitmq_volume
- name: Running RabbitMQ bootstrap container - name: Running RabbitMQ bootstrap container
vars:
service_name: "rabbitmq"
service: "{{ rabbitmq_services[service_name] }}"
kolla_docker: kolla_docker:
action: "start_container" action: "start_container"
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
detach: False detach: False
environment: environment: "{{ service.bootstrap_environment }}"
KOLLA_BOOTSTRAP: image: "{{ service.image }}"
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
RABBITMQ_CLUSTER_COOKIE: "{{ role_rabbitmq_cluster_cookie }}"
RABBITMQ_LOG_DIR: "/var/log/kolla/{{ project_name }}"
image: "{{ rabbitmq_image_full }}"
labels: labels:
BOOTSTRAP: BOOTSTRAP:
name: "{{ project_name }}_bootstrap" name: "{{ project_name }}_bootstrap"
restart_policy: "never" restart_policy: "never"
volumes: volumes: "{{ service.volumes }}"
- "{{ node_config_directory }}/{{ project_name }}/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ project_name }}:/var/lib/rabbitmq/"
when: rabbitmq_volume | changed when: rabbitmq_volume | changed