Rabbitmq bootstrap enhancement

Using rabbitmq service defined in default when
boot rabbitmq_bootstrap.
Not a bug here, just an enhancement.

Change-Id: I79f0f7efe3308ed4eb898b85a6370be1bd637d9a
This commit is contained in:
MinSun 2018-06-01 10:22:23 +08:00
parent 9568f1c790
commit ddc564d21f
2 changed files with 11 additions and 10 deletions

View File

@ -7,6 +7,11 @@ rabbitmq_services:
group: "{{ role_rabbitmq_groups }}"
enabled: true
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:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
RABBITMQ_CLUSTER_COOKIE: "{{ role_rabbitmq_cluster_cookie }}"

View File

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