1 heat_template_version: pike
4 OpenStack Octavia service configured with Puppet
7 DockerOctaviaHousekeepingImage:
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
44 type: ./containers-common.yaml
46 OctaviaHousekeepingPuppetBase:
47 type: ../../puppet/services/octavia-housekeeping.yaml
49 EndpointMap: {get_param: EndpointMap}
50 ServiceData: {get_param: ServiceData}
51 ServiceNetMap: {get_param: ServiceNetMap}
52 DefaultPasswords: {get_param: DefaultPasswords}
53 RoleName: {get_param: RoleName}
54 RoleParameters: {get_param: RoleParameters}
58 description: Role data for the Octavia housekeeping role.
60 service_name: {get_attr: [OctaviaHousekeepingPuppetBase, role_data, service_name]}
61 config_settings: {get_attr: [OctaviaHousekeepingPuppetBase, role_data, config_settings]}
62 step_config: &step_config
63 get_attr: [OctaviaHousekeepingPuppetBase, role_data, step_config]
64 service_config_settings: {get_attr: [OctaviaHousekeepingPuppetBase, role_data, service_config_settings]}
65 # BEGIN DOCKER SETTINGS #
67 config_volume: octavia
68 puppet_tags: octavia_config
69 step_config: *step_config
70 config_image: {get_param: DockerOctaviaConfigImage}
72 /var/lib/kolla/config_files/octavia_housekeeping.json:
73 command: /usr/bin/octavia-housekeeping --config-file /usr/share/octavia/octavia-dist.conf --config-file /etc/octavia/octavia.conf --log-file /var/log/octavia/housekeeping.log --config-dir /etc/octavia/conf.d/common --config-dir /etc/octavia/conf.d/octavia-housekeeping
75 - source: "/var/lib/kolla/config_files/src/*"
78 preserve_properties: true
81 octavia_housekeeping_init_dirs:
83 image: &octavia_housekeeping_image {get_param: DockerOctaviaHousekeepingImage}
86 # NOTE(mandre) we need extra dir for the service in /etc/octavia/conf.d
87 # It is normally created as part of the RPM install, but it is
88 # missing here because we use the same config_volume for all
89 # octavia services, hence the same container image to generate
91 - /var/lib/config-data/puppet-generated/octavia/etc/octavia:/etc/octavia/
92 command: ['/bin/bash', '-c', 'mkdir -p /etc/octavia/conf.d/octavia-housekeeping; chown -R octavia:octavia /etc/octavia/conf.d/octavia-housekeeping']
96 image: *octavia_housekeeping_image
102 - {get_attr: [ContainersCommon, volumes]}
104 - /var/lib/kolla/config_files/octavia_housekeeping.json:/var/lib/kolla/config_files/config.json:ro
105 - /var/lib/config-data/puppet-generated/octavia/:/var/lib/kolla/config_files/src:ro
106 - /var/log/containers/octavia:/var/log/octavia
108 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
110 - name: create persistent logs directory
112 path: /var/log/containers/octavia
115 - name: Stop and disable octavia_housekeeping service
117 service: name=openstack-octavia-housekeeping state=stopped enabled=no