d29ecbd64c
In before, etcd container is launched in compute node if kuryr is enabled. This logic breaks the all-in-one setup in which the etcd cluster is configured with two members (controller and compute) but it actually has one member only. However, even if kuryr is enabled, running etcd in compute node is not the common practice and kuryr has changed its devstack plugin to run etcd on controller only [1]. [1] https://review.openstack.org/#/c/514815/ Closes-Bug: #1790415 Change-Id: I701d495675178c3ed8ec1f00b31d09f198b38a6f
41 lines
1.8 KiB
YAML
41 lines
1.8 KiB
YAML
---
|
|
project_name: "etcd"
|
|
|
|
etcd_services:
|
|
etcd:
|
|
container_name: etcd
|
|
group: etcd
|
|
enabled: true
|
|
environment:
|
|
ETCD_DATA_DIR: "/var/lib/etcd"
|
|
ETCD_NAME: "{{ ansible_hostname }}"
|
|
ETCD_ADVERTISE_CLIENT_URLS: "{{ internal_protocol }}://{{ api_interface_address }}:{{ etcd_client_port }}"
|
|
ETCD_LISTEN_CLIENT_URLS: "{{ internal_protocol }}://{{ api_interface_address }}:{{ etcd_client_port }}"
|
|
ETCD_INITIAL_ADVERTISE_PEER_URLS: "{{ internal_protocol }}://{{ api_interface_address }}:{{ etcd_peer_port }}"
|
|
ETCD_LISTEN_PEER_URLS: "{{ internal_protocol }}://{{ api_interface_address }}:{{ etcd_peer_port }}"
|
|
ETCD_INITIAL_CLUSTER_TOKEN: "{{ etcd_cluster_token }}"
|
|
ETCD_INITIAL_CLUSTER: "{% for host in etcd_hosts %}{{ hostvars[host]['ansible_hostname'] }}={{ internal_protocol }}://{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ etcd_peer_port }}{% if not loop.last %},{% endif %}{% endfor %}"
|
|
ETCD_INITIAL_CLUSTER_STATE: "new"
|
|
ETCD_OUT_FILE: "/var/log/kolla/etcd/etcd.log"
|
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
image: "{{ etcd_image_full }}"
|
|
host_in_groups: "{{ inventory_hostname in etcd_hosts }}"
|
|
volumes:
|
|
- "{{ node_config_directory }}/etcd/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "kolla_etcd:/var/lib/etcd/"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
dimensions: "{{ etcd_dimensions }}"
|
|
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
etcd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-etcd"
|
|
etcd_tag: "{{ openstack_release }}"
|
|
etcd_image_full: "{{ etcd_image }}:{{ etcd_tag }}"
|
|
etcd_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
# List of hosts running etcd.
|
|
etcd_hosts: "{{ groups['control'] }}"
|