1bda1fd9a7
This makes the docker-registry service focused on installing the registry, as it should be. Also this makes it possible to invoke this service during overcloud deploy too. This change also switches to calling the tripleo-common script tripleo-container-image-prepare instead of the full openstack command. This will allow a mistral image to do a prepare without depending on the python-tripleoclient package. The {{role}}Services and {{role}}Count are propagated to tripleo-container-image-prepare so that images are filtered correctly. sudo is used instead of become:true so that the tripleo-common mistral sudoers pattern matches. Depends-On: Ic1648e43f45bb7604d4c0f9abf247a475fb23707 Change-Id: Ibc16bed673de7b22cd8eef3f6fb0d45871083873 Blueprint: container-prepare-workflow
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
heat_template_version: rocky
|
|
|
|
description: >
|
|
Configures docker-registry on a host.
|
|
|
|
parameters:
|
|
EndpointMap:
|
|
default: {}
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
via parameter_defaults in the resource registry.
|
|
type: json
|
|
ServiceData:
|
|
default: {}
|
|
description: Dictionary packing service data
|
|
type: json
|
|
ServiceNetMap:
|
|
default: {}
|
|
description: Mapping of service_name -> network name. Typically set
|
|
via parameter_defaults in the resource registry. This
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
type: json
|
|
DefaultPasswords:
|
|
default: {}
|
|
type: json
|
|
RoleName:
|
|
default: ''
|
|
description: Role name on which the service is applied
|
|
type: string
|
|
RoleParameters:
|
|
default: {}
|
|
description: Parameters specific to the role
|
|
type: json
|
|
LocalContainerRegistry:
|
|
default: ''
|
|
description: The IP address used to bind the local container registry
|
|
type: string
|
|
|
|
conditions:
|
|
local_container_registry_is_empty: {equals : [{get_param: LocalContainerRegistry}, '']}
|
|
|
|
outputs:
|
|
role_data:
|
|
description: Role data for the docker registry service
|
|
value:
|
|
service_name: docker_registry
|
|
config_settings:
|
|
tripleo.docker_registry.firewall_rules:
|
|
'155 docker-registry':
|
|
dport:
|
|
- 8787
|
|
- 13787
|
|
step_config: ''
|
|
host_prep_tasks:
|
|
- name: Install, Configure and Run Docker Distribution
|
|
block:
|
|
# NOTE(bogdando): w/a https://github.com/ansible/ansible/issues/42621
|
|
- set_fact:
|
|
container_registry_host:
|
|
if:
|
|
- local_container_registry_is_empty
|
|
- {get_param: [EndpointMap, DockerRegistryInternal, host]}
|
|
- {get_param: LocalContainerRegistry}
|
|
container_registry_port: {get_param: [EndpointMap, DockerRegistryInternal, port]}
|
|
- include_role:
|
|
name: container-registry
|
|
tasks_from: docker-distribution
|
|
upgrade_tasks:
|
|
- name: Install docker packages on upgrade if missing
|
|
when: step|int == 3
|
|
package: name=docker-distribution state=latest
|