1 heat_template_version: pike
4 OpenStack Sahara service configured with Puppet
10 DockerSaharaConfigImage:
11 description: The container image to use for the sahara 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
39 UpgradeRemoveUnusedPackages:
41 description: Remove package if the service is being disabled during upgrade
47 type: ./containers-common.yaml
50 type: ../../puppet/services/database/mysql-client.yaml
53 type: ../../puppet/services/sahara-api.yaml
55 EndpointMap: {get_param: EndpointMap}
56 ServiceData: {get_param: ServiceData}
57 ServiceNetMap: {get_param: ServiceNetMap}
58 DefaultPasswords: {get_param: DefaultPasswords}
62 description: Role data for the Sahara API role.
64 service_name: {get_attr: [SaharaApiPuppetBase, role_data, service_name]}
67 - get_attr: [SaharaApiPuppetBase, role_data, config_settings]
68 - sahara::sync_db: false
69 logging_source: {get_attr: [SaharaApiPuppetBase, role_data, logging_source]}
70 logging_groups: {get_attr: [SaharaApiPuppetBase, role_data, logging_groups]}
71 step_config: &step_config
74 - - {get_attr: [SaharaApiPuppetBase, role_data, step_config]}
75 - {get_attr: [MySQLClient, role_data, step_config]}
76 service_config_settings: {get_attr: [SaharaApiPuppetBase, role_data, service_config_settings]}
77 # BEGIN DOCKER SETTINGS #
80 puppet_tags: sahara_api_paste_ini,sahara_cluster_template,sahara_config,sahara_node_group_template
81 step_config: *step_config
82 config_image: {get_param: DockerSaharaConfigImage}
84 /var/lib/kolla/config_files/sahara-api.json:
85 command: /usr/bin/sahara-api --config-file /etc/sahara/sahara.conf
87 - source: "/var/lib/kolla/config_files/src/*"
90 preserve_properties: true
92 - path: /var/lib/sahara
95 - path: /var/log/sahara
101 image: &sahara_api_image {get_param: DockerSaharaApiImage}
108 - {get_attr: [ContainersCommon, volumes]}
110 - /var/lib/config-data/sahara/etc/sahara/:/etc/sahara/:ro
111 - /lib/modules:/lib/modules:ro
112 - /var/lib/sahara:/var/lib/sahara
113 - /var/log/containers/sahara:/var/log/sahara
114 command: "/usr/bin/bootstrap_host_exec sahara_api su sahara -s /bin/bash -c 'sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head'"
117 image: *sahara_api_image
123 - {get_attr: [ContainersCommon, volumes]}
125 - /var/lib/kolla/config_files/sahara-api.json:/var/lib/kolla/config_files/config.json
126 - /var/lib/config-data/puppet-generated/sahara/:/var/lib/kolla/config_files/src:ro
127 - /lib/modules:/lib/modules:ro
128 - /var/lib/sahara:/var/lib/sahara
129 - /var/log/containers/sahara:/var/log/sahara
131 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
133 - name: create /var/lib/sahara
135 path: /var/lib/sahara
137 - name: create persistent sahara logs directory
139 path: /var/log/containers/sahara
142 - name: Stop and disable sahara_api service
144 service: name=openstack-sahara-api state=stopped enabled=no
145 - name: Remove openstack-sahara-api package if operator requests it
146 yum: name=openstack-sahara-api state=removed
149 when: {get_param: UpgradeRemoveUnusedPackages}