aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/haproxy.pp20
-rw-r--r--manifests/profile/base/ceilometer.pp12
-rw-r--r--manifests/profile/base/ceilometer/collector.pp40
-rw-r--r--manifests/profile/base/ceph.pp10
-rw-r--r--manifests/profile/base/ceph/osd.pp4
-rw-r--r--manifests/profile/base/gnocchi.pp36
-rw-r--r--manifests/profile/base/gnocchi/api.pp58
-rw-r--r--manifests/profile/base/gnocchi/metricd.pp36
-rw-r--r--manifests/profile/base/gnocchi/statsd.pp36
-rw-r--r--manifests/profile/base/horizon.pp50
-rw-r--r--manifests/profile/base/kernel.pp26
-rw-r--r--manifests/profile/base/neutron.pp7
-rw-r--r--manifests/profile/base/neutron/agents/midonet.pp56
-rw-r--r--manifests/profile/base/neutron/agents/nuage.pp62
-rw-r--r--manifests/profile/base/neutron/midonet.pp9
-rw-r--r--manifests/profile/base/neutron/ml2.pp64
-rw-r--r--manifests/profile/base/neutron/plugins/ml2.pp4
-rw-r--r--manifests/profile/base/neutron/plugins/nuage.pp3
-rw-r--r--manifests/profile/base/neutron/plugins/opencontrail.pp3
-rw-r--r--manifests/profile/base/neutron/plugins/plumgrid.pp3
-rw-r--r--manifests/profile/base/neutron/server.pp2
-rw-r--r--manifests/profile/base/nova.pp27
-rw-r--r--manifests/profile/base/nova/api.pp3
-rw-r--r--manifests/profile/base/nova/compute.pp20
-rw-r--r--manifests/profile/base/nova/compute/libvirt.pp2
-rw-r--r--manifests/profile/base/sahara/api.pp2
-rw-r--r--manifests/profile/base/sahara/engine.pp2
-rw-r--r--manifests/profile/base/trove/api.pp45
-rw-r--r--manifests/profile/base/trove/conductor.pp36
-rw-r--r--manifests/profile/base/trove/taskmanager.pp36
-rw-r--r--manifests/profile/pacemaker/ceilometer.pp39
-rw-r--r--manifests/profile/pacemaker/ceilometer/api.pp7
-rw-r--r--manifests/profile/pacemaker/gnocchi.pp90
-rw-r--r--manifests/profile/pacemaker/gnocchi/api.pp (renamed from manifests/profile/pacemaker/neutron/ml2.pp)30
-rw-r--r--manifests/profile/pacemaker/gnocchi/metricd.pp47
-rw-r--r--manifests/profile/pacemaker/gnocchi/statsd.pp47
-rw-r--r--manifests/profile/pacemaker/heat.pp86
-rw-r--r--manifests/profile/pacemaker/heat/api.pp50
-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.pp52
-rw-r--r--manifests/profile/pacemaker/keystone.pp8
-rw-r--r--manifests/profile/pacemaker/neutron.pp8
-rw-r--r--manifests/profile/pacemaker/neutron/dhcp.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/l3.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/metadata.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/midonet.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/ovs.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/ml2.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/nuage.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/opencontrail.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/plumgrid.pp4
-rw-r--r--manifests/profile/pacemaker/neutron/server.pp7
-rw-r--r--manifests/profile/pacemaker/nova.pp9
-rw-r--r--manifests/profile/pacemaker/nova/api.pp7
-rw-r--r--manifests/profile/pacemaker/nova/conductor.pp7
-rw-r--r--manifests/profile/pacemaker/nova/consoleauth.pp7
-rw-r--r--manifests/profile/pacemaker/nova/scheduler.pp7
-rw-r--r--manifests/profile/pacemaker/nova/vncproxy.pp7
-rw-r--r--manifests/profile/pacemaker/sahara.pp34
-rw-r--r--manifests/profile/pacemaker/sahara/api.pp50
-rw-r--r--manifests/profile/pacemaker/sahara/engine.pp51
62 files changed, 1180 insertions, 321 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index e3e48ce..33185dc 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -193,6 +193,10 @@
# (optional) Enable or not Ironic API binding
# Defaults to false
#
+# [*ironic_inspector*]
+# (optional) Enable or not Ironic Inspector API binding
+# Defaults to false
+#
# [*mysql*]
# (optional) Enable or not MySQL Galera binding
# Defaults to false
@@ -240,6 +244,8 @@
# 'heat_cw_ssl_port' (Defaults to 13003)
# 'ironic_api_port' (Defaults to 6385)
# 'ironic_api_ssl_port' (Defaults to 13385)
+# 'ironic_inspector_port' (Defaults to 5050)
+# 'ironic_inspector_ssl_port' (Defaults to 13050)
# 'keystone_admin_api_port' (Defaults to 35357)
# 'keystone_admin_api_ssl_port' (Defaults to 13357)
# 'keystone_public_api_port' (Defaults to 5000)
@@ -302,6 +308,7 @@ class tripleo::haproxy (
$heat_cfn = false,
$horizon = false,
$ironic = false,
+ $ironic_inspector = false,
$mysql = false,
$mysql_clustercheck = false,
$rabbitmq = false,
@@ -330,6 +337,8 @@ class tripleo::haproxy (
heat_cw_ssl_port => 13003,
ironic_api_port => 6385,
ironic_api_ssl_port => 13385,
+ ironic_inspector_port => 5050,
+ ironic_inspector_ssl_port => 13050,
keystone_admin_api_port => 35357,
keystone_admin_api_ssl_port => 13357,
keystone_public_api_port => 5000,
@@ -754,6 +763,17 @@ class tripleo::haproxy (
}
}
+ if $ironic_inspector {
+ ::tripleo::haproxy::endpoint { 'ironic-inspector':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('ironic_inspector_vip', $controller_virtual_ip),
+ service_port => $ports[ironic_inspector_port],
+ ip_addresses => hiera('ironic_inspector_node_ips', $controller_hosts_real),
+ server_names => $controller_hosts_names_real,
+ public_ssl_port => $ports[ironic_inspector_ssl_port],
+ }
+ }
+
if $mysql_clustercheck {
$mysql_listen_options = {
'option' => [ 'tcpka', 'httpchk' ],
diff --git a/manifests/profile/base/ceilometer.pp b/manifests/profile/base/ceilometer.pp
index a7d62ce..88818de 100644
--- a/manifests/profile/base/ceilometer.pp
+++ b/manifests/profile/base/ceilometer.pp
@@ -23,20 +23,12 @@
# for more details.
# Defaults to hiera('step')
#
-# [*pacemaker_master*]
-# (Optional) The master node runs some tasks
-# one step earlier than others; disable to
-# the node is not the master.
-# Defaults to true
-
class tripleo::profile::base::ceilometer (
- $step = hiera('step'),
- $pacemaker_master = true,
+ $step = hiera('step'),
) {
- if $step >= 4 or ($step >= 3 and $pacemaker_master) {
+ if $step >= 3 {
include ::ceilometer
- include ::ceilometer::db
include ::ceilometer::config
}
diff --git a/manifests/profile/base/ceilometer/collector.pp b/manifests/profile/base/ceilometer/collector.pp
index 6891f9c..c294e56 100644
--- a/manifests/profile/base/ceilometer/collector.pp
+++ b/manifests/profile/base/ceilometer/collector.pp
@@ -33,18 +33,44 @@ class tripleo::profile::base::ceilometer::collector (
$sync_db = true,
) {
- class { '::tripleo::profile::base::ceilometer':
- pacemaker_master => $sync_db,
+ $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
+ # MongoDB
+ if $ceilometer_backend == 'mongodb' {
+ # NOTE(gfidente): 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(hiera('mongodb::server::ipv6', false)) {
+ $mongo_node_ips_with_port_prefixed = prefix(hiera('mongo_node_ips'), '[')
+ $mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017')
+ $mongo_node_ips_with_port_nobr = suffix(hiera('mongo_node_ips'), ':27017')
+ } else {
+ $mongo_node_ips_with_port = suffix(hiera('mongo_node_ips'), ':27017')
+ $mongo_node_ips_with_port_nobr = suffix(hiera('mongo_node_ips'), ':27017')
+ }
+ $mongo_node_string = join($mongo_node_ips_with_port, ',')
+
+ $mongodb_replset = hiera('mongodb::server::replset')
+ $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
+ }
+
+ include ::tripleo::profile::base::ceilometer
+
+ if $step >= 2 and $sync_db and $ceilometer_backend == 'mysql' {
+ include ::ceilometer::db::mysql
}
if $step >= 3 and $sync_db {
- $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
- if $ceilometer_backend == 'mysql' {
- include ::ceilometer::db::mysql
- }
+ include ::ceilometer::db::sync
}
- if $step >= 4 {
+ if $step >= 4 or ($step >= 3 and $sync_db) {
+ if $ceilometer_backend == 'mongodb' {
+ class { '::ceilometer::db' :
+ database_connection => $ceilometer_mongodb_conn_string,
+ }
+ } else {
+ include ::ceilometer::db
+ }
include ::ceilometer::collector
include ::ceilometer::dispatcher::gnocchi
}
diff --git a/manifests/profile/base/ceph.pp b/manifests/profile/base/ceph.pp
index 29ca9ae..94166ac 100644
--- a/manifests/profile/base/ceph.pp
+++ b/manifests/profile/base/ceph.pp
@@ -35,6 +35,10 @@
# mon_host when ceph_ipv6 is true
# Defaults to undef
#
+# [*enable_ceph_storage*]
+# (Optional) enable_ceph_storage
+# Deprecated: defaults to false
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
@@ -45,6 +49,7 @@ class tripleo::profile::base::ceph (
$ceph_mon_initial_members = undef,
$ceph_mon_host = undef,
$ceph_mon_host_v6 = undef,
+ $enable_ceph_storage = false,
$step = hiera('step'),
) {
@@ -67,4 +72,9 @@ class tripleo::profile::base::ceph (
include ::ceph::conf
}
+
+ # TODO: deprecated boolean
+ if $enable_ceph_storage {
+ include ::tripleo::profile::base::ceph::osd
+ }
}
diff --git a/manifests/profile/base/ceph/osd.pp b/manifests/profile/base/ceph/osd.pp
index d0c77e9..a9224d3 100644
--- a/manifests/profile/base/ceph/osd.pp
+++ b/manifests/profile/base/ceph/osd.pp
@@ -20,7 +20,7 @@
#
# [*ceph_osd_selinux_permissive*]
# (Optional) Wheter to configure SELinux in permissive mode
-# Default to true
+# Default to false
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -28,7 +28,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph::osd (
- $ceph_osd_selinux_permissive = true,
+ $ceph_osd_selinux_permissive = false,
$step = hiera('step'),
) {
diff --git a/manifests/profile/base/gnocchi.pp b/manifests/profile/base/gnocchi.pp
new file mode 100644
index 0000000..ee903cb
--- /dev/null
+++ b/manifests/profile/base/gnocchi.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::gnocchi
+#
+# Gnocchi 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::gnocchi (
+ $step = hiera('step'),
+) {
+
+ if $step >= 3 {
+ include ::gnocchi
+ include ::gnocchi::config
+ include ::gnocchi::client
+ }
+}
diff --git a/manifests/profile/base/gnocchi/api.pp b/manifests/profile/base/gnocchi/api.pp
new file mode 100644
index 0000000..d415ee9
--- /dev/null
+++ b/manifests/profile/base/gnocchi/api.pp
@@ -0,0 +1,58 @@
+# 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::gnocchi::api
+#
+# Gnocchi profile for tripleo api
+#
+# === Parameters
+#
+# [*gnocchi_backend*]
+# (Optional) Gnocchi backend string file, swift or rbd
+# Defaults to swift
+#
+# [*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 undef
+
+class tripleo::profile::base::gnocchi::api (
+ $gnocchi_backend = downcase(hiera('gnocchi_backend', 'swift')),
+ $step = hiera('step'),
+ $sync_db = true,
+) {
+
+ include ::tripleo::profile::base::gnocchi
+
+ if $step >= 3 and $sync_db {
+ include ::gnocchi::db::mysql
+ include ::gnocchi::db::sync
+ }
+
+ if $step >= 4 {
+ include ::gnocchi::api
+ include ::gnocchi::wsgi::apache
+ include ::gnocchi::storage
+ case $gnocchi_backend {
+ 'swift': { include ::gnocchi::storage::swift }
+ 'file': { include ::gnocchi::storage::file }
+ 'rbd': { include ::gnocchi::storage::ceph }
+ default: { fail('Unrecognized gnocchi_backend parameter.') }
+ }
+ }
+}
diff --git a/manifests/profile/base/gnocchi/metricd.pp b/manifests/profile/base/gnocchi/metricd.pp
new file mode 100644
index 0000000..29cf882
--- /dev/null
+++ b/manifests/profile/base/gnocchi/metricd.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::gnocchi::metricd
+#
+# Gnocchi metricd profile
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+
+class tripleo::profile::base::gnocchi::metricd (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::gnocchi
+
+ if $step >= 4 {
+ include ::gnocchi::metricd
+ }
+}
diff --git a/manifests/profile/base/gnocchi/statsd.pp b/manifests/profile/base/gnocchi/statsd.pp
new file mode 100644
index 0000000..830a128
--- /dev/null
+++ b/manifests/profile/base/gnocchi/statsd.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::gnocchi::statsd
+#
+# Gnocchi statsd profile
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+
+class tripleo::profile::base::gnocchi::statsd (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::gnocchi
+
+ if $step >= 4 {
+ include ::gnocchi::statsd
+ }
+}
diff --git a/manifests/profile/base/horizon.pp b/manifests/profile/base/horizon.pp
new file mode 100644
index 0000000..1b7df19
--- /dev/null
+++ b/manifests/profile/base/horizon.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::horizon
+#
+# Horizon 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::horizon (
+ $step = hiera('step'),
+) {
+ if $step >= 4 {
+ # Horizon
+ include ::apache::mod::remoteip
+ include ::apache::mod::status
+ if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers') {
+ $_profile_support = 'cisco'
+ } else {
+ $_profile_support = 'None'
+ }
+ $neutron_options = {'profile_support' => $_profile_support }
+ $memcached_ipv6 = hiera('memcached_ipv6', false)
+ if $memcached_ipv6 {
+ $horizon_memcached_servers = hiera('memcache_node_ips_v6', '[::1]')
+ } else {
+ $horizon_memcached_servers = hiera('memcache_node_ips', '127.0.0.1')
+ }
+ class { '::horizon':
+ cache_server_ip => $horizon_memcached_servers,
+ neutron_options => $neutron_options,
+ }
+ }
+}
diff --git a/manifests/profile/base/kernel.pp b/manifests/profile/base/kernel.pp
new file mode 100644
index 0000000..db0280f
--- /dev/null
+++ b/manifests/profile/base/kernel.pp
@@ -0,0 +1,26 @@
+# 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::profile::base::kernel
+#
+# Load and configure Kernel modules.
+#
+class tripleo::profile::base::kernel {
+
+ create_resources(kmod::load, hiera('kernel_modules'), { })
+ create_resources(sysctl::value, hiera('sysctl_settings'), { })
+ Exec <| tag == 'kmod::load' |> -> Sysctl <| |>
+
+}
diff --git a/manifests/profile/base/neutron.pp b/manifests/profile/base/neutron.pp
index d5efa81..1ee2d90 100644
--- a/manifests/profile/base/neutron.pp
+++ b/manifests/profile/base/neutron.pp
@@ -18,19 +18,14 @@
#
# === 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 (
- $sync_db = true,
$step = hiera('step'),
) {
- if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
+ if hiera('step') >= 3 {
include ::neutron
include ::neutron::config
}
diff --git a/manifests/profile/base/neutron/agents/midonet.pp b/manifests/profile/base/neutron/agents/midonet.pp
new file mode 100644
index 0000000..52cafa9
--- /dev/null
+++ b/manifests/profile/base/neutron/agents/midonet.pp
@@ -0,0 +1,56 @@
+# 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::neutron::agents::midonet
+#
+# Midonet Neutron agent profile
+#
+# === Parameters
+#
+# [*neutron_api_node_ips*]
+# (Optional) The IPs of the Neutron API hosts
+# Defaults to hiera('neutron_api_node_ips')
+#
+# [*midonet_libvirt_qemu_data*]
+# (Optional) qemu.conf data for midonet.
+# Defaults to hiera('midonet_libvirt_qemu_data')
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::agents::midonet (
+ $neutron_api_node_ips = hiera('neutron_api_node_ips', ''),
+ $midonet_libvirt_qemu_data = hiera('midonet_libvirt_qemu_data', ''),
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+
+ # TODO(devvesa) provide non-controller ips for these services
+ class { '::tripleo::network::midonet::agent':
+ zookeeper_servers => $neutron_api_node_ips,
+ cassandra_seeds => $neutron_api_node_ips
+ }
+
+ if defined(Service['libvirt']) {
+ file { '/etc/libvirt/qemu.conf':
+ ensure => present,
+ content => hiera('midonet_libvirt_qemu_data')
+ }
+ }
+
+ }
+
+}
diff --git a/manifests/profile/base/neutron/agents/nuage.pp b/manifests/profile/base/neutron/agents/nuage.pp
new file mode 100644
index 0000000..c50feb2
--- /dev/null
+++ b/manifests/profile/base/neutron/agents/nuage.pp
@@ -0,0 +1,62 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::neutron::agents::nuage
+#
+# Nuage Neutron agent profile
+#
+# === Parameters
+#
+# [*nova_os_tenant_name*]
+# (Optional) Nova tenant name
+# Defaults to hiera('nova_os_tenant_name')
+#
+# [*nova_os_password*]
+# (Optional) Nova password
+# Defaults to hiera('nova_password')
+#
+# [*nova_metadata_ip*]
+# (Optional) Nova metadata node IPs
+# Defaults to hiera('nova_metadata_node_ips')
+#
+# [*nova_auth_ip*]
+# (Optional) Nova auth IP
+# Defaults to hiera('keystone_public_api_virtual_ip')
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::agents::nuage (
+ $nova_os_tenant_name = hiera('nova::api::admin_tenant_name', ''),
+ $nova_os_password = hiera('nova_password', ''),
+ $nova_metadata_ip = hiera('nova_metadata_node_ips', ''),
+ $nova_auth_ip = hiera('keystone_public_api_virtual_ip', ''),
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+
+ include ::nuage::vrs
+
+ class { '::nuage::metadataagent':
+ nova_os_tenant_name => $nova_os_tenant_name,
+ nova_os_password => $nova_os_password,
+ nova_metadata_ip => $nova_metadata_ip,
+ nova_auth_ip => $nova_auth_ip,
+ }
+
+ }
+
+}
diff --git a/manifests/profile/base/neutron/midonet.pp b/manifests/profile/base/neutron/midonet.pp
index 972856f..3276b82 100644
--- a/manifests/profile/base/neutron/midonet.pp
+++ b/manifests/profile/base/neutron/midonet.pp
@@ -82,11 +82,9 @@ class tripleo::profile::base::neutron::midonet (
) {
include ::tripleo::profile::base::neutron
+ include ::tripleo::profile::base::neutron::agents::midonet
if $step >= 4 {
- class { '::neutron':
- service_plugins => []
- }
# Run zookeeper in the controller if configured
if zk_on_controller {
@@ -106,11 +104,6 @@ class tripleo::profile::base::neutron::midonet (
}
}
- class {'::tripleo::network::midonet::agent':
- zookeeper_servers => $neutron_api_node_ips,
- cassandra_seeds => $neutron_api_node_ips
- }
-
class {'::tripleo::network::midonet::api':
zookeeper_servers => $neutron_api_node_ips,
vip => $vip,
diff --git a/manifests/profile/base/neutron/ml2.pp b/manifests/profile/base/neutron/ml2.pp
deleted file mode 100644
index 59c74c8..0000000
--- a/manifests/profile/base/neutron/ml2.pp
+++ /dev/null
@@ -1,64 +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::base::neutron::ml2
-#
-# Neutron ML2 driver profile for tripleo
-#
-# === Parameters
-#
-# [*mechanism_drivers*]
-# (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.
-# Defaults to hiera('step')
-#
-class tripleo::profile::base::neutron::ml2 (
- $mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'),
- $sync_db = true,
- $step = hiera('step'),
-) {
-
- warning('This class is going is deprecated and will be removed very soon, replaced by tripleo::profile::base::neutron::plugins::ml2.')
-
- if $step >= 4 or ( $step >= 3 and $sync_db ) {
- include ::neutron::plugins::ml2
- include ::tripleo::profile::base::neutron
-
- if 'cisco_n1kv' in $mechanism_drivers {
- include ::tripleo::profile::base::neutron::n1k
- }
-
- if 'cisco_ucsm' in $mechanism_drivers {
- include ::neutron::plugins::ml2::cisco::ucsm
- }
-
- if 'cisco_nexus' in $mechanism_drivers {
- include ::neutron::plugins::ml2::cisco::nexus
- include ::neutron::plugins::ml2::cisco::type_nexus_vxlan
- }
-
- if 'bsn_ml2' in $mechanism_drivers {
- include ::neutron::plugins::ml2::bigswitch::restproxy
- include ::neutron::agents::bigswitch
- }
- }
-}
diff --git a/manifests/profile/base/neutron/plugins/ml2.pp b/manifests/profile/base/neutron/plugins/ml2.pp
index b462e1b..8218c9e 100644
--- a/manifests/profile/base/neutron/plugins/ml2.pp
+++ b/manifests/profile/base/neutron/plugins/ml2.pp
@@ -37,9 +37,10 @@ class tripleo::profile::base::neutron::plugins::ml2 (
$step = hiera('step'),
) {
+ include ::tripleo::profile::base::neutron
+
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::plugins::ml2
- include ::tripleo::profile::base::neutron
if 'cisco_n1kv' in $mechanism_drivers {
include ::tripleo::profile::base::neutron::n1k
@@ -56,7 +57,6 @@ class tripleo::profile::base::neutron::plugins::ml2 (
if 'bsn_ml2' in $mechanism_drivers {
include ::neutron::plugins::ml2::bigswitch::restproxy
- include ::neutron::agents::bigswitch
}
}
}
diff --git a/manifests/profile/base/neutron/plugins/nuage.pp b/manifests/profile/base/neutron/plugins/nuage.pp
index 20f93db..5d3661e 100644
--- a/manifests/profile/base/neutron/plugins/nuage.pp
+++ b/manifests/profile/base/neutron/plugins/nuage.pp
@@ -29,6 +29,9 @@ class tripleo::profile::base::neutron::plugins::nuage (
$step = hiera('step'),
$sync_db = true,
) {
+
+ include ::tripleo::profile::base::neutron
+
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::plugins::nuage
}
diff --git a/manifests/profile/base/neutron/plugins/opencontrail.pp b/manifests/profile/base/neutron/plugins/opencontrail.pp
index 1fcb627..96d7421 100644
--- a/manifests/profile/base/neutron/plugins/opencontrail.pp
+++ b/manifests/profile/base/neutron/plugins/opencontrail.pp
@@ -29,6 +29,9 @@ class tripleo::profile::base::neutron::plugins::opencontrail (
$step = hiera('step'),
$sync_db = true,
) {
+
+ include ::tripleo::profile::base::neutron
+
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::plugins::opencontrail
}
diff --git a/manifests/profile/base/neutron/plugins/plumgrid.pp b/manifests/profile/base/neutron/plugins/plumgrid.pp
index 7f645b9..f5cd273 100644
--- a/manifests/profile/base/neutron/plugins/plumgrid.pp
+++ b/manifests/profile/base/neutron/plugins/plumgrid.pp
@@ -31,6 +31,9 @@ class tripleo::profile::base::neutron::plugins::plumgrid (
$step = hiera('step'),
$sync_db = true,
) {
+
+ include ::tripleo::profile::base::neutron
+
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 320f83c..8b5539e 100644
--- a/manifests/profile/base/neutron/server.pp
+++ b/manifests/profile/base/neutron/server.pp
@@ -29,7 +29,7 @@ class tripleo::profile::base::neutron::server (
include ::tripleo::profile::base::neutron
- if $step >= 2 {
+ if $step >= 3 {
include ::neutron::db::mysql
}
diff --git a/manifests/profile/base/nova.pp b/manifests/profile/base/nova.pp
index 66f0d7d..52a4c73 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -22,8 +22,23 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
+# [*manage_migration*]
+# (Optional) Whether or not manage Nova Live migration
+# Defaults to false
+#
+# [*libvirt_enabled*]
+# (Optional) Whether or not Libvirt is enabled.
+# Defaults to false
+#
+# [*nova_compute_enabled*]
+# (Optional) Whether or not nova-compute is enabled.
+# Defaults to false
+#
class tripleo::profile::base::nova (
- $step = hiera('step'),
+ $step = hiera('step'),
+ $manage_migration = false,
+ $libvirt_enabled = false,
+ $nova_compute_enabled = false,
) {
if hiera('nova::use_ipv6', false) {
@@ -41,4 +56,14 @@ class tripleo::profile::base::nova (
}
include ::nova::config
}
+
+ if $step >= 4 {
+ if $manage_migration {
+ class { '::nova::migration::libvirt':
+ configure_libvirt => $libvirt_enabled,
+ configure_nova => $nova_compute_enabled,
+ }
+ }
+ }
+
}
diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp
index 4064b1e..3b36c57 100644
--- a/manifests/profile/base/nova/api.pp
+++ b/manifests/profile/base/nova/api.pp
@@ -34,10 +34,9 @@ class tripleo::profile::base::nova::api (
include ::tripleo::profile::base::nova
- if $step >= 2 and $sync_db {
+ if $step >= 3 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) {
diff --git a/manifests/profile/base/nova/compute.pp b/manifests/profile/base/nova/compute.pp
index 4297031..c734906 100644
--- a/manifests/profile/base/nova/compute.pp
+++ b/manifests/profile/base/nova/compute.pp
@@ -23,8 +23,13 @@
# for more details.
# Defaults to hiera('step')
#
+# [*cinder_nfs_backend*]
+# (Optional) Whether or not Cinder is backed by NFS.
+# Defaults to hiera('cinder_enable_nfs_backend', false)
+#
class tripleo::profile::base::nova::compute (
- $step = hiera('step'),
+ $step = hiera('step'),
+ $cinder_nfs_backend = hiera('cinder_enable_nfs_backend', false),
) {
if $step >= 4 {
@@ -49,4 +54,17 @@ class tripleo::profile::base::nova::compute (
}
}
+ # If NFS is used as a Cinder backend
+ if $cinder_nfs_backend {
+ ensure_packages('nfs-utils', { ensure => present })
+ Package['nfs-utils'] -> Service['nova-compute']
+ if str2bool($::selinux) {
+ selboolean { 'virt_use_nfs':
+ value => on,
+ persistent => true,
+ }
+ Selboolean['virt_use_nfs'] -> Package['nfs-utils']
+ }
+ }
+
}
diff --git a/manifests/profile/base/nova/compute/libvirt.pp b/manifests/profile/base/nova/compute/libvirt.pp
index 74af7fc..5b6f895 100644
--- a/manifests/profile/base/nova/compute/libvirt.pp
+++ b/manifests/profile/base/nova/compute/libvirt.pp
@@ -35,7 +35,7 @@ class tripleo::profile::base::nova::compute::libvirt (
$rbd_persistent_storage = hiera('rbd_persistent_storage', false)
if $rbd_ephemeral_storage or $rbd_persistent_storage {
$client_keys = hiera('ceph::profile::params::client_keys')
- $client_user = join(['client.', hiera('tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name')])
+ $client_user = join(['client.', hiera('nova::compute::rbd::libvirt_rbd_user')])
class { '::nova::compute::rbd':
libvirt_rbd_secret_key => $client_keys[$client_user]['secret'],
}
diff --git a/manifests/profile/base/sahara/api.pp b/manifests/profile/base/sahara/api.pp
index e9149b1..dc23d64 100644
--- a/manifests/profile/base/sahara/api.pp
+++ b/manifests/profile/base/sahara/api.pp
@@ -28,6 +28,6 @@ class tripleo::profile::base::sahara::api (
) {
if $step >= 4 {
include ::tripleo::profile::base::sahara
- include ::sahara::api
+ include ::sahara::service::api
}
}
diff --git a/manifests/profile/base/sahara/engine.pp b/manifests/profile/base/sahara/engine.pp
index 28aff7b..8fa1f5f 100644
--- a/manifests/profile/base/sahara/engine.pp
+++ b/manifests/profile/base/sahara/engine.pp
@@ -37,6 +37,6 @@ class tripleo::profile::base::sahara::engine (
if $step >= 4 or ($step >= 3 and $sync_db) {
include ::tripleo::profile::base::sahara
- include ::sahara::engine
+ include ::sahara::service::engine
}
}
diff --git a/manifests/profile/base/trove/api.pp b/manifests/profile/base/trove/api.pp
new file mode 100644
index 0000000..a98f114
--- /dev/null
+++ b/manifests/profile/base/trove/api.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::base::trove::api
+#
+# Trove API profile for tripleo
+#
+# === Parameters
+#
+# [*sync_db*]
+# (Optional) Whether to run db sync
+# Defaults to true
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::trove::api (
+ $sync_db = true,
+ $step = hiera('step'),
+) {
+
+ if $step >= 3 and $sync_db {
+ include ::trove::db::mysql
+ }
+
+ if $step >= 4 or ($step >= 3 and $sync_db) {
+ include ::trove
+ include ::trove::config
+ include ::trove::api
+ }
+
+}
diff --git a/manifests/profile/base/trove/conductor.pp b/manifests/profile/base/trove/conductor.pp
new file mode 100644
index 0000000..0e95a40
--- /dev/null
+++ b/manifests/profile/base/trove/conductor.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::trove::conductor
+#
+# Trove Conductor 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::trove::conductor (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ include ::trove
+ include ::trove::config
+ include ::trove::conductor
+ }
+
+}
diff --git a/manifests/profile/base/trove/taskmanager.pp b/manifests/profile/base/trove/taskmanager.pp
new file mode 100644
index 0000000..3972c29
--- /dev/null
+++ b/manifests/profile/base/trove/taskmanager.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::trove::taskmanager
+#
+# Trove Taskmanager 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::trove::taskmanager (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ include ::trove
+ include ::trove::config
+ include ::trove::taskmanager
+ }
+
+}
diff --git a/manifests/profile/pacemaker/ceilometer.pp b/manifests/profile/pacemaker/ceilometer.pp
index 0c21807..23021fc 100644
--- a/manifests/profile/pacemaker/ceilometer.pp
+++ b/manifests/profile/pacemaker/ceilometer.pp
@@ -27,47 +27,18 @@
# for more details.
# Defaults to hiera('step')
#
-# [*sync_db*]
-# (Optional) Whether to run db sync
-# Defaults to undef
-#
class tripleo::profile::pacemaker::ceilometer (
$bootstrap_node = hiera('bootstrap_nodeid'),
$step = hiera('step'),
- $sync_db = true,
) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
include ::tripleo::profile::base::ceilometer
- if $step >= 5 and $pacemaker_master {
- $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
- case $ceilometer_backend {
- /mysql/: {
- pacemaker::resource::service { $::ceilometer::params::agent_central_service_name:
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Ocf['openstack-core'],
- }
- }
- default: {
- pacemaker::resource::service { $::ceilometer::params::agent_central_service_name:
- clone_params => 'interleave=true',
- require => [Pacemaker::Resource::Ocf['openstack-core'],
- Pacemaker::Resource::Service[$::mongodb::params::service_name]],
- }
- }
- }
-
- if $sync_db {
- if $ceilometer_backend == 'mysql' {
- class { '::ceilometer::db::mysql':
- require => Exec['galera-ready'],
- }
+ $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'],
}
}
diff --git a/manifests/profile/pacemaker/ceilometer/api.pp b/manifests/profile/pacemaker/ceilometer/api.pp
index cfe103a..3006be8 100644
--- a/manifests/profile/pacemaker/ceilometer/api.pp
+++ b/manifests/profile/pacemaker/ceilometer/api.pp
@@ -40,13 +40,6 @@ class tripleo::profile::pacemaker::ceilometer::api (
pacemaker::resource::service { $::ceilometer::params::api_service_name :
clone_params => 'interleave=true',
}
- pacemaker::constraint::colocation { 'ceilometer-delay-with-ceilometer-api-colocation':
- source => 'delay-clone',
- target => "${::ceilometer::params::api_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name],
- Pacemaker::Resource::Ocf['delay']],
- }
}
}
diff --git a/manifests/profile/pacemaker/gnocchi.pp b/manifests/profile/pacemaker/gnocchi.pp
new file mode 100644
index 0000000..ad566b1
--- /dev/null
+++ b/manifests/profile/pacemaker/gnocchi.pp
@@ -0,0 +1,90 @@
+# 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
+#
+# [*gnocchi_indexer_backend*]
+# (Optional) Gnocchi indexer backend
+# Defaults to mysql
+#
+# [*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')
+#
+# [*sync_db*]
+# (Optional) Whether to run db sync
+# Defaults to undef
+#
+
+class tripleo::profile::pacemaker::gnocchi (
+ $gnocchi_indexer_backend = downcase(hiera('gnocchi_indexer_backend', 'mysql')),
+ $bootstrap_node = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+ $sync_db = true,
+) {
+
+ 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 >= 3 and $sync_db {
+ include ::gnocchi
+ include ::gnocchi::config
+ include ::gnocchi::client
+ if $gnocchi_indexer_backend == 'mysql' {
+ class { '::gnocchi::db::mysql':
+ require => Exec['galera-ready'],
+ }
+ }
+ include ::gnocchi::db::sync
+ }
+
+ if $step >= 5 and $pacemaker_master {
+
+ 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/neutron/ml2.pp b/manifests/profile/pacemaker/gnocchi/api.pp
index ab5a219..684527f 100644
--- a/manifests/profile/pacemaker/neutron/ml2.pp
+++ b/manifests/profile/pacemaker/gnocchi/api.pp
@@ -12,27 +12,35 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-# == Class: tripleo::profile::pacemaker::neutron::ml2
+# == Class: tripleo::profile::pacemaker::gnocchi::api
#
-# Neutron ML2 driver Pacemaker HA profile for tripleo
+# Gnocchi profile for tripleo api
#
# === Parameters
#
# [*pacemaker_master*]
-# (Optional) The hostname of the pacemaker master
+# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
-class tripleo::profile::pacemaker::neutron::ml2 (
+# [*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 undef
+
+class tripleo::profile::pacemaker::gnocchi::api (
$pacemaker_master = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+ $sync_db = true,
) {
- warning('This class is going is deprecated and will be removed very soon, replaced by tripleo::profile::pacemaker::neutron::plugins::ml2.')
+ include ::tripleo::profile::pacemaker::gnocchi
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
-
- class { '::tripleo::profile::base::neutron::plugins::ml2':
- sync_db => ($::hostname == downcase($pacemaker_master))
+ class { '::tripleo::profile::base::gnocchi::api':
+ step => $step,
+ sync_db => (downcase($::hostname) == $pacemaker_master),
}
-
}
diff --git a/manifests/profile/pacemaker/gnocchi/metricd.pp b/manifests/profile/pacemaker/gnocchi/metricd.pp
new file mode 100644
index 0000000..4ac5e74
--- /dev/null
+++ b/manifests/profile/pacemaker/gnocchi/metricd.pp
@@ -0,0 +1,47 @@
+# 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 :
+ clone_params => 'interleave=true',
+ }
+ }
+}
diff --git a/manifests/profile/pacemaker/gnocchi/statsd.pp b/manifests/profile/pacemaker/gnocchi/statsd.pp
new file mode 100644
index 0000000..526dcac
--- /dev/null
+++ b/manifests/profile/pacemaker/gnocchi/statsd.pp
@@ -0,0 +1,47 @@
+# 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 :
+ clone_params => 'interleave=true',
+ }
+ }
+}
diff --git a/manifests/profile/pacemaker/heat.pp b/manifests/profile/pacemaker/heat.pp
index 001b36f..e72f02a 100644
--- a/manifests/profile/pacemaker/heat.pp
+++ b/manifests/profile/pacemaker/heat.pp
@@ -39,94 +39,8 @@ class tripleo::profile::pacemaker::heat (
stop => '/bin/true',
}
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
class { '::tripleo::profile::base::heat':
bootstrap_master => $bootstrap_node,
}
- include ::tripleo::profile::base::heat::api
- include ::tripleo::profile::base::heat::api_cfn
- include ::tripleo::profile::base::heat::api_cloudwatch
- class { '::tripleo::profile::base::heat::engine':
- sync_db => $pacemaker_master,
- }
-
- if $step >= 5 and $pacemaker_master {
- # Heat
- pacemaker::resource::service { $::heat::params::api_service_name :
- clone_params => 'interleave=true',
- }
- pacemaker::resource::service { $::heat::params::api_cloudwatch_service_name :
- clone_params => 'interleave=true',
- }
- pacemaker::resource::service { $::heat::params::api_cfn_service_name :
- clone_params => 'interleave=true',
- }
- pacemaker::resource::service { $::heat::params::engine_service_name :
- clone_params => 'interleave=true',
- }
- pacemaker::constraint::base { 'heat-api-then-heat-api-cfn-constraint':
- constraint_type => 'order',
- first_resource => "${::heat::params::api_service_name}-clone",
- second_resource => "${::heat::params::api_cfn_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::heat::params::api_service_name],
- Pacemaker::Resource::Service[$::heat::params::api_cfn_service_name]],
- }
- pacemaker::constraint::colocation { 'heat-api-cfn-with-heat-api-colocation':
- source => "${::heat::params::api_cfn_service_name}-clone",
- target => "${::heat::params::api_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::heat::params::api_cfn_service_name],
- Pacemaker::Resource::Service[$::heat::params::api_service_name]],
- }
- pacemaker::constraint::base { 'heat-api-cfn-then-heat-api-cloudwatch-constraint':
- constraint_type => 'order',
- first_resource => "${::heat::params::api_cfn_service_name}-clone",
- second_resource => "${::heat::params::api_cloudwatch_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::heat::params::api_cloudwatch_service_name],
- Pacemaker::Resource::Service[$::heat::params::api_cfn_service_name]],
- }
- pacemaker::constraint::colocation { 'heat-api-cloudwatch-with-heat-api-cfn-colocation':
- source => "${::heat::params::api_cloudwatch_service_name}-clone",
- target => "${::heat::params::api_cfn_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::heat::params::api_cfn_service_name],
- Pacemaker::Resource::Service[$::heat::params::api_cloudwatch_service_name]],
- }
- pacemaker::constraint::base { 'heat-api-cloudwatch-then-heat-engine-constraint':
- constraint_type => 'order',
- first_resource => "${::heat::params::api_cloudwatch_service_name}-clone",
- second_resource => "${::heat::params::engine_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::heat::params::api_cloudwatch_service_name],
- Pacemaker::Resource::Service[$::heat::params::engine_service_name]],
- }
- pacemaker::constraint::colocation { 'heat-engine-with-heat-api-cloudwatch-colocation':
- source => "${::heat::params::engine_service_name}-clone",
- target => "${::heat::params::api_cloudwatch_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::heat::params::api_cloudwatch_service_name],
- Pacemaker::Resource::Service[$::heat::params::engine_service_name]],
- }
- pacemaker::constraint::base { 'ceilometer-notification-then-heat-api-constraint':
- constraint_type => 'order',
- first_resource => "${::ceilometer::params::agent_notification_service_name}-clone",
- second_resource => "${::heat::params::api_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::heat::params::api_service_name],
- Pacemaker::Resource::Service[$::ceilometer::params::agent_notification_service_name]],
- }
-
- }
}
diff --git a/manifests/profile/pacemaker/heat/api.pp b/manifests/profile/pacemaker/heat/api.pp
new file mode 100644
index 0000000..ed9ca5b
--- /dev/null
+++ b/manifests/profile/pacemaker/heat/api.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::pacemaker::heat
+#
+# Heat 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::heat::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::heat
+ include ::tripleo::profile::base::heat::api
+
+ if $step >= 5 and $pacemaker_master {
+ pacemaker::resource::service { $::heat::params::api_service_name :
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/heat/api_cfn.pp b/manifests/profile/pacemaker/heat/api_cfn.pp
new file mode 100644
index 0000000..d3ba6e4
--- /dev/null
+++ b/manifests/profile/pacemaker/heat/api_cfn.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::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 :
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/heat/api_cloudwatch.pp b/manifests/profile/pacemaker/heat/api_cloudwatch.pp
new file mode 100644
index 0000000..a7784fb
--- /dev/null
+++ b/manifests/profile/pacemaker/heat/api_cloudwatch.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::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 :
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/heat/engine.pp b/manifests/profile/pacemaker/heat/engine.pp
new file mode 100644
index 0000000..47b8a09
--- /dev/null
+++ b/manifests/profile/pacemaker/heat/engine.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::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
+ class { '::tripleo::profile::base::heat::engine':
+ sync_db => $pacemaker_master,
+ }
+
+ if $step >= 5 and $pacemaker_master {
+ pacemaker::resource::service { $::heat::params::engine_service_name :
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/keystone.pp b/manifests/profile/pacemaker/keystone.pp
index 497d6f3..46a40db 100644
--- a/manifests/profile/pacemaker/keystone.pp
+++ b/manifests/profile/pacemaker/keystone.pp
@@ -46,15 +46,9 @@ class tripleo::profile::pacemaker::keystone (
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- if $step >= 5 and $pacemaker_master {
$manage_roles = true
- Pacemaker::Resource::Service[$::apache::params::service_name] -> Class['::keystone::roles::admin']
- Pacemaker::Resource::Service[$::apache::params::service_name] -> Class['::keystone::endpoint']
} else {
+ $pacemaker_master = false
$manage_roles = false
}
diff --git a/manifests/profile/pacemaker/neutron.pp b/manifests/profile/pacemaker/neutron.pp
index 2af53dc..75a75b3 100644
--- a/manifests/profile/pacemaker/neutron.pp
+++ b/manifests/profile/pacemaker/neutron.pp
@@ -24,7 +24,7 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
# [*enable_l3*]
# (Optional) Whether to include the Neutron L3 agent pacemaker profile
@@ -44,7 +44,7 @@
#
class tripleo::profile::pacemaker::neutron (
$step = hiera('step'),
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
# We can drop the hiera defaults once the neutron roles are decomposed
$enable_l3 = hiera('neutron::enable_l3_agent', false),
$enable_dhcp = hiera('neutron::enable_dhcp_agent', false),
@@ -61,9 +61,7 @@ class tripleo::profile::pacemaker::neutron (
stop => '/bin/true',
}
- class { '::tripleo::profile::base::neutron':
- sync_db => ($::hostname == downcase($pacemaker_master)),
- }
+ include ::tripleo::profile::base::neutron
if $step >= 4 {
include ::neutron::params
diff --git a/manifests/profile/pacemaker/neutron/dhcp.pp b/manifests/profile/pacemaker/neutron/dhcp.pp
index 1f3b178..d738f21 100644
--- a/manifests/profile/pacemaker/neutron/dhcp.pp
+++ b/manifests/profile/pacemaker/neutron/dhcp.pp
@@ -25,11 +25,11 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::dhcp (
$step = hiera('step'),
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
include ::neutron::params
diff --git a/manifests/profile/pacemaker/neutron/l3.pp b/manifests/profile/pacemaker/neutron/l3.pp
index e1699cc..fec4af2 100644
--- a/manifests/profile/pacemaker/neutron/l3.pp
+++ b/manifests/profile/pacemaker/neutron/l3.pp
@@ -25,11 +25,11 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::l3 (
$step = hiera('step'),
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
include ::neutron::params
diff --git a/manifests/profile/pacemaker/neutron/metadata.pp b/manifests/profile/pacemaker/neutron/metadata.pp
index e6bccb1..4fccea2 100644
--- a/manifests/profile/pacemaker/neutron/metadata.pp
+++ b/manifests/profile/pacemaker/neutron/metadata.pp
@@ -25,11 +25,11 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::metadata (
$step = hiera('step'),
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
include ::neutron::params
diff --git a/manifests/profile/pacemaker/neutron/midonet.pp b/manifests/profile/pacemaker/neutron/midonet.pp
index a4ec831..9d380f0 100644
--- a/manifests/profile/pacemaker/neutron/midonet.pp
+++ b/manifests/profile/pacemaker/neutron/midonet.pp
@@ -25,11 +25,11 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::midonet (
$step = hiera('step'),
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
include ::neutron::params
include ::tripleo::profile::pacemaker::neutron
diff --git a/manifests/profile/pacemaker/neutron/ovs.pp b/manifests/profile/pacemaker/neutron/ovs.pp
index 34ff5d3..a330de1 100644
--- a/manifests/profile/pacemaker/neutron/ovs.pp
+++ b/manifests/profile/pacemaker/neutron/ovs.pp
@@ -25,11 +25,11 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::ovs (
$step = hiera('step'),
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
include ::neutron::params
diff --git a/manifests/profile/pacemaker/neutron/plugins/ml2.pp b/manifests/profile/pacemaker/neutron/plugins/ml2.pp
index 5ec363b..6c9d8b1 100644
--- a/manifests/profile/pacemaker/neutron/plugins/ml2.pp
+++ b/manifests/profile/pacemaker/neutron/plugins/ml2.pp
@@ -20,10 +20,10 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::plugins::ml2 (
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
include ::neutron::params
diff --git a/manifests/profile/pacemaker/neutron/plugins/nuage.pp b/manifests/profile/pacemaker/neutron/plugins/nuage.pp
index 6b38884..ea40d38 100644
--- a/manifests/profile/pacemaker/neutron/plugins/nuage.pp
+++ b/manifests/profile/pacemaker/neutron/plugins/nuage.pp
@@ -20,10 +20,10 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::plugins::nuage (
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
class { '::tripleo::profile::base::neutron::plugins::nuage':
diff --git a/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp b/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp
index 32564f4..8db3cb2 100644
--- a/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp
+++ b/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp
@@ -20,10 +20,10 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::plugins::opencontrail (
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
class { '::tripleo::profile::base::neutron::plugins::opencontrail':
diff --git a/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp b/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp
index 1f2b32a..57f9e31 100644
--- a/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp
+++ b/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp
@@ -20,10 +20,10 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::pacemaker::neutron::plugins::plumgrid (
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
) {
class { '::tripleo::profile::base::neutron::plugins::plumgrid':
diff --git a/manifests/profile/pacemaker/neutron/server.pp b/manifests/profile/pacemaker/neutron/server.pp
index 0bad1b9..acd7993 100644
--- a/manifests/profile/pacemaker/neutron/server.pp
+++ b/manifests/profile/pacemaker/neutron/server.pp
@@ -20,7 +20,7 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('bootstrap_nodeid', undef)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -28,7 +28,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::neutron::server (
- $pacemaker_master = hiera('bootstrap_nodeid'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
) {
@@ -36,9 +36,8 @@ class tripleo::profile::pacemaker::neutron::server (
include ::tripleo::profile::pacemaker::neutron
$sync_db = ($::hostname == downcase($pacemaker_master))
- if $step >= 2 and $sync_db {
+ if $step >= 3 and $sync_db {
include ::neutron::db::mysql
- Exec<| title == 'galera-ready'|> -> Class['neutron::db::mysql']
}
if $step >= 4 or ( $step >= 3 and $sync_db ) {
diff --git a/manifests/profile/pacemaker/nova.pp b/manifests/profile/pacemaker/nova.pp
index b6e6cba..13c6128 100644
--- a/manifests/profile/pacemaker/nova.pp
+++ b/manifests/profile/pacemaker/nova.pp
@@ -26,15 +26,6 @@ class tripleo::profile::pacemaker::nova (
$step = hiera('step'),
) {
- Service <|
- tag == 'nova-service'
- |> {
- hasrestart => true,
- restart => '/bin/true',
- start => '/bin/true',
- stop => '/bin/true',
- }
-
include ::tripleo::profile::base::nova
}
diff --git a/manifests/profile/pacemaker/nova/api.pp b/manifests/profile/pacemaker/nova/api.pp
index 5d8e11f..30ab733 100644
--- a/manifests/profile/pacemaker/nova/api.pp
+++ b/manifests/profile/pacemaker/nova/api.pp
@@ -35,6 +35,13 @@ class tripleo::profile::pacemaker::nova::api (
include ::nova::params
include ::tripleo::profile::pacemaker::nova
+ Service<| title == 'nova-api' |> {
+ hasrestart => true,
+ restart => '/bin/true',
+ start => '/bin/true',
+ stop => '/bin/true',
+ }
+
class { '::tripleo::profile::base::nova::api':
sync_db => (downcase($::hostname) == $pacemaker_master),
}
diff --git a/manifests/profile/pacemaker/nova/conductor.pp b/manifests/profile/pacemaker/nova/conductor.pp
index 76dc462..495c92e 100644
--- a/manifests/profile/pacemaker/nova/conductor.pp
+++ b/manifests/profile/pacemaker/nova/conductor.pp
@@ -36,6 +36,13 @@ class tripleo::profile::pacemaker::nova::conductor (
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:
clone_params => 'interleave=true',
diff --git a/manifests/profile/pacemaker/nova/consoleauth.pp b/manifests/profile/pacemaker/nova/consoleauth.pp
index 54f17b7..fb9428a 100644
--- a/manifests/profile/pacemaker/nova/consoleauth.pp
+++ b/manifests/profile/pacemaker/nova/consoleauth.pp
@@ -36,6 +36,13 @@ class tripleo::profile::pacemaker::nova::consoleauth (
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:
clone_params => 'interleave=true',
diff --git a/manifests/profile/pacemaker/nova/scheduler.pp b/manifests/profile/pacemaker/nova/scheduler.pp
index 6516394..9e78c30 100644
--- a/manifests/profile/pacemaker/nova/scheduler.pp
+++ b/manifests/profile/pacemaker/nova/scheduler.pp
@@ -36,6 +36,13 @@ class tripleo::profile::pacemaker::nova::scheduler (
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:
clone_params => 'interleave=true',
diff --git a/manifests/profile/pacemaker/nova/vncproxy.pp b/manifests/profile/pacemaker/nova/vncproxy.pp
index 7f7d095..ec71ca7 100644
--- a/manifests/profile/pacemaker/nova/vncproxy.pp
+++ b/manifests/profile/pacemaker/nova/vncproxy.pp
@@ -36,6 +36,13 @@ class tripleo::profile::pacemaker::nova::vncproxy (
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:
clone_params => 'interleave=true',
diff --git a/manifests/profile/pacemaker/sahara.pp b/manifests/profile/pacemaker/sahara.pp
index 04b4edf..e6e5117 100644
--- a/manifests/profile/pacemaker/sahara.pp
+++ b/manifests/profile/pacemaker/sahara.pp
@@ -45,37 +45,5 @@ class tripleo::profile::pacemaker::sahara (
$pacemaker_master = false
}
- include ::tripleo::profile::base::sahara-api
- class { '::tripleo::profile::base::sahara-engine':
- sync_db => $pacemaker_master,
- }
-
- if $step >= 5 and $pacemaker_master {
- # Sahara
- pacemaker::resource::service { $::sahara::params::api_service_name :
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Ocf['openstack-core'],
- }
- pacemaker::resource::service { $::sahara::params::engine_service_name :
- clone_params => 'interleave=true',
- }
- pacemaker::constraint::base { 'keystone-then-sahara-api-constraint':
- constraint_type => 'order',
- first_resource => 'openstack-core-clone',
- second_resource => "${::sahara::params::api_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::sahara::params::api_service_name],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
- pacemaker::constraint::base { 'sahara-api-then-sahara-engine-constraint':
- constraint_type => 'order',
- first_resource => "${::sahara::params::api_service_name}-clone",
- second_resource => "${::sahara::params::engine_service_name}-clone",
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service[$::sahara::params::api_service_name],
- Pacemaker::Resource::Service[$::sahara::params::engine_service_name]],
- }
- }
+ include ::tripleo::profile::base::sahara
}
diff --git a/manifests/profile/pacemaker/sahara/api.pp b/manifests/profile/pacemaker/sahara/api.pp
new file mode 100644
index 0000000..eed82dd
--- /dev/null
+++ b/manifests/profile/pacemaker/sahara/api.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::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 :
+ clone_params => 'interleave=true',
+ }
+ }
+}
diff --git a/manifests/profile/pacemaker/sahara/engine.pp b/manifests/profile/pacemaker/sahara/engine.pp
new file mode 100644
index 0000000..6265e80
--- /dev/null
+++ b/manifests/profile/pacemaker/sahara/engine.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::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
+ class { '::tripleo::profile::base::sahara::engine':
+ sync_db => $pacemaker_master
+ }
+
+ if $step >= 5 and $pacemaker_master {
+ pacemaker::resource::service { $::sahara::params::engine_service_name :
+ clone_params => 'interleave=true',
+ }
+ }
+}