Cleanup docker services templates

Use yaml anchors wherever possible for image definition and drop unused
anchors.

Renamed parameters to Docker*ConfigImage to clarify that an image is
specifically used to generate configuration files.

Change-Id: I388bd59de7f1d36a3a881fbb723ba5bcba09e637
This commit is contained in:
Martin André 2017-03-09 16:48:06 +01:00
parent 97d891ea48
commit 1f018babcf
16 changed files with 40 additions and 85 deletions

View File

@ -91,10 +91,7 @@ outputs:
config_volume: 'mongodb_init_tasks' config_volume: 'mongodb_init_tasks'
puppet_tags: 'mongodb_database,mongodb_user,mongodb_replset' puppet_tags: 'mongodb_database,mongodb_user,mongodb_replset'
step_config: 'include ::tripleo::profile::base::database::mongodb' step_config: 'include ::tripleo::profile::base::database::mongodb'
config_image: config_image: *mongodb_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerMongodbImage} ]
volumes: volumes:
- "mongodb:/var/lib/mongodb/" - "mongodb:/var/lib/mongodb/"
- "logs:/var/log/kolla:ro" - "logs:/var/log/kolla:ro"

View File

@ -123,10 +123,7 @@ outputs:
config_volume: 'mysql_init_tasks' config_volume: 'mysql_init_tasks'
puppet_tags: 'mysql_database,mysql_grant,mysql_user' puppet_tags: 'mysql_database,mysql_grant,mysql_user'
step_config: 'include ::tripleo::profile::base::database::mysql' step_config: 'include ::tripleo::profile::base::database::mysql'
config_image: config_image: *mysql_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerMysqlImage} ]
volumes: volumes:
- "mariadb:/var/lib/mysql/:ro" - "mariadb:/var/lib/mysql/:ro"
- "/var/lib/config-data/mysql/root:/root:ro" #provides .my.cnf - "/var/lib/config-data/mysql/root:/root:ro" #provides .my.cnf

View File

@ -13,7 +13,7 @@ parameters:
default: 'centos-binary-heat-api-cfn:latest' default: 'centos-binary-heat-api-cfn:latest'
type: string type: string
# we configure all heat services in the same heat engine container # we configure all heat services in the same heat engine container
DockerHeatEngineImage: DockerHeatConfigImage:
description: image description: image
default: 'centos-binary-heat-engine:latest' default: 'centos-binary-heat-engine:latest'
type: string type: string
@ -62,7 +62,7 @@ outputs:
config_image: config_image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
kolla_config: kolla_config:
/var/lib/kolla/config_files/heat_api_cfn.json: /var/lib/kolla/config_files/heat_api_cfn.json:
command: /usr/bin/heat-api-cfn --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf command: /usr/bin/heat-api-cfn --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf

View File

@ -13,7 +13,7 @@ parameters:
default: 'centos-binary-heat-api:latest' default: 'centos-binary-heat-api:latest'
type: string type: string
# we configure all heat services in the same heat engine container # we configure all heat services in the same heat engine container
DockerHeatEngineImage: DockerHeatConfigImage:
description: image description: image
default: 'centos-binary-heat-engine:latest' default: 'centos-binary-heat-engine:latest'
type: string type: string
@ -62,7 +62,7 @@ outputs:
config_image: config_image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
kolla_config: kolla_config:
/var/lib/kolla/config_files/heat_api.json: /var/lib/kolla/config_files/heat_api.json:
command: /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf command: /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf

View File

@ -149,10 +149,7 @@ outputs:
config_volume: 'keystone_init_tasks' 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' 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' step_config: 'include ::tripleo::profile::base::keystone'
config_image: config_image: *keystone_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerKeystoneImage} ]
upgrade_tasks: upgrade_tasks:
- name: Stop and disable keystone service (running under httpd) - name: Stop and disable keystone service (running under httpd)
tags: step2 tags: step2

View File

@ -72,7 +72,7 @@ outputs:
docker_config: docker_config:
step_4: step_4:
mistral_engine: mistral_engine:
image: &mistral_engine_image image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerMistralEngineImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerMistralEngineImage} ]

View File

@ -72,7 +72,7 @@ outputs:
docker_config: docker_config:
step_4: step_4:
mistral_executor: mistral_executor:
image: &mistral_executor_image image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerMistralExecutorImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerMistralExecutorImage} ]

View File

@ -8,7 +8,7 @@ parameters:
description: namespace description: namespace
default: 'tripleoupstream' default: 'tripleoupstream'
type: string type: string
DockerNeutronApiImage: DockerNeutronDHCPImage:
description: image description: image
default: 'centos-binary-neutron-dhcp-agent:latest' default: 'centos-binary-neutron-dhcp-agent:latest'
type: string type: string
@ -76,10 +76,10 @@ outputs:
docker_config: docker_config:
step_4: step_4:
neutron_dhcp: neutron_dhcp:
image: &neutron_dhcp_image image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNeutronApiImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerNeutronDHCPImage} ]
net: host net: host
pid: host pid: host
privileged: true privileged: true

View File

@ -72,7 +72,7 @@ outputs:
docker_config: docker_config:
step_4: step_4:
neutronl3agent: neutronl3agent:
image: &neutron_l3_agent_image image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNeutronL3AgentImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerNeutronL3AgentImage} ]

View File

@ -12,7 +12,7 @@ parameters:
description: image description: image
default: 'centos-binary-nova-api:latest' default: 'centos-binary-nova-api:latest'
type: string type: string
DockerNovaBaseImage: DockerNovaConfigImage:
description: image description: image
default: 'centos-binary-nova-base:latest' default: 'centos-binary-nova-base:latest'
type: string type: string
@ -60,7 +60,7 @@ outputs:
config_image: config_image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
kolla_config: kolla_config:
/var/lib/kolla/config_files/nova_api.json: /var/lib/kolla/config_files/nova_api.json:
command: /usr/bin/nova-api command: /usr/bin/nova-api

View File

@ -12,7 +12,7 @@ parameters:
description: image description: image
default: 'centos-binary-nova-conductor:latest' default: 'centos-binary-nova-conductor:latest'
type: string type: string
DockerNovaBaseImage: DockerNovaConfigImage:
description: image description: image
default: 'centos-binary-nova-base:latest' default: 'centos-binary-nova-base:latest'
type: string type: string
@ -58,7 +58,7 @@ outputs:
config_image: config_image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
kolla_config: kolla_config:
/var/lib/kolla/config_files/nova_conductor.json: /var/lib/kolla/config_files/nova_conductor.json:
command: /usr/bin/nova-conductor command: /usr/bin/nova-conductor

View File

@ -12,7 +12,7 @@ parameters:
description: image description: image
default: 'centos-binary-nova-compute-ironic:latest' default: 'centos-binary-nova-compute-ironic:latest'
type: string type: string
DockerNovaBaseImage: DockerNovaConfigImage:
description: image description: image
default: 'centos-binary-nova-base:latest' default: 'centos-binary-nova-base:latest'
type: string type: string
@ -54,7 +54,7 @@ outputs:
config_image: config_image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
kolla_config: kolla_config:
/var/lib/kolla/config_files/nova_ironic.json: /var/lib/kolla/config_files/nova_ironic.json:
command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf

View File

@ -14,7 +14,7 @@ parameters:
type: string type: string
# we configure libvirt via the nova-compute container due to coupling # we configure libvirt via the nova-compute container due to coupling
# in the puppet modules # in the puppet modules
DockerNovaComputeImage: DockerNovaConfigImage:
description: image description: image
default: 'centos-binary-nova-compute:latest' default: 'centos-binary-nova-compute:latest'
type: string type: string
@ -57,7 +57,7 @@ outputs:
config_image: config_image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
kolla_config: kolla_config:
/var/lib/kolla/config_files/nova-libvirt.json: /var/lib/kolla/config_files/nova-libvirt.json:
command: /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf command: /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf

View File

@ -53,7 +53,7 @@ outputs:
config_volume: nova_placement config_volume: nova_placement
puppet_tags: nova_config puppet_tags: nova_config
step_config: *step_config step_config: *step_config
config_image: config_image: &nova_placement_image
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaPlacementImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerNovaPlacementImage} ]
@ -92,10 +92,7 @@ outputs:
step_3: step_3:
nova_placement: nova_placement:
start_order: 1 start_order: 1
image: image: *nova_placement_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaPlacementImage} ]
net: host net: host
user: root user: root
restart: always restart: always

View File

@ -12,7 +12,7 @@ parameters:
description: image description: image
default: 'centos-binary-nova-scheduler:latest' default: 'centos-binary-nova-scheduler:latest'
type: string type: string
DockerNovaBaseImage: DockerNovaConfigImage:
description: image description: image
default: 'centos-binary-nova-base:latest' default: 'centos-binary-nova-base:latest'
type: string type: string
@ -57,7 +57,7 @@ outputs:
config_image: config_image:
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
kolla_config: kolla_config:
/var/lib/kolla/config_files/nova_scheduler.json: /var/lib/kolla/config_files/nova_scheduler.json:
command: /usr/bin/nova-scheduler command: /usr/bin/nova-scheduler

View File

@ -62,7 +62,7 @@ outputs:
config_volume: swift config_volume: swift
puppet_tags: swift_config,swift_container_config,swift_container_sync_realms_config,swift_account_config,swift_object_config,swift_object_expirer_config puppet_tags: swift_config,swift_container_config,swift_container_sync_realms_config,swift_account_config,swift_object_config,swift_object_expirer_config
step_config: *step_config step_config: *step_config
config_image: config_image: &swift_proxy_image
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
@ -99,7 +99,7 @@ outputs:
# volume during the configuration stage. We just need to create this # volume during the configuration stage. We just need to create this
# directory and make sure it's owned by swift. # directory and make sure it's owned by swift.
swift_setup_srv: swift_setup_srv:
image: image: &swift_account_image
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
@ -109,10 +109,7 @@ outputs:
- swift-srv:/srv - swift-srv:/srv
step_4: step_4:
swift_account_auditor: swift_account_auditor:
image: image: *swift_account_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -128,10 +125,7 @@ outputs:
environment: &kolla_env environment: &kolla_env
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
swift_account_reaper: swift_account_reaper:
image: image: *swift_account_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -146,10 +140,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_account_replicator: swift_account_replicator:
image: image: *swift_account_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -164,10 +155,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_account_server: swift_account_server:
image: image: *swift_account_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -182,7 +170,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_container_auditor: swift_container_auditor:
image: image: &swift_container_image
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
@ -200,10 +188,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_container_replicator: swift_container_replicator:
image: image: *swift_container_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -218,10 +203,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_container_updater: swift_container_updater:
image: image: *swift_container_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -236,10 +218,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_container_server: swift_container_server:
image: image: *swift_container_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -254,7 +233,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_object_auditor: swift_object_auditor:
image: image: &swift_object_image
list_join: list_join:
- '/' - '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ] - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
@ -272,10 +251,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_object_expirer: swift_object_expirer:
image: image: *swift_proxy_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -290,10 +266,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_object_replicator: swift_object_replicator:
image: image: *swift_object_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -308,10 +281,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_object_updater: swift_object_updater:
image: image: *swift_object_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always
@ -326,10 +296,7 @@ outputs:
- /dev:/dev - /dev:/dev
environment: *kolla_env environment: *kolla_env
swift_object_server: swift_object_server:
image: image: *swift_object_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
net: host net: host
user: swift user: swift
restart: always restart: always