1 heat_template_version: pike
4 OpenStack containerized Barbican API service
7 DockerBarbicanApiImage:
10 DockerBarbicanConfigImage:
11 description: The container image to use for the barbican 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]}
50 type: ./containers-common.yaml
53 type: ../../puppet/services/database/mysql-client.yaml
56 type: ../../puppet/services/barbican-api.yaml
58 EndpointMap: {get_param: EndpointMap}
59 ServiceData: {get_param: ServiceData}
60 ServiceNetMap: {get_param: ServiceNetMap}
61 DefaultPasswords: {get_param: DefaultPasswords}
62 RoleName: {get_param: RoleName}
63 RoleParameters: {get_param: RoleParameters}
67 description: Role data for the Barbican API role.
69 service_name: {get_attr: [BarbicanApiBase, role_data, service_name]}
72 - get_attr: [BarbicanApiBase, role_data, config_settings]
73 - apache::default_vhost: false
74 step_config: &step_config
77 - - {get_attr: [BarbicanApiBase, role_data, step_config]}
78 - {get_attr: [MySQLClient, role_data, step_config]}
79 service_config_settings: {get_attr: [BarbicanApiBase, role_data, service_config_settings]}
80 # BEGIN DOCKER SETTINGS
82 config_volume: barbican
83 puppet_tags: barbican_api_paste_ini,barbican_config
84 step_config: *step_config
85 config_image: {get_param: DockerBarbicanConfigImage}
87 /var/lib/kolla/config_files/barbican_api.json:
88 command: /usr/sbin/httpd -DFOREGROUND
90 - source: "/var/lib/kolla/config_files/src/*"
93 preserve_properties: true
95 # db sync runs before permissions set by kolla_config
98 image: &barbican_api_image {get_param: DockerBarbicanApiImage}
102 - /var/log/containers/barbican:/var/log/barbican
103 command: ['/bin/bash', '-c', 'chown -R barbican:barbican /var/log/barbican']
105 barbican_api_db_sync:
107 image: *barbican_api_image
111 volumes: &barbican_api_volumes
113 - {get_attr: [ContainersCommon, volumes]}
115 - /var/lib/config-data/barbican/etc/barbican/:/etc/barbican/:ro
116 - /var/log/containers/barbican:/var/log/barbican
117 command: "/usr/bin/bootstrap_host_exec barbican_api su barbican -s /bin/bash -c '/usr/bin/barbican-manage db upgrade'"
120 image: *barbican_api_image
127 - {get_attr: [ContainersCommon, volumes]}
129 - /var/lib/kolla/config_files/barbican_api.json:/var/lib/kolla/config_files/config.json:ro
130 - /var/log/containers/barbican:/var/log/barbican
131 - /var/lib/config-data/puppet-generated/barbican/:/var/lib/kolla/config_files/src:ro
134 - internal_tls_enabled
135 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
139 - internal_tls_enabled
140 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
143 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
145 - name: create persistent logs directory
147 path: /var/log/containers/barbican
150 - name: Stop and disable barbican_api service
152 service: name=openstack-barbican-api state=stopped enabled=no
154 get_attr: [BarbicanApiBase, role_data, metadata_settings]