Merge "Deploy etcd in compute nodes when kuryr"
This commit is contained in:
commit
3a765500ce
@ -40,6 +40,7 @@ monitoring
|
||||
|
||||
[etcd:children]
|
||||
control
|
||||
compute
|
||||
|
||||
[karbor:children]
|
||||
control
|
||||
|
@ -58,6 +58,7 @@ monitoring
|
||||
|
||||
[etcd:children]
|
||||
control
|
||||
compute
|
||||
|
||||
[influxdb:children]
|
||||
monitoring
|
||||
|
@ -19,6 +19,11 @@ etcd_services:
|
||||
ETCD_OUT_FILE: "/var/log/kolla/etcd/etcd.log"
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
image: "{{ etcd_image_full }}"
|
||||
host_in_groups: >-
|
||||
{{
|
||||
inventory_hostname in groups['control']
|
||||
or (enable_kuryr | bool and inventory_hostname in groups['compute'])
|
||||
}}
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/etcd/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
|
@ -14,7 +14,7 @@
|
||||
volumes: "{{ service.volumes }}"
|
||||
when:
|
||||
- action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
- service.enabled | bool
|
||||
- service.host_in_groups | bool
|
||||
- config_json.changed | bool
|
||||
or etcd_container.changed | bool
|
||||
|
@ -1,19 +0,0 @@
|
||||
---
|
||||
- name: Running etcd bootstrap container
|
||||
vars:
|
||||
etcd: "{{ etcd_services['etcd'] }}"
|
||||
kolla_docker:
|
||||
action: "start_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
detach: False
|
||||
environment:
|
||||
KOLLA_BOOTSTRAP:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
image: "{{ etcd.image }}"
|
||||
labels:
|
||||
BOOTSTRAP:
|
||||
name: "bootstrap_etcd"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ etcd.volumes }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups[etcd.group][0] }}"
|
@ -5,8 +5,8 @@
|
||||
state: "directory"
|
||||
recurse: yes
|
||||
when:
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.value.enabled | bool
|
||||
- item.value.host_in_groups | bool
|
||||
with_dict: "{{ etcd_services }}"
|
||||
|
||||
- name: Copying over config.json files for services
|
||||
@ -15,8 +15,8 @@
|
||||
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
|
||||
register: etcd_config_jsons
|
||||
when:
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.value.enabled | bool
|
||||
- item.value.host_in_groups | bool
|
||||
with_dict: "{{ etcd_services }}"
|
||||
notify:
|
||||
- Restart etcd container
|
||||
@ -31,8 +31,8 @@
|
||||
register: check_etcd_containers
|
||||
when:
|
||||
- action != "config"
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.value.enabled | bool
|
||||
- item.value.host_in_groups | bool
|
||||
with_dict: "{{ etcd_services }}"
|
||||
notify:
|
||||
- Restart etcd container
|
||||
|
@ -1,7 +1,5 @@
|
||||
---
|
||||
- include: config.yml
|
||||
|
||||
- include: bootstrap.yml
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
@ -5,6 +5,6 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
image: "{{ item.value.image }}"
|
||||
when:
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.value.enabled | bool
|
||||
- item.value.host_in_groups | bool
|
||||
with_dict: "{{ etcd_services }}"
|
||||
|
Loading…
Reference in New Issue
Block a user