Merge "Remove unused KeystoneRegion parameter from gnocchi-base"
[apex-tripleo-heat-templates.git] / docker / services / swift-storage.yaml
index 8e76504..301ef69 100644 (file)
@@ -62,7 +62,7 @@ outputs:
         config_volume: swift
         puppet_tags: swift_config,swift_container_config,swift_container_sync_realms_config,swift_account_config,swift_object_config,swift_object_expirer_config
         step_config: *step_config
-        config_image:
+        config_image: &swift_proxy_image
           list_join:
             - '/'
             - [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
@@ -99,20 +99,17 @@ outputs:
           # volume during the configuration stage.  We just need to create this
           # directory and make sure it's owned by swift.
           swift_setup_srv:
-            image:
+            image: &swift_account_image
               list_join:
                 - '/'
                 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
             user: root
-            command: ['/bin/bash', '-c', 'mkdir /srv/node && chown swift:swift /srv/node']
+            command: ['chown', '-R', 'swift:', '/srv/node']
             volumes:
-              - swift-srv:/srv
+              - /srv/node:/srv/node
         step_4:
           swift_account_auditor:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
+            image: *swift_account_image
             net: host
             user: swift
             restart: always
@@ -123,15 +120,12 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: &kolla_env
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
           swift_account_reaper:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
+            image: *swift_account_image
             net: host
             user: swift
             restart: always
@@ -142,14 +136,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_account_replicator:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
+            image: *swift_account_image
             net: host
             user: swift
             restart: always
@@ -160,14 +151,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_account_server:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
+            image: *swift_account_image
             net: host
             user: swift
             restart: always
@@ -178,11 +166,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_container_auditor:
-            image:
+            image: &swift_container_image
               list_join:
                 - '/'
                 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
@@ -196,14 +184,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_container_replicator:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
+            image: *swift_container_image
             net: host
             user: swift
             restart: always
@@ -214,14 +199,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_container_updater:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
+            image: *swift_container_image
             net: host
             user: swift
             restart: always
@@ -232,14 +214,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_container_server:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftContainerImage} ]
+            image: *swift_container_image
             net: host
             user: swift
             restart: always
@@ -250,11 +229,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_object_auditor:
-            image:
+            image: &swift_object_image
               list_join:
                 - '/'
                 - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
@@ -268,14 +247,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_object_expirer:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftProxyImage} ]
+            image: *swift_proxy_image
             net: host
             user: swift
             restart: always
@@ -286,14 +262,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_object_replicator:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
+            image: *swift_object_image
             net: host
             user: swift
             restart: always
@@ -304,14 +277,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_object_updater:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
+            image: *swift_object_image
             net: host
             user: swift
             restart: always
@@ -322,14 +292,11 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
           swift_object_server:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerSwiftObjectImage} ]
+            image: *swift_object_image
             net: host
             user: swift
             restart: always
@@ -340,9 +307,14 @@ outputs:
               - /etc/hosts:/etc/hosts:ro
               - /etc/localtime:/etc/localtime:ro
               - /run:/run
-              - swift-srv:/srv
+              - /srv/node:/srv/node
               - /dev:/dev
             environment: *kolla_env
+      host_prep_tasks:
+        - name: create /srv/node
+          file:
+            path: /srv/node
+            state: directory
       upgrade_tasks:
         - name: Stop and disable swift storage services
           tags: step2