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: Mapping of service_name -> network name. Typically set
21 via parameter_defaults in the resource registry. This
22 mapping overrides those in ServiceNetMapDefaults.
29 description: Role name on which the service is applied
33 description: Parameters specific to the role
41 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
47 type: ./containers-common.yaml
50 type: ../../puppet/services/octavia-api.yaml
52 EndpointMap: {get_param: EndpointMap}
53 ServiceNetMap: {get_param: ServiceNetMap}
54 DefaultPasswords: {get_param: DefaultPasswords}
55 RoleName: {get_param: RoleName}
56 RoleParameters: {get_param: RoleParameters}
60 description: Role data for the Octavia API role.
62 service_name: {get_attr: [OctaviaApiPuppetBase, role_data, service_name]}
63 config_settings: {get_attr: [OctaviaApiPuppetBase, role_data, config_settings]}
64 step_config: &step_config
65 get_attr: [OctaviaApiPuppetBase, role_data, step_config]
66 service_config_settings: {get_attr: [OctaviaApiPuppetBase, role_data, service_config_settings]}
67 # BEGIN DOCKER SETTINGS #
69 config_volume: octavia
70 puppet_tags: octavia_config
71 step_config: *step_config
72 config_image: {get_param: DockerOctaviaConfigImage}
74 /var/lib/kolla/config_files/octavia_api.json:
75 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
77 - source: "/var/lib/kolla/config_files/src/*"
80 preserve_properties: true
81 /var/lib/kolla/config_files/octavia_api_tls_proxy.json:
82 command: /usr/sbin/httpd -DFOREGROUND
84 - source: "/var/lib/kolla/config_files/src/*"
87 preserve_properties: true
89 # Kolla_bootstrap/db_sync runs before permissions set by kolla_config
91 octavia_api_init_dirs:
93 image: &octavia_api_image {get_param: DockerOctaviaApiImage}
96 # NOTE(mandre) we need extra dir for the service in /etc/octavia/conf.d
97 # It is normally created as part of the RPM install, but it is
98 # missing here because we use the same config_volume for all
99 # octavia services, hence the same container image to generate
101 - /var/lib/config-data/puppet-generated/octavia/etc/octavia:/etc/octavia/
102 - /var/log/containers/octavia:/var/log/octavia
103 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']
107 image: *octavia_api_image
114 - {get_attr: [ContainersCommon, volumes]}
116 - /var/lib/config-data/octavia/etc/octavia/:/etc/octavia/:ro
117 - /var/log/containers/octavia:/var/log/octavia
118 command: "/usr/bin/bootstrap_host_exec octavia_api su octavia -s /bin/bash -c '/usr/bin/octavia-db-manage upgrade head'"
123 image: *octavia_api_image
129 - {get_attr: [ContainersCommon, volumes]}
131 - /var/lib/kolla/config_files/octavia_api.json:/var/lib/kolla/config_files/config.json:ro
132 - /var/lib/config-data/puppet-generated/octavia/:/var/lib/kolla/config_files/src:ro
133 - /var/log/containers/octavia:/var/log/octavia
135 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
137 - internal_tls_enabled
138 - octavia_api_tls_proxy:
140 image: *octavia_api_image
146 - {get_attr: [ContainersCommon, volumes]}
148 - /var/lib/kolla/config_files/octavia_api_tls_proxy.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 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
151 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
153 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
156 - name: create persistent logs directory
158 path: /var/log/containers/octavia
161 - name: Stop and disable octavia_api service
163 service: name=openstack-octavia-api state=stopped enabled=no