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'
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} ]
config_image: *mongodb_image
volumes:
- "mongodb:/var/lib/mongodb/"
- "logs:/var/log/kolla:ro"

View File

@ -123,10 +123,7 @@ outputs:
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} ]
config_image: *mysql_image
volumes:
- "mariadb:/var/lib/mysql/:ro"
- "/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'
type: string
# we configure all heat services in the same heat engine container
DockerHeatEngineImage:
DockerHeatConfigImage:
description: image
default: 'centos-binary-heat-engine:latest'
type: string
@ -62,7 +62,7 @@ outputs:
config_image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
- [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
kolla_config:
/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

View File

@ -13,7 +13,7 @@ parameters:
default: 'centos-binary-heat-api:latest'
type: string
# we configure all heat services in the same heat engine container
DockerHeatEngineImage:
DockerHeatConfigImage:
description: image
default: 'centos-binary-heat-engine:latest'
type: string
@ -62,7 +62,7 @@ outputs:
config_image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerHeatEngineImage} ]
- [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
kolla_config:
/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

View File

@ -149,10 +149,7 @@ outputs:
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} ]
config_image: *keystone_image
upgrade_tasks:
- name: Stop and disable keystone service (running under httpd)
tags: step2

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ parameters:
description: image
default: 'centos-binary-nova-compute-ironic:latest'
type: string
DockerNovaBaseImage:
DockerNovaConfigImage:
description: image
default: 'centos-binary-nova-base:latest'
type: string
@ -54,7 +54,7 @@ outputs:
config_image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaBaseImage} ]
- [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
kolla_config:
/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

View File

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

View File

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

View File

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

View File

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