summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/deploy-steps.j26
-rw-r--r--common/services.yaml27
2 files changed, 33 insertions, 0 deletions
diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2
index 5c923a99..542bf720 100644
--- a/common/deploy-steps.j2
+++ b/common/deploy-steps.j2
@@ -194,6 +194,7 @@ resources:
kolla_config: {get_param: [role_data, {{role.name}}, kolla_config]}
bootstrap_server_id: {get_param: [servers, {{primary_role_name}}, '0']}
puppet_step_config: {get_param: [role_data, {{role.name}}, step_config]}
+ docker_config_scripts: {get_param: [role_data, {{role.name}}, docker_config_scripts]}
tasks:
# Join host_prep_tasks with the other per-host configuration
list_concat:
@@ -217,6 +218,11 @@ resources:
# FIXME: can we move docker-puppet somewhere so it's installed via a package?
- name: Write docker-puppet.py
copy: content="{{docker_puppet_script}}" dest=/var/lib/docker-puppet/docker-puppet.py force=yes mode=0600
+ - name: Create /var/lib/docker-config-scripts
+ file: path=/var/lib/docker-config-scripts state=directory
+ - name: Write docker config scripts
+ copy: content="{{item.value.content}}" dest="/var/lib/docker-config-scripts/{{item.key}}" force=yes mode="{{item.value.mode|default('0600', true)}}"
+ with_dict: "{{docker_config_scripts}}"
# Here we are dumping all the docker container startup configuration data
# so that we can have access to how they are started outside of heat
# and docker-cmd. This lets us create command line tools to test containers.
diff --git a/common/services.yaml b/common/services.yaml
index a0015c7e..f7062066 100644
--- a/common/services.yaml
+++ b/common/services.yaml
@@ -89,6 +89,31 @@ resources:
service_names: {get_attr: [ServiceChain, role_data, service_names]}
docker_config: {get_attr: [ServiceChain, role_data, docker_config]}
+ DockerConfigScripts:
+ type: OS::Heat::Value
+ properties:
+ type: json
+ value:
+ yaql:
+ expression:
+ # select 'docker_config_scripts' only from services that have it
+ coalesce($.data.service_names, []).zip(coalesce($.data.docker_config_scripts, [])).where($[1] != null).select($[1]).reduce($1.mergeWith($2), {})
+ data:
+ service_names: {get_attr: [ServiceChain, role_data, service_names]}
+ docker_config_scripts: {get_attr: [ServiceChain, role_data, docker_config_scripts]}
+
+ CellV2Discovery:
+ type: OS::Heat::Value
+ properties:
+ type: boolean
+ value:
+ yaql:
+ expression:
+ # If any service in this role requires cellv2_discovery then this value is true
+ coalesce($.data.cellv2_discovery, []).contains(true)
+ data:
+ cellv2_discovery: {get_attr: [ServiceChain, role_data, cellv2_discovery]}
+
LoggingSourcesConfig:
type: OS::Heat::Value
properties:
@@ -282,5 +307,7 @@ outputs:
puppet_config: {get_attr: [PuppetConfig, value]}
kolla_config: {get_attr: [KollaConfig, value]}
docker_config: {get_attr: [DockerConfig, value]}
+ docker_config_scripts: {get_attr: [DockerConfigScripts, value]}
docker_puppet_tasks: {get_attr: [DockerPuppetTasks, value]}
host_prep_tasks: {get_attr: [HostPrepTasks, value]}
+ cellv2_discovery: {get_attr: [CellV2Discovery, value]}