aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/firewall/rule.pp19
-rw-r--r--manifests/haproxy.pp67
-rw-r--r--manifests/haproxy/endpoint.pp29
-rw-r--r--manifests/network/midonet/api.pp122
-rw-r--r--manifests/packages.pp4
-rw-r--r--manifests/profile/base/ceilometer/api.pp7
-rw-r--r--manifests/profile/base/cinder/volume.pp49
-rw-r--r--manifests/profile/base/cinder/volume/hpelefthand.pp71
-rw-r--r--manifests/profile/base/database/mysql.pp2
-rw-r--r--manifests/profile/base/metrics/collectd.pp88
-rw-r--r--manifests/profile/base/metrics/collectd/plugin_helper.pp6
-rw-r--r--manifests/profile/base/neutron/agents/ovn.pp14
-rw-r--r--manifests/profile/base/neutron/opendaylight.pp19
-rw-r--r--manifests/profile/base/neutron/ovn_northd.pp (renamed from manifests/profile/pacemaker/heat/api.pp)30
-rw-r--r--manifests/profile/base/neutron/plugins/ml2.pp5
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/ovn.pp25
-rw-r--r--manifests/profile/base/pacemaker.pp3
-rw-r--r--manifests/profile/base/swift/proxy.pp23
-rw-r--r--manifests/profile/pacemaker/apache.pp58
-rw-r--r--manifests/profile/pacemaker/ceilometer.pp92
-rw-r--r--manifests/profile/pacemaker/ceilometer/agent/central.pp59
-rw-r--r--manifests/profile/pacemaker/ceilometer/agent/notification.pp45
-rw-r--r--manifests/profile/pacemaker/ceilometer/api.pp45
-rw-r--r--manifests/profile/pacemaker/ceilometer/collector.pp49
-rw-r--r--manifests/profile/pacemaker/cinder/api.pp65
-rw-r--r--manifests/profile/pacemaker/cinder/scheduler.pp88
-rw-r--r--manifests/profile/pacemaker/core.pp58
-rw-r--r--manifests/profile/pacemaker/database/mongodb.pp73
-rw-r--r--manifests/profile/pacemaker/glance.pp131
-rw-r--r--manifests/profile/pacemaker/gnocchi.pp97
-rw-r--r--manifests/profile/pacemaker/gnocchi/api.pp32
-rw-r--r--manifests/profile/pacemaker/gnocchi/metricd.pp46
-rw-r--r--manifests/profile/pacemaker/gnocchi/statsd.pp46
-rw-r--r--manifests/profile/pacemaker/heat.pp38
-rw-r--r--manifests/profile/pacemaker/heat/api_cfn.pp50
-rw-r--r--manifests/profile/pacemaker/heat/api_cloudwatch.pp51
-rw-r--r--manifests/profile/pacemaker/heat/engine.pp50
-rw-r--r--manifests/profile/pacemaker/keystone.pp81
-rw-r--r--manifests/profile/pacemaker/memcached.pp61
-rw-r--r--manifests/profile/pacemaker/neutron.pp213
-rw-r--r--manifests/profile/pacemaker/neutron/dhcp.pp44
-rw-r--r--manifests/profile/pacemaker/neutron/l3.pp44
-rw-r--r--manifests/profile/pacemaker/neutron/metadata.pp44
-rw-r--r--manifests/profile/pacemaker/neutron/midonet.pp81
-rw-r--r--manifests/profile/pacemaker/neutron/ovs.pp88
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/ml2.pp26
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/nuage.pp24
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/opencontrail.pp24
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/plumgrid.pp24
-rw-r--r--manifests/profile/pacemaker/neutron/server.pp47
-rw-r--r--manifests/profile/pacemaker/nova.pp37
-rw-r--r--manifests/profile/pacemaker/nova/api.pp88
-rw-r--r--manifests/profile/pacemaker/nova/conductor.pp77
-rw-r--r--manifests/profile/pacemaker/nova/consoleauth.pp87
-rw-r--r--manifests/profile/pacemaker/nova/scheduler.pp52
-rw-r--r--manifests/profile/pacemaker/nova/vncproxy.pp52
-rw-r--r--manifests/profile/pacemaker/sahara.pp37
-rw-r--r--manifests/profile/pacemaker/sahara/api.pp50
-rw-r--r--manifests/profile/pacemaker/sahara/engine.pp49
-rw-r--r--manifests/tls_proxy.pp60
-rw-r--r--manifests/vip_hosts.pp39
-rw-r--r--metadata.json2
-rw-r--r--releasenotes/notes/hpelefthand_8474c416b0d411e6.yaml3
-rw-r--r--releasenotes/notes/sriov_numvfs-40564db9e1be589b.yaml2
-rw-r--r--spec/classes/tripleo_cluster_cassandra_spec.rb54
-rw-r--r--spec/classes/tripleo_cluster_zookeeper_spec.rb86
-rw-r--r--spec/classes/tripleo_firewall_spec.rb17
-rw-r--r--spec/classes/tripleo_midonet_api_spec.rb76
-rw-r--r--spec/classes/tripleo_profile_base_ceilometer_api_spec.rb16
-rw-r--r--spec/classes/tripleo_profile_base_cinder_api_spec.rb86
-rw-r--r--spec/classes/tripleo_profile_base_cinder_backup_ceph_spec.rb59
-rw-r--r--spec/classes/tripleo_profile_base_cinder_backup_spec.rb56
-rw-r--r--spec/classes/tripleo_profile_base_cinder_backup_swift_spec.rb59
-rw-r--r--spec/classes/tripleo_profile_base_cinder_scheduler_spec.rb56
-rw-r--r--spec/classes/tripleo_profile_base_cinder_spec.rb122
-rw-r--r--spec/classes/tripleo_profile_base_cinder_volume_dellsc_spec.rb58
-rw-r--r--spec/classes/tripleo_profile_base_cinder_volume_eqlx_spec.rb58
-rw-r--r--spec/classes/tripleo_profile_base_cinder_volume_iscsi_spec.rb85
-rw-r--r--spec/classes/tripleo_profile_base_cinder_volume_netapp_spec.rb58
-rw-r--r--spec/classes/tripleo_profile_base_cinder_volume_nfs_spec.rb88
-rw-r--r--spec/classes/tripleo_profile_base_cinder_volume_rbd_spec.rb83
-rw-r--r--spec/classes/tripleo_profile_base_cinder_volume_spec.rb216
-rw-r--r--spec/classes/tripleo_ui_spec.rb99
-rw-r--r--spec/fixtures/hiera.yaml1
-rw-r--r--spec/fixtures/hieradata/default.yaml3
-rw-r--r--spec/fixtures/hieradata/step1.yaml2
-rw-r--r--spec/fixtures/hieradata/step2.yaml2
-rw-r--r--spec/fixtures/hieradata/step3.yaml2
-rw-r--r--spec/fixtures/hieradata/step4.yaml9
-rw-r--r--spec/fixtures/hieradata/step5.yaml2
-rw-r--r--spec/fixtures/hieradata/step6.yaml2
91 files changed, 1669 insertions, 2978 deletions
diff --git a/manifests/firewall/rule.pp b/manifests/firewall/rule.pp
index 6801dc4..816e6fe 100644
--- a/manifests/firewall/rule.pp
+++ b/manifests/firewall/rule.pp
@@ -77,8 +77,16 @@ define tripleo::firewall::rule (
$extras = {},
) {
+ if $port == 'all' {
+ warning("All ${proto} traffic will be open on this host.")
+ # undef so the IPtables rule won't have any port specified.
+ $port_real = undef
+ } else {
+ $port_real = $port
+ }
+
$basic = {
- 'port' => $port,
+ 'port' => $port_real,
'dport' => $dport,
'sport' => $sport,
'proto' => $proto,
@@ -100,6 +108,15 @@ define tripleo::firewall::rule (
$rule = merge($basic, $state_rule, $extras)
validate_hash($rule)
+ # This conditional will ensure that TCP and UDP firewall rules have
+ # a port specified in the configuration when using INPUT or OUTPUT chains.
+ # If not, the Puppet catalog will fail.
+ # If we don't do this sanity check, a user could create some TCP/UDP
+ # rules without port, and the result would be an iptables rule that allow any
+ # traffic on the host.
+ if ($proto in ['tcp', 'udp']) and (! ($port or $dport or $sport) and ($chain != 'FORWARD')) {
+ fail("${title} firewall rule cannot be created. TCP or UDP rules for INPUT or OUTPUT need port or sport or dport.")
+ }
create_resources('firewall', { "${title}" => $rule })
}
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 2f3f062..c57666d 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -117,6 +117,11 @@
# String that sets the default ssl options to force on all "bind" lines.
# Defaults to 'no-sslv3'
#
+# [*ca_bundle*]
+# Path to the CA bundle to be used for HAProxy to validate the certificates of
+# the servers it balances
+# Defaults to '/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt'
+#
# [*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.
@@ -271,6 +276,10 @@
# (optional) Enable or not OpenDaylight binding
# Defaults to hiera('opendaylight_api_enabled', false)
#
+# [*ovn_dbs*]
+# (optional) Enable or not OVN northd binding
+# Defaults to hiera('ovn_dbs_enabled', false)
+#
# [*zaqar_ws*]
# (optional) Enable or not Zaqar Websockets binding
# Defaults to false
@@ -375,6 +384,10 @@
# (optional) Specify the network panko is running on.
# Defaults to hiera('panko_api_network', undef)
#
+# [*ovn_dbs_network*]
+# (optional) Specify the network ovn_dbs is running on.
+# Defaults to hiera('ovn_dbs_network', undef)
+#
# [*sahara_network*]
# (optional) Specify the network sahara is running on.
# Defaults to hiera('sahara_api_network', undef)
@@ -436,6 +449,8 @@
# 'nova_novnc_ssl_port' (Defaults to 13080)
# 'panko_api_port' (Defaults to 8779)
# 'panko_api_ssl_port' (Defaults to 13779)
+# 'ovn_nbdb_port' (Defaults to 6641)
+# 'ovn_sbdb_port' (Defaults to 6642)
# 'sahara_api_port' (Defaults to 8386)
# 'sahara_api_ssl_port' (Defaults to 13386)
# 'swift_proxy_port' (Defaults to 8080)
@@ -472,6 +487,7 @@ class tripleo::haproxy (
$enable_internal_tls = hiera('enable_internal_tls', false),
$ssl_cipher_suite = '!SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES',
$ssl_options = 'no-sslv3',
+ $ca_bundle = '/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt',
$haproxy_stats_certificate = undef,
$keystone_admin = hiera('keystone_enabled', false),
$keystone_public = hiera('keystone_enabled', false),
@@ -509,6 +525,7 @@ class tripleo::haproxy (
$zaqar_api = hiera('zaqar_api_enabled', false),
$ceph_rgw = hiera('ceph_rgw_enabled', false),
$opendaylight = hiera('opendaylight_api_enabled', false),
+ $ovn_dbs = hiera('ovn_dbs_enabled', false),
$zaqar_ws = hiera('zaqar_api_enabled', false),
$ui = hiera('enable_ui', false),
$aodh_network = hiera('aodh_api_network', undef),
@@ -534,6 +551,7 @@ class tripleo::haproxy (
$nova_novncproxy_network = hiera('nova_vnc_proxy_network', undef),
$nova_osapi_network = hiera('nova_api_network', undef),
$panko_network = hiera('panko_api_network', undef),
+ $ovn_dbs_network = hiera('ovn_dbs_network', undef),
$sahara_network = hiera('sahara_api_network', undef),
$swift_proxy_server_network = hiera('swift_proxy_network', undef),
$trove_network = hiera('trove_api_network', undef),
@@ -574,6 +592,7 @@ class tripleo::haproxy (
keystone_public_api_ssl_port => 13000,
manila_api_port => 8786,
manila_api_ssl_port => 13786,
+ midonet_cluster_port => 8181,
neutron_api_port => 9696,
neutron_api_ssl_port => 13696,
nova_api_port => 8774,
@@ -583,6 +602,8 @@ class tripleo::haproxy (
nova_novnc_ssl_port => 13080,
panko_api_port => 8779,
panko_api_ssl_port => 13779,
+ ovn_nbdb_port => 6641,
+ ovn_sbdb_port => 6642,
sahara_api_port => 8386,
sahara_api_ssl_port => 13386,
swift_proxy_port => 8080,
@@ -601,8 +622,7 @@ class tripleo::haproxy (
$ports = merge($default_service_ports, $service_ports)
if $enable_internal_tls {
- # TODO(jaosorior): change verify none to verify required.
- $internal_tls_member_options = ['ssl', 'verify none']
+ $internal_tls_member_options = ['ssl', 'verify required', "ca-file ${ca_bundle}"]
} else {
$internal_tls_member_options = []
}
@@ -1245,10 +1265,10 @@ class tripleo::haproxy (
}
}
- $midonet_api_vip = hiera('midonet_api_vip', $controller_virtual_ip)
+ $midonet_cluster_vip = hiera('midonet_cluster_vip', $controller_virtual_ip)
$midonet_bind_opts = {
- "${midonet_api_vip}:8081" => [],
- "${public_virtual_ip}:8081" => [],
+ "${midonet_cluster_vip}:${ports[midonet_cluster_port]}" => [],
+ "${public_virtual_ip}:${ports[midonet_cluster_port]}" => [],
}
if $midonet_api {
@@ -1258,7 +1278,7 @@ class tripleo::haproxy (
}
haproxy::balancermember { 'midonet_api':
listening_service => 'midonet_api',
- ports => '8081',
+ ports => $ports[midonet_cluster_port],
ipaddresses => hiera('midonet_api_node_ips', $controller_hosts_real),
server_names => hiera('midonet_api_node_names', $controller_hosts_names_real),
options => $haproxy_member_options,
@@ -1312,6 +1332,39 @@ class tripleo::haproxy (
}
}
+
+ if $ovn_dbs {
+ # FIXME: is this config enough to ensure we only hit the first node in
+ # ovn_northd_node_ips ?
+ $ovn_db_listen_options = {
+ 'option' => [ 'tcpka' ],
+ 'timeout client' => '90m',
+ 'timeout server' => '90m',
+ 'stick-table' => 'type ip size 1000',
+ 'stick' => 'on dst',
+ }
+ ::tripleo::haproxy::endpoint { 'ovn_nbdb':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('ovn_dbs_vip', $controller_virtual_ip),
+ service_port => $ports[ovn_nbdb_port],
+ ip_addresses => hiera('ovn_dbs_node_ips', $controller_hosts_real),
+ server_names => hiera('ovn_dbs_node_names', $controller_hosts_names_real),
+ service_network => $ovn_dbs_network,
+ listen_options => $ovn_db_listen_options,
+ mode => 'tcp'
+ }
+ ::tripleo::haproxy::endpoint { 'ovn_sbdb':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('ovn_dbs_vip', $controller_virtual_ip),
+ service_port => $ports[ovn_sbdb_port],
+ ip_addresses => hiera('ovn_dbs_node_ips', $controller_hosts_real),
+ server_names => hiera('ovn_dbs_node_names', $controller_hosts_names_real),
+ service_network => $ovn_dbs_network,
+ listen_options => $ovn_db_listen_options,
+ mode => 'tcp'
+ }
+ }
+
if $zaqar_ws {
::tripleo::haproxy::endpoint { 'zaqar_ws':
public_virtual_ip => $public_virtual_ip,
@@ -1325,7 +1378,7 @@ class tripleo::haproxy (
# NOTE(jaosorior): Websockets have more overhead in establishing
# connections than regular HTTP connections. Also, since it begins
# as an HTTP connection and then "upgrades" to a TCP connection, some
- # timeouts get overriden by others at certain times of the connection.
+ # timeouts get overridden by others at certain times of the connection.
# The following values were taken from the following site:
# http://blog.haproxy.com/2012/11/07/websockets-load-balancing-with-haproxy/
'timeout' => ['connect 5s', 'client 25s', 'server 25s', 'tunnel 3600s'],
diff --git a/manifests/haproxy/endpoint.pp b/manifests/haproxy/endpoint.pp
index 4311049..0bba245 100644
--- a/manifests/haproxy/endpoint.pp
+++ b/manifests/haproxy/endpoint.pp
@@ -149,14 +149,27 @@ define tripleo::haproxy::endpoint (
}
if hiera('manage_firewall', true) {
include ::tripleo::firewall
- $firewall_rules = {
- "100 ${name}_haproxy" => {
- 'dport' => $service_port,
- },
- "100 ${name}_haproxy_ssl" => {
- 'dport' => $public_ssl_port,
- },
+ # This block will construct firewall rules only when we specify
+ # a port for the regular service and also the ssl port for the service.
+ # It makes sure we're not trying to create TCP iptables rules where no port
+ # is specified.
+ if $service_port {
+ $haproxy_firewall_rules = {
+ "100 ${name}_haproxy" => {
+ 'dport' => $service_port,
+ },
+ }
+ }
+ if $public_ssl_port {
+ $haproxy_ssl_firewall_rules = {
+ "100 ${name}_haproxy_ssl" => {
+ 'dport' => $public_ssl_port,
+ },
+ }
+ }
+ $firewall_rules = merge($haproxy_firewall_rules, $haproxy_ssl_firewall_rules)
+ if $service_port or $public_ssl_port {
+ create_resources('tripleo::firewall::rule', $firewall_rules)
}
- create_resources('tripleo::firewall::rule', $firewall_rules)
}
}
diff --git a/manifests/network/midonet/api.pp b/manifests/network/midonet/api.pp
deleted file mode 100644
index 83efd2c..0000000
--- a/manifests/network/midonet/api.pp
+++ /dev/null
@@ -1,122 +0,0 @@
-#
-# Copyright (C) 2015 Midokura SARL
-#
-# 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::network::midonet::api
-#
-# Configure the MidoNet API
-#
-# == Parameters:
-#
-# [*zookeeper_servers*]
-# (required) List IPs of the zookeeper server cluster. Zookeeper is the
-# backend database where MidoNet stores the virtual network topology.
-# Array of strings value.
-#
-# [*vip*]
-# (required) Public Virtual IP where the API will be exposed.
-# String (IPv4) value.
-#
-# [*keystone_ip*]
-# (required) MidoNet API is registered as an OpenStack service. Provide the
-# keystone ip address.
-# String (IPv4) value.
-#
-# [*keystone_admin_token*]
-# (required) MidoNet API is registered as an OpenStack service. It needs the
-# keystone admin token to perform some admin calls.
-# String value.
-#
-# [*bind_address*]
-# (required) MidoNet API uses a Tomcat instance to offer the REST service. The
-# ip address where to bind the tomcat service.
-# String (IPv4) value.
-#
-# [*admin_password*]
-# (required) OpenStack admin user password.
-# String value.
-#
-# [*keystone_port*]
-# (optional) MidoNet API is registered as an OpenStack service. Provide
-# the keystone port.
-# Defaults to 35357
-#
-# [*keystone_tenant_name*]
-# (optional) Tenant of the keystone service.
-# Defaults to 'admin'
-#
-# [*admin_user_name*]
-# (optional) OpenStack admin user name.
-# Defaults to 'admin'
-#
-# [*admin_tenant_name*]
-# (optional). OpenStack admin tenant name.
-# Defaults to 'admin'
-#
-
-class tripleo::network::midonet::api(
- $zookeeper_servers,
- $vip,
- $keystone_ip,
- $keystone_admin_token,
- $bind_address,
- $admin_password,
- $keystone_port = 35357,
- $keystone_tenant_name = 'admin',
- $admin_user_name = 'admin',
- $admin_tenant_name = 'admin'
-)
-{
-
- # TODO: Remove this comment once we can guarantee that all the distros
- # deploying TripleO use Puppet > 3.7 because of this bug:
- # https://tickets.puppetlabs.com/browse/PUP-1299
-
- # validate_array($zookeeper_servers)
- validate_ip_address($vip)
- validate_ip_address($keystone_ip)
- validate_ip_address($bind_address)
-
- # Run Tomcat and MidoNet API
- class {'::tomcat':
- install_from_source => false
- } ->
-
- package {'midonet-api':
- ensure => present
- } ->
-
- class {'::midonet::midonet_api::run':
- zk_servers => list_to_zookeeper_hash($zookeeper_servers),
- keystone_auth => true,
- tomcat_package => 'tomcat',
- vtep => false,
- api_ip => $vip,
- api_port => '8081',
- keystone_host => $keystone_ip,
- keystone_port => $keystone_port,
- keystone_admin_token => $keystone_admin_token,
- keystone_tenant_name => $keystone_tenant_name,
- catalina_base => '/usr/share/tomcat',
- bind_address => $bind_address
- }
-
- # Configure the CLI
- class {'::midonet::midonet_cli':
- api_endpoint => "http://${vip}:8081/midonet-api",
- username => $admin_user_name,
- password => $admin_password,
- tenant_name => $admin_tenant_name
- }
-}
diff --git a/manifests/packages.pp b/manifests/packages.pp
index ec2635a..147c76a 100644
--- a/manifests/packages.pp
+++ b/manifests/packages.pp
@@ -35,7 +35,7 @@ class tripleo::packages (
# required for stages
include ::stdlib
- if !$enable_install and !$enable_upgrade {
+ if !str2bool($enable_install) and !str2bool($enable_upgrade) {
case $::osfamily {
'RedHat': {
Package <| |> { provider => 'norpm' }
@@ -46,7 +46,7 @@ class tripleo::packages (
}
}
- if $enable_upgrade {
+ if str2bool($enable_upgrade) {
Package <| |> { ensure => 'latest' }
# Running the package upgrade before managing Services in the main stage.
# So we're sure that services will be able to restart with the new version
diff --git a/manifests/profile/base/ceilometer/api.pp b/manifests/profile/base/ceilometer/api.pp
index 6ef4748..2e7986b 100644
--- a/manifests/profile/base/ceilometer/api.pp
+++ b/manifests/profile/base/ceilometer/api.pp
@@ -18,6 +18,10 @@
#
# === Parameters
#
+# [*enable_legacy_api*]
+# (Optional) Enable legacy ceilometer api service.
+# Defaults to hiera('enable_legacy_api', false)
+#
# [*ceilometer_network*]
# (Optional) The network name where the ceilometer endpoint is listening on.
# This is set by t-h-t.
@@ -53,6 +57,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::ceilometer::api (
+ $enable_legacy_api = hiera('enable_legacy_ceilometer_api', false),
$ceilometer_network = hiera('ceilometer_api_network', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
@@ -76,7 +81,7 @@ class tripleo::profile::base::ceilometer::api (
$tls_keyfile = undef
}
- if $step >= 4 {
+ if $step >= 4 and $enable_legacy_api {
include ::ceilometer::api
class { '::ceilometer::wsgi::apache':
ssl_cert => $tls_certfile,
diff --git a/manifests/profile/base/cinder/volume.pp b/manifests/profile/base/cinder/volume.pp
index 7d562ec..7663b6f 100644
--- a/manifests/profile/base/cinder/volume.pp
+++ b/manifests/profile/base/cinder/volume.pp
@@ -22,6 +22,10 @@
# (Optional) Whether to enable the delsc backend
# Defaults to true
#
+# [*cinder_enable_hpelefthand_backend*]
+# (Optional) Whether to enable the hpelefthand backend
+# Defaults to false
+#
# [*cinder_enable_eqlx_backend*]
# (Optional) Whether to enable the eqlx backend
# Defaults to true
@@ -52,14 +56,15 @@
# 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'),
+ $cinder_enable_dellsc_backend = false,
+ $cinder_enable_hpelefthand_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
@@ -73,6 +78,13 @@ class tripleo::profile::base::cinder::volume (
$cinder_dellsc_backend_name = undef
}
+ if $cinder_enable_hpelefthand_backend {
+ include ::tripleo::profile::base::cinder::volume::hpelefthand
+ $cinder_hpelefthand_backend_name = hiera('cinder::backend::hpelefthand_iscsi::volume_backend_name', 'tripleo_hpelefthand')
+ } else {
+ $cinder_hpelefthand_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')
@@ -108,13 +120,20 @@ class tripleo::profile::base::cinder::volume (
$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])
+ $backends = delete_undef_values([$cinder_iscsi_backend_name,
+ $cinder_rbd_backend_name,
+ $cinder_eqlx_backend_name,
+ $cinder_dellsc_backend_name,
+ $cinder_hpelefthand_backend_name,
+ $cinder_netapp_backend_name,
+ $cinder_nfs_backend_name,
+ $cinder_user_enabled_backends])
+ # NOTE(aschultz): during testing it was found that puppet 3 may incorrectly
+ # include a "" in the previous array which is not removed by the
+ # delete_undef_values function. So we need to make sure we don't have any
+ # "" strings in our array.
+ $cinder_enabled_backends = delete($backends, '')
+
class { '::cinder::backends' :
enabled_backends => $cinder_enabled_backends,
}
diff --git a/manifests/profile/base/cinder/volume/hpelefthand.pp b/manifests/profile/base/cinder/volume/hpelefthand.pp
new file mode 100644
index 0000000..32f0976
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/hpelefthand.pp
@@ -0,0 +1,71 @@
+# Copyright 2016 Hewlett-Packard Enterprise.
+#
+# 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::hpelefthand
+#
+# Cinder Volume hpelefthand profile for tripleo
+#
+# === Parameters
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_hpelefthand'
+#
+# [*cinder_hpelefthand_api_url*]
+# (required) url for api access to lefthand - example https://10.x.x.x:8080/api/v1
+#
+# [*cinder_hpelefthand_username*]
+# (required) Username for HPElefthand admin user
+#
+# [*cinder_hpelefthand_password*]
+# (required) Password for hpelefthand_username
+#
+# [*cinder_hpelefthand_iscsi_chap_enabled*]
+# (required) setting to false by default
+#
+# [*cinder_hpelefthand_clustername*]
+# (required) clustername of hpelefthand
+#
+# [*cinder_hpelefthand_debug*]
+# (required) setting to false by default
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume::hpelefthand (
+ $backend_name = hiera('cinder::backend::hpelefthand_iscsi::volume_backend_name', 'tripleo_hpelefthand'),
+ $cinder_hpelefthand_username = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_username', undef),
+ $cinder_hpelefthand_password = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_password', undef),
+ $cinder_hpelefthand_clustername = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_clustername', undef),
+ $cinder_hpelefthand_api_url = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_api_url', undef),
+ $cinder_hpelefthand_iscsi_chap_enabled = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_iscsi_chap_enabled', undef),
+ $cinder_hpelefthand_debug = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_debug', undef),
+ $step = hiera('step'),
+) {
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ cinder::backend::hpelefthand_iscsi { $backend_name :
+ hpelefthand_username => $cinder_hpelefthand_username,
+ hpelefthand_password => $cinder_hpelefthand_password,
+ hpelefthand_clustername => $cinder_hpelefthand_clustername,
+ hpelefthand_api_url => $cinder_hpelefthand_api_url,
+ hpelefthand_iscsi_chap_enabled => $cinder_hpelefthand_iscsi_chap_enabled,
+ hpelefthand_debug => $cinder_hpelefthand_debug,
+ }
+ }
+
+}
diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp
index e5f366e..a039439 100644
--- a/manifests/profile/base/database/mysql.pp
+++ b/manifests/profile/base/database/mysql.pp
@@ -150,7 +150,7 @@ class tripleo::profile::base::database::mysql (
if hiera('cinder_api_enabled', false) {
include ::cinder::db::mysql
}
- if hiera('glance_registry_enabled', false) {
+ if hiera('glance_api_enabled', false) {
include ::glance::db::mysql
}
if hiera('gnocchi_api_enabled', false) {
diff --git a/manifests/profile/base/metrics/collectd.pp b/manifests/profile/base/metrics/collectd.pp
new file mode 100644
index 0000000..0f738d1
--- /dev/null
+++ b/manifests/profile/base/metrics/collectd.pp
@@ -0,0 +1,88 @@
+# == Class: tripleo::profile::base::metrics::collectd
+#
+# Collectd configuration for TripleO
+#
+# === Parameters
+#
+# [*collectd_plugins*]
+# (Optional) List. A list of collectd plugins to configure (the
+# corresponding collectd::plugin::NAME class must exist in the
+# collectd package).
+#
+# [*collectd_server*]
+# (Optional) String. The name or address of a collectd server to
+# which we should send metrics.
+#
+# [*collectd_port*]
+# (Optional) Integer. The port to which we will connect on the
+# collectd server.
+#
+# [*collectd_username*]
+# (Optional) String. Username for authenticating to the remote
+# collectd server.
+#
+# [*collectd_password*]
+# (Optional) String. Password for authenticating to the remote
+# collectd server.
+#
+# [*collectd_securitylevel*]
+# (Optional) String.
+#
+# [*collectd_interface*]
+# (Optional) String. Name of a network interface.
+#
+# [*collectd_graphite_server*]
+# (Optional) String. The name or address of a graphite server to
+# which we should send metrics.
+#
+# [*collectd_graphite_port*]
+# (Optional) Integer. This is the port to which we will connect on
+# the graphite server. Defaults to 2004.
+#
+# [*collectd_graphite_prefix*]
+# (Optional) String. Prefix to add to metric names. Defaults to
+# 'overcloud.'.
+#
+# [*collectd_graphite_protocol*]
+# (Optional) String. One of 'udp' or 'tcp'.
+#
+class tripleo::profile::base::metrics::collectd (
+ $collectd_plugins = [],
+
+ $collectd_server = undef,
+ $collectd_port = 25826,
+ $collectd_username = undef,
+ $collectd_password = undef,
+ $collectd_securitylevel = undef,
+
+ $collectd_graphite_server = undef,
+ $collectd_graphite_port = 2004,
+ $collectd_graphite_prefix = undef,
+ $collectd_graphite_protocol = 'udp'
+) {
+ include ::collectd
+ ::tripleo::profile::base::metrics::collectd::plugin_helper { $collectd_plugins: }
+
+ if ! ($collectd_graphite_protocol in ['udp', 'tcp']) {
+ fail("collectd_graphite_protocol must be one of 'udp' or 'tcp'")
+ }
+
+ if $collectd_server {
+ ::collectd::plugin::network::server { $collectd_server:
+ username => $collectd_username,
+ password => $collectd_password,
+ port => $collectd_port,
+ securitylevel => $collectd_securitylevel,
+ }
+ }
+
+ if $collectd_graphite_server {
+ ::collectd::plugin::write_graphite::carbon { 'openstack_graphite':
+ graphitehost => $collectd_graphite_server,
+ graphiteport => $collectd_graphite_port,
+ graphiteprefix => $collectd_graphite_prefix,
+ protocol => $collectd_graphite_protocol,
+ }
+ }
+}
+
diff --git a/manifests/profile/base/metrics/collectd/plugin_helper.pp b/manifests/profile/base/metrics/collectd/plugin_helper.pp
new file mode 100644
index 0000000..b624ee1
--- /dev/null
+++ b/manifests/profile/base/metrics/collectd/plugin_helper.pp
@@ -0,0 +1,6 @@
+# We use this to transform a list of unqualified plugin names
+# (like ['disk', 'ntpd']) into the correct collectd plugin classes.
+define tripleo::profile::base::metrics::collectd::plugin_helper (
+) {
+ include "collectd::plugin::${title}"
+}
diff --git a/manifests/profile/base/neutron/agents/ovn.pp b/manifests/profile/base/neutron/agents/ovn.pp
index 443b164..a593092 100644
--- a/manifests/profile/base/neutron/agents/ovn.pp
+++ b/manifests/profile/base/neutron/agents/ovn.pp
@@ -17,7 +17,12 @@
# OVN Neutron agent profile for tripleo
#
# [*ovn_db_host*]
-# The IP-Address/Hostname where OVN DBs are deployed
+# (Optional) The IP-Address where OVN DBs are listening.
+# Defaults to hiera('ovn_dbs_vip')
+#
+# [*ovn_sbdb_port*]
+# (Optional) Port number on which southbound database is listening
+# Defaults to hiera('ovn::southbound::port')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -25,14 +30,13 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::agents::ovn (
- $ovn_db_host,
- $step = hiera('step')
+ $ovn_db_host = hiera('ovn_dbs_vip'),
+ $ovn_sbdb_port = hiera('ovn::southbound::port'),
+ $step = hiera('step')
) {
if $step >= 4 {
- $ovn_sbdb_port = hiera('ovn::southbound::port')
class { '::ovn::controller':
ovn_remote => "tcp:${ovn_db_host}:${ovn_sbdb_port}",
- ovn_encap_type => hiera('ovn::southboud::encap_type')
}
}
}
diff --git a/manifests/profile/base/neutron/opendaylight.pp b/manifests/profile/base/neutron/opendaylight.pp
index a3f46ec..556fe63 100644
--- a/manifests/profile/base/neutron/opendaylight.pp
+++ b/manifests/profile/base/neutron/opendaylight.pp
@@ -22,24 +22,19 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
-# [*primary_controller*]
-# (Optional) The hostname of the first controller
+# [*primary_node*]
+# (Optional) The hostname of the first node of this role type
# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::base::neutron::opendaylight (
- $step = hiera('step'),
- $primary_controller = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
+ $primary_node = hiera('bootstrap_nodeid', undef),
) {
- include ::tripleo::profile::base::neutron
-
- if ! str2bool(hiera('opendaylight::enable_l3')) {
- include ::tripleo::profile::base::neutron::l3
- }
-
if $step >= 1 {
- # Configure ODL only on first controller
- if $primary_controller == downcase($::hostname) {
+ # Configure ODL only on first node of the role where this service is
+ # applied
+ if $primary_node == downcase($::hostname) {
include ::opendaylight
}
}
diff --git a/manifests/profile/pacemaker/heat/api.pp b/manifests/profile/base/neutron/ovn_northd.pp
index 7b0987f..0b46d5c 100644
--- a/manifests/profile/pacemaker/heat/api.pp
+++ b/manifests/profile/base/neutron/ovn_northd.pp
@@ -12,11 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-# == Class: tripleo::profile::pacemaker::heat
+# == Class: tripleo::profile::base::neutron::plugins::ml2::ovn
#
-# Heat API Pacemaker HA profile for tripleo
-#
-# === Parameters
+# OVN Neutron northd profile for tripleo
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
@@ -27,24 +25,16 @@
# for more details.
# Defaults to hiera('step')
#
-class tripleo::profile::pacemaker::heat::api (
- $bootstrap_node = hiera('bootstrap_nodeid'),
+class tripleo::profile::base::neutron::ovn_northd (
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- include ::tripleo::profile::pacemaker::heat
- include ::tripleo::profile::base::heat::api
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::resource::service { $::heat::params::api_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
+ if $step >= 4 {
+ # Note this only runs on the first node in the cluster when
+ # deployed on a role where multiple nodes exist.
+ if $::hostname == downcase($bootstrap_node) {
+ include ::ovn::northd
}
}
-
}
+
diff --git a/manifests/profile/base/neutron/plugins/ml2.pp b/manifests/profile/base/neutron/plugins/ml2.pp
index 4f4de0b..c046850 100644
--- a/manifests/profile/base/neutron/plugins/ml2.pp
+++ b/manifests/profile/base/neutron/plugins/ml2.pp
@@ -71,5 +71,10 @@ class tripleo::profile::base::neutron::plugins::ml2 (
if 'ovn' in $mechanism_drivers {
include ::tripleo::profile::base::neutron::plugins::ml2::ovn
}
+
+ if 'fujitsu_cfab' in $mechanism_drivers {
+ include ::neutron::plugins::ml2::fujitsu
+ include ::neutron::plugins::ml2::fujitsu::cfab
+ }
}
}
diff --git a/manifests/profile/base/neutron/plugins/ml2/ovn.pp b/manifests/profile/base/neutron/plugins/ml2/ovn.pp
index 46477a7..b5b7a0a 100644
--- a/manifests/profile/base/neutron/plugins/ml2/ovn.pp
+++ b/manifests/profile/base/neutron/plugins/ml2/ovn.pp
@@ -17,7 +17,16 @@
# OVN Neutron ML2 profile for tripleo
#
# [*ovn_db_host*]
-# The IP-Address/Hostname where OVN DBs are deployed
+# The IP-Address where OVN DBs are listening.
+# Defaults to hiera('ovn_dbs_vip')
+#
+# [*ovn_nb_port*]
+# (Optional) Port number on which northbound database is listening
+# Defaults to hiera('ovn::northbound::port')
+#
+# [*ovn_sb_port*]
+# (Optional) Port number on which southbound database is listening
+# Defaults to hiera('ovn::southbound::port')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -25,18 +34,12 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::plugins::ml2::ovn (
- $ovn_db_host,
- $step = hiera('step')
+ $ovn_db_host = hiera('ovn_dbs_vip'),
+ $ovn_nb_port = hiera('ovn::northbound::port'),
+ $ovn_sb_port = hiera('ovn::southbound::port'),
+ $step = hiera('step')
) {
if $step >= 4 {
- if $::hostname == $ovn_db_host {
- # NOTE: we might split northd from plugin later, in the case of
- # micro-services, where neutron-server & northd are not in the same
- # containers
- include ::ovn::northd
- }
- $ovn_nb_port = hiera('ovn::northbound::port')
- $ovn_sb_port = hiera('ovn::southbound::port')
class { '::neutron::plugins::ml2::ovn':
ovn_nb_connection => "tcp:${ovn_db_host}:${ovn_nb_port}",
ovn_sb_connection => "tcp:${ovn_db_host}:${ovn_sb_port}",
diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp
index cc5fd8a..19eb52b 100644
--- a/manifests/profile/base/pacemaker.pp
+++ b/manifests/profile/base/pacemaker.pp
@@ -40,7 +40,8 @@ class tripleo::profile::base::pacemaker (
$enable_fencing = str2bool(hiera('enable_fencing', false)) and $step >= 5
if $step >= 1 {
- $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G'))
+ $pacemaker_short_node_names = join(hiera('pacemaker_short_node_names'), ',')
+ $pacemaker_cluster_members = downcase(regsubst($pacemaker_short_node_names, ',', ' ', 'G'))
$corosync_ipv6 = str2bool(hiera('corosync_ipv6', false))
if $corosync_ipv6 {
$cluster_setup_extras = { '--token' => hiera('corosync_token_timeout', 1000), '--ipv6' => '' }
diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp
index 974a725..7bbef1e 100644
--- a/manifests/profile/base/swift/proxy.pp
+++ b/manifests/profile/base/swift/proxy.pp
@@ -37,14 +37,19 @@
#
# [*rabbit_port*]
# IP port for rabbitmq service
-# Defaults to hiera('swift::proxy::ceilometer::rabbit_port', 5672)
+# Defaults to 5672
+#
+# [*ceilometer_enabled*]
+# Whether the ceilometer pipeline is enabled.
+# Defaults to true
#
class tripleo::profile::base::swift::proxy (
- $step = hiera('step'),
- $memcache_servers = hiera('memcached_node_ips'),
- $memcache_port = 11211,
- $rabbit_hosts = hiera('rabbitmq_node_names', undef),
- $rabbit_port = hiera('swift::proxy::ceilometer::rabbit_port', 5672),
+ $step = hiera('step'),
+ $memcache_servers = hiera('memcached_node_ips'),
+ $memcache_port = 11211,
+ $rabbit_hosts = hiera('rabbitmq_node_names', undef),
+ $rabbit_port = 5672,
+ $ceilometer_enabled = true,
) {
if $step >= 4 {
$swift_memcache_servers = suffix(any2array(normalize_ip_for_uri($memcache_servers)), ":${memcache_port}")
@@ -64,8 +69,10 @@ class tripleo::profile::base::swift::proxy (
include ::swift::proxy::formpost
include ::swift::proxy::bulk
$swift_rabbit_hosts = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
- class { '::swift::proxy::ceilometer':
- rabbit_hosts => $swift_rabbit_hosts,
+ if $ceilometer_enabled {
+ class { '::swift::proxy::ceilometer':
+ rabbit_hosts => $swift_rabbit_hosts,
+ }
}
include ::swift::proxy::versioned_writes
include ::swift::proxy::slo
diff --git a/manifests/profile/pacemaker/apache.pp b/manifests/profile/pacemaker/apache.pp
deleted file mode 100644
index c8aeac5..0000000
--- a/manifests/profile/pacemaker/apache.pp
+++ /dev/null
@@ -1,58 +0,0 @@
-# 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::apache
-#
-# Apache 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::apache (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- if $step >= 5 and $pacemaker_master {
- include ::apache::params
- pacemaker::resource::service { $::apache::params::service_name:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- verify_on_create => true,
- }
- pacemaker::constraint::base { 'openstack-core-then-httpd-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::apache::params::service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::apache::params::service_name],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/ceilometer.pp b/manifests/profile/pacemaker/ceilometer.pp
deleted file mode 100644
index a31128d..0000000
--- a/manifests/profile/pacemaker/ceilometer.pp
+++ /dev/null
@@ -1,92 +0,0 @@
-# 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::ceilometer
-#
-# Ceilometer 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::ceilometer (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::tripleo::profile::base::ceilometer
-
- $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
- if $step >= 5 and $::hostname == downcase($bootstrap_node) {
- if $ceilometer_backend == 'mysql' {
- class { '::ceilometer::db::mysql':
- require => Exec['galera-ready'],
- }
- }
-
- # NOTE(emilien): the constraints won't live forever here as we're moving to
- # pacemaker-lite architecture.
-
- # Fedora doesn't know `require-all` parameter for constraints yet
- if $::operatingsystem == 'Fedora' {
- $redis_ceilometer_constraint_params = undef
- } else {
- $redis_ceilometer_constraint_params = 'require-all=false'
- }
- pacemaker::constraint::base { 'redis-then-ceilometer-central-constraint':
- constraint_type => 'order',
- first_resource => 'redis-master',
- second_resource => "${::ceilometer::params::agent_central_service_name}-clone",
- first_action => 'promote',
- second_action => 'start',
- constraint_params => $redis_ceilometer_constraint_params,
- require => [Pacemaker::Resource::Ocf['redis'],
- Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name]],
- }
- pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::ceilometer::params::agent_central_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- pacemaker::constraint::base { 'keystone-then-ceilometer-notification-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::ceilometer::params::agent_notification_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- pacemaker::constraint::base { 'ceilometer-central-then-ceilometer-collector-constraint':
- constraint_type => 'order',
- first_resource => "${::ceilometer::params::agent_central_service_name}-clone",
- second_resource => "${::ceilometer::params::collector_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name],
- Pacemaker::Resource::Service[$::ceilometer::params::collector_service_name]],
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/ceilometer/agent/central.pp b/manifests/profile/pacemaker/ceilometer/agent/central.pp
deleted file mode 100644
index b9655c3..0000000
--- a/manifests/profile/pacemaker/ceilometer/agent/central.pp
+++ /dev/null
@@ -1,59 +0,0 @@
-# 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::ceilometer::agent::central
-#
-# Ceilometer Central Agent Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (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::ceilometer::agent::central (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::ceilometer::params
- include ::tripleo::profile::pacemaker::ceilometer
- include ::tripleo::profile::base::ceilometer::agent::central
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
- case downcase(hiera('ceilometer_backend')) {
- /mysql/: {
- pacemaker::resource::service { $::ceilometer::params::agent_central_service_name:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Ocf['openstack-core'],
- }
- }
- default: {
- pacemaker::resource::service { $::ceilometer::params::agent_central_service_name:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- require => [Pacemaker::Resource::Ocf['openstack-core'],
- Pacemaker::Resource::Service[$::mongodb::params::service_name]],
- }
- }
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/ceilometer/agent/notification.pp b/manifests/profile/pacemaker/ceilometer/agent/notification.pp
deleted file mode 100644
index 394cc36..0000000
--- a/manifests/profile/pacemaker/ceilometer/agent/notification.pp
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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::ceilometer::agent::notification
-#
-# Ceilometer Notification Agent Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (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::ceilometer::agent::notification (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::ceilometer::params
- include ::tripleo::profile::pacemaker::ceilometer
- include ::tripleo::profile::base::ceilometer::agent::notification
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::ceilometer::params::agent_notification_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/ceilometer/api.pp b/manifests/profile/pacemaker/ceilometer/api.pp
deleted file mode 100644
index 169121b..0000000
--- a/manifests/profile/pacemaker/ceilometer/api.pp
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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::ceilometer::api
-#
-# Ceilometer API Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (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::ceilometer::api (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::ceilometer::params
- include ::tripleo::profile::pacemaker::ceilometer
- include ::tripleo::profile::base::ceilometer::api
- include ::tripleo::profile::pacemaker::apache
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- class { '::tripleo::profile::base::ceilometer::api':
- step => $step,
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/ceilometer/collector.pp b/manifests/profile/pacemaker/ceilometer/collector.pp
deleted file mode 100644
index 350125f..0000000
--- a/manifests/profile/pacemaker/ceilometer/collector.pp
+++ /dev/null
@@ -1,49 +0,0 @@
-# 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::ceilometer::collector
-#
-# Ceilometer Collector Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (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::ceilometer::collector (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::ceilometer::params
- include ::tripleo::profile::pacemaker::ceilometer
- include ::tripleo::profile::base::ceilometer::collector
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
- if $ceilometer_backend == 'mysql' {
- Exec<| title == 'galera-ready'|> -> Class['ceilometer::db::mysql']
- }
- pacemaker::resource::service { $::ceilometer::params::collector_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/cinder/api.pp b/manifests/profile/pacemaker/cinder/api.pp
deleted file mode 100644
index f25a050..0000000
--- a/manifests/profile/pacemaker/cinder/api.pp
+++ /dev/null
@@ -1,65 +0,0 @@
-# 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
- }
-
- include ::tripleo::profile::base::cinder::api
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::resource::service { $::cinder::params::api_service :
- op_params => 'start timeout=200s stop timeout=200s',
- 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
deleted file mode 100644
index 4bfb89a..0000000
--- a/manifests/profile/pacemaker/cinder/scheduler.pp
+++ /dev/null
@@ -1,88 +0,0 @@
-# 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 :
- op_params => 'start timeout=200s stop timeout=200s',
- 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]],
- }
- 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/core.pp b/manifests/profile/pacemaker/core.pp
deleted file mode 100644
index 359a817..0000000
--- a/manifests/profile/pacemaker/core.pp
+++ /dev/null
@@ -1,58 +0,0 @@
-# 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::core
-#
-# Core 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::core (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- if $step >= 2 and $pacemaker_master {
- pacemaker::resource::ocf { 'openstack-core':
- ocf_agent_name => 'heartbeat:Dummy',
- clone_params => 'interleave=true',
- }
- }
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::constraint::base { 'galera-then-openstack-core-constraint':
- constraint_type => 'order',
- first_resource => 'galera-master',
- second_resource => 'openstack-core-clone',
- first_action => 'promote',
- second_action => 'start',
- require => [Pacemaker::Resource::Ocf['galera'],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- }
-}
diff --git a/manifests/profile/pacemaker/database/mongodb.pp b/manifests/profile/pacemaker/database/mongodb.pp
deleted file mode 100644
index e4b5fcf..0000000
--- a/manifests/profile/pacemaker/database/mongodb.pp
+++ /dev/null
@@ -1,73 +0,0 @@
-# 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::database::mongodb
-#
-# Mongodb Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*mongodb_replset*]
-# Mongodb replicaset name
-#
-# [*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::database::mongodb (
- $mongodb_replset,
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $step >= 1 {
- include ::mongodb::globals
- include ::mongodb::client
- include ::mongodb::server
- }
-
- if $step >= 2 {
-
- include ::tripleo::profile::base::database::mongodbcommon
-
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- if $pacemaker_master {
- pacemaker::resource::service { $::mongodb::params::service_name :
- op_params => 'start timeout=370s stop timeout=200s',
- clone_params => true,
- require => Class['::mongodb::server'],
- }
- # NOTE (spredzy) : The replset can only be run
- # once all the nodes have joined the cluster.
- tripleo::profile::pacemaker::database::mongodbvalidator {
- $tripleo::profile::base::database::mongodbcommon::mongodb_node_ips :
- port => $tripleo::profile::base::database::mongodbcommon::port,
- require => Pacemaker::Resource::Service[$::mongodb::params::service_name],
- before => Mongodb_replset[$mongodb_replset],
- }
- mongodb_replset { $mongodb_replset :
- members => $tripleo::profile::base::database::mongodbcommon::mongo_node_ips_with_port_nobr,
- }
- }
- }
-}
diff --git a/manifests/profile/pacemaker/glance.pp b/manifests/profile/pacemaker/glance.pp
deleted file mode 100644
index cace5ae..0000000
--- a/manifests/profile/pacemaker/glance.pp
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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::glance
-#
-# Glance Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*bootstrap_node*]
-# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
-#
-# [*glance_backend*]
-# (Optional) Glance backend(s) to use.
-# Defaults to downcase(hiera('glance_backend', 'swift'))
-#
-# [*glance_file_pcmk_device*]
-# (Optional) Device to mount glance file backend.
-# Defaults to hiera('glance_file_pcmk_device', '')
-#
-# [*glance_file_pcmk_directory*]
-# (Optional) Directory to mount glance file backend.
-# Defaults to hiera('glance_file_pcmk_directory', '')
-#
-# [*glance_file_pcmk_fstype*]
-# (Optional) Filesystem type to mount glance file backend.
-# Defaults to hiera('glance_file_pcmk_fstype', '')
-#
-# [*glance_file_pcmk_manage*]
-# (Optional) Whether or not manage glance_file_pcmk.
-# Defaults to hiera('glance_file_pcmk_manage', false)
-#
-# [*glance_file_pcmk_options*]
-# (Optional) pcmk options to mount Glance file backend..
-# Defaults to hiera('glance_file_pcmk_options', '')
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::glance (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $glance_backend = downcase(hiera('glance_backend', 'swift')),
- $glance_file_pcmk_device = hiera('glance_file_pcmk_device', ''),
- $glance_file_pcmk_directory = hiera('glance_file_pcmk_directory', ''),
- $glance_file_pcmk_fstype = hiera('glance_file_pcmk_fstype', ''),
- $glance_file_pcmk_manage = hiera('glance_file_pcmk_manage', false),
- $glance_file_pcmk_options = hiera('glance_file_pcmk_options', ''),
- $step = hiera('step'),
-) {
- Service <| tag == 'glance-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::glance::api
- include ::tripleo::profile::base::glance::registry
-
- if $step >= 4 {
- if $glance_backend == 'file' and $glance_file_pcmk_manage {
- $secontext = 'context="system_u:object_r:glance_var_lib_t:s0"'
- pacemaker::resource::filesystem { 'glance-fs':
- device => $glance_file_pcmk_device,
- directory => $glance_file_pcmk_directory,
- fstype => $glance_file_pcmk_fstype,
- fsoptions => join([$secontext, $glance_file_pcmk_options],','),
- clone_params => '',
- }
- }
- }
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::resource::service { $::glance::params::registry_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Ocf['openstack-core'],
- }
- pacemaker::resource::service { $::glance::params::api_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
-
- pacemaker::constraint::base { 'keystone-then-glance-registry-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::glance::params::registry_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- pacemaker::constraint::base { 'glance-registry-then-glance-api-constraint':
- constraint_type => 'order',
- first_resource => "${::glance::params::registry_service_name}-clone",
- second_resource => "${::glance::params::api_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name],
- Pacemaker::Resource::Service[$::glance::params::api_service_name]],
- }
- pacemaker::constraint::colocation { 'glance-api-with-glance-registry-colocation':
- source => "${::glance::params::api_service_name}-clone",
- target => "${::glance::params::registry_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name],
- Pacemaker::Resource::Service[$::glance::params::api_service_name]],
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/gnocchi.pp b/manifests/profile/pacemaker/gnocchi.pp
deleted file mode 100644
index 5bfc174..0000000
--- a/manifests/profile/pacemaker/gnocchi.pp
+++ /dev/null
@@ -1,97 +0,0 @@
-# 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::gnocchi
-#
-# Gnocchi Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*bootstrap_node*]
-# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
-#
-# [*gnocchi_indexer_backend*]
-# (Optional) Gnocchi indexer backend
-# Defaults to mysql
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::gnocchi (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $gnocchi_indexer_backend = downcase(hiera('gnocchi_indexer_backend', 'mysql')),
- $step = hiera('step'),
-) {
- Service <| tag == 'gnocchi-service' |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- if $step >= 2 and $pacemaker_master {
- if $gnocchi_indexer_backend == 'mysql' {
- class { '::gnocchi::db::mysql':
- require => Exec['galera-ready'],
- }
- }
- }
-
- if $step >= 3 {
- include ::gnocchi
- include ::gnocchi::config
- include ::gnocchi::client
- if $pacemaker_master {
- include ::gnocchi::db::sync
- }
- }
-
- if $step >= 5 and $pacemaker_master {
-
- pacemaker::constraint::base { 'keystone-then-gnocchi-metricd-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::gnocchi::params::metricd_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::gnocchi::params::metricd_service_name],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- pacemaker::constraint::base { 'gnocchi-metricd-then-gnocchi-statsd-constraint':
- constraint_type => 'order',
- first_resource => "${::gnocchi::params::metricd_service_name}-clone",
- second_resource => "${::gnocchi::params::statsd_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::gnocchi::params::metricd_service_name],
- Pacemaker::Resource::Service[$::gnocchi::params::statsd_service_name]],
- }
- pacemaker::constraint::colocation { 'gnocchi-statsd-with-metricd-colocation':
- source => "${::gnocchi::params::statsd_service_name}-clone",
- target => "${::gnocchi::params::metricd_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::gnocchi::params::metricd_service_name],
- Pacemaker::Resource::Service[$::gnocchi::params::statsd_service_name]],
- }
- }
-}
diff --git a/manifests/profile/pacemaker/gnocchi/api.pp b/manifests/profile/pacemaker/gnocchi/api.pp
deleted file mode 100644
index 29f2435..0000000
--- a/manifests/profile/pacemaker/gnocchi/api.pp
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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::gnocchi::api
-#
-# Gnocchi profile for tripleo api
-#
-# === Parameters
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::gnocchi::api (
- $step = hiera('step'),
-) {
- include ::tripleo::profile::pacemaker::gnocchi
- include ::tripleo::profile::pacemaker::apache
- include ::tripleo::profile::base::gnocchi::api
-}
diff --git a/manifests/profile/pacemaker/gnocchi/metricd.pp b/manifests/profile/pacemaker/gnocchi/metricd.pp
deleted file mode 100644
index aacec01..0000000
--- a/manifests/profile/pacemaker/gnocchi/metricd.pp
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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::gnocchi::metricd
-#
-# Gnocchi metricd profile
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (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::gnocchi::metricd (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::gnocchi::params
- include ::tripleo::profile::pacemaker::gnocchi
-
- if $step >= 4 and downcase($::hostname) == $pacemaker_master {
-
- include ::gnocchi::metricd
-
- pacemaker::resource::service { $::gnocchi::params::metricd_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-}
diff --git a/manifests/profile/pacemaker/gnocchi/statsd.pp b/manifests/profile/pacemaker/gnocchi/statsd.pp
deleted file mode 100644
index 1058010..0000000
--- a/manifests/profile/pacemaker/gnocchi/statsd.pp
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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::gnocchi::statsd
-#
-# Gnocchi statsd profile
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (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::gnocchi::statsd (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::gnocchi::params
- include ::tripleo::profile::pacemaker::gnocchi
-
- if $step >= 4 and downcase($::hostname) == $pacemaker_master {
-
- include ::gnocchi::statsd
-
- pacemaker::resource::service { $::gnocchi::params::statsd_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-}
diff --git a/manifests/profile/pacemaker/heat.pp b/manifests/profile/pacemaker/heat.pp
deleted file mode 100644
index e3c1598..0000000
--- a/manifests/profile/pacemaker/heat.pp
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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::heat
-#
-# Heat Pacemaker HA 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::pacemaker::heat (
- $step = hiera('step'),
-) {
- Service <| tag == 'heat-service' |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- include ::tripleo::profile::base::heat
-
-}
diff --git a/manifests/profile/pacemaker/heat/api_cfn.pp b/manifests/profile/pacemaker/heat/api_cfn.pp
deleted file mode 100644
index 6e40dba..0000000
--- a/manifests/profile/pacemaker/heat/api_cfn.pp
+++ /dev/null
@@ -1,50 +0,0 @@
-# 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::heat
-#
-# Heat 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::heat::api_cfn (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- include ::tripleo::profile::pacemaker::heat
- include ::tripleo::profile::base::heat::api_cfn
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::resource::service { $::heat::params::api_cfn_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/heat/api_cloudwatch.pp b/manifests/profile/pacemaker/heat/api_cloudwatch.pp
deleted file mode 100644
index 9403812..0000000
--- a/manifests/profile/pacemaker/heat/api_cloudwatch.pp
+++ /dev/null
@@ -1,51 +0,0 @@
-# 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::heat
-#
-# Heat 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::heat::api_cloudwatch (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- include ::tripleo::profile::pacemaker::heat
- include ::tripleo::profile::base::heat::api_cloudwatch
-
- if $step >= 5 and $pacemaker_master {
- # Heat
- pacemaker::resource::service { $::heat::params::api_cloudwatch_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/heat/engine.pp b/manifests/profile/pacemaker/heat/engine.pp
deleted file mode 100644
index bd50dc0..0000000
--- a/manifests/profile/pacemaker/heat/engine.pp
+++ /dev/null
@@ -1,50 +0,0 @@
-# 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::heat
-#
-# Heat Engine 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::heat::engine (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- include ::tripleo::profile::pacemaker::heat
- include ::tripleo::profile::base::heat::engine
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::resource::service { $::heat::params::engine_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/keystone.pp b/manifests/profile/pacemaker/keystone.pp
deleted file mode 100644
index db14aea..0000000
--- a/manifests/profile/pacemaker/keystone.pp
+++ /dev/null
@@ -1,81 +0,0 @@
-# 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::keystone
-#
-# Keystone Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*bootstrap_node*]
-# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
-#
-# [*enable_load_balancer*]
-# (Optional) Whether load balancing is enabled for this cluster
-# Defaults to hiera('enable_load_balancer', true)
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::keystone (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $enable_load_balancer = hiera('enable_load_balancer', true),
- $step = hiera('step'),
-) {
- Service <| tag == 'keystone-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::keystone
- include ::tripleo::profile::pacemaker::apache
-
- if $step >= 5 and $pacemaker_master and $enable_load_balancer {
- pacemaker::constraint::base { 'haproxy-then-keystone-constraint':
- constraint_type => 'order',
- first_resource => 'haproxy-clone',
- second_resource => 'openstack-core-clone',
- first_action => 'start',
- second_action => 'start',
- before => Pacemaker::Resource::Service[$::apache::params::service_name],
- require => [Pacemaker::Resource::Service['haproxy'],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- }
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::constraint::base { 'rabbitmq-then-keystone-constraint':
- constraint_type => 'order',
- first_resource => 'rabbitmq-clone',
- second_resource => 'openstack-core-clone',
- first_action => 'start',
- second_action => 'start',
- before => Pacemaker::Resource::Service[$::apache::params::service_name],
- require => [Pacemaker::Resource::Ocf['rabbitmq'],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/memcached.pp b/manifests/profile/pacemaker/memcached.pp
deleted file mode 100644
index 9c6a1a3..0000000
--- a/manifests/profile/pacemaker/memcached.pp
+++ /dev/null
@@ -1,61 +0,0 @@
-# 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::memcached
-#
-# Memcached 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::memcached (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- include ::tripleo::profile::base::memcached
-
- if $step >= 2 and $pacemaker_master {
- pacemaker::resource::service { $::memcached::params::service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- require => Class['::memcached'],
- }
- }
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::constraint::base { 'memcached-then-openstack-core-constraint':
- constraint_type => 'order',
- first_resource => 'memcached-clone',
- second_resource => 'openstack-core-clone',
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service['memcached'],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- }
-}
diff --git a/manifests/profile/pacemaker/neutron.pp b/manifests/profile/pacemaker/neutron.pp
deleted file mode 100644
index ccc1401..0000000
--- a/manifests/profile/pacemaker/neutron.pp
+++ /dev/null
@@ -1,213 +0,0 @@
-# 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::neutron
-#
-# Neutron server profile for tripleo
-#
-# === Parameters
-#
-# [*enable_dhcp*]
-# (Optional) Whether to include the Neutron DHCP agent pacemaker profile
-# Defaults to hiera('neutron::enable_dhcp_agent', false)
-#
-# [*enable_l3*]
-# (Optional) Whether to include the Neutron L3 agent pacemaker profile
-# Defaults to hiera('neutron::enable_l3_agent', false)
-#
-# [*enable_metadata*]
-# (Optional) Whether to include the Neutron Metadata agent pacemaker profile
-# Defaults to hiera('neutron::enable_metadata_agent', false)
-#
-# [*enable_ovs*]
-# (Optional) Whether to include the Neutron OVS agent pacemaker profile
-# Defaults to hiera('neutron::enable_ovs_agent', false)
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid', undef)
-#
-# [*step*]
-# (Optional) The step in the deployment
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::neutron (
- # We can drop the hiera defaults once the neutron roles are decomposed
- $enable_dhcp = hiera('neutron::enable_dhcp_agent', false),
- $enable_l3 = hiera('neutron::enable_l3_agent', false),
- $enable_metadata = hiera('neutron::enable_metadata_agent', false),
- $enable_ovs = hiera('neutron::enable_ovs_agent', false),
- #Don't drop below this line
- $pacemaker_master = hiera('bootstrap_nodeid', undef),
- $step = hiera('step'),
-) {
- Service <|
- tag == 'neutron-service'
- |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- include ::tripleo::profile::base::neutron
-
- if $step >= 4 {
- include ::neutron::params
-
- # To be removed when puppet-oslo comes into service
- neutron_config {
- 'DEFAULT/notification_driver': value => 'messaging';
- }
- }
-
- if $step >= 5 and $pacemaker_master == downcase($::hostname) {
- if $step == 5 {
- # Neutron
- # NOTE(gfidente): Neutron will try to populate the database with some data
- # as soon as neutron-server is started; to avoid races we want to make this
- # happen only on one node, before normal Pacemaker initialization
- # https://bugzilla.redhat.com/show_bug.cgi?id=1233061
- # NOTE(emilien): we need to run this Exec only at Step 4 otherwise this exec
- # will try to start the service while it's already started by Pacemaker
- # It would result to a deployment failure since systemd would return 1 to Puppet
- # and the overcloud would fail to deploy (6 would be returned).
- # This conditional prevents from a race condition during the deployment.
- # https://bugzilla.redhat.com/show_bug.cgi?id=1290582
- exec { 'neutron-server-systemd-start-sleep' :
- command => 'systemctl start neutron-server && /usr/bin/sleep 5',
- path => '/usr/bin',
- unless => '/sbin/pcs resource show neutron-server',
- } ->
- pacemaker::resource::service { $::neutron::params::server_service:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Ocf['openstack-core']
- }
- } else {
- pacemaker::resource::service { $::neutron::params::server_service:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Ocf['openstack-core']
- }
- }
-
- pacemaker::constraint::base { 'keystone-to-neutron-server-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::neutron::params::server_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Ocf['openstack-core'],
- Pacemaker::Resource::Service[$::neutron::params::server_service]],
- }
-
- if $enable_ovs {
- pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint':
- constraint_type => 'order',
- first_resource => "${::neutron::params::ovs_agent_service}-clone",
- second_resource => "${::neutron::params::dhcp_agent_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service],
- Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
- }
- }
-
- if $enable_dhcp and $enable_ovs {
- pacemaker::constraint::base { 'neutron-server-to-openvswitch-agent-constraint':
- constraint_type => 'order',
- first_resource => "${::neutron::params::server_service}-clone",
- second_resource => "${::neutron::params::ovs_agent_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::neutron::params::server_service],
- Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
- }
-
- pacemaker::constraint::colocation { 'neutron-openvswitch-agent-to-dhcp-agent-colocation':
- source => "${::neutron::params::dhcp_agent_service}-clone",
- target => "${::neutron::params::ovs_agent_service}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service],
- Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
- }
- }
-
- if $enable_dhcp and $enable_l3 {
- pacemaker::constraint::base { 'neutron-dhcp-agent-to-l3-agent-constraint':
- constraint_type => 'order',
- first_resource => "${::neutron::params::dhcp_agent_service}-clone",
- second_resource => "${::neutron::params::l3_agent_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
- Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]]
- }
-
- pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-l3-agent-colocation':
- source => "${::neutron::params::l3_agent_service}-clone",
- target => "${::neutron::params::dhcp_agent_service}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
- Pacemaker::Resource::Service[$::neutron::params::l3_agent_service]]
- }
- }
-
- if $enable_l3 and $enable_metadata {
- pacemaker::constraint::base { 'neutron-l3-agent-to-metadata-agent-constraint':
- constraint_type => 'order',
- first_resource => "${::neutron::params::l3_agent_service}-clone",
- second_resource => "${::neutron::params::metadata_agent_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
- Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]]
- }
- pacemaker::constraint::colocation { 'neutron-l3-agent-to-metadata-agent-colocation':
- source => "${::neutron::params::metadata_agent_service}-clone",
- target => "${::neutron::params::l3_agent_service}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::neutron::params::l3_agent_service],
- Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]]
- }
- }
-
- #VSM
- if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
- pacemaker::resource::ocf { 'vsm-p' :
- ocf_agent_name => 'heartbeat:VirtualDomain',
- resource_params => 'force_stop=true config=/var/spool/cisco/vsm/vsm_primary_deploy.xml',
- require => Class['n1k_vsm'],
- meta_params => 'resource-stickiness=INFINITY',
- }
- if str2bool(hiera('n1k_vsm::pacemaker_control', true)) {
- pacemaker::resource::ocf { 'vsm-s' :
- ocf_agent_name => 'heartbeat:VirtualDomain',
- resource_params => 'force_stop=true config=/var/spool/cisco/vsm/vsm_secondary_deploy.xml',
- require => Class['n1k_vsm'],
- meta_params => 'resource-stickiness=INFINITY',
- }
- pacemaker::constraint::colocation { 'vsm-colocation-contraint':
- source => 'vsm-p',
- target => 'vsm-s',
- score => '-INFINITY',
- require => [Pacemaker::Resource::Ocf['vsm-p'],
- Pacemaker::Resource::Ocf['vsm-s']],
- }
- }
- }
-
- }
-}
diff --git a/manifests/profile/pacemaker/neutron/dhcp.pp b/manifests/profile/pacemaker/neutron/dhcp.pp
deleted file mode 100644
index 2081357..0000000
--- a/manifests/profile/pacemaker/neutron/dhcp.pp
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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::neutron::dhcp
-#
-# Neutron DHCP Agent server profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid', undef)
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::neutron::dhcp (
- $pacemaker_master = hiera('bootstrap_nodeid', undef),
- $step = hiera('step'),
-) {
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
- include ::tripleo::profile::base::neutron::dhcp
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::neutron::params::dhcp_agent_service:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-}
diff --git a/manifests/profile/pacemaker/neutron/l3.pp b/manifests/profile/pacemaker/neutron/l3.pp
deleted file mode 100644
index b59edc1..0000000
--- a/manifests/profile/pacemaker/neutron/l3.pp
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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::neutron::l3
-#
-# Neutron L3 Agent server profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid', undef)
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::neutron::l3 (
- $pacemaker_master = hiera('bootstrap_nodeid', undef),
- $step = hiera('step'),
-) {
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
- include ::tripleo::profile::base::neutron::l3
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::neutron::params::l3_agent_service:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-}
diff --git a/manifests/profile/pacemaker/neutron/metadata.pp b/manifests/profile/pacemaker/neutron/metadata.pp
deleted file mode 100644
index 6b0e537..0000000
--- a/manifests/profile/pacemaker/neutron/metadata.pp
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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::neutron::metadata
-#
-# Neutron Metadata Agent server profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid', undef)
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::neutron::metadata (
- $pacemaker_master = hiera('bootstrap_nodeid', undef),
- $step = hiera('step'),
-) {
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
- include ::tripleo::profile::base::neutron::metadata
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::neutron::params::metadata_agent_service:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-}
diff --git a/manifests/profile/pacemaker/neutron/midonet.pp b/manifests/profile/pacemaker/neutron/midonet.pp
deleted file mode 100644
index 33aed64..0000000
--- a/manifests/profile/pacemaker/neutron/midonet.pp
+++ /dev/null
@@ -1,81 +0,0 @@
-# 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::neutron::midonet
-#
-# Neutron Midonet driver Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid', undef)
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::neutron::midonet (
- $pacemaker_master = hiera('bootstrap_nodeid', undef),
- $step = hiera('step'),
-) {
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
- include ::tripleo::profile::base::neutron::midonet
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
-
- pacemaker::resource::service {'tomcat':
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
-
- #midonet-chain chain keystone-->neutron-server-->dhcp-->metadata->tomcat
- pacemaker::constraint::base { 'neutron-server-to-dhcp-agent-constraint':
- constraint_type => 'order',
- first_resource => "${::neutron::params::server_service}-clone",
- second_resource => "${::neutron::params::dhcp_agent_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::neutron::params::server_service],
- Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service]],
- }
- pacemaker::constraint::base { 'neutron-dhcp-agent-to-metadata-agent-constraint':
- constraint_type => 'order',
- first_resource => "${::neutron::params::dhcp_agent_service}-clone",
- second_resource => "${::neutron::params::metadata_agent_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
- Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
- }
- pacemaker::constraint::base { 'neutron-metadata-agent-to-tomcat-constraint':
- constraint_type => 'order',
- first_resource => "${::neutron::params::metadata_agent_service}-clone",
- second_resource => 'tomcat-clone',
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service],
- Pacemaker::Resource::Service['tomcat']],
- }
- pacemaker::constraint::colocation { 'neutron-dhcp-agent-to-metadata-agent-colocation':
- source => "${::neutron::params::metadata_agent_service}-clone",
- target => "${::neutron::params::dhcp_agent_service}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::neutron::params::dhcp_agent_service],
- Pacemaker::Resource::Service[$::neutron::params::metadata_agent_service]],
- }
- }
-}
diff --git a/manifests/profile/pacemaker/neutron/ovs.pp b/manifests/profile/pacemaker/neutron/ovs.pp
deleted file mode 100644
index c97cd65..0000000
--- a/manifests/profile/pacemaker/neutron/ovs.pp
+++ /dev/null
@@ -1,88 +0,0 @@
-# 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::neutron::ovs
-#
-# Neutron OVS Agent Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid', undef)
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::neutron::ovs (
- $pacemaker_master = hiera('bootstrap_nodeid', undef),
- $step = hiera('step'),
-) {
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
- include ::tripleo::profile::base::neutron::ovs
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
-
- pacemaker::resource::service { $::neutron::params::ovs_agent_service:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
-
- pacemaker::resource::ocf { $::neutron::params::ovs_cleanup_service:
- ocf_agent_name => 'neutron:OVSCleanup',
- clone_params => 'interleave=true',
- }
- pacemaker::resource::ocf { 'neutron-netns-cleanup':
- ocf_agent_name => 'neutron:NetnsCleanup',
- clone_params => 'interleave=true',
- }
-
- # neutron - one chain ovs-cleanup-->netns-cleanup-->ovs-agent
- pacemaker::constraint::base { 'neutron-ovs-cleanup-to-netns-cleanup-constraint':
- constraint_type => 'order',
- first_resource => "${::neutron::params::ovs_cleanup_service}-clone",
- second_resource => 'neutron-netns-cleanup-clone',
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Ocf[$::neutron::params::ovs_cleanup_service],
- Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
- }
- pacemaker::constraint::colocation { 'neutron-ovs-cleanup-to-netns-cleanup-colocation':
- source => 'neutron-netns-cleanup-clone',
- target => "${::neutron::params::ovs_cleanup_service}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Ocf[$::neutron::params::ovs_cleanup_service],
- Pacemaker::Resource::Ocf['neutron-netns-cleanup']],
- }
- pacemaker::constraint::base { 'neutron-netns-cleanup-to-openvswitch-agent-constraint':
- constraint_type => 'order',
- first_resource => 'neutron-netns-cleanup-clone',
- second_resource => "${::neutron::params::ovs_agent_service}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Ocf['neutron-netns-cleanup'],
- Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
- }
- pacemaker::constraint::colocation { 'neutron-netns-cleanup-to-openvswitch-agent-colocation':
- source => "${::neutron::params::ovs_agent_service}-clone",
- target => 'neutron-netns-cleanup-clone',
- score => 'INFINITY',
- require => [Pacemaker::Resource::Ocf['neutron-netns-cleanup'],
- Pacemaker::Resource::Service[$::neutron::params::ovs_agent_service]],
- }
- }
-}
diff --git a/manifests/profile/pacemaker/neutron/plugins/ml2.pp b/manifests/profile/pacemaker/neutron/plugins/ml2.pp
deleted file mode 100644
index aff682a..0000000
--- a/manifests/profile/pacemaker/neutron/plugins/ml2.pp
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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::neutron::plugins::ml2
-#
-# Neutron ML2 driver Pacemaker HA profile for tripleo
-#
-# === Parameters
-#
-class tripleo::profile::pacemaker::neutron::plugins::ml2
-{
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
- include ::tripleo::profile::base::neutron::plugins::ml2
-}
diff --git a/manifests/profile/pacemaker/neutron/plugins/nuage.pp b/manifests/profile/pacemaker/neutron/plugins/nuage.pp
deleted file mode 100644
index 03cdb7e..0000000
--- a/manifests/profile/pacemaker/neutron/plugins/nuage.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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::neutron::plugins::nuage
-#
-# Nuage Neutron profile for tripleo pacemaker
-#
-# === Parameters
-#
-class tripleo::profile::pacemaker::neutron::plugins::nuage
-{
- include ::tripleo::profile::base::neutron::plugins::nuage
-}
diff --git a/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp b/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp
deleted file mode 100644
index 438245a..0000000
--- a/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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::neutron::plugins::opencontrail
-#
-# Opencontrail Neutron profile for tripleo pacemaker
-#
-# === Parameters
-#
-class tripleo::profile::pacemaker::neutron::plugins::opencontrail
-{
- include ::tripleo::profile::base::neutron::plugins::opencontrail
-}
diff --git a/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp b/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp
deleted file mode 100644
index 38b2179..0000000
--- a/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2016 PLUMgrid, 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::neutron::plugins::plumgrid
-#
-# PLUMgrid Neutron profile for tripleo pacemaker
-#
-# === Parameters
-#
-class tripleo::profile::pacemaker::neutron::plugins::plumgrid
-{
- include ::tripleo::profile::base::neutron::plugins::plumgrid
-}
diff --git a/manifests/profile/pacemaker/neutron/server.pp b/manifests/profile/pacemaker/neutron/server.pp
deleted file mode 100644
index d817ee7..0000000
--- a/manifests/profile/pacemaker/neutron/server.pp
+++ /dev/null
@@ -1,47 +0,0 @@
-# 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::neutron::server
-#
-# Neutron Server Pacemaker profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid', undef)
-#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::neutron::server (
- $pacemaker_master = hiera('bootstrap_nodeid', undef),
- $step = hiera('step'),
-) {
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
-
- $sync_db = ($::hostname == downcase($pacemaker_master))
- if $step >= 3 and $sync_db {
- include ::neutron::db::mysql
- }
-
- if $step >= 4 or ( $step >= 3 and $sync_db ) {
- include ::neutron::server::notifications
- include ::neutron::server
- }
-
-}
diff --git a/manifests/profile/pacemaker/nova.pp b/manifests/profile/pacemaker/nova.pp
deleted file mode 100644
index 222035e..0000000
--- a/manifests/profile/pacemaker/nova.pp
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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::nova
-#
-# Nova base with Pacemaker profile for tripleo
-#
-# === Parameters
-#
-# [*step*]
-# (Optional) The step in the deployment
-# Defaults to hiera('step')
-#
-class tripleo::profile::pacemaker::nova (
- $step = hiera('step'),
-) {
- Service <|
- tag == 'nova-service'
- |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
-}
diff --git a/manifests/profile/pacemaker/nova/api.pp b/manifests/profile/pacemaker/nova/api.pp
deleted file mode 100644
index 6724b4d..0000000
--- a/manifests/profile/pacemaker/nova/api.pp
+++ /dev/null
@@ -1,88 +0,0 @@
-# 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::nova::api
-#
-# Nova API with Pacemaker profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# Defaults to downcase(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::nova::api (
- $pacemaker_master = downcase(hiera('bootstrap_nodeid')),
- $step = hiera('step'),
-) {
-
- include ::nova::params
- include ::tripleo::profile::pacemaker::nova
-
- Service<| title == 'nova-api' |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- include ::tripleo::profile::base::nova::api
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::nova::params::api_service_name:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
-
- pacemaker::constraint::base { 'nova-vncproxy-then-nova-api-constraint':
- constraint_type => 'order',
- first_resource => "${::nova::params::vncproxy_service_name}-clone",
- second_resource => "${::nova::params::api_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name],
- Pacemaker::Resource::Service[$::nova::params::api_service_name]],
- }
- pacemaker::constraint::colocation { 'nova-api-with-nova-vncproxy-colocation':
- source => "${::nova::params::api_service_name}-clone",
- target => "${::nova::params::vncproxy_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name],
- Pacemaker::Resource::Service[$::nova::params::api_service_name]],
- }
- pacemaker::constraint::base { 'nova-api-then-nova-scheduler-constraint':
- constraint_type => 'order',
- first_resource => "${::nova::params::api_service_name}-clone",
- second_resource => "${::nova::params::scheduler_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::nova::params::api_service_name],
- Pacemaker::Resource::Service[$::nova::params::scheduler_service_name]],
- }
- pacemaker::constraint::colocation { 'nova-scheduler-with-nova-api-colocation':
- source => "${::nova::params::scheduler_service_name}-clone",
- target => "${::nova::params::api_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::nova::params::api_service_name],
- Pacemaker::Resource::Service[$::nova::params::scheduler_service_name]],
- }
-
- }
-
-}
diff --git a/manifests/profile/pacemaker/nova/conductor.pp b/manifests/profile/pacemaker/nova/conductor.pp
deleted file mode 100644
index b7ffe0c..0000000
--- a/manifests/profile/pacemaker/nova/conductor.pp
+++ /dev/null
@@ -1,77 +0,0 @@
-# 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::nova::conductor
-#
-# Nova Conductor with Pacemaker profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# 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::nova::conductor (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
-
- include ::nova::params
- include ::tripleo::profile::pacemaker::nova
- include ::tripleo::profile::base::nova::conductor
-
- Service<| title == 'nova-conductor' |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::nova::params::conductor_service_name:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
-
- pacemaker::constraint::base { 'nova-scheduler-then-nova-conductor-constraint':
- constraint_type => 'order',
- first_resource => "${::nova::params::scheduler_service_name}-clone",
- second_resource => "${::nova::params::conductor_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::nova::params::scheduler_service_name],
- Pacemaker::Resource::Service[$::nova::params::conductor_service_name]],
- }
- pacemaker::constraint::colocation { 'nova-conductor-with-nova-scheduler-colocation':
- source => "${::nova::params::conductor_service_name}-clone",
- target => "${::nova::params::scheduler_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::nova::params::scheduler_service_name],
- Pacemaker::Resource::Service[$::nova::params::conductor_service_name]],
- }
-
-
- # If Service['nova-compute'] is in catalog, make sure we start it after
- # nova-conductor pcmk resource.
- # Also make sure to restart nova-compute if nova-conductor pcmk resource changed
- # the state, since nova-compute is deployed at a previous step.
- Pacemaker::Resource::Service[$::nova::params::conductor_service_name] ~> Service<| title == 'nova-compute' |>
- }
-
-}
diff --git a/manifests/profile/pacemaker/nova/consoleauth.pp b/manifests/profile/pacemaker/nova/consoleauth.pp
deleted file mode 100644
index aeec6b4..0000000
--- a/manifests/profile/pacemaker/nova/consoleauth.pp
+++ /dev/null
@@ -1,87 +0,0 @@
-# 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::nova::consoleauth
-#
-# Nova Consoleauth with Pacemaker profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# 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::nova::consoleauth (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
-
- include ::nova::params
- include ::tripleo::profile::pacemaker::nova
- include ::tripleo::profile::base::nova::consoleauth
-
- Service<| title == 'nova-consoleauth' |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::nova::params::consoleauth_service_name:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
-
- pacemaker::constraint::base { 'keystone-then-nova-consoleauth-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::nova::params::consoleauth_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- pacemaker::constraint::colocation { 'nova-consoleauth-with-openstack-core':
- source => "${::nova::params::consoleauth_service_name}-clone",
- target => 'openstack-core-clone',
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- pacemaker::constraint::base { 'nova-consoleauth-then-nova-vncproxy-constraint':
- constraint_type => 'order',
- first_resource => "${::nova::params::consoleauth_service_name}-clone",
- second_resource => "${::nova::params::vncproxy_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name],
- Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name]],
- }
- pacemaker::constraint::colocation { 'nova-vncproxy-with-nova-consoleauth-colocation':
- source => "${::nova::params::vncproxy_service_name}-clone",
- target => "${::nova::params::consoleauth_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name],
- Pacemaker::Resource::Service[$::nova::params::vncproxy_service_name]],
- }
-
- }
-
-}
diff --git a/manifests/profile/pacemaker/nova/scheduler.pp b/manifests/profile/pacemaker/nova/scheduler.pp
deleted file mode 100644
index d4d3dab..0000000
--- a/manifests/profile/pacemaker/nova/scheduler.pp
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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::nova::scheduler
-#
-# Nova Scheduler with Pacemaker profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# 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::nova::scheduler (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::nova::params
- include ::tripleo::profile::pacemaker::nova
- include ::tripleo::profile::base::nova::scheduler
-
- Service<| title == 'nova-scheduler' |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::nova::params::scheduler_service_name:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/nova/vncproxy.pp b/manifests/profile/pacemaker/nova/vncproxy.pp
deleted file mode 100644
index e9a1124..0000000
--- a/manifests/profile/pacemaker/nova/vncproxy.pp
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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::nova::vncproxy
-#
-# Nova vncproxy with Pacemaker profile for tripleo
-#
-# === Parameters
-#
-# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
-# 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::nova::vncproxy (
- $pacemaker_master = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- include ::nova::params
- include ::tripleo::profile::pacemaker::nova
- include ::tripleo::profile::base::nova::vncproxy
-
- Service<| title == 'nova-vncproxy' |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- if $step >= 5 and downcase($::hostname) == $pacemaker_master {
- pacemaker::resource::service { $::nova::params::vncproxy_service_name:
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/sahara.pp b/manifests/profile/pacemaker/sahara.pp
deleted file mode 100644
index 07cd882..0000000
--- a/manifests/profile/pacemaker/sahara.pp
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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::sahara
-#
-# Sahara Pacemaker HA 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::pacemaker::sahara (
- $step = hiera('step'),
-) {
- Service <| tag == 'sahara-service' |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
- include ::tripleo::profile::base::sahara
-}
diff --git a/manifests/profile/pacemaker/sahara/api.pp b/manifests/profile/pacemaker/sahara/api.pp
deleted file mode 100644
index 70632d1..0000000
--- a/manifests/profile/pacemaker/sahara/api.pp
+++ /dev/null
@@ -1,50 +0,0 @@
-# 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::sahara::api
-#
-# Sahara 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::sahara::api (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- include ::tripleo::profile::pacemaker::sahara
- include ::tripleo::profile::base::sahara::api
-
- if $step >= 5 and $pacemaker_master {
- # Sahara
- pacemaker::resource::service { $::sahara::params::api_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-}
diff --git a/manifests/profile/pacemaker/sahara/engine.pp b/manifests/profile/pacemaker/sahara/engine.pp
deleted file mode 100644
index 640acc0..0000000
--- a/manifests/profile/pacemaker/sahara/engine.pp
+++ /dev/null
@@ -1,49 +0,0 @@
-# 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::sahara::engine
-#
-# Sahara Engine 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::sahara::engine (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
-) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- include ::tripleo::profile::pacemaker::sahara
- include ::tripleo::profile::base::sahara::engine
-
- if $step >= 5 and $pacemaker_master {
- pacemaker::resource::service { $::sahara::params::engine_service_name :
- op_params => 'start timeout=200s stop timeout=200s',
- clone_params => 'interleave=true',
- }
- }
-}
diff --git a/manifests/tls_proxy.pp b/manifests/tls_proxy.pp
new file mode 100644
index 0000000..36d6b6d
--- /dev/null
+++ b/manifests/tls_proxy.pp
@@ -0,0 +1,60 @@
+# 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::tls_proxy
+#
+# Sets up a TLS proxy using mod_proxy that redirects towards localhost.
+#
+# === Parameters
+#
+# [*ip*]
+# The IP address that the proxy will be listening on.
+#
+# [*port*]
+# The port that the proxy will be listening on.
+#
+# [*servername*]
+# The vhost servername that contains the FQDN to identify the virtual host.
+#
+# [*tls_cert*]
+# The path to the TLS certificate that the proxy will be serving.
+#
+# [*tls_key*]
+# The path to the key used for the specified certificate.
+#
+define tripleo::tls_proxy(
+ $ip,
+ $port,
+ $servername,
+ $tls_cert,
+ $tls_key,
+) {
+ ::apache::vhost { "${title}-proxy":
+ ensure => 'present',
+ docroot => undef, # This is required by the manifest
+ manage_docroot => false,
+ servername => $servername,
+ ip => $ip,
+ port => $port,
+ ssl => true,
+ ssl_cert => $tls_cert,
+ ssl_key => $tls_key,
+ request_headers => ['set X-Forwarded-Proto "https"'],
+ proxy_pass => {
+ path => '/',
+ url => "http://localhost:${port}/",
+ params => {retry => '10'},
+ }
+ }
+}
diff --git a/manifests/vip_hosts.pp b/manifests/vip_hosts.pp
deleted file mode 100644
index 7b260fd..0000000
--- a/manifests/vip_hosts.pp
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2016 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::vip_hosts
-#
-# Write the overcloud VIPs into /etc/hosts
-#
-# === Parameters
-#
-# [*hosts_spec*]
-# The specification of the hosts that will be added to the /etc/hosts file.
-# These come in the form of a hash that will be consumed by create_resources.
-# e.g.:
-# tripleo::hosts_spec:
-# host-1:
-# name: host1.domain
-# ip: 127.0.0.1
-# host-2:
-# name: host2.domain
-# ip: 127.0.0.2
-#
-class tripleo::vip_hosts (
- $hosts_spec
-) {
- create_resources('host', $hosts_spec)
-}
-
diff --git a/metadata.json b/metadata.json
index a417f95..1aa1b4d 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,6 +1,6 @@
{
"name": "openstack-tripleo",
- "version": "6.0.0",
+ "version": "6.1.0",
"author": "OpenStack Contributors",
"summary": "Puppet module for TripleO",
"license": "Apache-2.0",
diff --git a/releasenotes/notes/hpelefthand_8474c416b0d411e6.yaml b/releasenotes/notes/hpelefthand_8474c416b0d411e6.yaml
new file mode 100644
index 0000000..a92cbae
--- /dev/null
+++ b/releasenotes/notes/hpelefthand_8474c416b0d411e6.yaml
@@ -0,0 +1,3 @@
+---
+features:
+ - Added hpelefthand_iscsi backend support for cinder
diff --git a/releasenotes/notes/sriov_numvfs-40564db9e1be589b.yaml b/releasenotes/notes/sriov_numvfs-40564db9e1be589b.yaml
index 85cbdec..5bcb588 100644
--- a/releasenotes/notes/sriov_numvfs-40564db9e1be589b.yaml
+++ b/releasenotes/notes/sriov_numvfs-40564db9e1be589b.yaml
@@ -1,4 +1,4 @@
---
features:
- Added a provider to configure VFs for SR-IOV interface.
- Added a define for persistence of the VFs configuratin.
+ - Added a define for persistence of the VFs configuration.
diff --git a/spec/classes/tripleo_cluster_cassandra_spec.rb b/spec/classes/tripleo_cluster_cassandra_spec.rb
deleted file mode 100644
index 3f7d471..0000000
--- a/spec/classes/tripleo_cluster_cassandra_spec.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Copyright (C) 2015 Midokura SARL
-#
-# 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.
-#
-# Unit tests for the cassandra service
-
-require 'spec_helper'
-
-describe 'tripleo::cluster::cassandra' do
-
- shared_examples_for 'tripleo::cluster::cassandra' do
-
- let :params do
- {
- :cassandra_servers => ['192.168.2.2', '192.168.2.3'],
- :cassandra_ip => '192.168.2.2'
- }
- end
-
- it 'should configure cassandra' do
- is_expected.to contain_class('cassandra').with(
- :seeds => ['192.168.2.2', '192.168.2.3'],
- :listen_address => '192.168.2.2',
- :storage_port => 7000,
- :ssl_storage_port => 7001,
- :native_transport_port => 9042,
- :rpc_port => 9160
- )
-
- end
- end
-
- on_supported_os.each do |os, facts|
- context "on #{os}" do
- let(:facts) do
- facts.merge({})
- end
-
- it_behaves_like 'tripleo::cluster::cassandra'
- end
- end
-
-end
diff --git a/spec/classes/tripleo_cluster_zookeeper_spec.rb b/spec/classes/tripleo_cluster_zookeeper_spec.rb
deleted file mode 100644
index fc003b6..0000000
--- a/spec/classes/tripleo_cluster_zookeeper_spec.rb
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# Copyright (C) 2015 Midokura SARL
-#
-# 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.
-#
-# Unit tests for the zookeeper service
-
-require 'spec_helper'
-
-describe 'tripleo::cluster::zookeeper' do
-
- shared_examples_for 'tripleo::cluster::zookeeper' do
- let :params do
- {
- :zookeeper_server_ips => ['23.43.2.34', '23.43.2.35', '24.43.2.36'],
- :zookeeper_hostnames => ['host1.midonet', 'host2.midonet', 'host3.midonet']
- }
- end
-
- context 'on host1' do
- before :each do
- facts.merge!({ :hostname => 'host1.midonet'})
- params.merge!({ :zookeeper_client_ip => '23.43.2.34' })
- end
-
- it 'should call zookeeper using id==1' do
- is_expected.to contain_class('zookeeper').with(
- :servers => ['23.43.2.34', '23.43.2.35', '24.43.2.36'],
- :client_ip => '23.43.2.34',
- :id => 1
- )
- end
- end
-
- context 'on host2' do
- before :each do
- facts.merge!({ :hostname => 'host2.midonet'})
- params.merge!({ :zookeeper_client_ip => '23.43.2.35' })
- end
-
- it 'should call zookeeper using id==1' do
- is_expected.to contain_class('zookeeper').with(
- :servers => ['23.43.2.34', '23.43.2.35', '24.43.2.36'],
- :client_ip => '23.43.2.35',
- :id => 2
- )
- end
- end
-
- context 'on host3' do
- before :each do
- facts.merge!({ :hostname => 'host3.midonet'})
- params.merge!({ :zookeeper_client_ip => '23.43.2.36' })
- end
-
- it 'should call zookeeper using id==1' do
- is_expected.to contain_class('zookeeper').with(
- :servers => ['23.43.2.34', '23.43.2.35', '24.43.2.36'],
- :client_ip => '23.43.2.36',
- :id => 3
- )
- end
-
- end
- end
-
- on_supported_os.each do |os, facts|
- context "on #{os}" do
- let(:facts) do
- facts.merge({})
- end
-
- it_behaves_like 'tripleo::cluster::zookeeper'
- end
- end
-end
diff --git a/spec/classes/tripleo_firewall_spec.rb b/spec/classes/tripleo_firewall_spec.rb
index 3116a51..3a1a0a0 100644
--- a/spec/classes/tripleo_firewall_spec.rb
+++ b/spec/classes/tripleo_firewall_spec.rb
@@ -74,7 +74,7 @@ describe 'tripleo::firewall' do
:firewall_rules => {
'300 add custom application 1' => {'port' => '999', 'proto' => 'udp', 'action' => 'accept'},
'301 add custom application 2' => {'port' => '8081', 'proto' => 'tcp', 'action' => 'accept'},
- '302 fwd custom cidr 1' => {'chain' => 'FORWARD', 'destination' => '192.0.2.0/24'},
+ '302 fwd custom cidr 1' => {'port' => 'all', 'chain' => 'FORWARD', 'destination' => '192.0.2.0/24'},
'303 add custom application 3' => {'dport' => '8081', 'proto' => 'tcp', 'action' => 'accept'},
'304 add custom application 4' => {'sport' => '1000', 'proto' => 'tcp', 'action' => 'accept'},
'305 add gre rule' => {'proto' => 'gre'}
@@ -96,7 +96,8 @@ describe 'tripleo::firewall' do
)
is_expected.to contain_firewall('302 fwd custom cidr 1').with(
:chain => 'FORWARD',
- :destination => '192.0.2.0/24',
+ :proto => 'tcp',
+ :destination => '192.0.2.0/24',
)
is_expected.to contain_firewall('303 add custom application 3').with(
:dport => '8081',
@@ -114,6 +115,18 @@ describe 'tripleo::firewall' do
end
end
+ context 'with TCP rule without port or dport or sport specified' do
+ before :each do
+ params.merge!(
+ :manage_firewall => true,
+ :firewall_rules => {
+ '500 wrong tcp rule' => {'proto' => 'tcp', 'action' => 'accept'},
+ }
+ )
+ end
+ it_raises 'a Puppet::Error', /500 wrong tcp rule firewall rule cannot be created. TCP or UDP rules for INPUT or OUTPUT need port or sport or dport./
+ end
+
end
on_supported_os.each do |os, facts|
diff --git a/spec/classes/tripleo_midonet_api_spec.rb b/spec/classes/tripleo_midonet_api_spec.rb
deleted file mode 100644
index 25b375b..0000000
--- a/spec/classes/tripleo_midonet_api_spec.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-# Copyright (C) 2015 Midokura SARL
-#
-# 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.
-#
-# Unit tests for the midonet api
-
-require 'spec_helper'
-
-describe 'tripleo::network::midonet::api' do
-
- shared_examples_for 'tripleo::midonet::api' do
-
- let :params do
- {
- :zookeeper_servers => ['192.168.2.1', '192.168.2.2'],
- :vip => '192.23.0.2',
- :keystone_ip => '192.23.0.2',
- :keystone_admin_token => 'admin_token',
- :admin_password => 'admin_password',
- :bind_address => '192.23.0.65'
- }
- end
-
- it 'should call api configuration' do
- is_expected.to contain_class('midonet::midonet_api::run').with(
- :zk_servers => [{'ip' => '192.168.2.1', 'port' => 2181},
- {'ip' => '192.168.2.2', 'port' => 2181}],
- :keystone_auth => true,
- :tomcat_package => 'tomcat',
- :vtep => false,
- :api_ip => '192.23.0.2',
- :api_port => '8081',
- :keystone_host => '192.23.0.2',
- :keystone_port => 35357,
- :keystone_admin_token => 'admin_token',
- :keystone_tenant_name => 'admin',
- :catalina_base => '/usr/share/tomcat',
- :bind_address => '192.23.0.65'
- )
- end
-
- it 'should install the cli' do
- is_expected.to contain_class('midonet::midonet_cli').with(
- :api_endpoint => 'http://192.23.0.2:8081/midonet-api',
- :username => 'admin',
- :password => 'admin_password',
- :tenant_name => 'admin'
- )
- end
-
- end
-
- on_supported_os.each do |os, facts|
- context "on #{os}" do
- let(:facts) do
- facts.merge({
- :augeasversion => '1.0.0'
- })
- end
-
- it_behaves_like 'tripleo::midonet::api'
- end
- end
-
-end
diff --git a/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb b/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
index 935e9e8..2887d32 100644
--- a/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
+++ b/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
@@ -32,9 +32,10 @@ describe 'tripleo::profile::base::ceilometer::api' do
end
end
- context 'with step 4' do
+ context 'with step 4 and enable_legacy_api' do
let(:params) { {
- :step => 4,
+ :step => 4,
+ :enable_legacy_api => true,
} }
it 'should trigger complete configuration' do
@@ -42,6 +43,17 @@ describe 'tripleo::profile::base::ceilometer::api' do
is_expected.to contain_class('ceilometer::wsgi::apache')
end
end
+
+ context 'with step 4 and default enable_legacy_api' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should do nothing' do
+ is_expected.to_not contain_class('ceilometer::api')
+ is_expected.to_not contain_class('ceilometer::wsgi::apache')
+ end
+ end
end
diff --git a/spec/classes/tripleo_profile_base_cinder_api_spec.rb b/spec/classes/tripleo_profile_base_cinder_api_spec.rb
new file mode 100644
index 0000000..a0c607d
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_api_spec.rb
@@ -0,0 +1,86 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::api' do
+ shared_examples_for 'tripleo::profile::base::cinder::api' do
+ let(:pre_condition) do
+ "class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }"
+ end
+
+ context 'with step less than 3' do
+ let(:params) { { :step => 1 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::api')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_class('cinder::api')
+ is_expected.to_not contain_class('cinder::ceilometer')
+ is_expected.to_not contain_class('cinder::glance')
+ end
+ end
+
+ context 'with step 3 on bootstrap node' do
+ let(:params) { {
+ :step => 3,
+ :bootstrap_node => 'node.example.com',
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder::api')
+ is_expected.to contain_class('cinder::ceilometer')
+ is_expected.to contain_class('cinder::glance')
+ end
+ end
+
+ context 'with step 3 not on bootstrap node' do
+ let(:params) { {
+ :step => 3,
+ :bootstrap_node => 'other.example.com',
+ } }
+
+ it 'should not trigger any configuration' do
+ is_expected.to_not contain_class('cinder::api')
+ is_expected.to_not contain_class('cinder::ceilometer')
+ is_expected.to_not contain_class('cinder::glance')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder::api')
+ is_expected.to contain_class('cinder::ceilometer')
+ is_expected.to contain_class('cinder::glance')
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::api'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_backup_ceph_spec.rb b/spec/classes/tripleo_profile_base_cinder_backup_ceph_spec.rb
new file mode 100644
index 0000000..46c3d15
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_backup_ceph_spec.rb
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::backup::ceph' do
+ shared_examples_for 'tripleo::profile::base::cinder::backup::ceph' do
+ let(:pre_condition) do
+ <<-EOF
+ class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }
+ class { '::tripleo::profile::base::cinder::backup': step => #{params[:step]} }
+ EOF
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::backup::ceph')
+ is_expected.to contain_class('tripleo::profile::base::cinder::backup')
+ is_expected.to_not contain_class('cinder::backup::ceph')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder::backup::ceph')
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::backup::ceph'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_backup_spec.rb b/spec/classes/tripleo_profile_base_cinder_backup_spec.rb
new file mode 100644
index 0000000..0e15c9a
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_backup_spec.rb
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::backup' do
+ shared_examples_for 'tripleo::profile::base::cinder::backup' do
+ let(:pre_condition) do
+ "class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }"
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::backup')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_class('cinder::backup')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder::backup')
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::backup'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_backup_swift_spec.rb b/spec/classes/tripleo_profile_base_cinder_backup_swift_spec.rb
new file mode 100644
index 0000000..2c9d71f
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_backup_swift_spec.rb
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::backup::swift' do
+ shared_examples_for 'tripleo::profile::base::cinder::backup::swift' do
+ let(:pre_condition) do
+ <<-EOF
+ class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }
+ class { '::tripleo::profile::base::cinder::backup': step => #{params[:step]} }
+ EOF
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::backup::swift')
+ is_expected.to contain_class('tripleo::profile::base::cinder::backup')
+ is_expected.to_not contain_class('cinder::backup::swift')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder::backup::swift')
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::backup::swift'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_scheduler_spec.rb b/spec/classes/tripleo_profile_base_cinder_scheduler_spec.rb
new file mode 100644
index 0000000..cd044ee
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_scheduler_spec.rb
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::scheduler' do
+ shared_examples_for 'tripleo::profile::base::cinder::scheduler' do
+ let(:pre_condition) do
+ "class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }"
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::scheduler')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_class('cinder::scheduler')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder::scheduler')
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::scheduler'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_spec.rb b/spec/classes/tripleo_profile_base_cinder_spec.rb
new file mode 100644
index 0000000..6a36152
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_spec.rb
@@ -0,0 +1,122 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder' do
+ shared_examples_for 'tripleo::profile::base::cinder' do
+ context 'with step less than 3' do
+ let(:params) { { :step => 1 } }
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_class('cinder')
+ is_expected.to_not contain_class('cinder::config')
+ is_expected.to_not contain_class('cinder:::cron::db_purge')
+ end
+ end
+
+ context 'with step 3 on bootstrap node' do
+ let(:params) { {
+ :step => 3,
+ :bootstrap_node => 'node.example.com',
+ :rabbit_hosts => ['127.0.0.1', '127.0.0.2'],
+ :rabbit_port => '1234'
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder').with(
+ :rabbit_hosts => params[:rabbit_hosts].map{ |h| "#{h}:#{params[:rabbit_port]}" }
+ )
+ is_expected.to contain_class('cinder::config')
+ is_expected.to_not contain_class('cinder::cron::db_purge')
+ end
+ end
+
+ context 'with step 3 not on bootstrap node' do
+ let(:params) { {
+ :step => 3,
+ :bootstrap_node => 'soemthingelse.example.com'
+ } }
+
+ it 'should not trigger any configuration' do
+ is_expected.to_not contain_class('cinder')
+ is_expected.to_not contain_class('cinder::config')
+ is_expected.to_not contain_class('cinder:::cron::db_purge')
+ end
+ end
+
+ context 'with step 4 on other node' do
+ let(:params) { {
+ :step => 4,
+ :bootstrap_node => 'somethingelse.example.com',
+ :rabbit_hosts => ['127.0.0.1', '127.0.0.2'],
+ :rabbit_port => '5672'
+ } }
+
+ it 'should trigger cinder configuration without mysql grant' do
+ is_expected.to contain_class('cinder').with(
+ :rabbit_hosts => params[:rabbit_hosts].map{ |h| "#{h}:#{params[:rabbit_port]}" }
+ )
+ is_expected.to contain_class('cinder::config')
+ is_expected.to_not contain_class('cinder:::cron::db_purge')
+ end
+ end
+
+ context 'with step 5' do
+ let(:params) { {
+ :step => 5,
+ :bootstrap_node => 'node.example.com',
+ :rabbit_hosts => ['127.0.0.1', '127.0.0.2']
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder').with(
+ :rabbit_hosts => params[:rabbit_hosts].map{ |h| "#{h}:5672" }
+ )
+ is_expected.to contain_class('cinder::config')
+ is_expected.to contain_class('cinder::cron::db_purge')
+ end
+ end
+
+ context 'with step 5 without db_purge' do
+ let(:params) { {
+ :step => 5,
+ :bootstrap_node => 'node.example.com',
+ :rabbit_hosts => ['127.0.0.1', '127.0.0.2'],
+ :cinder_enable_db_purge => false
+ } }
+
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder').with(
+ :rabbit_hosts => params[:rabbit_hosts].map{ |h| "#{h}:5672" }
+ )
+ is_expected.to contain_class('cinder::config')
+ is_expected.to_not contain_class('cinder::cron::db_purge')
+ end
+ end
+
+ end
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_volume_dellsc_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_dellsc_spec.rb
new file mode 100644
index 0000000..328e886
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_volume_dellsc_spec.rb
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::volume::dellsc' do
+ shared_examples_for 'tripleo::profile::base::cinder::volume::dellsc' do
+ before :each do
+ facts.merge!({ :step => params[:step] })
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellsc')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_cinder__backend__dellsc_iscsi('tripleo_dellsc')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should trigger complete configuration' do
+ # TODO(aschultz): check hiera parameters
+ is_expected.to contain_cinder__backend__dellsc_iscsi('tripleo_dellsc')
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::volume::dellsc'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_volume_eqlx_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_eqlx_spec.rb
new file mode 100644
index 0000000..1a188aa
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_volume_eqlx_spec.rb
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::volume::eqlx' do
+ shared_examples_for 'tripleo::profile::base::cinder::volume::eqlx' do
+ before :each do
+ facts.merge!({ :step => params[:step] })
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::eqlx')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_cinder__backend__eqlx('tripleo_eqlx')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should trigger complete configuration' do
+ # TODO(aschultz): check hiera parameters
+ is_expected.to contain_cinder__backend__eqlx('tripleo_eqlx')
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::volume::eqlx'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_volume_iscsi_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_iscsi_spec.rb
new file mode 100644
index 0000000..65bf3dc
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_volume_iscsi_spec.rb
@@ -0,0 +1,85 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::volume::iscsi' do
+ shared_examples_for 'tripleo::profile::base::cinder::volume::iscsi' do
+ before :each do
+ facts.merge!({ :step => params[:step] })
+ end
+
+ context 'with step less than 4' do
+ let(:params) { {
+ :cinder_iscsi_address => '127.0.0.1',
+ :step => 3
+ } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_class('cinder::setup_test_volume')
+ is_expected.to_not contain_cinder__backend__iscsi('tripleo_iscsi')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :cinder_iscsi_address => '127.0.0.1',
+ :step => 4,
+ } }
+
+ context 'with defaults' do
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder::setup_test_volume').with(
+ :size => '10280M'
+ )
+ is_expected.to contain_cinder__backend__iscsi('tripleo_iscsi').with(
+ :iscsi_ip_address => '127.0.0.1',
+ :iscsi_helper => 'tgtadm',
+ :iscsi_protocol => 'iscsi'
+ )
+ end
+ end
+
+ context 'with ipv6 address' do
+ before :each do
+ params.merge!({ :cinder_iscsi_address => 'fe80::fc54:ff:fe9e:7846' })
+ end
+ it 'should trigger complete configuration' do
+ is_expected.to contain_class('cinder::setup_test_volume').with(
+ :size => '10280M'
+ )
+ is_expected.to contain_cinder__backend__iscsi('tripleo_iscsi').with(
+ :iscsi_ip_address => '[fe80::fc54:ff:fe9e:7846]'
+ )
+ end
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::volume::iscsi'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_volume_netapp_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_netapp_spec.rb
new file mode 100644
index 0000000..732720e
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_volume_netapp_spec.rb
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::volume::netapp' do
+ shared_examples_for 'tripleo::profile::base::cinder::volume::netapp' do
+ before :each do
+ facts.merge!({ :step => params[:step] })
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::netapp')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_cinder__backend__netapp('tripleo_netapp')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should trigger complete configuration' do
+ # TODO(aschultz): check parameters via hiera
+ is_expected.to contain_cinder__backend__netapp('tripleo_netapp')
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::volume::netapp'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_volume_nfs_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_nfs_spec.rb
new file mode 100644
index 0000000..194a70d
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_volume_nfs_spec.rb
@@ -0,0 +1,88 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::volume::nfs' do
+ shared_examples_for 'tripleo::profile::base::cinder::volume::nfs' do
+ before :each do
+ facts.merge!({ :step => params[:step] })
+ end
+
+ context 'with step less than 4' do
+ let(:params) { {
+ :cinder_nfs_servers => ['127.0.0.1'],
+ :step => 3
+ } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::nfs')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_cinder__backend__nfs('tripleo_nfs')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :cinder_nfs_servers => ['127.0.0.1'],
+ :step => 4,
+ } }
+
+ context 'with defaults' do
+ it 'should trigger complete configuration' do
+ is_expected.to contain_cinder__backend__nfs('tripleo_nfs').with(
+ :nfs_servers => ['127.0.0.1'],
+ :nfs_mount_options => '',
+ :nfs_shares_config => '/etc/cinder/shares-nfs.conf'
+ )
+ end
+ end
+
+ context 'with selinux' do
+ before :each do
+ facts.merge!({ :selinux => 'true' })
+ end
+ it 'should configure selinux' do
+ is_expected.to contain_selboolean('virt_use_nfs').with(
+ :value => 'on',
+ :persistent => true,
+ )
+ end
+ end
+
+ context 'without selinux' do
+ before :each do
+ facts.merge!({ :selinux => 'false' })
+ end
+ it 'should configure selinux' do
+ is_expected.to_not contain_selboolean('virt_use_nfs')
+ end
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::volume::nfs'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_volume_rbd_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_rbd_spec.rb
new file mode 100644
index 0000000..559b836
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_volume_rbd_spec.rb
@@ -0,0 +1,83 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::volume::rbd' do
+ shared_examples_for 'tripleo::profile::base::cinder::volume::rbd' do
+ before :each do
+ facts.merge!({ :step => params[:step] })
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::rbd')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_cinder__backend__rbd('tripleo_ceph')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ context 'with defaults' do
+ it 'should trigger complete configuration' do
+ is_expected.to contain_cinder__backend__rbd('tripleo_ceph').with(
+ :backend_host => 'hostgroup',
+ :rbd_pool => 'volumes',
+ :rbd_user => 'openstack',
+ )
+ end
+ end
+
+ context 'with customizations' do
+ before :each do
+ params.merge!({
+ :backend_name => 'poodles',
+ :cinder_rbd_backend_host => 'fe80::fc54:ff:fe9e:7846',
+ :cinder_rbd_pool_name => 'poolname',
+ :cinder_rbd_secret_uuid => 'secretuuid',
+ :cinder_rbd_user_name => 'kcatsnepo'
+ })
+ end
+ it 'should trigger complete configuration' do
+ is_expected.to contain_cinder__backend__rbd('poodles').with(
+ :backend_host => 'fe80::fc54:ff:fe9e:7846',
+ :rbd_pool => 'poolname',
+ :rbd_user => 'kcatsnepo',
+ :rbd_secret_uuid => 'secretuuid'
+ )
+ end
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::volume::rbd'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_profile_base_cinder_volume_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_spec.rb
new file mode 100644
index 0000000..e0ec9de
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_cinder_volume_spec.rb
@@ -0,0 +1,216 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::cinder::volume' do
+
+ shared_examples_for 'tripleo::profile::base::cinder::volume' do
+ # this hack allows hiera('step') to work as the spec hiera config will
+ # allow any included modules to automagically get the right step from
+ # hiera. (╯°□°)╯︵ ┻━┻
+ before :each do
+ facts.merge!({ :step => params[:step] })
+ end
+
+ let(:pre_condition) do
+ "class { '::tripleo::profile::base::cinder': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }"
+ end
+
+ context 'with step less than 4' do
+ let(:params) { { :step => 3 } }
+
+ it 'should do nothing' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to_not contain_class('cinder::volume')
+ end
+ end
+
+ context 'with step 4' do
+ let(:params) { { :step => 4 } }
+
+ context 'with defaults' do
+ it 'should configure iscsi' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to contain_class('cinder::volume')
+ is_expected.to contain_class('cinder::backends').with(
+ :enabled_backends => ['tripleo_iscsi']
+ )
+ end
+ end
+
+ context 'with only dellsc' do
+ before :each do
+ params.merge!({
+ :cinder_enable_dellsc_backend => true,
+ :cinder_enable_iscsi_backend => false,
+ })
+ end
+ it 'should configure only dellsc' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellsc')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to contain_class('cinder::volume')
+ is_expected.to contain_class('cinder::backends').with(
+ :enabled_backends => ['tripleo_dellsc']
+ )
+ end
+ end
+
+ context 'with only eqlx' do
+ before :each do
+ params.merge!({
+ :cinder_enable_eqlx_backend => true,
+ :cinder_enable_iscsi_backend => false,
+ })
+ end
+ it 'should configure only eqlx' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::eqlx')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to contain_class('cinder::volume')
+ is_expected.to contain_class('cinder::backends').with(
+ :enabled_backends => ['tripleo_eqlx']
+ )
+ end
+ end
+
+ context 'with only netapp' do
+ before :each do
+ params.merge!({
+ :cinder_enable_netapp_backend => true,
+ :cinder_enable_iscsi_backend => false,
+ })
+ end
+ it 'should configure only netapp' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::netapp')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to contain_class('cinder::volume')
+ is_expected.to contain_class('cinder::backends').with(
+ :enabled_backends => ['tripleo_netapp']
+ )
+ end
+ end
+
+ context 'with only nfs' do
+ before :each do
+ params.merge!({
+ :cinder_enable_nfs_backend => true,
+ :cinder_enable_iscsi_backend => false,
+ })
+ end
+ it 'should configure only nfs' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::nfs')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to contain_class('cinder::volume')
+ is_expected.to contain_class('cinder::backends').with(
+ :enabled_backends => ['tripleo_nfs']
+ )
+ end
+ end
+
+ context 'with only rbd' do
+ before :each do
+ params.merge!({
+ :cinder_enable_rbd_backend => true,
+ :cinder_enable_iscsi_backend => false,
+ })
+ end
+ it 'should configure only ceph' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::rbd')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to contain_class('cinder::volume')
+ is_expected.to contain_class('cinder::backends').with(
+ :enabled_backends => ['tripleo_ceph']
+ )
+ end
+ end
+
+ context 'with only user backend' do
+ before :each do
+ params.merge!({
+ :cinder_enable_iscsi_backend => false,
+ :cinder_user_enabled_backends => 'poodles'
+ })
+ end
+ it 'should configure only user backend' do
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellsc')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::eqlx')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::netapp')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::nfs')
+ is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::rbd')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to contain_class('cinder::volume')
+ is_expected.to contain_class('cinder::backends').with(
+ :enabled_backends => ['poodles']
+ )
+ end
+ end
+
+ context 'with all tripleo backends' do
+ before :each do
+ params.merge!({
+ :cinder_enable_iscsi_backend => true,
+ :cinder_enable_dellsc_backend => true,
+ :cinder_enable_eqlx_backend => true,
+ :cinder_enable_netapp_backend => true,
+ :cinder_enable_nfs_backend => true,
+ :cinder_enable_rbd_backend => true,
+ })
+ end
+ it 'should configure all backends' do
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::iscsi')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellsc')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::eqlx')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::netapp')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::nfs')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume::rbd')
+ is_expected.to contain_class('tripleo::profile::base::cinder::volume')
+ is_expected.to contain_class('tripleo::profile::base::cinder')
+ is_expected.to contain_class('cinder::volume')
+ is_expected.to contain_class('cinder::backends').with(
+ :enabled_backends => ['tripleo_iscsi', 'tripleo_ceph', 'tripleo_eqlx',
+ 'tripleo_dellsc', 'tripleo_netapp','tripleo_nfs']
+ )
+ end
+ end
+ end
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::profile::base::cinder::volume'
+ end
+ end
+end
diff --git a/spec/classes/tripleo_ui_spec.rb b/spec/classes/tripleo_ui_spec.rb
new file mode 100644
index 0000000..588a944
--- /dev/null
+++ b/spec/classes/tripleo_ui_spec.rb
@@ -0,0 +1,99 @@
+#
+# Copyright (C) 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.
+#
+
+require 'spec_helper'
+
+describe 'tripleo::ui' do
+ shared_examples_for 'tripleo::ui' do
+ let(:pre_condition) do
+ 'include ::apache'
+ end
+
+ context 'with required parameters' do
+ let(:params) { {
+ :servername => facts[:hostname],
+ :bind_host => '127.0.0.1',
+ :keystone_url => 'http://127.0.0.1:5000/'
+ } }
+
+ it 'should configure tripleo ui' do
+ is_expected.to contain_class('tripleo::ui')
+ is_expected.to contain_apache__vhost('tripleo-ui').with(
+ :ensure => 'present',
+ :servername => facts[:hostname],
+ :ip => '127.0.0.1',
+ :port => 3000,
+ :docroot => '/var/www/openstack-tripleo-ui/dist',
+ :options => [ 'Indexes', 'FollowSymLinks' ],
+ :fallbackresource => '/index.html'
+ )
+ is_expected.to contain_file('/etc/httpd/conf.d/openstack-tripleo-ui.conf').with_content(/cleaned by Puppet/)
+ is_expected.to contain_file('/var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js')
+ .with_content(/"keystone": "http:\/\/127.0.0.1:5000\/"/)
+ .with_content(/"zaqar_default_queue": "tripleo"/)
+ end
+ end
+
+ context 'with all parameters' do
+ let(:params) { {
+ :servername => 'custom.example.com',
+ :bind_host => '127.0.0.2',
+ :ui_port => 3001,
+ :keystone_url => 'http://127.0.0.1:1111/',
+ :heat_url => 'http://127.0.0.1:2222/',
+ :ironic_url => 'http://127.0.0.1:3333/',
+ :mistral_url => 'http://127.0.0.1:4444/',
+ :swift_url => 'http://127.0.0.1:5555/',
+ :zaqar_websocket_url => 'http://127.0.0.1:6666/',
+ :zaqar_default_queue => 'myqueue'
+ } }
+
+ it 'should configure tripleo ui' do
+ is_expected.to contain_class('tripleo::ui')
+ is_expected.to contain_apache__vhost('tripleo-ui').with(
+ :ensure => 'present',
+ :servername => 'custom.example.com',
+ :ip => '127.0.0.2',
+ :port => 3001,
+ :docroot => '/var/www/openstack-tripleo-ui/dist',
+ :options => [ 'Indexes', 'FollowSymLinks' ],
+ :fallbackresource => '/index.html'
+ )
+ is_expected.to contain_file('/etc/httpd/conf.d/openstack-tripleo-ui.conf').with_content(/cleaned by Puppet/)
+ is_expected.to contain_file('/var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js')
+ .with_content(/"keystone": "http:\/\/127.0.0.1:1111\/"/)
+ .with_content(/"heat": "http:\/\/127.0.0.1:2222\/"/)
+ .with_content(/"ironic": "http:\/\/127.0.0.1:3333\/"/)
+ .with_content(/"mistral": "http:\/\/127.0.0.1:4444\/"/)
+ .with_content(/"swift": "http:\/\/127.0.0.1:5555\/"/)
+ .with_content(/"zaqar-websocket": "http:\/\/127.0.0.1:6666\/"/)
+ .with_content(/"zaqar_default_queue": "myqueue"/)
+ end
+ end
+
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::ui'
+ end
+ end
+end
diff --git a/spec/fixtures/hiera.yaml b/spec/fixtures/hiera.yaml
index d5368e9..07bc836 100644
--- a/spec/fixtures/hiera.yaml
+++ b/spec/fixtures/hiera.yaml
@@ -4,4 +4,5 @@
:yaml:
:datadir: './spec/fixtures/hieradata'
:hierarchy:
+ - 'step%{::step}'
- 'default'
diff --git a/spec/fixtures/hieradata/default.yaml b/spec/fixtures/hieradata/default.yaml
index 87ae28c..d63fc76 100644
--- a/spec/fixtures/hieradata/default.yaml
+++ b/spec/fixtures/hieradata/default.yaml
@@ -14,3 +14,6 @@ barbican::keystone::authtoken::password: 'password'
ceilometer::keystone::authtoken::password: 'password'
# ceph related items
ceph::profile::params::mon_key: 'password'
+# cinder related items
+cinder::rabbit_password: 'password'
+cinder::keystone::authtoken::password: 'password'
diff --git a/spec/fixtures/hieradata/step1.yaml b/spec/fixtures/hieradata/step1.yaml
new file mode 100644
index 0000000..795a4a7
--- /dev/null
+++ b/spec/fixtures/hieradata/step1.yaml
@@ -0,0 +1,2 @@
+---
+step: 1
diff --git a/spec/fixtures/hieradata/step2.yaml b/spec/fixtures/hieradata/step2.yaml
new file mode 100644
index 0000000..4bd5851
--- /dev/null
+++ b/spec/fixtures/hieradata/step2.yaml
@@ -0,0 +1,2 @@
+---
+step: 2
diff --git a/spec/fixtures/hieradata/step3.yaml b/spec/fixtures/hieradata/step3.yaml
new file mode 100644
index 0000000..1526e81
--- /dev/null
+++ b/spec/fixtures/hieradata/step3.yaml
@@ -0,0 +1,2 @@
+---
+step: 3
diff --git a/spec/fixtures/hieradata/step4.yaml b/spec/fixtures/hieradata/step4.yaml
new file mode 100644
index 0000000..0b53225
--- /dev/null
+++ b/spec/fixtures/hieradata/step4.yaml
@@ -0,0 +1,9 @@
+---
+step: 4
+# items needed for tripleo::profile::base::cinder::volume
+tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: '127.0.0.1'
+tripleo::profile::base::cinder::volume::nfs::cinder_nfs_servers:
+ - '127.0.0.1'
+cinder::backend::eqlx::eqlx_chap_login: 'user'
+cinder::backend::eqlx::eqlx_chap_password: 'user'
+
diff --git a/spec/fixtures/hieradata/step5.yaml b/spec/fixtures/hieradata/step5.yaml
new file mode 100644
index 0000000..442420f
--- /dev/null
+++ b/spec/fixtures/hieradata/step5.yaml
@@ -0,0 +1,2 @@
+---
+step: 5
diff --git a/spec/fixtures/hieradata/step6.yaml b/spec/fixtures/hieradata/step6.yaml
new file mode 100644
index 0000000..08ba54d
--- /dev/null
+++ b/spec/fixtures/hieradata/step6.yaml
@@ -0,0 +1,2 @@
+---
+step: 6