aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/database
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2017-03-29 14:11:21 +0200
committerMartin André <m.andre@redhat.com>2017-04-03 18:24:49 +0200
commit91e7a548cb4e39e72798c8cda16f3a946128a419 (patch)
treea782dd2aa9d1c38e91ca86b5d1c4e1149f55a53e /docker/services/database
parent0ae9d9b346f1c5d7e29b8f281474577eca260670 (diff)
Remove kolla_config copy from services
Simplify the config of the containerized services by bind mounting in the configurations instead of specifying them all in kolla config. This is change is useful to limit the side effects of generating the config files and running the container is two separate steps as config directories are now bind-mounted inside the container instead of having files being copied to the container. We've seen examples of Apache's mod_ssl configuration file present on the container preventing it to start when puppet configured apache not to load the ssl module (in case TLS is disabled). Co-Authored-By: Ian Main <imain@redhat.com> Change-Id: I4ec5dd8b360faea71a044894a61790997f54d48a
Diffstat (limited to 'docker/services/database')
-rw-r--r--docker/services/database/mongodb.yaml11
-rw-r--r--docker/services/database/mysql.yaml15
2 files changed, 4 insertions, 22 deletions
diff --git a/docker/services/database/mongodb.yaml b/docker/services/database/mongodb.yaml
index 15795828..5756c322 100644
--- a/docker/services/database/mongodb.yaml
+++ b/docker/services/database/mongodb.yaml
@@ -62,15 +62,6 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/mongodb.json:
command: /usr/bin/mongod --unixSocketPrefix=/var/run/mongodb --config /etc/mongod.conf run
- config_files:
- - dest: /etc/mongod.conf
- source: /var/lib/kolla/config_files/src/etc/mongod.conf
- owner: mongodb
- perm: '0600'
- - dest: /etc/mongos.conf
- source: /var/lib/kolla/config_files/src/etc/mongos.conf
- owner: mongodb
- perm: '0600'
docker_config:
step_2:
mongodb_data_ownership:
@@ -88,7 +79,7 @@ outputs:
privileged: false
volumes: &mongodb_volumes
- /var/lib/kolla/config_files/mongodb.json:/var/lib/kolla/config_files/config.json
- - /var/lib/config-data/mongodb/:/var/lib/kolla/config_files/src:ro
+ - /var/lib/config-data/mongodb/etc/:/etc/:ro
- /etc/localtime:/etc/localtime:ro
- logs:/var/log/kolla
- /var/lib/mongodb:/var/lib/mongodb
diff --git a/docker/services/database/mysql.yaml b/docker/services/database/mysql.yaml
index 0ffd0336..372f059c 100644
--- a/docker/services/database/mysql.yaml
+++ b/docker/services/database/mysql.yaml
@@ -71,15 +71,6 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/mysql.json:
command: /usr/bin/mysqld_safe
- config_files:
- - dest: /etc/mysql/my.cnf
- source: /var/lib/kolla/config_files/src/etc/my.cnf
- owner: mysql
- perm: '0644'
- - dest: /etc/my.cnf.d/galera.cnf
- source: /var/lib/kolla/config_files/src/etc/my.cnf.d/galera.cnf
- owner: mysql
- perm: '0644'
docker_config:
step_2:
mysql_data_ownership:
@@ -101,7 +92,7 @@ outputs:
command: ['bash', '-c', 'test -e /var/lib/mysql/mysql || kolla_start']
volumes: &mysql_volumes
- /var/lib/kolla/config_files/mysql.json:/var/lib/kolla/config_files/config.json
- - /var/lib/config-data/mysql/:/var/lib/kolla/config_files/src:ro
+ - /var/lib/config-data/mysql/etc/:/etc/:ro
- /etc/localtime:/etc/localtime:ro
- /etc/hosts:/etc/hosts:ro
- /var/lib/mysql:/var/lib/mysql
@@ -137,8 +128,8 @@ outputs:
step_config: 'include ::tripleo::profile::base::database::mysql'
config_image: *mysql_image
volumes:
- - "/var/lib/mysql:/var/lib/mysql/:ro"
- - "/var/lib/config-data/mysql/root:/root:ro" #provides .my.cnf
+ - /var/lib/mysql:/var/lib/mysql/:ro
+ - /var/lib/config-data/mysql/root:/root:ro #provides .my.cnf
host_prep_tasks:
- name: create /var/lib/mysql
file: