Merge "Disable Manila CephFS snapshots by default"
[apex-tripleo-heat-templates.git] / docker / services / swift-proxy.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack containerized swift proxy service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerSwiftProxyImage:
12     description: image
13     default: 'centos-binary-swift-proxy-server: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   SwiftProxyBase:
36     type: ../../puppet/services/swift-proxy.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 swift proxy.
45     value:
46       service_name: {get_attr: [SwiftProxyBase, role_data, service_name]}
47       config_settings: {get_attr: [SwiftProxyBase, role_data, config_settings]}
48       step_config: &step_config
49         get_attr: [SwiftProxyBase, role_data, step_config]
50       service_config_settings: {get_attr: [SwiftProxyBase, role_data, service_config_settings]}
51       # BEGIN DOCKER SETTINGS
52       puppet_config:
53         config_volume: swift
54         puppet_tags: swift_proxy_config
55         step_config: *step_config
56         config_image: &swift_proxy_image
57           list_join:
58             - '/'
59             - [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
60       kolla_config:
61         /var/lib/kolla/config_files/swift_proxy.json:
62           command: /usr/bin/swift-proxy-server /etc/swift/proxy-server.conf
63       docker_config:
64         step_4:
65           swift_proxy:
66             image: *swift_proxy_image
67             net: host
68             user: swift
69             restart: always
70             volumes:
71               yaql:
72                 expression: $.data.common.concat($.data.service)
73                 data:
74                   common: {get_attr: [ContainersCommon, volumes]}
75                   service:
76                     - /var/lib/kolla/config_files/swift_proxy.json:/var/lib/kolla/config_files/config.json:ro
77                     # FIXME I'm mounting /etc/swift as rw.  Are the rings written to
78                     # at all during runtime?
79                     - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
80                     - /run:/run
81                     - /srv/node:/srv/node
82                     - /dev:/dev
83             environment:
84               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
85       host_prep_tasks:
86         - name: create /srv/node
87           file:
88             path: /srv/node
89             state: directory
90       upgrade_tasks:
91         - name: Stop and disable swift_proxy service
92           tags: step2
93           service: name=openstack-swift-proxy state=stopped enabled=no