50367fbe35
This change converts our filewall deployment practice to use the tripleo-ansible firewall role. This change creates a new "firewall_rules" object which is queried using YAQL from the "FirewallRules" resource. A new parameter has been added allowing users to input additional firewall rules as needed. The new parameter is `ExtraFirewallRules` and will be merged on top of the YAQL interface. Depends-On: Ie5d0f51d7efccd112847d3f1edf5fd9cdb1edeed Change-Id: I1be209a04f599d1d018e730c92f1fc8dd9bf884b Signed-off-by: Kevin Carter <kecarter@redhat.com>
75 lines
2.4 KiB
YAML
75 lines
2.4 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
|
|
firewall_rules:
|
|
'155 docker-registry':
|
|
dport:
|
|
- 8787
|
|
- 13787
|
|
host_prep_tasks:
|
|
- name: Install, Configure and Run Docker Distribution
|
|
block:
|
|
# NOTE(bogdando): w/a https://github.com/ansible/ansible/issues/42621
|
|
- set_fact: &docker_vars
|
|
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:
|
|
- block:
|
|
- name: Install docker packages on upgrade if missing
|
|
package: name=docker-distribution state=latest
|
|
- set_fact: *docker_vars
|
|
- name: Reconfigure Docker if needed
|
|
include_role:
|
|
name: container-registry
|
|
tasks_from: docker
|
|
when: step|int == 3
|