Merge "Internal TLS: Use specific CA file for haproxy"
[apex-tripleo-heat-templates.git] / docker / services / glance-api.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Glance service configured with Puppet
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerGlanceApiImage:
12     description: image
13     default: 'centos-binary-glance-api:latest'
14     type: string
15   EndpointMap:
16     default: {}
17     description: Mapping of service endpoint -> protocol. Typically set
18                  via parameter_defaults in the resource registry.
19     type: json
20   ServiceNetMap:
21     default: {}
22     description: Mapping of service_name -> network name. Typically set
23                  via parameter_defaults in the resource registry.  This
24                  mapping overrides those in ServiceNetMapDefaults.
25     type: json
26   DefaultPasswords:
27     default: {}
28     type: json
29
30 resources:
31
32   ContainersCommon:
33     type: ./containers-common.yaml
34
35   GlanceApiPuppetBase:
36     type: ../../puppet/services/glance-api.yaml
37     properties:
38       EndpointMap: {get_param: EndpointMap}
39       ServiceNetMap: {get_param: ServiceNetMap}
40       DefaultPasswords: {get_param: DefaultPasswords}
41
42 outputs:
43   role_data:
44     description: Role data for the Glance API role.
45     value:
46       service_name: {get_attr: [GlanceApiPuppetBase, role_data, service_name]}
47       config_settings:
48         map_merge:
49           - get_attr: [GlanceApiPuppetBase, role_data, config_settings]
50           - glance::api::sync_db: false
51       step_config: &step_config
52         get_attr: [GlanceApiPuppetBase, role_data, step_config]
53       service_config_settings: {get_attr: [GlanceApiPuppetBase, role_data, service_config_settings]}
54       # BEGIN DOCKER SETTINGS #
55       puppet_config:
56         config_volume: glance_api
57         puppet_tags: glance_api_config,glance_api_paste_ini,glance_swift_config,glance_cache_config
58         step_config: *step_config
59         config_image: &glance_image
60           list_join:
61             - '/'
62             - [ {get_param: DockerNamespace}, {get_param: DockerGlanceApiImage} ]
63       kolla_config:
64         /var/lib/kolla/config_files/glance-api.json:
65           command: /usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf
66       docker_config:
67         step_3:
68           glance_api_db_sync:
69             image: *glance_image
70             net: host
71             privileged: false
72             detach: false
73             volumes: &glance_volumes
74               list_concat:
75                 - {get_attr: [ContainersCommon, volumes]}
76                 -
77                   - /var/lib/kolla/config_files/glance-api.json:/var/lib/kolla/config_files/config.json
78                   - /var/lib/config-data/glance_api/etc/glance/:/etc/glance/:ro
79                   - /lib/modules:/lib/modules:ro
80                   - /run:/run
81                   - /dev:/dev
82             environment:
83               - KOLLA_BOOTSTRAP=True
84               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
85         step_4:
86           glance_api:
87             image: *glance_image
88             net: host
89             privileged: false
90             restart: always
91             volumes: *glance_volumes
92             environment:
93               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
94       upgrade_tasks:
95         - name: Stop and disable glance_api service
96           tags: step2
97           service: name=openstack-glance-api state=stopped enabled=no