aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/profile/base/database/mongodb.pp54
-rw-r--r--manifests/profile/base/database/mongodbcommon.pp52
-rw-r--r--manifests/profile/base/keystone.pp17
-rw-r--r--manifests/profile/base/neutron.pp9
-rw-r--r--manifests/profile/base/neutron/ml2.pp7
-rw-r--r--manifests/profile/base/neutron/plugins/plumgrid.pp37
-rw-r--r--manifests/profile/base/neutron/server.pp15
-rw-r--r--manifests/profile/base/nova.pp14
-rw-r--r--manifests/profile/base/nova/api.pp51
-rw-r--r--manifests/profile/base/nova/compute.pp35
-rw-r--r--manifests/profile/base/nova/conductor.pp2
-rw-r--r--manifests/profile/base/nova/consoleauth.pp35
-rw-r--r--manifests/profile/base/nova/scheduler.pp36
-rw-r--r--manifests/profile/base/nova/vncproxy.pp35
-rw-r--r--manifests/profile/base/snmp.pp50
-rw-r--r--manifests/profile/base/swift/proxy.pp1
-rw-r--r--manifests/profile/pacemaker/database/mongodb.pp74
-rw-r--r--manifests/profile/pacemaker/database/mongodbvalidator.pp37
-rw-r--r--manifests/profile/pacemaker/keystone.pp7
-rw-r--r--manifests/profile/pacemaker/neutron.pp5
-rw-r--r--manifests/profile/pacemaker/neutron/ml2.pp15
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/plumgrid.pp33
-rw-r--r--manifests/profile/pacemaker/neutron/server.pp22
-rw-r--r--manifests/profile/pacemaker/nova.pp4
-rw-r--r--manifests/profile/pacemaker/nova/api.pp48
-rw-r--r--manifests/profile/pacemaker/nova/consoleauth.pp45
-rw-r--r--manifests/profile/pacemaker/nova/scheduler.pp45
-rw-r--r--manifests/profile/pacemaker/nova/vncproxy.pp45
28 files changed, 785 insertions, 45 deletions
diff --git a/manifests/profile/base/database/mongodb.pp b/manifests/profile/base/database/mongodb.pp
new file mode 100644
index 0000000..4c53c9c
--- /dev/null
+++ b/manifests/profile/base/database/mongodb.pp
@@ -0,0 +1,54 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::database::mongodb
+#
+# Mongodb 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::base::database::mongodb (
+ $mongodb_replset,
+ $bootstrap_node = downcase(hiera('bootstrap_nodeid')),
+ $step = hiera('step'),
+) {
+
+ if $step >= 2 {
+
+ include ::mongodb::globals
+ include ::mongodb::client
+ include ::mongodb::server
+
+ include ::tripleo::profile::base::database::mongodbcommon
+
+ if $bootstrap_node == $::hostname {
+ mongodb_replset { $mongodb_replset :
+ members => $tripleo::profile::base::database::mongodbcommon::mongo_node_ips_with_port_nobr,
+ }
+ }
+
+ }
+}
diff --git a/manifests/profile/base/database/mongodbcommon.pp b/manifests/profile/base/database/mongodbcommon.pp
new file mode 100644
index 0000000..6530730
--- /dev/null
+++ b/manifests/profile/base/database/mongodbcommon.pp
@@ -0,0 +1,52 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::database::mongodb
+#
+# Mongodb profile for tripleo
+#
+# === Parameters
+#
+# [*mongodb_node_ips*]
+# List of The mongodb node ip addresses
+#
+# [*mongodb_ipv6_enabled*]
+# A boolean value for mongodb server ipv6 is enabled or not
+# Defaults to false
+#
+class tripleo::profile::base::database::mongodbcommon (
+ $mongodb_node_ips = hiera('mongo_node_ips'),
+ $mongodb_ipv6_enabled = false,
+) {
+
+ $port = '27017'
+
+ # NOTE(gfidente): the following vars are needed on all nodes so they
+ # need to stay out of pacemaker_master conditional.
+ # The addresses mangling will hopefully go away when we'll be able to
+ # configure the connection string via hostnames, until then, we need to pass
+ # the list of IPv6 addresses *with* port and without the brackets as 'members'
+ # argument for the 'mongodb_replset' resource.
+ if str2bool($mongodb_ipv6_enabled) {
+ $mongo_node_ips_with_port_prefixed = prefix($mongodb_node_ips, '[')
+ $mongo_node_ips_with_port = suffix(
+ $mongo_node_ips_with_port_prefixed, "]:${port}")
+ $mongo_node_ips_with_port_nobr = suffix($mongodb_node_ips, ":${port}")
+ } else {
+ $mongo_node_ips_with_port = suffix($mongodb_node_ips, ":${port}")
+ $mongo_node_ips_with_port_nobr = suffix($mongodb_node_ips, ":${port}")
+ }
+ $mongo_node_string = join($mongo_node_ips_with_port, ',')
+
+}
diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp
index a5060b8..706b78f 100644
--- a/manifests/profile/base/keystone.pp
+++ b/manifests/profile/base/keystone.pp
@@ -22,10 +22,6 @@
# (Optional) Whether to run db sync
# Defaults to true
#
-# [*bootstrap_master*]
-# (Optional) The hostname of the node responsible for bootstrapping
-# Defaults to hiera('bootstrap_nodeid')
-#
# [*manage_roles*]
# (Optional) whether to create keystone admin role
# Defaults to true
@@ -44,12 +40,11 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::keystone (
- $sync_db = true,
- $bootstrap_master = undef,
- $manage_roles = true,
- $manage_endpoint = true,
- $manage_db_purge = hiera('keystone_enable_db_purge', true),
- $step = hiera('step'),
+ $sync_db = true,
+ $manage_roles = true,
+ $manage_endpoint = true,
+ $manage_db_purge = hiera('keystone_enable_db_purge', true),
+ $step = hiera('step'),
) {
if $step >= 3 and $sync_db {
@@ -59,7 +54,7 @@ class tripleo::profile::base::keystone (
if $step >= 4 or ( $step >= 3 and $sync_db ) {
class { '::keystone':
sync_db => $sync_db,
- enable_bootstrap => $bootstrap_master,
+ enable_bootstrap => $sync_db,
}
include ::keystone::config
diff --git a/manifests/profile/base/neutron.pp b/manifests/profile/base/neutron.pp
index 2958170..d5efa81 100644
--- a/manifests/profile/base/neutron.pp
+++ b/manifests/profile/base/neutron.pp
@@ -18,14 +18,19 @@
#
# === Parameters
#
+# [*sync_db*]
+# (Optional) Whether to run db sync
+# Defaults to true
+#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron (
- $step = hiera('step'),
+ $sync_db = true,
+ $step = hiera('step'),
) {
- if $step >= 4 {
+ if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
include ::neutron
include ::neutron::config
}
diff --git a/manifests/profile/base/neutron/ml2.pp b/manifests/profile/base/neutron/ml2.pp
index 47b1b3c..d18638e 100644
--- a/manifests/profile/base/neutron/ml2.pp
+++ b/manifests/profile/base/neutron/ml2.pp
@@ -22,6 +22,10 @@
# (Optional) The mechanism drivers to use with the Ml2 plugin
# Defaults to hiera('neutron::plugins::ml2::mechanism_drivers')
#
+# [*sync_db*]
+# (Optional) Whether to run Neutron DB sync operations
+# Defaults to undef
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
@@ -29,10 +33,11 @@
#
class tripleo::profile::base::neutron::ml2 (
$mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'),
+ $sync_db = true,
$step = hiera('step'),
) {
- if $step >= 4 {
+ if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::plugins::ml2
include ::tripleo::profile::base::neutron
diff --git a/manifests/profile/base/neutron/plugins/plumgrid.pp b/manifests/profile/base/neutron/plugins/plumgrid.pp
new file mode 100644
index 0000000..7f645b9
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/plumgrid.pp
@@ -0,0 +1,37 @@
+# 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::base::neutron::plugins::plumgrid
+#
+# PLUMgrid Neutron profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*sync_db*]
+# (Optional) Whether to run Neutron DB sync operations
+# Defaults to undef
+#
+class tripleo::profile::base::neutron::plugins::plumgrid (
+ $step = hiera('step'),
+ $sync_db = true,
+) {
+ if $step >= 4 or ( $step >= 3 and $sync_db ) {
+ include ::neutron::plugins::plumgrid
+ }
+}
diff --git a/manifests/profile/base/neutron/server.pp b/manifests/profile/base/neutron/server.pp
index 14af56e..320f83c 100644
--- a/manifests/profile/base/neutron/server.pp
+++ b/manifests/profile/base/neutron/server.pp
@@ -18,31 +18,24 @@
#
# === Parameters
#
-# [*sync_db*]
-# (Optional) Whether to run Neutron DB sync operations
-# Defaults to undef
-#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::server (
- $sync_db = true,
$step = hiera('step'),
) {
include ::tripleo::profile::base::neutron
- if $step >= 3 and $sync_db {
+ if $step >= 2 {
include ::neutron::db::mysql
}
- if $step >= 4 or ($step >=3 and $sync_db) {
+ if $step >= 4 {
include ::neutron::server::notifications
-
- class { '::neutron::server':
- sync_db => $sync_db,
- }
+ include ::neutron::server
}
+
}
diff --git a/manifests/profile/base/nova.pp b/manifests/profile/base/nova.pp
index abedf37..66f0d7d 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -25,8 +25,20 @@
class tripleo::profile::base::nova (
$step = hiera('step'),
) {
- if $step >= 4 {
+
+ if hiera('nova::use_ipv6', false) {
+ $memcached_servers = suffix(hiera('memcache_node_ips_v6'), ':11211')
+ } else {
+ $memcached_servers = suffix(hiera('memcache_node_ips'), ':11211')
+ }
+ if $step >= 3 {
include ::nova
+ # TODO(emilien): once we merge https://review.openstack.org/#/c/325983/
+ # let's override the value this way.
+ warning('Overriding memcached_servers from puppet-tripleo until 325983 lands.')
+ Nova {
+ memcached_servers => $memcached_servers,
+ }
include ::nova::config
}
}
diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp
new file mode 100644
index 0000000..4064b1e
--- /dev/null
+++ b/manifests/profile/base/nova/api.pp
@@ -0,0 +1,51 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::api
+#
+# Nova API profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*sync_db*]
+# (Optional) Whether to run db sync
+# Defaults to true
+#
+class tripleo::profile::base::nova::api (
+ $step = hiera('step'),
+ $sync_db = true,
+) {
+
+ include ::tripleo::profile::base::nova
+
+ if $step >= 2 and $sync_db {
+ include ::nova::db::mysql
+ include ::nova::db::mysql_api
+ Exec<| title == 'galera-ready'|> -> Anchor['nova::db::begin']
+ }
+
+ if $step >= 4 or ($step >= 3 and $sync_db) {
+ class { '::nova::api':
+ sync_db => $sync_db,
+ sync_db_api => $sync_db,
+ }
+ include ::nova::network::neutron
+ }
+}
+
diff --git a/manifests/profile/base/nova/compute.pp b/manifests/profile/base/nova/compute.pp
new file mode 100644
index 0000000..ae37d4a
--- /dev/null
+++ b/manifests/profile/base/nova/compute.pp
@@ -0,0 +1,35 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::compute
+#
+# Nova Compute profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::nova::compute (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ include ::tripleo::profile::base::nova
+ include ::nova::compute
+ }
+
+}
diff --git a/manifests/profile/base/nova/conductor.pp b/manifests/profile/base/nova/conductor.pp
index 494bbc7..04c9d06 100644
--- a/manifests/profile/base/nova/conductor.pp
+++ b/manifests/profile/base/nova/conductor.pp
@@ -27,8 +27,8 @@ class tripleo::profile::base::nova::conductor (
$step = hiera('step'),
) {
+ include ::tripleo::profile::base::nova
if $step >= 4 {
- include ::tripleo::profile::base::nova
include ::nova::conductor
}
diff --git a/manifests/profile/base/nova/consoleauth.pp b/manifests/profile/base/nova/consoleauth.pp
new file mode 100644
index 0000000..442cf84
--- /dev/null
+++ b/manifests/profile/base/nova/consoleauth.pp
@@ -0,0 +1,35 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::consoleauth
+#
+# Nova Consoleauth profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::nova::consoleauth (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ include ::tripleo::profile::base::nova
+ include ::nova::consoleauth
+ }
+
+}
diff --git a/manifests/profile/base/nova/scheduler.pp b/manifests/profile/base/nova/scheduler.pp
new file mode 100644
index 0000000..13b4e82
--- /dev/null
+++ b/manifests/profile/base/nova/scheduler.pp
@@ -0,0 +1,36 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::scheduler
+#
+# Nova Scheduler profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::nova::scheduler (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ include ::tripleo::profile::base::nova
+ include ::nova::scheduler
+ include ::nova::scheduler::filter
+ }
+
+}
diff --git a/manifests/profile/base/nova/vncproxy.pp b/manifests/profile/base/nova/vncproxy.pp
new file mode 100644
index 0000000..aa0cc7b
--- /dev/null
+++ b/manifests/profile/base/nova/vncproxy.pp
@@ -0,0 +1,35 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::vncproxy
+#
+# Nova vncproxy profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::nova::vncproxy (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ include ::tripleo::profile::base::nova
+ include ::nova::vncproxy
+ }
+
+}
diff --git a/manifests/profile/base/snmp.pp b/manifests/profile/base/snmp.pp
new file mode 100644
index 0000000..40f7393
--- /dev/null
+++ b/manifests/profile/base/snmp.pp
@@ -0,0 +1,50 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::snmp
+#
+# SNMP profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*snmpd_user*]
+# The SNMP username
+# Defaults to hiera('snmpd_readonly_user_name')
+#
+# [*snmpd_password*]
+# The SNMP password
+# Defaults to hiera('snmpd_readonly_user_password')
+#
+class tripleo::profile::base::snmp (
+ $step = hiera('step'),
+ $snmpd_user = hiera('snmpd_readonly_user_name'),
+ $snmpd_password = hiera('snmpd_readonly_user_password'),
+) {
+
+ if $step >= 4 {
+ snmp::snmpv3_user { $snmpd_user:
+ authtype => 'MD5',
+ authpass => $snmpd_password,
+ }
+ class { '::snmp':
+ agentaddress => ['udp:161','udp6:[::1]:161'],
+ snmpd_config => [ join(['createUser ', $snmpd_user, ' MD5 "', $snmpd_password, '"']), join(['rouser ', $snmpd_user]), 'proc cron', 'includeAllDisks 10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
+ }
+ }
+}
diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp
index 58e2b6f..40e61ae 100644
--- a/manifests/profile/base/swift/proxy.pp
+++ b/manifests/profile/base/swift/proxy.pp
@@ -40,5 +40,6 @@ class tripleo::profile::base::swift::proxy (
include ::swift::proxy::catch_errors
include ::swift::proxy::tempurl
include ::swift::proxy::formpost
+ include ::swift::proxy::bulk
}
}
diff --git a/manifests/profile/pacemaker/database/mongodb.pp b/manifests/profile/pacemaker/database/mongodb.pp
new file mode 100644
index 0000000..15c84d7
--- /dev/null
+++ b/manifests/profile/pacemaker/database/mongodb.pp
@@ -0,0 +1,74 @@
+# 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/database/mongodbvalidator.pp b/manifests/profile/pacemaker/database/mongodbvalidator.pp
new file mode 100644
index 0000000..95d3bd7
--- /dev/null
+++ b/manifests/profile/pacemaker/database/mongodbvalidator.pp
@@ -0,0 +1,37 @@
+# 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::conn_validator
+#
+# Connection validator for a node that serves MongoDB. This is done to be able
+# to iterate through the different servers in a more seamless way.
+#
+# === Parameters
+#
+# [*title*]
+# the title or namevar of the resource will be used as the server of the
+# actual mongodb_conn_validator.
+#
+# [*port*]
+# The port in which the MongoDB server is listening on.
+#
+define tripleo::profile::pacemaker::database::mongodbvalidator(
+ $port,
+) {
+ mongodb_conn_validator { "${title}_conn_validator" :
+ server => $title,
+ port => $port,
+ timeout => '600',
+ }
+}
diff --git a/manifests/profile/pacemaker/keystone.pp b/manifests/profile/pacemaker/keystone.pp
index 42c44d4..497d6f3 100644
--- a/manifests/profile/pacemaker/keystone.pp
+++ b/manifests/profile/pacemaker/keystone.pp
@@ -59,10 +59,9 @@ class tripleo::profile::pacemaker::keystone (
}
class { '::tripleo::profile::base::keystone':
- sync_db => $pacemaker_master,
- bootstrap_master => $pacemaker_master,
- manage_roles => $manage_roles,
- manage_endpoint => $manage_roles
+ sync_db => $pacemaker_master,
+ manage_roles => $manage_roles,
+ manage_endpoint => $manage_roles
}
if $step >= 5 and $pacemaker_master and $enable_load_balancer {
diff --git a/manifests/profile/pacemaker/neutron.pp b/manifests/profile/pacemaker/neutron.pp
index 03ccbc3..2af53dc 100644
--- a/manifests/profile/pacemaker/neutron.pp
+++ b/manifests/profile/pacemaker/neutron.pp
@@ -61,9 +61,12 @@ class tripleo::profile::pacemaker::neutron (
stop => '/bin/true',
}
+ class { '::tripleo::profile::base::neutron':
+ sync_db => ($::hostname == downcase($pacemaker_master)),
+ }
+
if $step >= 4 {
include ::neutron::params
- include ::tripleo::profile::base::neutron
# To be removed when puppet-oslo comes into service
neutron_config {
diff --git a/manifests/profile/pacemaker/neutron/ml2.pp b/manifests/profile/pacemaker/neutron/ml2.pp
index 6c6e580..8acaf21 100644
--- a/manifests/profile/pacemaker/neutron/ml2.pp
+++ b/manifests/profile/pacemaker/neutron/ml2.pp
@@ -18,8 +18,19 @@
#
# === Parameters
#
-class tripleo::profile::pacemaker::neutron::ml2 {
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to hiera('bootstrap_nodeid')
+#
+class tripleo::profile::pacemaker::neutron::ml2 (
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+) {
+
include ::neutron::params
include ::tripleo::profile::pacemaker::neutron
- include ::tripleo::profile::base::neutron::ml2
+
+ class { '::tripleo::profile::base::neutron::ml2':
+ sync_db => ($::hostname == downcase($pacemaker_master))
+ }
+
}
diff --git a/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp b/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp
new file mode 100644
index 0000000..1f2b32a
--- /dev/null
+++ b/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp
@@ -0,0 +1,33 @@
+# 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
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to hiera('bootstrap_nodeid')
+#
+class tripleo::profile::pacemaker::neutron::plugins::plumgrid (
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+) {
+
+ class { '::tripleo::profile::base::neutron::plugins::plumgrid':
+ sync_db => ($::hostname == downcase($pacemaker_master))
+ }
+
+}
diff --git a/manifests/profile/pacemaker/neutron/server.pp b/manifests/profile/pacemaker/neutron/server.pp
index f4fe083..0bad1b9 100644
--- a/manifests/profile/pacemaker/neutron/server.pp
+++ b/manifests/profile/pacemaker/neutron/server.pp
@@ -23,21 +23,27 @@
# Defaults to hiera('bootstrap_nodeid')
#
# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('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'),
- $step = hiera('step'),
+ $step = hiera('step'),
) {
+
include ::neutron::params
include ::tripleo::profile::pacemaker::neutron
- if $step >= 5 {
- class { '::tripleo::profile::base::neutron::server':
- sync_db => ($::hostname == downcase($pacemaker_master)),
- }
+ $sync_db = ($::hostname == downcase($pacemaker_master))
+ if $step >= 2 and $sync_db {
+ include ::neutron::db::mysql
+ Exec<| title == 'galera-ready'|> -> Class['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
index 09aed61..b6e6cba 100644
--- a/manifests/profile/pacemaker/nova.pp
+++ b/manifests/profile/pacemaker/nova.pp
@@ -35,8 +35,6 @@ class tripleo::profile::pacemaker::nova (
stop => '/bin/true',
}
- if $step >= 4 {
- include ::tripleo::profile::base::nova
- }
+ include ::tripleo::profile::base::nova
}
diff --git a/manifests/profile/pacemaker/nova/api.pp b/manifests/profile/pacemaker/nova/api.pp
new file mode 100644
index 0000000..5d8e11f
--- /dev/null
+++ b/manifests/profile/pacemaker/nova/api.pp
@@ -0,0 +1,48 @@
+# 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
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to downcase(hiera('bootstrap_nodeid'))
+#
+class tripleo::profile::pacemaker::nova::api (
+ $step = hiera('step'),
+ $pacemaker_master = downcase(hiera('bootstrap_nodeid')),
+) {
+
+ include ::nova::params
+ include ::tripleo::profile::pacemaker::nova
+
+ class { '::tripleo::profile::base::nova::api':
+ sync_db => (downcase($::hostname) == $pacemaker_master),
+ }
+
+ if $step >= 5 and downcase($::hostname) == $pacemaker_master {
+ pacemaker::resource::service { $::nova::params::api_service_name:
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/nova/consoleauth.pp b/manifests/profile/pacemaker/nova/consoleauth.pp
new file mode 100644
index 0000000..54f17b7
--- /dev/null
+++ b/manifests/profile/pacemaker/nova/consoleauth.pp
@@ -0,0 +1,45 @@
+# 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
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to hiera('bootstrap_nodeid')
+#
+class tripleo::profile::pacemaker::nova::consoleauth (
+ $step = hiera('step'),
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+) {
+
+ include ::nova::params
+ include ::tripleo::profile::pacemaker::nova
+ include ::tripleo::profile::base::nova::consoleauth
+
+ if $step >= 5 and downcase($::hostname) == $pacemaker_master {
+ pacemaker::resource::service { $::nova::params::consoleauth_service_name:
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/nova/scheduler.pp b/manifests/profile/pacemaker/nova/scheduler.pp
new file mode 100644
index 0000000..6516394
--- /dev/null
+++ b/manifests/profile/pacemaker/nova/scheduler.pp
@@ -0,0 +1,45 @@
+# 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
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to hiera('bootstrap_nodeid')
+#
+class tripleo::profile::pacemaker::nova::scheduler (
+ $step = hiera('step'),
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+) {
+
+ include ::nova::params
+ include ::tripleo::profile::pacemaker::nova
+ include ::tripleo::profile::base::nova::scheduler
+
+ if $step >= 5 and downcase($::hostname) == $pacemaker_master {
+ pacemaker::resource::service { $::nova::params::scheduler_service_name:
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/nova/vncproxy.pp b/manifests/profile/pacemaker/nova/vncproxy.pp
new file mode 100644
index 0000000..7f7d095
--- /dev/null
+++ b/manifests/profile/pacemaker/nova/vncproxy.pp
@@ -0,0 +1,45 @@
+# 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
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to hiera('bootstrap_nodeid')
+#
+class tripleo::profile::pacemaker::nova::vncproxy (
+ $step = hiera('step'),
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+) {
+
+ include ::nova::params
+ include ::tripleo::profile::pacemaker::nova
+ include ::tripleo::profile::base::nova::vncproxy
+
+ if $step >= 5 and downcase($::hostname) == $pacemaker_master {
+ pacemaker::resource::service { $::nova::params::vncproxy_service_name:
+ clone_params => 'interleave=true',
+ }
+ }
+
+}