Merge "Adds network/cidr mapping into a new service property"
[apex-tripleo-heat-templates.git] / docker / services / nova-consoleauth.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack containerized Nova Consoleauth service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerNovaConsoleauthImage:
12     description: image
13     default: 'centos-binary-nova-consoleauth:latest'
14     type: string
15   DockerNovaConfigImage:
16     description: The container image to use for the nova config_volume
17     default: 'centos-binary-nova-base:latest'
18     type: string
19   EndpointMap:
20     default: {}
21     description: Mapping of service endpoint -> protocol. Typically set
22                  via parameter_defaults in the resource registry.
23     type: json
24   ServiceData:
25     default: {}
26     description: Dictionary packing service data
27     type: json
28   ServiceNetMap:
29     default: {}
30     description: Mapping of service_name -> network name. Typically set
31                  via parameter_defaults in the resource registry.  This
32                  mapping overrides those in ServiceNetMapDefaults.
33     type: json
34   DefaultPasswords:
35     default: {}
36     type: json
37   RoleName:
38     default: ''
39     description: Role name on which the service is applied
40     type: string
41   RoleParameters:
42     default: {}
43     description: Parameters specific to the role
44     type: json
45
46 resources:
47
48   ContainersCommon:
49     type: ./containers-common.yaml
50
51   NovaConsoleauthPuppetBase:
52     type: ../../puppet/services/nova-consoleauth.yaml
53     properties:
54       EndpointMap: {get_param: EndpointMap}
55       ServiceData: {get_param: ServiceData}
56       ServiceNetMap: {get_param: ServiceNetMap}
57       DefaultPasswords: {get_param: DefaultPasswords}
58       RoleName: {get_param: RoleName}
59       RoleParameters: {get_param: RoleParameters}
60
61 outputs:
62   role_data:
63     description: Role data for the Nova Consoleauth service.
64     value:
65       service_name: {get_attr: [NovaConsoleauthPuppetBase, role_data, service_name]}
66       config_settings: {get_attr: [NovaConsoleauthPuppetBase, role_data, config_settings]}
67       step_config: &step_config
68         get_attr: [NovaConsoleauthPuppetBase, role_data, step_config]
69       service_config_settings: {get_attr: [NovaConsoleauthPuppetBase, role_data, service_config_settings]}
70       # BEGIN DOCKER SETTINGS
71       puppet_config:
72         config_volume: nova
73         puppet_tags: nova_config
74         step_config: *step_config
75         config_image:
76           list_join:
77           - '/'
78           - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
79       kolla_config:
80         /var/lib/kolla/config_files/nova_consoleauth.json:
81           command: /usr/bin/nova-consoleauth
82           config_files:
83             - source: "/var/lib/kolla/config_files/src/*"
84               dest: "/"
85               merge: true
86               preserve_properties: true
87           permissions:
88             - path: /var/log/nova
89               owner: nova:nova
90               recurse: true
91       docker_config:
92         step_4:
93           nova_consoleauth:
94             image:
95               list_join:
96                 - '/'
97                 - [ {get_param: DockerNamespace}, {get_param: DockerNovaConsoleauthImage} ]
98             net: host
99             privileged: false
100             restart: always
101             volumes:
102               list_concat:
103                 - {get_attr: [ContainersCommon, volumes]}
104                 -
105                   - /var/lib/kolla/config_files/nova_consoleauth.json:/var/lib/kolla/config_files/config.json:ro
106                   - /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
107                   - /var/log/containers/nova:/var/log/nova
108             environment:
109               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
110       host_prep_tasks:
111         - name: create persistent logs directory
112           file:
113             path: /var/log/containers/nova
114             state: directory
115       upgrade_tasks:
116         - name: Stop and disable nova_consoleauth service
117           tags: step2
118           service: name=openstack-nova-consoleauth state=stopped enabled=no