1 heat_template_version: pike
4 OpenStack Octavia service configured with Puppet
9 default: 'tripleoupstream'
11 DockerOctaviaApiImage:
13 default: 'centos-binary-octavia-api:latest'
15 DockerOctaviaConfigImage:
16 description: The container image to use for the octavia config_volume
17 default: 'centos-binary-octavia-api:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Dictionary packing service data
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.
39 description: Role name on which the service is applied
43 description: Parameters specific to the role
51 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
57 type: ./containers-common.yaml
60 type: ../../puppet/services/octavia-api.yaml
62 EndpointMap: {get_param: EndpointMap}
63 ServiceData: {get_param: ServiceData}
64 ServiceNetMap: {get_param: ServiceNetMap}
65 DefaultPasswords: {get_param: DefaultPasswords}
66 RoleName: {get_param: RoleName}
67 RoleParameters: {get_param: RoleParameters}
71 description: Role data for the Octavia API role.
73 service_name: {get_attr: [OctaviaApiPuppetBase, role_data, service_name]}
74 config_settings: {get_attr: [OctaviaApiPuppetBase, role_data, config_settings]}
75 step_config: &step_config
76 get_attr: [OctaviaApiPuppetBase, role_data, step_config]
77 service_config_settings: {get_attr: [OctaviaApiPuppetBase, role_data, service_config_settings]}
78 # BEGIN DOCKER SETTINGS #
80 config_volume: octavia
81 puppet_tags: octavia_config
82 step_config: *step_config
86 - [ {get_param: DockerNamespace}, {get_param: DockerOctaviaConfigImage} ]
88 /var/lib/kolla/config_files/octavia_api.json:
89 command: /usr/bin/octavia-api --config-file /usr/share/octavia/octavia-dist.conf --config-file /etc/octavia/octavia.conf --log-file /var/log/octavia/api.log --config-dir /etc/octavia/conf.d/common --config-dir /etc/octavia/conf.d/octavia-api
91 - source: "/var/lib/kolla/config_files/src/*"
94 preserve_properties: true
95 /var/lib/kolla/config_files/octavia_api_tls_proxy.json:
96 command: /usr/sbin/httpd -DFOREGROUND
98 - source: "/var/lib/kolla/config_files/src/*"
101 preserve_properties: true
103 # Kolla_bootstrap/db_sync runs before permissions set by kolla_config
105 octavia_api_init_dirs:
107 image: &octavia_api_image
110 - [ {get_param: DockerNamespace}, {get_param: DockerOctaviaApiImage} ]
113 # NOTE(mandre) we need extra dir for the service in /etc/octavia/conf.d
114 # It is normally created as part of the RPM install, but it is
115 # missing here because we use the same config_volume for all
116 # octavia services, hence the same container image to generate
118 - /var/lib/config-data/puppet-generated/octavia/etc/octavia:/etc/octavia/
119 - /var/log/containers/octavia:/var/log/octavia
120 command: ['/bin/bash', '-c', 'mkdir -p /etc/octavia/conf.d/octavia-api; chown -R octavia:octavia /etc/octavia/conf.d/octavia-api; chown -R octavia:octavia /var/log/octavia']
124 image: *octavia_api_image
131 - {get_attr: [ContainersCommon, volumes]}
133 - /var/lib/config-data/octavia/etc/octavia/:/etc/octavia/:ro
134 - /var/log/containers/octavia:/var/log/octavia
135 command: "/usr/bin/bootstrap_host_exec octavia_api su octavia -s /bin/bash -c '/usr/bin/octavia-db-manage upgrade head'"
140 image: *octavia_api_image
146 - {get_attr: [ContainersCommon, volumes]}
148 - /var/lib/kolla/config_files/octavia_api.json:/var/lib/kolla/config_files/config.json:ro
149 - /var/lib/config-data/puppet-generated/octavia/:/var/lib/kolla/config_files/src:ro
150 - /var/log/containers/octavia:/var/log/octavia
152 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
154 - internal_tls_enabled
155 - octavia_api_tls_proxy:
157 image: *octavia_api_image
163 - {get_attr: [ContainersCommon, volumes]}
165 - /var/lib/kolla/config_files/octavia_api_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
166 - /var/lib/config-data/puppet-generated/octavia/:/var/lib/kolla/config_files/src:ro
167 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
168 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
170 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
173 - name: create persistent logs directory
175 path: /var/log/containers/octavia
178 - name: Stop and disable octavia_api service
180 service: name=openstack-octavia-api state=stopped enabled=no