Set memcached server list from memcached_node_names
This follows other clustered services (like RabbitMQ) and
uses *_node_names (which contain FQDNs), instead of *_node_ips.
Certificate for Memcached TLS is also created using FQDN.
Because of this, validation failed when using pymemcache.
This patch fixes this issue.
Closes-Bug: #1929574
Change-Id: I9d0ddcc88098a5b891829192f1ce656842d0aa15
(cherry picked from commit 49921d57f5
)
This commit is contained in:
parent
ad5de51ab7
commit
057fbbdb90
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Aodh authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::aodh::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,18 +16,20 @@
|
|||
#
|
||||
# Barbican authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
# Defaults to hiera('memcached_authtoken_port', [])
|
||||
# Defaults to hiera('memcached_authtoken_port', 11211)
|
||||
#
|
||||
# [*security_strategy*]
|
||||
# (Optional) Memcached (authtoken) security strategy.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::barbican::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Cinder authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::cinder::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Designate authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::designate::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Glance authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::glance::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Gnocchi authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::gnocchi::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -79,9 +79,19 @@
|
|||
# Enable ssl oslo messaging services
|
||||
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
|
||||
#
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
# Defaults to hiera('memcached_port', 11211)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::heat (
|
||||
$bootstrap_node = downcase(hiera('heat_engine_short_bootstrap_node_name')),
|
||||
|
@ -99,8 +109,12 @@ class tripleo::profile::base::heat (
|
|||
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
|
||||
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
|
||||
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
|
||||
$memcached_ips = hiera('memcached_node_ips'),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_port', 11211),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
include ::tripleo::profile::base::heat::authtoken
|
||||
|
||||
|
@ -137,10 +151,10 @@ class tripleo::profile::base::heat (
|
|||
include ::heat::cors
|
||||
include ::heat::logging
|
||||
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211'), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
class { '::heat::cache':
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Heat authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::heat::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -52,9 +52,15 @@
|
|||
# (Optional) A hash of parameters to enable features specific to Neutron
|
||||
# Defaults to hiera('horizon::neutron_options', {})
|
||||
#
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::horizon (
|
||||
$step = Integer(hiera('step')),
|
||||
|
@ -63,8 +69,12 @@ class tripleo::profile::base::horizon (
|
|||
$enable_internal_tls = hiera('enable_internal_tls', false),
|
||||
$horizon_network = hiera('horizon_network', undef),
|
||||
$neutron_options = hiera('horizon::neutron_options', {}),
|
||||
$memcached_ips = hiera('memcached_node_ips')
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
|
||||
$is_bootstrap = true
|
||||
} else {
|
||||
|
@ -94,11 +104,10 @@ class tripleo::profile::base::horizon (
|
|||
}
|
||||
$neutron_options_real = merge({'profile_support' => $_profile_support }, $neutron_options)
|
||||
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$horizon_memcached_servers = prefix(any2array(normalize_ip_for_uri($memcached_ips)), 'inet6:')
|
||||
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$horizon_memcached_servers = prefix(any2array(normalize_ip_for_uri($memcached_hosts_real)), 'inet6:')
|
||||
} else {
|
||||
$horizon_memcached_servers = any2array(normalize_ip_for_uri($memcached_ips))
|
||||
$horizon_memcached_servers = any2array(normalize_ip_for_uri($memcached_hosts_real))
|
||||
}
|
||||
|
||||
class { '::horizon':
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Ironic authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::ironic::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Ironic inspector authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::ironic_inspector::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -154,9 +154,9 @@
|
|||
# (Optional) Enable OpenIDC federation
|
||||
# Defaults to hiera('keystone_openidc_enabled', false)
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -169,6 +169,12 @@
|
|||
# assignment.
|
||||
# Defaults to hiera('keystone_resources_managed', true)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::keystone (
|
||||
$admin_endpoint_network = hiera('keystone_admin_api_network', undef),
|
||||
$bootstrap_node = hiera('keystone_short_bootstrap_node_name', undef),
|
||||
|
@ -201,10 +207,14 @@ class tripleo::profile::base::keystone (
|
|||
$keystone_enable_member = hiera('keystone_enable_member', false),
|
||||
$keystone_federation_enabled = hiera('keystone_federation_enabled', false),
|
||||
$keystone_openidc_enabled = hiera('keystone_openidc_enabled', false),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_port', 11211),
|
||||
$keystone_resources_managed = hiera('keystone_resources_managed', true),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $bootstrap_node and $::hostname == downcase($bootstrap_node) and $keystone_resources_managed {
|
||||
$sync_db = true
|
||||
$manage_roles = true
|
||||
|
@ -235,7 +245,7 @@ class tripleo::profile::base::keystone (
|
|||
if $step >= 4 or ( $step >= 3 and $sync_db ) {
|
||||
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
|
||||
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
|
||||
$memcached_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcached_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
|
||||
class { '::keystone':
|
||||
sync_db => $sync_db,
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Manila authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::manila::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Neutron authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::neutron::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -74,14 +74,20 @@
|
|||
# (Optional) The current step of the deployment
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
# Defaults to hiera('memcached_port', 11211)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::nova (
|
||||
$bootstrap_node = hiera('nova_api_short_bootstrap_node_name', undef),
|
||||
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
|
||||
|
@ -97,9 +103,12 @@ class tripleo::profile::base::nova (
|
|||
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
|
||||
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips'),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_port', 11211),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
|
||||
$sync_db = true
|
||||
|
@ -107,10 +116,10 @@ class tripleo::profile::base::nova (
|
|||
$sync_db = false
|
||||
}
|
||||
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $step >= 4 or ($step >= 3 and $sync_db) {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Nova authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::nova::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Octavia authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::octavia::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Panko authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::panko::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# Placement authtoken profile for TripleO
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# [*memcached_hosts*]
|
||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*memcached_port*]
|
||||
# (Optional) Memcached port to use.
|
||||
|
@ -38,19 +40,28 @@
|
|||
# The key is hashed with a salt, to isolate services.
|
||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*memcached_ips*]
|
||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
||||
# Defaults to undef
|
||||
#
|
||||
class tripleo::profile::base::placement::authtoken (
|
||||
$step = Integer(hiera('step')),
|
||||
$memcached_ips = hiera('memcached_node_ips', []),
|
||||
$memcached_hosts = hiera('memcached_node_names', []),
|
||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
||||
# DEPRECATED PARAMETERS
|
||||
$memcached_ips = undef
|
||||
) {
|
||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
||||
|
||||
if $step >= 3 {
|
||||
if is_ipv6_address($memcached_ips[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}"), 'inet6:')
|
||||
if is_ipv6_address($memcached_hosts_real[0]) {
|
||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
||||
} else {
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ":${memcached_port}")
|
||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
||||
}
|
||||
|
||||
if $secret_key {
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
#
|
||||
# [*memcache_servers*]
|
||||
# (Optional) List of memcache servers
|
||||
# Defaults to hiera('memcached_node_ips')
|
||||
# Defaults to hiera('memcached_node_names', [])
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
|
@ -111,7 +111,7 @@ class tripleo::profile::base::swift::proxy (
|
|||
$certificates_specs = hiera('apache_certificates_specs', {}),
|
||||
$enable_internal_tls = hiera('enable_internal_tls', false),
|
||||
$memcache_port = hiera('memcached_port', 11211),
|
||||
$memcache_servers = hiera('memcached_node_ips', []),
|
||||
$memcache_servers = hiera('memcached_node_names', []),
|
||||
$step = Integer(hiera('step')),
|
||||
$swift_proxy_network = hiera('swift_proxy_network', undef),
|
||||
$tls_proxy_bind_ip = undef,
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::aodh::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::aodh::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::barbican::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::barbican::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::cinder::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::cinder::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::designate::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::designate::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::glance::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::glance::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::gnocchi::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::gnocchi::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::heat::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::heat::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -53,7 +53,7 @@ eos
|
|||
:oslomsg_notify_username => 'heat2',
|
||||
:oslomsg_notify_password => 'baa',
|
||||
:oslomsg_notify_port => '5678',
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration without db_purge' do
|
||||
|
@ -89,7 +89,7 @@ eos
|
|||
:oslomsg_notify_username => 'heat2',
|
||||
:oslomsg_notify_password => 'baa',
|
||||
:oslomsg_notify_port => '5678',
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration' do
|
||||
|
@ -128,7 +128,7 @@ eos
|
|||
:oslomsg_notify_password => 'baa',
|
||||
:oslomsg_notify_port => '5678',
|
||||
:manage_db_purge => false,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration without db_purge' do
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::ironic::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::ironic::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::ironic_inspector::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::ironic_inspector::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -30,7 +30,7 @@ describe 'tripleo::profile::base::keystone' do
|
|||
:oslomsg_notify_username => 'keystone2',
|
||||
:oslomsg_notify_password => 'baa',
|
||||
:oslomsg_notify_port => '5678',
|
||||
:memcached_ips => [ '192.168.0.3', '192.168.0.4', '192.168.0.5' ],
|
||||
:memcached_hosts => [ '192.168.0.3', '192.168.0.4', '192.168.0.5' ],
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::manila::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::manila::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::neutron::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::neutron::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::nova::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::nova::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -54,7 +54,7 @@ describe 'tripleo::profile::base::nova' do
|
|||
is_expected.to contain_class('nova::config')
|
||||
is_expected.to contain_class('nova::logging')
|
||||
is_expected.to contain_class('nova::cache').with(
|
||||
:memcache_servers => ['127.0.0.1:11211']
|
||||
:memcache_servers => ['controller-1:11211']
|
||||
)
|
||||
is_expected.to contain_class('nova::placement')
|
||||
is_expected.to contain_class('nova::keystone::service_user')
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::octavia::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::octavia::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -32,7 +32,7 @@ describe 'tripleo::profile::base::panko::authtoken' do
|
|||
context 'with step 3' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '127.0.0.1',
|
||||
:memcached_hosts => '127.0.0.1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
@ -45,7 +45,7 @@ describe 'tripleo::profile::base::panko::authtoken' do
|
|||
context 'with step 3 with ipv6' do
|
||||
let(:params) { {
|
||||
:step => 3,
|
||||
:memcached_ips => '::1',
|
||||
:memcached_hosts => '::1',
|
||||
} }
|
||||
|
||||
it {
|
||||
|
|
|
@ -94,10 +94,8 @@ placement_short_bootstrap_node_name: node
|
|||
placement::rabbit_password: 'password'
|
||||
placement::keystone::authtoken::password: 'password'
|
||||
# memcache related items
|
||||
memcached_node_ips_v6:
|
||||
- '::1'
|
||||
memcached_node_ips:
|
||||
- '127.0.0.1'
|
||||
memcached_node_names:
|
||||
- 'controller-1'
|
||||
# octavia related items
|
||||
octavia::rabbit_password: 'password'
|
||||
octavia::keystone::authtoken::password: 'password'
|
||||
|
|
Loading…
Reference in New Issue