From 932a9f0409395e1f7e8d83efdd6418d55b040370 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 1 Sep 2016 15:46:01 +0100 Subject: Create memcache_servers list in swift proxy profile Instead of mangling this list in t-h-t, generate the list derived from memcached_node_ips, which is now always set when memcached is deployed, regardless of the role. Note the port default is hard-coded as this is already hard-coded (in two places) in t-h-t, but we can override it if this changes in future. We need this to remove the swift specific stuff out of overcloud.yaml to enable custom-roles. Change-Id: Ic8872e5e51732874ca5b93bff5efd3e7ed75bc31 Partially-Implements: blueprint custom-roles --- manifests/profile/base/swift/proxy.pp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'manifests/profile') diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp index 1e763a1..a95d05f 100644 --- a/manifests/profile/base/swift/proxy.pp +++ b/manifests/profile/base/swift/proxy.pp @@ -23,14 +23,27 @@ # for more details. # Defaults to hiera('step') # +# [*memcache_servers*] +# (Optional) List of memcache servers +# Defaults to hiera('memcached_node_ips') +# +# [*memcache_port*] +# (Optional) memcache port +# Defaults to 11211 +# class tripleo::profile::base::swift::proxy ( $step = hiera('step'), + $memcache_servers = hiera('memcached_node_ips'), + $memcache_port = 11211, ) { if $step >= 4 { + $swift_memcache_servers = suffix($memcache_servers, ":${memcache_port}") include ::swift::proxy include ::swift::proxy::proxy_logging include ::swift::proxy::healthcheck - include ::swift::proxy::cache + class { '::swift::proxy::cache': + memcache_servers => $swift_memcache_servers + } include ::swift::proxy::keystone include ::swift::proxy::authtoken include ::swift::proxy::staticweb -- cgit 1.2.3-korg