diff options
author | Dan Prince <dprince@redhat.com> | 2017-01-03 21:57:14 -0500 |
---|---|---|
committer | Dan Prince <dprince@redhat.com> | 2017-01-29 08:16:19 -0500 |
commit | 9d82796da2ae30be4eb3dfcc9612c6947f882ded (patch) | |
tree | d0de8079e27bed985f210cf794686f746cb9be97 /docker/post.j2.yaml | |
parent | 8a646686edb6822214abd9b91e4b593bcd616e46 (diff) |
docker: eliminate copy-json.py in favor of json-file
This patch rewires how we configure the Kolla external config files
via Heat templates and uses a more simple json-file heat hook to
directly write out Kolla config files to disk.
By using a heat hook instead of a shell script we can avoid
Json conversion issues. Additionally, This generic json file hook will
be useful for other ad-hoc Json file configuration within the TripleO
docker architecture.
Co-Authored-By: Martin André <m.andre@redhat.com>
Change-Id: I8c72a4a9a7022f722bfe1cef3e18517605720cce
Depends-On: I2b372ac2e291339e436202c9fe58a681ed6a743f
Depends-On: Id3f779b11e23fd3122ef29b7ccbae116667d4520
Diffstat (limited to 'docker/post.j2.yaml')
-rw-r--r-- | docker/post.j2.yaml | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/docker/post.j2.yaml b/docker/post.j2.yaml index 1ba96e27..865c74e5 100644 --- a/docker/post.j2.yaml +++ b/docker/post.j2.yaml @@ -20,23 +20,6 @@ parameters: Setting this to a unique value will re-run any deployment tasks which perform configuration on a Heat stack-update. - DockerNamespace: - description: namespace - default: 'tripleoupstream' - type: string - - LibvirtConfig: - type: string - default: "/etc/libvirt/libvirtd.conf" - - NovaConfig: - type: string - default: "/etc/nova/nova.conf,/etc/nova/rootwrap.conf" - - NeutronOpenvswitchAgentConfig: - type: string - default: "/etc/neutron/neutron.conf,/etc/neutron/plugins/ml2/openvswitch_agent.ini" - resources: {% for role in roles %} @@ -174,31 +157,24 @@ resources: servers: {get_param: [servers, {{role.name}}]} config: {get_resource: CopyEtcConfig} - CopyJsonConfig: - type: OS::Heat::SoftwareConfig + {{role.name}}KollaJsonConfig: + type: OS::Heat::StructuredConfig + depends_on: CopyEtcDeployment properties: - group: script - inputs: - - name: libvirt_config - - name: nova_config - - name: neutron_openvswitch_agent_config - config: {get_file: ../docker/copy-json.py} + group: json-file + config: + {get_param: [role_data, {{role.name}}, kolla_config]} - CopyJsonDeployment: + {{role.name}}KollaJsonDeployment: type: OS::Heat::SoftwareDeploymentGroup - depends_on: CopyEtcDeployment properties: - name: CopyJsonDeployment - config: {get_resource: CopyJsonConfig} + name: {{role.name}}KollaJsonDeployment + config: {get_resource: {{role.name}}KollaJsonConfig} servers: {get_param: [servers, {{role.name}}]} - input_values: - libvirt_config: {get_param: LibvirtConfig} - nova_config: {get_param: NovaConfig} - neutron_openvswitch_agent_config: {get_param: NeutronOpenvswitchAgentConfig} {{role.name}}ContainersConfig_Step1: type: OS::Heat::StructuredConfig - depends_on: CopyJsonDeployment + depends_on: {{role.name}}KollaJsonDeployment properties: group: docker-cmd config: @@ -206,7 +182,7 @@ resources: {{role.name}}ContainersConfig_Step2: type: OS::Heat::StructuredConfig - depends_on: CopyJsonDeployment + depends_on: {{role.name}}KollaJsonDeployment properties: group: docker-cmd config: |