Merge "Fix a typo"
[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   SwiftProxyBase:
33     type: ../../puppet/services/swift-proxy.yaml
34     properties:
35       EndpointMap: {get_param: EndpointMap}
36       ServiceNetMap: {get_param: ServiceNetMap}
37       DefaultPasswords: {get_param: DefaultPasswords}
38
39 outputs:
40   role_data:
41     description: Role data for the swift proxy.
42     value:
43       service_name: {get_attr: [SwiftProxyBase, role_data, service_name]}
44       config_settings: {get_attr: [SwiftProxyBase, role_data, config_settings]}
45       step_config: &step_config
46         get_attr: [SwiftProxyBase, role_data, step_config]
47       service_config_settings: {get_attr: [SwiftProxyBase, role_data, service_config_settings]}
48       # BEGIN DOCKER SETTINGS
49       docker_image: &swift_proxy_image
50         list_join:
51           - '/'
52           - [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
53       puppet_config:
54         config_volume: swift
55         puppet_tags: swift_proxy_config
56         step_config: *step_config
57         config_image: *swift_proxy_image
58       kolla_config:
59         /var/lib/kolla/config_files/swift_proxy.json:
60           command: /usr/bin/swift-proxy-server /etc/swift/proxy-server.conf
61       docker_config:
62         step_4:
63           swift_proxy:
64             image: *swift_proxy_image
65             net: host
66             user: swift
67             restart: always
68             # I'm mounting /etc/swift as rw.  Are the rings written to at all during runtime?
69             volumes:
70               - /var/lib/kolla/config_files/swift_proxy.json:/var/lib/kolla/config_files/config.json:ro
71               - /var/lib/config-data/swift:/var/lib/kolla/config_files/src:ro
72               - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
73               - /etc/hosts:/etc/hosts:ro
74               - /etc/localtime:/etc/localtime:ro
75               - /run:/run
76               - swift-srv:/srv
77               - /dev:/dev
78             environment:
79               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS