Generate MySQL client config if service requires database
authorDamien Ciabrini <dciabrin@redhat.com>
Fri, 7 Jul 2017 14:44:26 +0000 (10:44 -0400)
committerDamien Ciabrini <dciabrin@redhat.com>
Thu, 27 Jul 2017 17:41:13 +0000 (13:41 -0400)
commit0cb45d65c607cf4eb9a4096c7cc3f1c8a5ca58b4
treecfff06cb08dd04a36e4c008cd9edddb29e2fa3fb
parent017f8b9b478e6e8a72cfb88cba54ce90b77e6532
Generate MySQL client config if service requires database

Services that access database have to read an extra MySQL configuration file
/etc/my.cnf.d/tripleo.cnf which holds client-only settings, like client bind
address and SSL configuration. The configuration file is thus used by
containerized services, but also by non-containerized services that still
run on the host.

In order to generate that client configuration file appropriately both on the
host and for containers, 1) the MySQLClient service must be included by the
role; 2) every containerized service which uses the database must include the
mysql::client profile in the docker-puppet config generation step.

By including the mysql::client profile in each containerized service, we ensure
that any change in configuration file will be reflected in the service's
/var/lib/config-data/{service}, and that paunch will restart the service's
container automatically.

We now only rely on MySQLClient from puppet/services, to make it possible to
generate /etc/my.cnf.d/tripleo.cnf on the host, and to set the hiera keys that
drive the generation of that config file in containers via docker-puppet.

We include a new YAML validation step to ensure that any service which depends
on MySQL will initialize the mysql::client profile during the docker-puppet
step.

Change-Id: I0dab1dc9caef1e749f1c42cfefeba179caebc8d7
44 files changed:
docker/services/aodh-api.yaml
docker/services/aodh-evaluator.yaml
docker/services/aodh-listener.yaml
docker/services/aodh-notifier.yaml
docker/services/cinder-api.yaml
docker/services/cinder-backup.yaml
docker/services/cinder-scheduler.yaml
docker/services/cinder-volume.yaml
docker/services/congress.yaml
docker/services/database/mysql-client.yaml [deleted file]
docker/services/ec2-api.yaml
docker/services/glance-api.yaml
docker/services/gnocchi-metricd.yaml
docker/services/gnocchi-statsd.yaml
docker/services/heat-engine.yaml
docker/services/ironic-api.yaml
docker/services/ironic-conductor.yaml
docker/services/keystone.yaml
docker/services/manila-api.yaml
docker/services/manila-scheduler.yaml
docker/services/manila-share.yaml
docker/services/mistral-api.yaml
docker/services/mistral-engine.yaml
docker/services/mistral-executor.yaml
docker/services/neutron-api.yaml
docker/services/nova-api.yaml
docker/services/nova-compute.yaml
docker/services/nova-conductor.yaml
docker/services/nova-consoleauth.yaml
docker/services/nova-ironic.yaml
docker/services/nova-libvirt.yaml
docker/services/nova-placement.yaml
docker/services/nova-scheduler.yaml
docker/services/nova-vnc-proxy.yaml
docker/services/octavia-api.yaml
docker/services/pacemaker/cinder-backup.yaml
docker/services/pacemaker/cinder-volume.yaml
docker/services/panko-api.yaml
docker/services/sahara-api.yaml
docker/services/sahara-engine.yaml
docker/services/tacker.yaml
docker/services/zaqar.yaml
environments/docker.yaml
tools/yaml-validate.py