From 9d49401bdc08119dfbbeb1b50eea65e5a3f02e99 Mon Sep 17 00:00:00 2001 From: Eamonn O'Toole Date: Tue, 8 Apr 2014 17:05:34 +0100 Subject: [PATCH] Adding Swift proxy-server memcache metadata Swift proxy-servers use memcache to store and share metadata. This change adds swift.proxy-memcache metadata to the swift-source and swift-storage-source yaml templates modelled on the existing swift.devices metadata. This metadata will be consumed by the swift-proxy/os-config-applier/etc/swift/proxy-server.conf element if the metadata exists. Change-Id: If0b5724f69e7ec1c98e4dbdbeb9f08c4a18151b6 --- swift-deploy.yaml | 22 +++++++++++++++++++ swift-source.yaml | 1 + swift-storage-source.yaml | 45 ++++++++++++++++++++++++++++----------- 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/swift-deploy.yaml b/swift-deploy.yaml index 1e96928feb..3fe8ecede5 100644 --- a/swift-deploy.yaml +++ b/swift-deploy.yaml @@ -43,3 +43,25 @@ Resources: - SwiftStorage0 - networks - ':%PORT%/d1' + swift_proxy_memcache: + Fn::Join: + - ', ' + - - Fn::Join: + - '' + - - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } + - ':11211' + - Fn::Join: + - ', ' + - Merge::Map: + SwiftStorage0: + Fn::Join: + - '' + - - Fn::Select: + - 0 + - Fn::Select: + - 'ctlplane' + - Fn::GetAtt: + - SwiftStorage0 + - networks + - ':11211' + diff --git a/swift-source.yaml b/swift-source.yaml index 1a17b770d4..90a956bf97 100644 --- a/swift-source.yaml +++ b/swift-source.yaml @@ -7,6 +7,7 @@ Resources: devices: { get_input: swift_devices } hash: { get_input: swift_hash_suffix } part-power: 10 + proxy-memcache: { get_input: swift_proxy_memcache } replicas: 1 service-password: { get_input: swift_password } neutron: diff --git a/swift-storage-source.yaml b/swift-storage-source.yaml index 69236b289a..f20b275250 100644 --- a/swift-storage-source.yaml +++ b/swift-storage-source.yaml @@ -39,16 +39,37 @@ Resources: - ':%PORT%/d1' - Fn::Join: - ', ' - Merge::Map: - SwiftStorage0: - Fn::Join: - - '' - - - 'r1z1-' - - Fn::Select: - - 0 + - Merge::Map: + SwiftStorage0: + Fn::Join: + - '' + - - 'r1z1-' - Fn::Select: - - 'ctlplane' - - Fn::GetAtt: - - SwiftStorage0 - - networks - - ':%PORT%/d1' + - 0 + - Fn::Select: + - 'ctlplane' + - Fn::GetAtt: + - SwiftStorage0 + - networks + - ':%PORT%/d1' + swift_proxy_memcache: + Fn::Join: + - ', ' + - - Fn::Join: + - '' + - - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } + - ':11211' + - Fn::Join: + - ', ' + - Merge::Map: + SwiftStorage0: + Fn::Join: + - '' + - - Fn::Select: + - 0 + - Fn::Select: + - 'ctlplane' + - Fn::GetAtt: + - SwiftStorage0 + - networks + - ':11211'