Add support for configuring MariaDB

This enables:

* Disabling MariaDB if external MariaDB is used
* Merging additional configuration with the default Kolla
  provided configuration for MariaDB

Story: 2002704
Task: 22545
Change-Id: I345f56d50dd64b516d563a025ec877bc4a4034e1
This commit is contained in:
Doug Szumski 2018-06-26 16:56:42 +01:00
parent 3037361cb0
commit 0353dba39a
13 changed files with 44 additions and 0 deletions

View File

@ -162,6 +162,8 @@ overcloud_container_image_regex_map:
enabled: "{{ kolla_enable_magnum | bool }}"
- regex: manila
enabled: "{{ kolla_enable_manila | bool }}"
- regex: mariadb
enabled: "{{ kolla_enable_mariadb | bool }}"
- regex: murano
enabled: "{{ kolla_enable_murano | bool }}"
- regex: mariadb
@ -319,6 +321,7 @@ kolla_enable_kafka: "no"
kolla_enable_kibana: "{{ 'yes' if kolla_enable_central_logging | bool else 'no' }}"
kolla_enable_magnum: "no"
kolla_enable_manila: "no"
kolla_enable_mariadb: "yes"
# Support for Monasca in Kolla is a work in progress. This currently relies
# on an out-of-band Monasca installation.
kolla_enable_monasca: "no"

View File

@ -110,6 +110,7 @@
- { name: ironic_dnsmasq, file: ironic/ironic-dnsmasq.conf }
- { name: kafka, file: kafka.server.properties }
- { name: magnum, file: magnum.conf }
- { name: mariadb, file: galera.cnf }
- { name: murano, file: murano.conf }
- { name: neutron, file: neutron.conf }
- { name: neutron_ml2, file: neutron/ml2_conf.ini }
@ -213,6 +214,7 @@
kolla_extra_ironic_dnsmasq: "{{ kolla_extra_config.ironic_dnsmasq | default }}"
kolla_extra_kafka: "{{ kolla_extra_config.kafka | default }}"
kolla_extra_magnum: "{{ kolla_extra_config.magnum | default }}"
kolla_extra_mariadb: "{{ kolla_extra_config.mariadb | default }}"
kolla_extra_murano: "{{ kolla_extra_config.murano | default }}"
kolla_extra_neutron: "{{ kolla_extra_config.neutron | default }}"
kolla_extra_neutron_ml2: "{{ kolla_extra_config.neutron_ml2 | default }}"

View File

@ -117,6 +117,7 @@
- enable_ironic
- enable_kafka
- enable_influxdb
- enable_mariadb
- enable_neutron
- enable_nova
- enable_zookeeper

View File

@ -93,6 +93,7 @@
kolla_enable_manila: True
kolla_enable_manila_backend_generic: True
kolla_enable_manila_backend_hnas: True
kolla_enable_mariadb: True
kolla_enable_mistral: True
kolla_enable_monasca: True
kolla_enable_mongodb: True
@ -227,6 +228,7 @@
#enable_manila: True
#enable_manila_backend_generic: True
#enable_manila_backend_hnas: True
#enable_mariadb: True
#enable_mistral: True
#enable_mongodb: True
#enable_murano: True

View File

@ -99,6 +99,7 @@ kolla_feature_flags:
- manila_backend_hnas
- manila_backend_cephfs_native
- manila_backend_cephfs_nfs
- mariadb
- mistral
- mongodb
- monasca

View File

@ -273,6 +273,15 @@ kolla_enable_magnum:
# Free form extra configuration to append to magnum.conf.
kolla_extra_magnum:
###############################################################################
# MariaDB configuration.
# Whether to enable MariaDB.
kolla_enable_mariadb:
# Free form extra configuration to append to galera.cnf.
kolla_extra_mariadb:
###############################################################################
# Manila configuration.

View File

@ -49,6 +49,7 @@ def test_service_config_directory(host, path):
'kafka',
'magnum',
'manila',
'mariadb',
'murano',
'neutron',
'nova',

View File

@ -63,6 +63,10 @@ provisioner:
[extra-magnum.conf]
foo=bar
kolla_enable_manila: true
kolla_enable_mariadb: true
kolla_extra_mariadb: |
[extra-galera.cnf]
foo=bar
kolla_enable_murano: true
kolla_enable_monasca: true
kolla_extra_murano: |

View File

@ -42,6 +42,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
'keystone',
'magnum',
'manila',
'mariadb',
'murano',
'neutron',
'nova',
@ -58,6 +59,7 @@ def test_service_config_directory(host, path):
['ceph.conf',
'cinder.conf',
'designate.conf',
'galera.cnf',
'glance.conf',
'grafana.ini',
'heat.conf',

View File

@ -16,6 +16,7 @@
- { src: ceph.conf.j2, dest: ceph.conf, enabled: "{{ kolla_enable_ceph }}" }
- { src: cinder.conf.j2, dest: cinder.conf, enabled: "{{ kolla_enable_cinder }}" }
- { src: designate.conf.j2, dest: designate.conf, enabled: "{{ kolla_enable_designate }}" }
- { src: galera.cnf.j2, dest: galera.cnf, enabled: "{{ kolla_enable_mariadb }}" }
- { src: glance.conf.j2, dest: glance.conf, enabled: "{{ kolla_enable_glance }}" }
- { src: grafana.ini.j2, dest: grafana.ini, enabled: "{{ kolla_enable_grafana }}" }
- { src: heat.conf.j2, dest: heat.conf, enabled: "{{ kolla_enable_heat }}" }

View File

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

View File

@ -90,6 +90,11 @@ kolla_openstack_custom_config:
dest: "{{ kolla_node_custom_config_path }}/manila"
patterns: "*"
enabled: "{{ kolla_enable_manila }}"
# MariaDB.
- src: "{{ kolla_extra_config_path }}/mariadb"
dest: "{{ kolla_node_custom_config_path }}/mariadb"
patterns: "*"
enabled: "{{ kolla_enable_mariadb }}"
# Murano.
- src: "{{ kolla_extra_config_path }}/murano"
dest: "{{ kolla_node_custom_config_path }}/murano"

View File

@ -0,0 +1,4 @@
---
features:
- Add support for configuring MariaDB to support customising the Kolla
deployment, or using an external DB.