Add metadata to configure swift
authorDerek Higgins <derekh@redhat.com>
Mon, 11 Nov 2013 20:42:46 +0000 (20:42 +0000)
committerDerek Higgins <derekh@redhat.com>
Mon, 18 Nov 2013 13:34:44 +0000 (13:34 +0000)
o Adds the required swift metadata (in swift-source.yaml).
o Sets up glance to use the swift backend on the overcloud.
o Sets up glance to use the file backend on the undercloud and seed,
  i.e. maintain the Status quo.

Change-Id: I4a70ffbf9c51f1fea5cfc84d8718d3d30d36b3f2

Makefile
nova-compute-instance.yaml
overcloud-source.yaml
swift-source.yaml [new file with mode: 0644]
undercloud-bm.yaml
undercloud-vm.yaml

index 52d65ef..51e954a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
-overcloud.yaml: overcloud-source.yaml nova-compute-instance.yaml
-       python merge.py $< > $@.tmp
+overcloud.yaml: overcloud-source.yaml nova-compute-instance.yaml swift-source.yaml
+       # $^ won't work here because we want to list nova-compute-instance.yaml as
+       # a prerequisite but don't want to pass it into merge.py
+       python merge.py overcloud-source.yaml swift-source.yaml > $@.tmp
        mv $@.tmp $@
 
 undercloud-vm-tuskar.yaml: undercloud-vm.yaml tuskar-source.yaml
index dd7c39a..9152065 100644 (file)
@@ -131,6 +131,3 @@ Resources:
       rabbit:
         host: {Ref: RabbitHost}
         password: {Ref: RabbitPassword}
-      swift:
-        store_user: ''
-        store_key: ''
index 8285c8f..798ca8d 100644 (file)
@@ -176,6 +176,7 @@ Resources:
                - networks
       db-password: unset
       glance:
+        backend: swift
         db: mysql://glance:unset@localhost/glance
         host:
           Fn::Select:
@@ -187,6 +188,9 @@ Resources:
                  - networks
         service-password:
           Ref: GlancePassword
+        swift-store-user: service:glance
+        swift-store-key:
+          Ref: GlancePassword
       heat:
         admin_password:
           Ref: HeatPassword
diff --git a/swift-source.yaml b/swift-source.yaml
new file mode 100644 (file)
index 0000000..a982d2f
--- /dev/null
@@ -0,0 +1,35 @@
+Description: 'Swift-common: Openstack object storage common configurations'
+Parameters:
+  SwiftHashSuffix:
+    Default: unset
+    Description: A random string to be used as a salt when hashing to determine mappings in the ring.
+    Type: String
+    NoEcho: true
+  SwiftPassword:
+    Default: unset
+    Description: The password for the swift service account, used by the swift proxy services.
+    Type: String
+    NoEcho: true
+Resources:
+  notcomputeConfig:
+    Type: AWS::AutoScaling::LaunchConfiguration
+    Metadata:
+      swift:
+        devices:
+          Fn::Join:
+            - ''
+            - - 'r1z1-'
+              - Fn::Select:
+                - 0
+                - Fn::Select:
+                  - 'ctlplane'
+                  - Fn::GetAtt:
+                    - notcompute
+                    - networks
+              - ':%PORT%/d1'
+        hash:
+          Ref: SwiftHashSuffix
+        part-power: 10
+        replicas: 1
+        service-password:
+          Ref: SwiftPassword
index 7ec33d9..40f7b4a 100644 (file)
@@ -95,6 +95,7 @@ Resources:
         volume_size_mb: '5000'
       db-password: unset
       glance:
+        backend: file
         db: mysql://glance:unset@localhost/glance
         host: 127.0.0.1
         service-password:
index 41fb666..a8c82f3 100644 (file)
@@ -100,6 +100,7 @@ Resources:
         volume_size_mb: '5000'
       db-password: unset
       glance:
+        backend: file
         db: mysql://glance:unset@localhost/glance
         host: 127.0.0.1
         service-password: