1 heat_template_version: pike
4 OpenStack Octavia service configured with Puppet
10 DockerOctaviaConfigImage:
11 description: The container image to use for the octavia config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
45 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
51 type: ./containers-common.yaml
54 type: ../../puppet/services/octavia-api.yaml
56 EndpointMap: {get_param: EndpointMap}
57 ServiceData: {get_param: ServiceData}
58 ServiceNetMap: {get_param: ServiceNetMap}
59 DefaultPasswords: {get_param: DefaultPasswords}
60 RoleName: {get_param: RoleName}
61 RoleParameters: {get_param: RoleParameters}
65 description: Role data for the Octavia API role.
67 service_name: {get_attr: [OctaviaApiPuppetBase, role_data, service_name]}
68 config_settings: {get_attr: [OctaviaApiPuppetBase, role_data, config_settings]}
69 step_config: &step_config
70 get_attr: [OctaviaApiPuppetBase, role_data, step_config]
71 service_config_settings: {get_attr: [OctaviaApiPuppetBase, role_data, service_config_settings]}
72 # BEGIN DOCKER SETTINGS #
74 config_volume: octavia
75 puppet_tags: octavia_config
76 step_config: *step_config
77 config_image: {get_param: DockerOctaviaConfigImage}
79 /var/lib/kolla/config_files/octavia_api.json:
80 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
82 - source: "/var/lib/kolla/config_files/src/*"
85 preserve_properties: true
86 /var/lib/kolla/config_files/octavia_api_tls_proxy.json:
87 command: /usr/sbin/httpd -DFOREGROUND
89 - source: "/var/lib/kolla/config_files/src/*"
92 preserve_properties: true
94 # Kolla_bootstrap/db_sync runs before permissions set by kolla_config
96 octavia_api_init_dirs:
98 image: &octavia_api_image {get_param: DockerOctaviaApiImage}
101 # NOTE(mandre) we need extra dir for the service in /etc/octavia/conf.d
102 # It is normally created as part of the RPM install, but it is
103 # missing here because we use the same config_volume for all
104 # octavia services, hence the same container image to generate
106 - /var/lib/config-data/puppet-generated/octavia/etc/octavia:/etc/octavia/
107 - /var/log/containers/octavia:/var/log/octavia
108 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']
112 image: *octavia_api_image
119 - {get_attr: [ContainersCommon, volumes]}
121 - /var/lib/config-data/octavia/etc/octavia/:/etc/octavia/:ro
122 - /var/log/containers/octavia:/var/log/octavia
123 command: "/usr/bin/bootstrap_host_exec octavia_api su octavia -s /bin/bash -c '/usr/bin/octavia-db-manage upgrade head'"
128 image: *octavia_api_image
134 - {get_attr: [ContainersCommon, volumes]}
136 - /var/lib/kolla/config_files/octavia_api.json:/var/lib/kolla/config_files/config.json:ro
137 - /var/lib/config-data/puppet-generated/octavia/:/var/lib/kolla/config_files/src:ro
138 - /var/log/containers/octavia:/var/log/octavia
140 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
142 - internal_tls_enabled
143 - octavia_api_tls_proxy:
145 image: *octavia_api_image
151 - {get_attr: [ContainersCommon, volumes]}
153 - /var/lib/kolla/config_files/octavia_api_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
154 - /var/lib/config-data/puppet-generated/octavia/:/var/lib/kolla/config_files/src:ro
155 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
156 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
158 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
161 - name: create persistent logs directory
163 path: /var/log/containers/octavia
166 - name: Stop and disable octavia_api service
168 service: name=openstack-octavia-api state=stopped enabled=no