summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2017-02-28 23:34:51 +0000
committerSteve Baker <sbaker@redhat.com>2017-03-01 03:14:49 +0000
commit93561bde0aaaa82d1ceacccb91ff8b623a9963cb (patch)
tree4797148d91b358a5c3b07a4f586f4c6d2f16346c /docker
parentc992dcf51a3a6ab75eeb9e15c55e03f317f7633c (diff)
Switch to dict format for docker_puppet_tasks
This change gives the option of docker-puppet.py data to be in a dict as well as a list. This allows docker_puppet_tasks data to use the same keys as the top level puppet config data. If the yaql fu can be worked out to build the top level data, docker-puppet.py can later drop the list format entirely. Change-Id: I7e2294c6c898d2340421c93516296ccf120aa6d2
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/docker-puppet.py9
-rw-r--r--docker/services/database/mongodb.yaml14
-rw-r--r--docker/services/database/mysql.yaml16
-rw-r--r--docker/services/keystone.yaml9
4 files changed, 31 insertions, 17 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index 86c8ec98..d9496af6 100755
--- a/docker/docker-puppet.py
+++ b/docker/docker-puppet.py
@@ -87,6 +87,15 @@ configs = {}
for service in (json_data or []):
if service is None:
continue
+ if isinstance(service, dict):
+ service = [
+ service.get('config_volume'),
+ service.get('puppet_tags'),
+ service.get('step_config'),
+ service.get('config_image'),
+ service.get('volumes', []),
+ ]
+
config_volume = service[0] or ''
puppet_tags = service[1] or ''
manifest = service[2] or ''
diff --git a/docker/services/database/mongodb.yaml b/docker/services/database/mongodb.yaml
index cc28846a..127f8839 100644
--- a/docker/services/database/mongodb.yaml
+++ b/docker/services/database/mongodb.yaml
@@ -88,11 +88,13 @@ outputs:
docker_puppet_tasks:
# MySQL database initialization occurs only on single node
step_2:
- - 'mongodb_init_tasks'
- - 'mongodb_database,mongodb_user,mongodb_replset'
- - 'include ::tripleo::profile::base::database::mongodb'
- - list_join:
+ config_volume: 'mongodb_init_tasks'
+ puppet_tags: 'mongodb_database,mongodb_user,mongodb_replset'
+ step_config: 'include ::tripleo::profile::base::database::mongodb'
+ config_image:
+ list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerMongodbImage} ]
- - - "mongodb:/var/lib/mongodb"
- - "logs:/var/log/kolla:ro"
+ volumes:
+ - "mongodb:/var/lib/mongodb/"
+ - "logs:/var/log/kolla:ro"
diff --git a/docker/services/database/mysql.yaml b/docker/services/database/mysql.yaml
index 2ef068d2..5809396e 100644
--- a/docker/services/database/mysql.yaml
+++ b/docker/services/database/mysql.yaml
@@ -120,11 +120,13 @@ outputs:
docker_puppet_tasks:
# MySQL database initialization occurs only on single node
step_2:
- - 'mysql_init_tasks'
- - 'mysql_database,mysql_grant,mysql_user'
- - 'include ::tripleo::profile::base::database::mysql'
- - list_join:
- - '/'
- - [ {get_param: DockerNamespace}, {get_param: DockerMysqlImage} ]
- - - "mariadb:/var/lib/mysql/:ro"
+ config_volume: 'mysql_init_tasks'
+ puppet_tags: 'mysql_database,mysql_grant,mysql_user'
+ step_config: 'include ::tripleo::profile::base::database::mysql'
+ config_image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerMysqlImage} ]
+ volumes:
+ - "mariadb:/var/lib/mysql/:ro"
- "/var/lib/config-data/mysql/root:/root:ro" #provides .my.cnf
diff --git a/docker/services/keystone.yaml b/docker/services/keystone.yaml
index 2bf8fa09..644326e0 100644
--- a/docker/services/keystone.yaml
+++ b/docker/services/keystone.yaml
@@ -145,9 +145,10 @@ outputs:
docker_puppet_tasks:
# Keystone endpoint creation occurs only on single node
step_3:
- - 'keystone_init_tasks'
- - 'keystone_config,keystone_domain_config,keystone_endpoint,keystone_identity_provider,keystone_paste_ini,keystone_role,keystone_service,keystone_tenant,keystone_user,keystone_user_role,keystone_domain'
- - 'include ::tripleo::profile::base::keystone'
- - list_join:
+ config_volume: 'keystone_init_tasks'
+ puppet_tags: 'keystone_config,keystone_domain_config,keystone_endpoint,keystone_identity_provider,keystone_paste_ini,keystone_role,keystone_service,keystone_tenant,keystone_user,keystone_user_role,keystone_domain'
+ step_config: 'include ::tripleo::profile::base::keystone'
+ config_image:
+ list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerKeystoneImage} ]