summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/haproxy.pp31
-rw-r--r--manifests/loadbalancer.pp414
-rw-r--r--manifests/loadbalancer/endpoint.pp101
-rw-r--r--manifests/profile/base/cinder.pp52
-rw-r--r--manifests/profile/base/cinder/api.pp49
-rw-r--r--manifests/profile/base/cinder/scheduler.pp36
-rw-r--r--manifests/profile/base/cinder/volume.pp118
-rw-r--r--manifests/profile/base/cinder/volume/dellsc.pp51
-rw-r--r--manifests/profile/base/cinder/volume/eqlx.pp51
-rw-r--r--manifests/profile/base/cinder/volume/iscsi.pp62
-rw-r--r--manifests/profile/base/cinder/volume/netapp.pp66
-rw-r--r--manifests/profile/base/cinder/volume/nfs.pp62
-rw-r--r--manifests/profile/base/cinder/volume/rbd.pp66
-rw-r--r--manifests/profile/base/loadbalancer.pp28
-rw-r--r--manifests/profile/base/neutron/midonet.pp2
-rw-r--r--manifests/profile/pacemaker/cinder/api.pp67
-rw-r--r--manifests/profile/pacemaker/cinder/scheduler.pp72
-rw-r--r--manifests/profile/pacemaker/cinder/volume.pp70
-rw-r--r--manifests/profile/pacemaker/loadbalancer.pp52
19 files changed, 849 insertions, 601 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 9d07fa9..e3e48ce 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -53,20 +53,15 @@
# The IPv4, IPv6 or filesystem socket path of the syslog server.
# Defaults to '/dev/log'
#
-# [*controller_host*]
-# (Deprecated)Host or group of hosts to load-balance the services
-# Can be a string or an array.
-# Defaults to undef
-#
# [*controller_hosts*]
# IPs of host or group of hosts to load-balance the services
# Can be a string or an array.
-# Defaults to undef
+# Defaults tohiera('controller_node_ips')
#
# [*controller_hosts_names*]
# Names of host or group of hosts to load-balance the services
# Can be a string or an array.
-# Defaults to undef
+# Defaults to hiera('controller_node_names', undef)
#
# [*controller_virtual_ip*]
# Control IP or group of IPs to bind the pools
@@ -279,9 +274,8 @@ class tripleo::haproxy (
$haproxy_log_address = '/dev/log',
$haproxy_stats_user = 'admin',
$haproxy_stats_password = undef,
- $controller_host = undef,
- $controller_hosts = undef,
- $controller_hosts_names = undef,
+ $controller_hosts = hiera('controller_node_ips'),
+ $controller_hosts_names = hiera('controller_node_names', undef),
$service_certificate = undef,
$internal_certificate = undef,
$ssl_cipher_suite = '!SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES',
@@ -358,20 +352,11 @@ class tripleo::haproxy (
}
$ports = merge($default_service_ports, $service_ports)
- if !$controller_host and !$controller_hosts {
- fail('$controller_hosts or $controller_host (now deprecated) is a mandatory parameter')
- }
- if $controller_hosts {
- $controller_hosts_real = any2array($controller_hosts)
- } else {
- warning('$controller_host has been deprecated in favor of $controller_hosts')
- $controller_hosts_real = any2array($controller_host)
- }
-
- if !$controller_hosts_names {
- $controller_hosts_names_real = any2array($controller_hosts_real)
+ $controller_hosts_real = any2array(split($controller_hosts, ','))
+ if ! $controller_hosts_names {
+ $controller_hosts_names_real = $controller_hosts_real
} else {
- $controller_hosts_names_real = any2array($controller_hosts_names)
+ $controller_hosts_names_real = downcase(any2array(split($controller_hosts_names, ',')))
}
# This code will be removed once we switch undercloud and overcloud to use both haproxy & keepalived roles.
diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp
deleted file mode 100644
index c75e36a..0000000
--- a/manifests/loadbalancer.pp
+++ /dev/null
@@ -1,414 +0,0 @@
-# Copyright 2014 Red Hat, Inc.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-# == Class: tripleo::loadbalancer
-#
-# Configure an HAProxy/keepalived loadbalancer for TripleO.
-#
-# === Parameters:
-#
-# [*manage_vip*]
-# Whether to configure keepalived to manage the VIPs or not.
-# Defaults to true
-#
-# [*haproxy_service_manage*]
-# Will be passed as value for service_manage to HAProxy module.
-# Defaults to true
-#
-# [*haproxy_global_maxconn*]
-# The value to use as maxconn in the HAProxy global config section.
-# Defaults to 20480
-#
-# [*haproxy_default_maxconn*]
-# The value to use as maxconn in the HAProxy default config section.
-# Defaults to 4096
-#
-# [*haproxy_default_timeout*]
-# The value to use as timeout in the HAProxy default config section.
-# Defaults to [ 'http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s' ]
-#
-# [*haproxy_listen_bind_param*]
-# A list of params to be added to the HAProxy listener bind directive. By
-# default the 'transparent' param is added but it should be cleared if
-# one of the *_virtual_ip addresses is a wildcard, eg. 0.0.0.0
-# Defaults to [ 'transparent' ]
-#
-# [*haproxy_member_options*]
-# The default options to use for the HAProxy balancer members.
-# Defaults to [ 'check', 'inter 2000', 'rise 2', 'fall 5' ]
-#
-# [*haproxy_log_address*]
-# The IPv4, IPv6 or filesystem socket path of the syslog server.
-# Defaults to '/dev/log'
-#
-# [*controller_host*]
-# (Deprecated)Host or group of hosts to load-balance the services
-# Can be a string or an array.
-# Defaults to undef
-#
-# [*controller_hosts*]
-# IPs of host or group of hosts to load-balance the services
-# Can be a string or an array.
-# Defaults to undef
-#
-# [*controller_hosts_names*]
-# Names of host or group of hosts to load-balance the services
-# Can be a string or an array.
-# Defaults to undef
-#
-# [*controller_virtual_ip*]
-# Control IP or group of IPs to bind the pools
-# Can be a string or an array.
-# Defaults to undef
-#
-# [*control_virtual_interface*]
-# Interface to bind the control VIP
-# Can be a string or an array.
-# Defaults to undef
-#
-# [*public_virtual_interface*]
-# Interface to bind the public VIP
-# Can be a string or an array.
-# Defaults to undef
-#
-# [*public_virtual_ip*]
-# Public IP or group of IPs to bind the pools
-# Can be a string or an array.
-# Defaults to undef
-#
-# [*internal_api_virtual_ip*]
-# Virtual IP on the internal API network.
-# A string.
-# Defaults to false
-#
-# [*storage_virtual_ip*]
-# Virtual IP on the storage network.
-# A string.
-# Defaults to false
-#
-# [*storage_mgmt_virtual_ip*]
-# Virtual IP on the storage mgmt network.
-# A string.
-# Defaults to false
-#
-# [*haproxy_stats_user*]
-# Username for haproxy stats authentication.
-# A string.
-# Defaults to 'admin'
-#
-# [*haproxy_stats_password*]
-# Password for haproxy stats authentication. When set, authentication is
-# enabled on the haproxy stats endpoint.
-# A string.
-# Defaults to undef
-#
-# [*service_certificate*]
-# Filename of an HAProxy-compatible certificate and key file
-# When set, enables SSL on the public API endpoints using the specified file.
-# Defaults to undef
-#
-# [*internal_certificate*]
-# Filename of an HAProxy-compatible certificate and key file
-# When set, enables SSL on the internal API endpoints using the specified file.
-# Defaults to undef
-#
-# [*ssl_cipher_suite*]
-# The default string describing the list of cipher algorithms ("cipher suite")
-# that are negotiated during the SSL/TLS handshake for all "bind" lines. This
-# value comes from the Fedora system crypto policy.
-# Defaults to '!SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES'
-#
-# [*ssl_options*]
-# String that sets the default ssl options to force on all "bind" lines.
-# Defaults to 'no-sslv3'
-#
-# [*haproxy_stats_certificate*]
-# Filename of an HAProxy-compatible certificate and key file
-# When set, enables SSL on the haproxy stats endpoint using the specified file.
-# Defaults to undef
-#
-# [*keystone_admin*]
-# (optional) Enable or not Keystone Admin API binding
-# Defaults to false
-#
-# [*keystone_public*]
-# (optional) Enable or not Keystone Public API binding
-# Defaults to false
-#
-# [*neutron*]
-# (optional) Enable or not Neutron API binding
-# Defaults to false
-#
-# [*cinder*]
-# (optional) Enable or not Cinder API binding
-# Defaults to false
-#
-# [*manila*]
-# (optional) Enable or not Manila API binding
-# Defaults to false
-#
-# [*sahara*]
-# (optional) Enable or not Sahara API binding
-# defaults to false
-#
-# [*trove*]
-# (optional) Enable or not Trove API binding
-# defaults to false
-#
-# [*glance_api*]
-# (optional) Enable or not Glance API binding
-# Defaults to false
-#
-# [*glance_registry*]
-# (optional) Enable or not Glance registry binding
-# Defaults to false
-#
-# [*nova_osapi*]
-# (optional) Enable or not Nova API binding
-# Defaults to false
-#
-# [*nova_metadata*]
-# (optional) Enable or not Nova metadata binding
-# Defaults to false
-#
-# [*nova_novncproxy*]
-# (optional) Enable or not Nova novncproxy binding
-# Defaults to false
-#
-# [*ceilometer*]
-# (optional) Enable or not Ceilometer API binding
-# Defaults to false
-#
-# [*aodh*]
-# (optional) Enable or not Aodh API binding
-# Defaults to false
-#
-# [*gnocchi*]
-# (optional) Enable or not Gnocchi API binding
-# Defaults to false
-#
-# [*swift_proxy_server*]
-# (optional) Enable or not Swift API binding
-# Defaults to false
-#
-# [*heat_api*]
-# (optional) Enable or not Heat API binding
-# Defaults to false
-#
-# [*heat_cloudwatch*]
-# (optional) Enable or not Heat Cloudwatch API binding
-# Defaults to false
-#
-# [*heat_cfn*]
-# (optional) Enable or not Heat CFN API binding
-# Defaults to false
-#
-# [*horizon*]
-# (optional) Enable or not Horizon dashboard binding
-# Defaults to false
-#
-# [*ironic*]
-# (optional) Enable or not Ironic API binding
-# Defaults to false
-#
-# [*mysql*]
-# (optional) Enable or not MySQL Galera binding
-# Defaults to false
-#
-# [*mysql_clustercheck*]
-# (optional) Enable check via clustercheck for mysql
-# Defaults to false
-#
-# [*rabbitmq*]
-# (optional) Enable or not RabbitMQ binding
-# Defaults to false
-#
-# [*redis*]
-# (optional) Enable or not Redis binding
-# Defaults to false
-#
-# [*redis_password*]
-# (optional) Password for Redis authentication, eventually needed by the
-# specific monitoring we do from HAProxy for Redis
-# Defaults to undef
-#
-# [*midonet_api*]
-# (optional) Enable or not MidoNet API binding
-# Defaults to false
-#
-# [*service_ports*]
-# (optional) Hash that contains the values to override from the service ports
-# The available keys to modify the services' ports are:
-# 'aodh_api_port' (Defaults to 8042)
-# 'aodh_api_ssl_port' (Defaults to 13042)
-# 'ceilometer_api_port' (Defaults to 8777)
-# 'ceilometer_api_ssl_port' (Defaults to 13777)
-# 'cinder_api_port' (Defaults to 8776)
-# 'cinder_api_ssl_port' (Defaults to 13776)
-# 'glance_api_port' (Defaults to 9292)
-# 'glance_api_ssl_port' (Defaults to 13292)
-# 'glance_registry_port' (Defaults to 9191)
-# 'gnocchi_api_port' (Defaults to 8041)
-# 'gnocchi_api_ssl_port' (Defaults to 13041)
-# 'heat_api_port' (Defaults to 8004)
-# 'heat_api_ssl_port' (Defaults to 13004)
-# 'heat_cfn_port' (Defaults to 8000)
-# 'heat_cfn_ssl_port' (Defaults to 13005)
-# 'heat_cw_port' (Defaults to 8003)
-# 'heat_cw_ssl_port' (Defaults to 13003)
-# 'ironic_api_port' (Defaults to 6385)
-# 'ironic_api_ssl_port' (Defaults to 13385)
-# 'keystone_admin_api_port' (Defaults to 35357)
-# 'keystone_admin_api_ssl_port' (Defaults to 13357)
-# 'keystone_public_api_port' (Defaults to 5000)
-# 'keystone_public_api_ssl_port' (Defaults to 13000)
-# 'manila_api_port' (Defaults to 8786)
-# 'manila_api_ssl_port' (Defaults to 13786)
-# 'neutron_api_port' (Defaults to 9696)
-# 'neutron_api_ssl_port' (Defaults to 13696)
-# 'nova_api_port' (Defaults to 8774)
-# 'nova_api_ssl_port' (Defaults to 13774)
-# 'nova_metadata_port' (Defaults to 8775)
-# 'nova_novnc_port' (Defaults to 6080)
-# 'nova_novnc_ssl_port' (Defaults to 13080)
-# 'sahara_api_port' (Defaults to 8386)
-# 'sahara_api_ssl_port' (Defaults to 13386)
-# 'swift_proxy_port' (Defaults to 8080)
-# 'swift_proxy_ssl_port' (Defaults to 13808)
-# 'trove_api_port' (Defaults to 8779)
-# 'trove_api_ssl_port' (Defaults to 13779)
-# Defaults to {}
-#
-class tripleo::loadbalancer (
- $controller_virtual_ip,
- $control_virtual_interface,
- $public_virtual_interface,
- $public_virtual_ip,
- $internal_api_virtual_ip = false,
- $storage_virtual_ip = false,
- $storage_mgmt_virtual_ip = false,
- $manage_vip = true,
- $haproxy_service_manage = true,
- $haproxy_global_maxconn = 20480,
- $haproxy_default_maxconn = 4096,
- $haproxy_default_timeout = [ 'http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s' ],
- $haproxy_listen_bind_param = [ 'transparent' ],
- $haproxy_member_options = [ 'check', 'inter 2000', 'rise 2', 'fall 5' ],
- $haproxy_log_address = '/dev/log',
- $haproxy_stats_user = 'admin',
- $haproxy_stats_password = undef,
- $controller_host = undef,
- $controller_hosts = undef,
- $controller_hosts_names = undef,
- $service_certificate = undef,
- $internal_certificate = undef,
- $ssl_cipher_suite = '!SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES',
- $ssl_options = 'no-sslv3',
- $haproxy_stats_certificate = undef,
- $keystone_admin = false,
- $keystone_public = false,
- $neutron = false,
- $cinder = false,
- $sahara = false,
- $trove = false,
- $manila = false,
- $glance_api = false,
- $glance_registry = false,
- $nova_osapi = false,
- $nova_metadata = false,
- $nova_novncproxy = false,
- $ceilometer = false,
- $aodh = false,
- $gnocchi = false,
- $swift_proxy_server = false,
- $heat_api = false,
- $heat_cloudwatch = false,
- $heat_cfn = false,
- $horizon = false,
- $ironic = false,
- $mysql = false,
- $mysql_clustercheck = false,
- $rabbitmq = false,
- $redis = false,
- $redis_password = undef,
- $midonet_api = false,
- $service_ports = {}
-) {
- warning('This class is going to be dropped during Newton cycle, replaced by tripleo::haproxy and tripleo::keepalived.')
- class { '::tripleo::haproxy':
- controller_virtual_ip => $controller_virtual_ip,
- public_virtual_ip => $public_virtual_ip,
- # Force to false because we already declare ::tripleo::keepalived later in this manifest to kep
- # old hieradata binding.
- keepalived => false,
- haproxy_service_manage => $haproxy_service_manage,
- haproxy_global_maxconn => $haproxy_global_maxconn,
- haproxy_default_maxconn => $haproxy_default_maxconn,
- haproxy_default_timeout => $haproxy_default_timeout,
- haproxy_listen_bind_param => $haproxy_listen_bind_param,
- haproxy_member_options => $haproxy_member_options,
- haproxy_log_address => $haproxy_log_address,
- haproxy_stats_user => $haproxy_stats_user,
- haproxy_stats_password => $haproxy_stats_password,
- controller_host => $controller_host,
- controller_hosts => $controller_hosts,
- controller_hosts_names => $controller_hosts_names,
- service_certificate => $service_certificate,
- internal_certificate => $internal_certificate,
- ssl_cipher_suite => $ssl_cipher_suite,
- ssl_options => $ssl_options,
- haproxy_stats_certificate => $haproxy_stats_certificate,
- keystone_admin => $keystone_admin,
- keystone_public => $keystone_public,
- neutron => $neutron,
- cinder => $cinder,
- sahara => $sahara,
- trove => $trove,
- manila => $manila,
- glance_api => $glance_api,
- glance_registry => $glance_registry,
- nova_osapi => $nova_osapi,
- nova_metadata => $nova_metadata,
- nova_novncproxy => $nova_novncproxy,
- ceilometer => $ceilometer,
- aodh => $aodh,
- gnocchi => $gnocchi,
- swift_proxy_server => $swift_proxy_server,
- heat_api => $heat_api,
- heat_cloudwatch => $heat_cloudwatch,
- heat_cfn => $heat_cfn,
- horizon => $horizon,
- ironic => $ironic,
- mysql => $mysql,
- mysql_clustercheck => $mysql_clustercheck,
- rabbitmq => $rabbitmq,
- redis => $redis,
- redis_password => $redis_password,
- midonet_api => $midonet_api,
- service_ports => $service_ports,
- }
-
- if $manage_vip {
- class { '::tripleo::keepalived':
- controller_virtual_ip => $controller_virtual_ip,
- control_virtual_interface => $public_virtual_interface,
- public_virtual_interface => $public_virtual_interface,
- public_virtual_ip => $public_virtual_ip,
- internal_api_virtual_ip => $internal_api_virtual_ip,
- storage_virtual_ip => $storage_virtual_ip,
- storage_mgmt_virtual_ip => $storage_mgmt_virtual_ip,
- }
- }
-}
diff --git a/manifests/loadbalancer/endpoint.pp b/manifests/loadbalancer/endpoint.pp
deleted file mode 100644
index add6689..0000000
--- a/manifests/loadbalancer/endpoint.pp
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 2014 Red Hat, Inc.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-# == Class: tripleo::loadbalancer::endpoint
-#
-# Configure a HAProxy listen endpoint
-#
-# [*internal_ip*]
-# The IP in which the proxy endpoint will be listening in the internal
-# network.
-#
-# [*service_port*]
-# The default port on which the endpoint will be listening.
-#
-# [*ip_addresses*]
-# The ordered list of IPs to be used to contact the balancer member.
-#
-# [*server_names*]
-# The names of the balancer members, which usually should be the hostname.
-#
-# [*member_options*]
-# Options for the balancer member, specified after the server declaration.
-# These should go in the member's configuration block.
-#
-# [*public_virtual_ip*]
-# Address in which the proxy endpoint will be listening in the public network.
-# If this service is internal only this should be ommited.
-# Defaults to undef.
-#
-# [*mode*]
-# HAProxy mode in which the endpoint will be listening. This can be undef,
-# tcp, http or health.
-# Defaults to undef.
-#
-# [*haproxy_listen_bind_param*]
-# A list of params to be added to the HAProxy listener bind directive.
-# Defaults to undef.
-#
-# [*listen_options*]
-# Options specified for the listening service's configuration block (in
-# HAproxy terms, the frontend).
-# defaults to {'option' => []}
-#
-# [*public_ssl_port*]
-# The port used for the public proxy endpoint if it differs from the default
-# one. This is used only if SSL is enabled, and it's used in order to avoid
-# overriding with the internal proxy endpoint (which could happen if they were
-# in the same network).
-# Defaults to undef.
-#
-# [*public_certificate*]
-# Certificate path used to enable TLS for the public proxy endpoint.
-# Defaults to undef.
-#
-# [*internal_certificate*]
-# Certificate path used to enable TLS for the internal proxy endpoint.
-# Defaults to undef.
-#
-define tripleo::loadbalancer::endpoint (
- $internal_ip,
- $service_port,
- $ip_addresses,
- $server_names,
- $member_options,
- $public_virtual_ip = undef,
- $mode = undef,
- $haproxy_listen_bind_param = undef,
- $listen_options = {
- 'option' => [],
- },
- $public_ssl_port = undef,
- $public_certificate = undef,
- $internal_certificate = undef,
-) {
- ::tripleo::haproxy::endpoint { $name:
- internal_ip => $internal_ip,
- service_port => $service_port,
- ip_addresses => $ip_addresses,
- server_names => $server_names,
- member_options => $member_options,
- public_virtual_ip => $public_virtual_ip,
- mode => $mode,
- haproxy_listen_bind_param => $haproxy_listen_bind_param,
- listen_options => $listen_options,
- public_ssl_port => $public_ssl_port,
- public_certificate => $public_certificate,
- internal_certificate => $internal_certificate
- }
-}
diff --git a/manifests/profile/base/cinder.pp b/manifests/profile/base/cinder.pp
new file mode 100644
index 0000000..27dc277
--- /dev/null
+++ b/manifests/profile/base/cinder.pp
@@ -0,0 +1,52 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder
+#
+# Cinder common profile for tripleo
+#
+# === Parameters
+#
+# [*cinder_enable_db_purge*]
+# (Optional) Wheter to enable db purging
+# Defaults to true
+#
+# [*pacemaker_master*]
+# (Optional) The master node runs some tasks
+# one step earlier than others; disable to
+# the node is not the master.
+# Defaults to true
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder (
+ $cinder_enable_db_purge = true,
+ $pacemaker_master = true,
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 or ($step >= 3 and $pacemaker_master) {
+ include ::cinder
+ include ::cinder::config
+ }
+
+ if $step >= 5 {
+ if $cinder_enable_db_purge {
+ include ::cinder::cron::db_purge
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/api.pp b/manifests/profile/base/cinder/api.pp
new file mode 100644
index 0000000..a2da25f
--- /dev/null
+++ b/manifests/profile/base/cinder/api.pp
@@ -0,0 +1,49 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::api
+#
+# Cinder API profile for tripleo
+#
+# === Parameters
+#
+# [*sync_db*]
+# (Optional) Whether to run db sync
+# Defaults to true
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::api (
+ $sync_db = true,
+ $step = hiera('step'),
+) {
+
+ class { '::tripleo::profile::base::cinder':
+ pacemaker_master => $sync_db,
+ }
+
+ if $step >= 3 and $sync_db {
+ include ::cinder::db::mysql
+ }
+
+ if $step >= 4 or ($step >= 3 and $sync_db) {
+ include ::cinder::api
+ include ::cinder::ceilometer
+ include ::cinder::glance
+ }
+
+}
diff --git a/manifests/profile/base/cinder/scheduler.pp b/manifests/profile/base/cinder/scheduler.pp
new file mode 100644
index 0000000..68f2813
--- /dev/null
+++ b/manifests/profile/base/cinder/scheduler.pp
@@ -0,0 +1,36 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::scheduler
+#
+# Cinder Scheduler profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::scheduler (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder
+
+ if $step >= 4 {
+ include ::cinder::scheduler
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume.pp b/manifests/profile/base/cinder/volume.pp
new file mode 100644
index 0000000..96cd06a
--- /dev/null
+++ b/manifests/profile/base/cinder/volume.pp
@@ -0,0 +1,118 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::volume
+#
+# Cinder Volume profile for tripleo
+#
+# === Parameters
+#
+# [*cinder_enable_dellsc_backend*]
+# (Optional) Whether to enable the delsc backend
+# Defaults to true
+#
+# [*cinder_enable_eqlx_backend*]
+# (Optional) Whether to enable the eqlx backend
+# Defaults to true
+#
+# [*cinder_enable_iscsi_backend*]
+# (Optional) Whether to enable the iscsi backend
+# Defaults to true
+#
+# [*cinder_enable_netapp_backend*]
+# (Optional) Whether to enable the netapp backend
+# Defaults to true
+#
+# [*cinder_enable_nfs_backend*]
+# (Optional) Whether to enable the nfs backend
+# Defaults to true
+#
+# [*cinder_enable_rbd_backend*]
+# (Optional) Whether to enable the rbd backend
+# Defaults to true
+#
+# [*cinder_user_enabled_backends*]
+# (Optional) List of additional backend stanzas to activate
+# Defaults to hiera('cinder_user_enabled_backends')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume (
+ $cinder_enable_dellsc_backend = false,
+ $cinder_enable_eqlx_backend = false,
+ $cinder_enable_iscsi_backend = true,
+ $cinder_enable_netapp_backend = false,
+ $cinder_enable_nfs_backend = false,
+ $cinder_enable_rbd_backend = false,
+ $cinder_user_enabled_backends = hiera('cinder_user_enabled_backends', undef),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder
+
+ if $step >= 4 {
+ include ::cinder::volume
+
+ if $cinder_enable_dellsc_backend {
+ include ::tripleo::profile::base::cinder::volume::dellsc
+ $cinder_dellsc_backend_name = hiera('cinder::backend::dellsc_iscsi::volume_backend_name', 'tripleo_dellsc')
+ } else {
+ $cinder_dellsc_backend_name = undef
+ }
+
+ if $cinder_enable_eqlx_backend {
+ include ::tripleo::profile::base::cinder::volume::eqlx
+ $cinder_eqlx_backend_name = hiera('cinder::backend::eqlx::volume_backend_name', 'tripleo_eqlx')
+ } else {
+ $cinder_eqlx_backend_name = undef
+ }
+
+ if $cinder_enable_iscsi_backend {
+ include ::tripleo::profile::base::cinder::volume::iscsi
+ $cinder_iscsi_backend_name = hiera('cinder::backend::iscsi::volume_backend_name', 'tripleo_iscsi')
+ } else {
+ $cinder_iscsi_backend_name = undef
+ }
+
+ if $cinder_enable_netapp_backend {
+ include ::tripleo::profile::base::cinder::volume::netapp
+ $cinder_netapp_backend_name = hiera('cinder::backend::netapp::volume_backend_name', 'tripleo_netapp')
+ } else {
+ $cinder_netapp_backend_name = undef
+ }
+
+ if $cinder_enable_nfs_backend {
+ include ::tripleo::profile::base::cinder::volume::nfs
+ $cinder_nfs_backend_name = hiera('cinder::backend::nfs::volume_backend_name', 'tripleo_nfs')
+ } else {
+ $cinder_nfs_backend_name = undef
+ }
+
+ if $cinder_enable_rbd_backend {
+ include ::tripleo::profile::base::cinder::volume::rbd
+ $cinder_rbd_backend_name = hiera('cinder::backend::rbd::volume_backend_name', 'tripleo_ceph')
+ } else {
+ $cinder_rbd_backend_name = undef
+ }
+
+ $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend_name, $cinder_rbd_backend_name, $cinder_eqlx_backend_name, $cinder_dellsc_backend_name, $cinder_netapp_backend_name, $cinder_nfs_backend_name, $cinder_user_enabled_backends])
+ class { '::cinder::backends' :
+ enabled_backends => $cinder_enabled_backends,
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/dellsc.pp b/manifests/profile/base/cinder/volume/dellsc.pp
new file mode 100644
index 0000000..6f7922d
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/dellsc.pp
@@ -0,0 +1,51 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::volume::dellsc
+#
+# Cinder Volume dellsc profile for tripleo
+#
+# === Parameters
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_dellsc'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume::dellsc (
+ $backend_name = hiera('cinder::backend::dellsc_iscsi::volume_backend_name', 'tripleo_dellsc'),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ cinder::backend::dellsc_iscsi { $backend_name :
+ san_ip => hiera('cinder::backend::dellsc_iscsi::san_ip', undef),
+ san_login => hiera('cinder::backend::dellsc_iscsi::san_login', undef),
+ san_password => hiera('cinder::backend::dellsc_iscsi::san_password', undef),
+ dell_sc_ssn => hiera('cinder::backend::dellsc_iscsi::dell_sc_ssn', undef),
+ iscsi_ip_address => hiera('cinder::backend::dellsc_iscsi::iscsi_ip_address', undef),
+ iscsi_port => hiera('cinder::backend::dellsc_iscsi::iscsi_port', undef),
+ dell_sc_api_port => hiera('cinder::backend::dellsc_iscsi::dell_sc_api_port', undef),
+ dell_sc_server_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_server_folder', undef),
+ dell_sc_volume_folder => hiera('cinder::backend::dellsc_iscsi::dell_sc_volume_folder', undef),
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/eqlx.pp b/manifests/profile/base/cinder/volume/eqlx.pp
new file mode 100644
index 0000000..a18270d
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/eqlx.pp
@@ -0,0 +1,51 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::volume::eqlx
+#
+# Cinder Volume eqlx profile for tripleo
+#
+# === Parameters
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_eqlx'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume::eqlx (
+ $backend_name = hiera('cinder::backend::eqlx::volume_backend_name', 'tripleo_eqlx'),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ cinder::backend::eqlx { $backend_name :
+ san_ip => hiera('cinder::backend::eqlx::san_ip', undef),
+ san_login => hiera('cinder::backend::eqlx::san_login', undef),
+ san_password => hiera('cinder::backend::eqlx::san_password', undef),
+ san_thin_provision => hiera('cinder::backend::eqlx::san_thin_provision', undef),
+ eqlx_group_name => hiera('cinder::backend::eqlx::eqlx_group_name', undef),
+ eqlx_pool => hiera('cinder::backend::eqlx::eqlx_pool', undef),
+ eqlx_use_chap => hiera('cinder::backend::eqlx::eqlx_use_chap', undef),
+ eqlx_chap_login => hiera('cinder::backend::eqlx::eqlx_chap_login', undef),
+ eqlx_chap_password => hiera('cinder::backend::eqlx::eqlx_san_password', undef),
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/iscsi.pp b/manifests/profile/base/cinder/volume/iscsi.pp
new file mode 100644
index 0000000..d857caa
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/iscsi.pp
@@ -0,0 +1,62 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::volume::iscsi
+#
+# Cinder Volume iscsi profile for tripleo
+#
+# === Parameters
+#
+# [*cinder_iscsi_address*]
+# The address where to bind the iscsi targets daemon
+#
+# [*cinder_iscsi_helper*]
+# (Optional) The iscsi helper to use
+# Defaults to 'tgtadm'
+#
+# [*cinder_lvm_loop_device_size*]
+# (Optional) The size (in MB) of the LVM loopback volume
+# Defaults to '10280'
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_iscsi'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume::iscsi (
+ $cinder_iscsi_address,
+ $cinder_iscsi_helper = 'tgtadm',
+ $cinder_lvm_loop_device_size = '10280',
+ $backend_name = hiera('cinder::backend::iscsi::volume_backend_name', 'tripleo_iscsi'),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ class { '::cinder::setup_test_volume':
+ size => join([$cinder_lvm_loop_device_size, 'M']),
+ }
+
+ cinder::backend::iscsi { $backend_name :
+ iscsi_ip_address => $cinder_iscsi_address,
+ iscsi_helper => $cinder_iscsi_helper,
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/netapp.pp b/manifests/profile/base/cinder/volume/netapp.pp
new file mode 100644
index 0000000..bae541f
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/netapp.pp
@@ -0,0 +1,66 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::volume::netapp
+#
+# Cinder Volume netapp profile for tripleo
+#
+# === Parameters
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_netapp'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume::netapp (
+ $backend_name = hiera('cinder::backend::netapp::volume_backend_name', 'tripleo_netapp'),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ if hiera('cinder::backend::netapp::nfs_shares', undef) {
+ $cinder_netapp_nfs_shares = split(hiera('cinder::backend::netapp::nfs_shares', undef), ',')
+ }
+
+ cinder::backend::netapp { $backend_name :
+ netapp_login => hiera('cinder::backend::netapp::netapp_login', undef),
+ netapp_password => hiera('cinder::backend::netapp::netapp_password', undef),
+ netapp_server_hostname => hiera('cinder::backend::netapp::netapp_server_hostname', undef),
+ netapp_server_port => hiera('cinder::backend::netapp::netapp_server_port', undef),
+ netapp_size_multiplier => hiera('cinder::backend::netapp::netapp_size_multiplier', undef),
+ netapp_storage_family => hiera('cinder::backend::netapp::netapp_storage_family', undef),
+ netapp_storage_protocol => hiera('cinder::backend::netapp::netapp_storage_protocol', undef),
+ netapp_transport_type => hiera('cinder::backend::netapp::netapp_transport_type', undef),
+ netapp_vfiler => hiera('cinder::backend::netapp::netapp_vfiler', undef),
+ netapp_volume_list => hiera('cinder::backend::netapp::netapp_volume_list', undef),
+ netapp_vserver => hiera('cinder::backend::netapp::netapp_vserver', undef),
+ netapp_partner_backend_name => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef),
+ nfs_shares => $cinder_netapp_nfs_shares,
+ nfs_shares_config => hiera('cinder::backend::netapp::nfs_shares_config', undef),
+ netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef),
+ netapp_controller_ips => hiera('cinder::backend::netapp::netapp_controller_ips', undef),
+ netapp_sa_password => hiera('cinder::backend::netapp::netapp_sa_password', undef),
+ netapp_storage_pools => hiera('cinder::backend::netapp::netapp_storage_pools', undef),
+ netapp_eseries_host_type => hiera('cinder::backend::netapp::netapp_eseries_host_type', undef),
+ netapp_webservice_path => hiera('cinder::backend::netapp::netapp_webservice_path', undef),
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/nfs.pp b/manifests/profile/base/cinder/volume/nfs.pp
new file mode 100644
index 0000000..a26c50e
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/nfs.pp
@@ -0,0 +1,62 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::volume::nfs
+#
+# Cinder Volume nfs profile for tripleo
+#
+# === Parameters
+#
+# [*cinder_nfs_mount_options*]
+# (Optional) List of mount options for the NFS share
+# Defaults to ''
+#
+# [*cinder_nfs_servers*]
+# List of NFS shares to mount
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_nfs'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume::nfs (
+ $cinder_nfs_mount_options = '',
+ $cinder_nfs_servers,
+ $backend_name = hiera('cinder::backend::nfs::volume_backend_name', 'tripleo_nfs'),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ if str2bool($::selinux) {
+ selboolean { 'virt_use_nfs':
+ value => on,
+ persistent => true,
+ } -> Package['nfs-utils']
+ }
+
+ package {'nfs-utils': } ->
+ cinder::backend::nfs { $backend_name :
+ nfs_servers => $cinder_nfs_servers,
+ nfs_mount_options => $cinder_nfs_mount_options,
+ nfs_shares_config => '/etc/cinder/shares-nfs.conf',
+ }
+ }
+
+}
diff --git a/manifests/profile/base/cinder/volume/rbd.pp b/manifests/profile/base/cinder/volume/rbd.pp
new file mode 100644
index 0000000..6c8341a
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/rbd.pp
@@ -0,0 +1,66 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::cinder::volume::rbd
+#
+# Cinder Volume rbd profile for tripleo
+#
+# === Parameters
+#
+# [*cinder_rbd_backend_host*]
+# (Optional) String to use as backend_host in the backend stanza
+# Defaults to 'cinder::host'
+#
+# [*cinder_rbd_pool_name*]
+# (Optional) The name of the RBD pool to use
+# Defaults to 'volumes'
+#
+# [*cinder_rbd_secret_uuid*]
+# (Optional) UUID of the of the libvirt secret storing the Cephx key
+# Defaults to 'ceph::profile::params::fsid'
+#
+# [*cinder_rbd_user_name*]
+# (Optional) The user name for the RBD client
+# Defaults to 'openstack'
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_ceph'
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume::rbd (
+ $cinder_rbd_backend_host = hiera('cinder::host', 'hostgroup'),
+ $cinder_rbd_pool_name = 'volumes',
+ $cinder_rbd_secret_uuid = hiera('ceph::profile::params::fsid', undef),
+ $cinder_rbd_user_name = 'openstack',
+ $backend_name = hiera('cinder::backend::rbd::volume_backend_name', 'tripleo_ceph'),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ cinder::backend::rbd { $backend_name :
+ backend_host => $cinder_rbd_backend_host,
+ rbd_pool => $cinder_rbd_pool_name,
+ rbd_user => $cinder_rbd_user_name,
+ rbd_secret_uuid => $cinder_rbd_secret_uuid,
+ }
+ }
+
+}
diff --git a/manifests/profile/base/loadbalancer.pp b/manifests/profile/base/loadbalancer.pp
index e5a0f48..d9e2b15 100644
--- a/manifests/profile/base/loadbalancer.pp
+++ b/manifests/profile/base/loadbalancer.pp
@@ -27,36 +27,14 @@
# (Optional) Whether or not loadbalancer is enabled.
# Defaults to hiera('enable_load_balancer', true).
#
-# [*controller_node_ips*]
-# (Optional) List of IPs for controller nodes.
-# Defaults to split(hiera('controller_node_ips'), ',')).
-#
-# [*controller_node_names*]
-# (Optional) List of hostnames for controller nodes.
-# Defaults to split(downcase(hiera('controller_node_names')), ',').
-#
class tripleo::profile::base::loadbalancer (
- $enable_load_balancer = hiera('enable_load_balancer', true),
- $controller_node_ips = split(hiera('controller_node_ips'), ','),
- $controller_node_names = split(downcase(hiera('controller_node_names')), ','),
- $step = hiera('step'),
+ $enable_load_balancer = hiera('enable_load_balancer', true),
+ $step = hiera('step'),
) {
if $step >= 1 {
if $enable_load_balancer {
- # TODO(emilien): remove this conditional once
- # https://review.openstack.org/#/c/320411/ is merged.
- if hiera('tripleo::loadbalancer::keystone_admin', undef) {
- class { '::tripleo::loadbalancer':
- controller_hosts => $controller_node_ips,
- controller_hosts_names => $controller_node_names,
- }
- } else {
- class { '::tripleo::haproxy':
- controller_hosts => $controller_node_ips,
- controller_hosts_names => $controller_node_names,
- }
- }
+ include ::tripleo::haproxy
}
}
diff --git a/manifests/profile/base/neutron/midonet.pp b/manifests/profile/base/neutron/midonet.pp
index 60aa006..972856f 100644
--- a/manifests/profile/base/neutron/midonet.pp
+++ b/manifests/profile/base/neutron/midonet.pp
@@ -68,7 +68,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::midonet (
- $vip = hiera('public_virtual_ip', 'tripleo::loadbalancer::public_virtual_ip'),
+ $vip = hiera('public_virtual_ip'),
$keystone_admin_token = hiera('keystone::admin_token', ''),
$zookeeper_client_ip = hiera('neutron::bind_host', ''),
$zookeeper_hostnames = hiera('controller_node_names', ''),
diff --git a/manifests/profile/pacemaker/cinder/api.pp b/manifests/profile/pacemaker/cinder/api.pp
new file mode 100644
index 0000000..2c9cedf
--- /dev/null
+++ b/manifests/profile/pacemaker/cinder/api.pp
@@ -0,0 +1,67 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::cinder::api
+#
+# Cinder API Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::pacemaker::cinder::api (
+ $bootstrap_node = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+) {
+
+ Service <| tag == 'cinder-service' |> {
+ hasrestart => true,
+ restart => '/bin/true',
+ start => '/bin/true',
+ stop => '/bin/true',
+ }
+
+ if $::hostname == downcase($bootstrap_node) {
+ $pacemaker_master = true
+ } else {
+ $pacemaker_master = false
+ }
+
+ class { '::tripleo::profile::base::cinder::api':
+ sync_db => $pacemaker_master,
+ }
+
+ if $step >= 5 and $pacemaker_master {
+ pacemaker::resource::service { $::cinder::params::api_service :
+ clone_params => 'interleave=true',
+ require => Pacemaker::Resource::Ocf['openstack-core'],
+ }
+ pacemaker::constraint::base { 'keystone-then-cinder-api-constraint':
+ constraint_type => 'order',
+ first_resource => 'openstack-core-clone',
+ second_resource => "${::cinder::params::api_service}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Ocf['openstack-core'],
+ Pacemaker::Resource::Service[$::cinder::params::api_service]],
+ }
+ }
+}
diff --git a/manifests/profile/pacemaker/cinder/scheduler.pp b/manifests/profile/pacemaker/cinder/scheduler.pp
new file mode 100644
index 0000000..9b79903
--- /dev/null
+++ b/manifests/profile/pacemaker/cinder/scheduler.pp
@@ -0,0 +1,72 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::cinder::scheduler
+#
+# Cinder Scheduler Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::pacemaker::cinder::scheduler (
+ $bootstrap_node = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+) {
+
+ Service <| tag == 'cinder-service' |> {
+ hasrestart => true,
+ restart => '/bin/true',
+ start => '/bin/true',
+ stop => '/bin/true',
+ }
+
+ if $::hostname == downcase($bootstrap_node) {
+ $pacemaker_master = true
+ } else {
+ $pacemaker_master = false
+ }
+
+ include ::tripleo::profile::base::cinder::scheduler
+
+ if $step >= 5 and $pacemaker_master {
+ pacemaker::resource::service { $::cinder::params::scheduler_service :
+ clone_params => 'interleave=true',
+ }
+ pacemaker::constraint::base { 'cinder-api-then-cinder-scheduler-constraint':
+ constraint_type => 'order',
+ first_resource => "${::cinder::params::api_service}-clone",
+ second_resource => "${::cinder::params::scheduler_service}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::cinder::params::api_service],
+ Pacemaker::Resource::Service[$::cinder::params::scheduler_service]],
+ }
+ pacemaker::constraint::colocation { 'cinder-scheduler-with-cinder-api-colocation':
+ source => "${::cinder::params::scheduler_service}-clone",
+ target => "${::cinder::params::api_service}-clone",
+ score => 'INFINITY',
+ require => [Pacemaker::Resource::Service[$::cinder::params::api_service],
+ Pacemaker::Resource::Service[$::cinder::params::scheduler_service]],
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/cinder/volume.pp b/manifests/profile/pacemaker/cinder/volume.pp
new file mode 100644
index 0000000..a4f251e
--- /dev/null
+++ b/manifests/profile/pacemaker/cinder/volume.pp
@@ -0,0 +1,70 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::cinder::volume
+#
+# Cinder Volume Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::pacemaker::cinder::volume (
+ $bootstrap_node = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+) {
+
+ Service <| tag == 'cinder-service' |> {
+ hasrestart => true,
+ restart => '/bin/true',
+ start => '/bin/true',
+ stop => '/bin/true',
+ }
+
+ if $::hostname == downcase($bootstrap_node) {
+ $pacemaker_master = true
+ } else {
+ $pacemaker_master = false
+ }
+
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 5 and $pacemaker_master {
+ pacemaker::resource::service { $::cinder::params::volume_service : }
+ pacemaker::constraint::base { 'cinder-scheduler-then-cinder-volume-constraint':
+ constraint_type => 'order',
+ first_resource => "${::cinder::params::scheduler_service}-clone",
+ second_resource => $::cinder::params::volume_service,
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::cinder::params::scheduler_service],
+ Pacemaker::Resource::Service[$::cinder::params::volume_service]],
+ }
+ pacemaker::constraint::colocation { 'cinder-volume-with-cinder-scheduler-colocation':
+ source => $::cinder::params::volume_service,
+ target => "${::cinder::params::scheduler_service}-clone",
+ score => 'INFINITY',
+ require => [Pacemaker::Resource::Service[$::cinder::params::scheduler_service],
+ Pacemaker::Resource::Service[$::cinder::params::volume_service]],
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/loadbalancer.pp b/manifests/profile/pacemaker/loadbalancer.pp
index 2f41769..24b1596 100644
--- a/manifests/profile/pacemaker/loadbalancer.pp
+++ b/manifests/profile/pacemaker/loadbalancer.pp
@@ -54,67 +54,45 @@ class tripleo::profile::pacemaker::loadbalancer (
clone_params => true,
}
- # TODO(emilien): clean-up old parameter references when
- # https://review.openstack.org/#/c/320411/ is merged.
- if hiera('tripleo::loadbalancer::controller_virtual_ip', undef) {
- $control_vip_real = hiera('tripleo::loadbalancer::controller_virtual_ip')
- } else {
- $control_vip_real = hiera('controller_virtual_ip')
- }
+ $control_vip = hiera('controller_virtual_ip')
tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_control_vip':
vip_name => 'control',
- ip_address => $control_vip_real,
+ ip_address => $control_vip,
}
- if hiera('tripleo::loadbalancer::public_virtual_ip', undef) {
- $public_vip_real = hiera('tripleo::loadbalancer::public_virtual_ip')
- } else {
- $public_vip_real = hiera('public_virtual_ip')
- }
+ $public_vip = hiera('public_virtual_ip')
tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_public_vip':
- ensure => $public_vip_real and $public_vip_real != $control_vip_real,
+ ensure => $public_vip and $public_vip != $control_vip,
vip_name => 'public',
- ip_address => $public_vip_real,
+ ip_address => $public_vip,
}
$redis_vip = hiera('redis_vip')
tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_redis_vip':
- ensure => $redis_vip and $redis_vip != $control_vip_real,
+ ensure => $redis_vip and $redis_vip != $control_vip,
vip_name => 'redis',
ip_address => $redis_vip,
}
- if hiera('tripleo::loadbalancer::internal_api_virtual_ip', undef) {
- $internal_api_vip_real = hiera('tripleo::loadbalancer::internal_api_virtual_ip')
- } else {
- $internal_api_vip_real = hiera('internal_api_virtual_ip')
- }
+ $internal_api_vip = hiera('internal_api_virtual_ip')
tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_internal_api_vip':
- ensure => $internal_api_vip_real and $internal_api_vip_real != $control_vip_real,
+ ensure => $internal_api_vip and $internal_api_vip != $control_vip,
vip_name => 'internal_api',
- ip_address => $internal_api_vip_real,
+ ip_address => $internal_api_vip,
}
- if hiera('tripleo::loadbalancer::storage_virtual_ip', undef) {
- $storage_vip_real = hiera('tripleo::loadbalancer::storage_virtual_ip')
- } else {
- $storage_vip_real = hiera('storage_virtual_ip')
- }
+ $storage_vip = hiera('storage_virtual_ip')
tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_storage_vip':
- ensure => $storage_vip_real and $storage_vip_real != $control_vip_real,
+ ensure => $storage_vip and $storage_vip != $control_vip,
vip_name => 'storage',
- ip_address => $storage_vip_real,
+ ip_address => $storage_vip,
}
- if hiera('tripleo::loadbalancer::storage_mgmt_virtual_ip', undef) {
- $storage_mgmt_vip_real = hiera('tripleo::loadbalancer::storage_mgmt_virtual_ip')
- } else {
- $storage_mgmt_vip_real = hiera('storage_mgmt_virtual_ip')
- }
+ $storage_mgmt_vip = hiera('storage_mgmt_virtual_ip')
tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_storage_mgmt_vip':
- ensure => $storage_mgmt_vip_real and $storage_mgmt_vip_real != $control_vip_real,
+ ensure => $storage_mgmt_vip and $storage_mgmt_vip != $control_vip,
vip_name => 'storage_mgmt',
- ip_address => $storage_mgmt_vip_real,
+ ip_address => $storage_mgmt_vip,
}
}