Merge "Remove package if service stopped and disabled" into stable/pike
[apex-tripleo-heat-templates.git] / docker / services / swift-ringbuilder.yaml
index e4e2c7d..bfb57ed 100644 (file)
@@ -7,6 +7,10 @@ parameters:
   DockerSwiftConfigImage:
     description: The container image to use for the swift config_volume
     type: string
+  DockerSwiftRingbuilderConfigImage:
+    description: Fake parameter to bypass config_volume yaml validation
+    type: string
+    default: ''
   ServiceData:
     default: {}
     description: Dictionary packing service data
@@ -87,14 +91,29 @@ outputs:
         map_merge:
           - {get_attr: [SwiftRingbuilderBase, role_data, config_settings]}
           - tripleo::profile::base::swift::ringbuilder:skip_consistency_check: true
+      logging_source: {get_attr: [SwiftRingbuilderBase, role_data, logging_source]}
+      logging_groups: {get_attr: [SwiftRingbuilderBase, role_data, logging_groups]}
       step_config: &step_config
         get_attr: [SwiftRingbuilderBase, role_data, step_config]
       service_config_settings: {get_attr: [SwiftRingbuilderBase, role_data, service_config_settings]}
       # BEGIN DOCKER SETTINGS
       puppet_config:
-        config_volume: 'swift'
+        config_volume: 'swift_ringbuilder'
         puppet_tags: exec,fetch_swift_ring_tarball,extract_swift_ring_tarball,ring_object_device,swift::ringbuilder::create,tripleo::profile::base::swift::add_devices,swift::ringbuilder::rebalance,create_swift_ring_tarball,upload_swift_ring_tarball
         step_config: *step_config
-        config_image: {get_param: DockerSwiftConfigImage}
+        config_image: &swift_ringbuilder_image {get_param: DockerSwiftConfigImage}
       kolla_config: {}
-      docker_config: {}
+      docker_config:
+        step_3:
+          swift_copy_rings:
+            image: *swift_ringbuilder_image
+            user: root
+            detach: false
+            command:
+              # Use bash to run the cp command so that wildcards can be used
+              - '/bin/bash'
+              - '-c'
+              - 'cp -v -a -t /etc/swift /swift_ringbuilder/etc/swift/*.gz /swift_ringbuilder/etc/swift/*.builder /swift_ringbuilder/etc/swift/backups'
+            volumes:
+              - /var/lib/config-data/puppet-generated/swift/etc/swift:/etc/swift:rw
+              - /var/lib/config-data/swift_ringbuilder:/swift_ringbuilder:ro