Add support for deploying Zookeeper

Previously reviewed here:

https://github.com/stackhpc/kayobe/pull/136

Change-Id: I100a649f9bd659dde8a68684303c4eb4f654414d
Task: 6696
Story: 2001627
This commit is contained in:
Doug Szumski 2018-03-01 15:42:38 +00:00
parent bc5f3aba90
commit 87b458c8cf
14 changed files with 50 additions and 3 deletions

View File

@ -181,6 +181,8 @@ overcloud_container_image_regex_map:
enabled: "{{ kolla_enable_swift | bool }}" enabled: "{{ kolla_enable_swift | bool }}"
- regex: tgtd - regex: tgtd
enabled: "{{ kolla_enable_cinder | bool or kolla_enable_ironic | bool }}" enabled: "{{ kolla_enable_cinder | bool or kolla_enable_ironic | bool }}"
- regex: zookeeper
enabled: "{{ kolla_enable_zookeeper | bool or kolla_enable_kafka | bool }}"
# List of regular expressions matching names of container images to build for # List of regular expressions matching names of container images to build for
# overcloud hosts. # overcloud hosts.
@ -302,6 +304,8 @@ kolla_enable_haproxy: "yes"
kolla_enable_heat: "yes" kolla_enable_heat: "yes"
kolla_enable_horizon: "yes" kolla_enable_horizon: "yes"
kolla_enable_ironic: "yes" kolla_enable_ironic: "yes"
# Kafka is not currently supported
kolla_enable_kafka: "no"
kolla_enable_kibana: "{{ 'yes' if kolla_enable_central_logging | bool else 'no' }}" kolla_enable_kibana: "{{ 'yes' if kolla_enable_central_logging | bool else 'no' }}"
kolla_enable_magnum: "no" kolla_enable_magnum: "no"
kolla_enable_manila: "no" kolla_enable_manila: "no"
@ -315,6 +319,7 @@ kolla_enable_osprofiler: "no"
kolla_enable_sahara: "no" kolla_enable_sahara: "no"
kolla_enable_skydive: "no" kolla_enable_skydive: "no"
kolla_enable_swift: "no" kolla_enable_swift: "no"
kolla_enable_zookeeper: "no"
############################################################################### ###############################################################################
# Passwords and credentials. # Passwords and credentials.

View File

@ -113,6 +113,7 @@
- { name: neutron_ml2, file: neutron/ml2_conf.ini } - { name: neutron_ml2, file: neutron/ml2_conf.ini }
- { name: nova, file: nova.conf } - { name: nova, file: nova.conf }
- { name: sahara, file: sahara.conf } - { name: sahara, file: sahara.conf }
- { name: zookeeper, file: zookeeper.cfg }
- name: Initialise a fact containing extra configuration - name: Initialise a fact containing extra configuration
set_fact: set_fact:
@ -213,4 +214,5 @@
kolla_extra_neutron_ml2: "{{ kolla_extra_config.neutron_ml2 | default }}" kolla_extra_neutron_ml2: "{{ kolla_extra_config.neutron_ml2 | default }}"
kolla_extra_nova: "{{ kolla_extra_config.nova | default }}" kolla_extra_nova: "{{ kolla_extra_config.nova | default }}"
kolla_extra_sahara: "{{ kolla_extra_config.sahara | default }}" kolla_extra_sahara: "{{ kolla_extra_config.sahara | default }}"
kolla_extra_zookeeper: "{{ kolla_extra_config.zookeeper | default }}"
kolla_extra_config_path: "{{ kayobe_config_path }}/kolla/config" kolla_extra_config_path: "{{ kayobe_config_path }}/kolla/config"

View File

@ -207,6 +207,7 @@ kolla_openstack_logging_debug:
#kolla_enable_horizon: #kolla_enable_horizon:
#kolla_enable_influxdb: #kolla_enable_influxdb:
#kolla_enable_ironic: #kolla_enable_ironic:
#kolla_enable_kafka:
#kolla_enable_kuryr: #kolla_enable_kuryr:
#kolla_enable_magnum: #kolla_enable_magnum:
#kolla_enable_manila: #kolla_enable_manila:
@ -227,6 +228,7 @@ kolla_openstack_logging_debug:
#kolla_enable_telegraf: #kolla_enable_telegraf:
#kolla_enable_tempest: #kolla_enable_tempest:
#kolla_enable_watcher: #kolla_enable_watcher:
#kolla_enable_zookeeper:
####################### #######################
# Nova options # Nova options

View File

@ -199,3 +199,6 @@ control
[skydive:children] [skydive:children]
monitoring monitoring
[zookeeper:children]
monitoring

View File

@ -118,6 +118,7 @@
- enable_ironic - enable_ironic
- enable_neutron - enable_neutron
- enable_nova - enable_nova
- enable_zookeeper
- grafana_admin_username - grafana_admin_username
- name: Check whether inventory files exist - name: Check whether inventory files exist

View File

@ -121,6 +121,7 @@
kolla_enable_tempest: True kolla_enable_tempest: True
kolla_enable_trove: True kolla_enable_trove: True
kolla_enable_watcher: True kolla_enable_watcher: True
kolla_enable_zookeeper: True
kolla_enable_zun: True kolla_enable_zun: True
kolla_extra_globals: kolla_extra_globals:
extra-global-1: "extra-val-1" extra-global-1: "extra-val-1"
@ -253,6 +254,7 @@
#enable_tempest: True #enable_tempest: True
#enable_trove: True #enable_trove: True
#enable_watcher: True #enable_watcher: True
#enable_zookeeper: True
#enable_zun: True #enable_zun: True
extra-global-1: "extra-val-1" extra-global-1: "extra-val-1"
extra-global-2: "extra-val-2" extra-global-2: "extra-val-2"

View File

@ -118,4 +118,5 @@ kolla_feature_flags:
- tempest - tempest
- trove - trove
- watcher - watcher
- zookeeper
- zun - zun

View File

@ -348,3 +348,12 @@ kolla_extra_sahara:
# Whether to enable swift. # Whether to enable swift.
kolla_enable_swift: kolla_enable_swift:
###############################################################################
# Zookeeper configuration.
# Whether to enable Zookeeper.
kolla_enable_zookeeper:
# Free form extra configuration to append to zookeeper.cfg.
kolla_extra_zookeeper:

View File

@ -51,7 +51,8 @@ def test_service_config_directory(host, path):
'neutron', 'neutron',
'nova', 'nova',
'sahara', 'sahara',
'swift']) 'swift',
'zookeeper'])
def test_service_config_directory_absent(host, path): def test_service_config_directory_absent(host, path):
path = os.path.join('/etc/kolla/config', path) path = os.path.join('/etc/kolla/config', path)
utils.test_path_absent(host, path) utils.test_path_absent(host, path)

View File

@ -78,6 +78,10 @@ provisioner:
[extra-sahara.conf] [extra-sahara.conf]
foo=bar foo=bar
kolla_enable_swift: True kolla_enable_swift: True
kolla_enable_zookeeper: True
kolla_extra_zookeeper: |
[extra-zookeeper.cfg]
foo=bar
lint: lint:
name: ansible-lint name: ansible-lint
scenario: scenario:

View File

@ -44,7 +44,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
'neutron', 'neutron',
'nova', 'nova',
'sahara', 'sahara',
'swift']) 'swift',
'zookeeper'])
def test_service_config_directory(host, path): def test_service_config_directory(host, path):
path = os.path.join('/etc/kolla/config', path) path = os.path.join('/etc/kolla/config', path)
utils.test_directory(host, path) utils.test_directory(host, path)
@ -65,7 +66,8 @@ def test_service_config_directory(host, path):
'murano.conf', 'murano.conf',
'neutron.conf', 'neutron.conf',
'nova.conf', 'nova.conf',
'sahara.conf']) 'sahara.conf',
'zookeeper.cfg'])
def test_service_ini_file(host, path): def test_service_ini_file(host, path):
# TODO(mgoddard): Check more of config file contents. # TODO(mgoddard): Check more of config file contents.
path = os.path.join('/etc/kolla/config', path) path = os.path.join('/etc/kolla/config', path)

View File

@ -29,6 +29,7 @@
- { src: nova.conf.j2, dest: nova.conf, enabled: "{{ kolla_enable_nova }}" } - { src: nova.conf.j2, dest: nova.conf, enabled: "{{ kolla_enable_nova }}" }
- { src: pxelinux.default.j2, dest: ironic/pxelinux.default, enabled: "{{ kolla_enable_ironic }}" } - { src: pxelinux.default.j2, dest: ironic/pxelinux.default, enabled: "{{ kolla_enable_ironic }}" }
- { src: sahara.conf.j2, dest: sahara.conf, enabled: "{{ kolla_enable_sahara }}" } - { src: sahara.conf.j2, dest: sahara.conf, enabled: "{{ kolla_enable_sahara }}" }
- { src: zookeeper.cfg.j2, dest: zookeeper.cfg, enabled: "{{ kolla_enable_zookeeper }}" }
when: item.enabled | bool when: item.enabled | bool
- name: Ensure the ironic inspector kernel and ramdisk are downloaded - name: Ensure the ironic inspector kernel and ramdisk are downloaded

View File

@ -0,0 +1,9 @@
# {{ ansible_managed }}
{% if kolla_extra_zookeeper %}
#######################
# Extra configuration
#######################
{{ kolla_extra_zookeeper }}
{% endif %}

View File

@ -108,3 +108,8 @@ kolla_openstack_custom_config:
dest: "{{ kolla_node_custom_config_path }}/swift" dest: "{{ kolla_node_custom_config_path }}/swift"
patterns: "*" patterns: "*"
enabled: "{{ kolla_enable_swift }}" enabled: "{{ kolla_enable_swift }}"
# Zookeeper.
- src: "{{ kolla_extra_config_path }}/zookeeper"
dest: "{{ kolla_node_custom_config_path }}/zookeeper"
patterns: "*"
enabled: "{{ kolla_enable_zookeeper }}"