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
43 type: ./containers-common.yaml
45 OctaviaHousekeepingPuppetBase:
46 type: ../../puppet/services/octavia-housekeeping.yaml
48 EndpointMap: {get_param: EndpointMap}
49 ServiceData: {get_param: ServiceData}
50 ServiceNetMap: {get_param: ServiceNetMap}
51 DefaultPasswords: {get_param: DefaultPasswords}
52 RoleName: {get_param: RoleName}
53 RoleParameters: {get_param: RoleParameters}
57 description: Role data for the Octavia housekeeping role.
59 service_name: {get_attr: [OctaviaHousekeepingPuppetBase, role_data, service_name]}
60 config_settings: {get_attr: [OctaviaHousekeepingPuppetBase, role_data, config_settings]}
61 logging_source: {get_attr: [OctaviaHousekeepingPuppetBase, role_data, logging_source]}
62 logging_groups: {get_attr: [OctaviaHousekeepingPuppetBase, role_data, logging_groups]}
63 step_config: &step_config
64 get_attr: [OctaviaHousekeepingPuppetBase, role_data, step_config]
65 service_config_settings: {get_attr: [OctaviaHousekeepingPuppetBase, role_data, service_config_settings]}
66 # BEGIN DOCKER SETTINGS #
68 config_volume: octavia
69 puppet_tags: octavia_config
70 step_config: *step_config
71 config_image: {get_param: DockerOctaviaConfigImage}
73 /var/lib/kolla/config_files/octavia_housekeeping.json:
74 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
76 - source: "/var/lib/kolla/config_files/src/*"
79 preserve_properties: true
82 octavia_housekeeping_init_dirs:
84 image: &octavia_housekeeping_image {get_param: DockerOctaviaHousekeepingImage}
87 # NOTE(mandre) we need extra dir for the service in /etc/octavia/conf.d
88 # It is normally created as part of the RPM install, but it is
89 # missing here because we use the same config_volume for all
90 # octavia services, hence the same container image to generate
92 - /var/lib/config-data/puppet-generated/octavia/etc/octavia:/etc/octavia/
93 command: ['/bin/bash', '-c', 'mkdir -p /etc/octavia/conf.d/octavia-housekeeping; chown -R octavia:octavia /etc/octavia/conf.d/octavia-housekeeping']
97 image: *octavia_housekeeping_image
103 - {get_attr: [ContainersCommon, volumes]}
105 - /var/lib/kolla/config_files/octavia_housekeeping.json:/var/lib/kolla/config_files/config.json:ro
106 - /var/lib/config-data/puppet-generated/octavia/:/var/lib/kolla/config_files/src:ro
107 - /var/log/containers/octavia:/var/log/octavia
109 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
111 - name: create persistent logs directory
113 path: /var/log/containers/octavia
116 - name: Stop and disable octavia_housekeeping service
118 service: name=openstack-octavia-housekeeping state=stopped enabled=no