1 heat_template_version: ocata
4 OpenStack containerized Swift Storage services.
9 default: 'tripleoupstream'
11 DockerSwiftProxyImage:
13 default: 'centos-binary-swift-proxy-server:latest'
15 DockerSwiftAccountImage:
17 default: 'centos-binary-swift-account:latest'
19 DockerSwiftContainerImage:
21 default: 'centos-binary-swift-container:latest'
23 DockerSwiftObjectImage:
25 default: 'centos-binary-swift-object:latest'
29 description: Mapping of service endpoint -> protocol. Typically set
30 via parameter_defaults in the resource registry.
37 description: Mapping of service_name -> network name. Typically set
38 via parameter_defaults in the resource registry. This
39 mapping overrides those in ServiceNetMapDefaults.
45 type: ../../puppet/services/swift-storage.yaml
47 EndpointMap: {get_param: EndpointMap}
48 ServiceNetMap: {get_param: ServiceNetMap}
49 DefaultPasswords: {get_param: DefaultPasswords}
53 description: Role data for the swift storage services.
55 service_name: {get_attr: [SwiftStorageBase, role_data, service_name]}
56 config_settings: {get_attr: [SwiftStorageBase, role_data, config_settings]}
57 step_config: &step_config
58 get_attr: [SwiftStorageBase, role_data, step_config]
59 service_config_settings: {get_attr: [SwiftStorageBase, role_data, service_config_settings]}
60 # BEGIN DOCKER SETTINGS
63 puppet_tags: swift_config,swift_container_config,swift_container_sync_realms_config,swift_account_config,swift_object_config,swift_object_expirer_config
64 step_config: *step_config
65 config_image: &swift_proxy_image
68 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
70 /var/lib/kolla/config_files/swift_account_auditor.json:
71 command: /usr/bin/swift-account-auditor /etc/swift/account-server.conf
72 /var/lib/kolla/config_files/swift_account_reaper.json:
73 command: /usr/bin/swift-account-reaper /etc/swift/account-server.conf
74 /var/lib/kolla/config_files/swift_account_replicator.json:
75 command: /usr/bin/swift-account-replicator /etc/swift/account-server.conf
76 /var/lib/kolla/config_files/swift_account_server.json:
77 command: /usr/bin/swift-account-server /etc/swift/account-server.conf
78 /var/lib/kolla/config_files/swift_container_auditor.json:
79 command: /usr/bin/swift-container-auditor /etc/swift/container-server.conf
80 /var/lib/kolla/config_files/swift_container_replicator.json:
81 command: /usr/bin/swift-container-replicator /etc/swift/container-server.conf
82 /var/lib/kolla/config_files/swift_container_updater.json:
83 command: /usr/bin/swift-container-updater /etc/swift/container-server.conf
84 /var/lib/kolla/config_files/swift_container_server.json:
85 command: /usr/bin/swift-container-server /etc/swift/container-server.conf
86 /var/lib/kolla/config_files/swift_object_auditor.json:
87 command: /usr/bin/swift-object-auditor /etc/swift/object-server.conf
88 /var/lib/kolla/config_files/swift_object_expirer.json:
89 command: /usr/bin/swift-object-expirer /etc/swift/object-expirer.conf
90 /var/lib/kolla/config_files/swift_object_replicator.json:
91 command: /usr/bin/swift-object-replicator /etc/swift/object-server.conf
92 /var/lib/kolla/config_files/swift_object_updater.json:
93 command: /usr/bin/swift-object-updater /etc/swift/object-server.conf
94 /var/lib/kolla/config_files/swift_object_server.json:
95 command: /usr/bin/swift-object-server /etc/swift/object-server.conf
98 # The puppet config sets this up but we don't have a way to mount the named
99 # volume during the configuration stage. We just need to create this
100 # directory and make sure it's owned by swift.
102 image: &swift_account_image
105 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
107 command: ['chown', '-R', 'swift:', '/srv/node']
109 - /srv/node:/srv/node
111 swift_account_auditor:
112 image: *swift_account_image
117 - /var/lib/kolla/config_files/swift_account_auditor.json:/var/lib/kolla/config_files/config.json:ro
118 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
119 - /etc/hosts:/etc/hosts:ro
120 - /etc/localtime:/etc/localtime:ro
122 - /srv/node:/srv/node
124 environment: &kolla_env
125 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
126 swift_account_reaper:
127 image: *swift_account_image
132 - /var/lib/kolla/config_files/swift_account_reaper.json:/var/lib/kolla/config_files/config.json:ro
133 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
134 - /etc/hosts:/etc/hosts:ro
135 - /etc/localtime:/etc/localtime:ro
137 - /srv/node:/srv/node
139 environment: *kolla_env
140 swift_account_replicator:
141 image: *swift_account_image
146 - /var/lib/kolla/config_files/swift_account_replicator.json:/var/lib/kolla/config_files/config.json:ro
147 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
148 - /etc/hosts:/etc/hosts:ro
149 - /etc/localtime:/etc/localtime:ro
151 - /srv/node:/srv/node
153 environment: *kolla_env
154 swift_account_server:
155 image: *swift_account_image
160 - /var/lib/kolla/config_files/swift_account_server.json:/var/lib/kolla/config_files/config.json:ro
161 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
162 - /etc/hosts:/etc/hosts:ro
163 - /etc/localtime:/etc/localtime:ro
165 - /srv/node:/srv/node
167 environment: *kolla_env
168 swift_container_auditor:
169 image: &swift_container_image
172 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
177 - /var/lib/kolla/config_files/swift_container_auditor.json:/var/lib/kolla/config_files/config.json:ro
178 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
179 - /etc/hosts:/etc/hosts:ro
180 - /etc/localtime:/etc/localtime:ro
182 - /srv/node:/srv/node
184 environment: *kolla_env
185 swift_container_replicator:
186 image: *swift_container_image
191 - /var/lib/kolla/config_files/swift_container_replicator.json:/var/lib/kolla/config_files/config.json:ro
192 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
193 - /etc/hosts:/etc/hosts:ro
194 - /etc/localtime:/etc/localtime:ro
196 - /srv/node:/srv/node
198 environment: *kolla_env
199 swift_container_updater:
200 image: *swift_container_image
205 - /var/lib/kolla/config_files/swift_container_updater.json:/var/lib/kolla/config_files/config.json:ro
206 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
207 - /etc/hosts:/etc/hosts:ro
208 - /etc/localtime:/etc/localtime:ro
210 - /srv/node:/srv/node
212 environment: *kolla_env
213 swift_container_server:
214 image: *swift_container_image
219 - /var/lib/kolla/config_files/swift_container_server.json:/var/lib/kolla/config_files/config.json:ro
220 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
221 - /etc/hosts:/etc/hosts:ro
222 - /etc/localtime:/etc/localtime:ro
224 - /srv/node:/srv/node
226 environment: *kolla_env
227 swift_object_auditor:
228 image: &swift_object_image
231 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
236 - /var/lib/kolla/config_files/swift_object_auditor.json:/var/lib/kolla/config_files/config.json:ro
237 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
238 - /etc/hosts:/etc/hosts:ro
239 - /etc/localtime:/etc/localtime:ro
241 - /srv/node:/srv/node
243 environment: *kolla_env
244 swift_object_expirer:
245 image: *swift_proxy_image
250 - /var/lib/kolla/config_files/swift_object_expirer.json:/var/lib/kolla/config_files/config.json:ro
251 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
252 - /etc/hosts:/etc/hosts:ro
253 - /etc/localtime:/etc/localtime:ro
255 - /srv/node:/srv/node
257 environment: *kolla_env
258 swift_object_replicator:
259 image: *swift_object_image
264 - /var/lib/kolla/config_files/swift_object_replicator.json:/var/lib/kolla/config_files/config.json:ro
265 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
266 - /etc/hosts:/etc/hosts:ro
267 - /etc/localtime:/etc/localtime:ro
269 - /srv/node:/srv/node
271 environment: *kolla_env
272 swift_object_updater:
273 image: *swift_object_image
278 - /var/lib/kolla/config_files/swift_object_updater.json:/var/lib/kolla/config_files/config.json:ro
279 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
280 - /etc/hosts:/etc/hosts:ro
281 - /etc/localtime:/etc/localtime:ro
283 - /srv/node:/srv/node
285 environment: *kolla_env
287 image: *swift_object_image
292 - /var/lib/kolla/config_files/swift_object_server.json:/var/lib/kolla/config_files/config.json:ro
293 - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
294 - /etc/hosts:/etc/hosts:ro
295 - /etc/localtime:/etc/localtime:ro
297 - /srv/node:/srv/node
299 environment: *kolla_env
301 - name: create /srv/node
306 - name: Stop and disable swift storage services
308 service: name={{ item }} state=stopped enabled=no
310 - openstack-swift-account-auditor
311 - openstack-swift-account-reaper
312 - openstack-swift-account-replicator
313 - openstack-swift-account
314 - openstack-swift-container-auditor
315 - openstack-swift-container-replicator
316 - openstack-swift-container-updater
317 - openstack-swift-container
318 - openstack-swift-object-auditor
319 - openstack-swift-object-replicator
320 - openstack-swift-object-updater
321 - openstack-swift-object