aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile')
-rw-r--r--manifests/profile/base/ceilometer.pp35
-rw-r--r--manifests/profile/base/ceilometer/agent/central.pp38
-rw-r--r--manifests/profile/base/ceilometer/agent/compute.pp38
-rw-r--r--manifests/profile/base/ceilometer/agent/notification.pp38
-rw-r--r--manifests/profile/base/ceilometer/api.pp37
-rw-r--r--manifests/profile/base/ceilometer/collector.pp78
-rw-r--r--manifests/profile/base/ceilometer/expirer.pp38
-rw-r--r--manifests/profile/base/ceph.pp80
-rw-r--r--manifests/profile/base/ceph/client.pp35
-rw-r--r--manifests/profile/base/ceph/mon.pp (renamed from manifests/profile/base/loadbalancer.pp)36
-rw-r--r--manifests/profile/base/ceph/osd.pp54
-rw-r--r--manifests/profile/base/database/mongodb.pp54
-rw-r--r--manifests/profile/base/database/mongodbcommon.pp52
-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.pp (renamed from manifests/profile/base/neutron/nuage.pp)17
-rw-r--r--manifests/profile/base/horizon.pp50
-rw-r--r--manifests/profile/base/ironic.pp43
-rw-r--r--manifests/profile/base/ironic/api.pp (renamed from manifests/profile/pacemaker/neutron/ml2.pp)20
-rw-r--r--manifests/profile/base/ironic/conductor.pp37
-rw-r--r--manifests/profile/base/kernel.pp26
-rw-r--r--manifests/profile/base/keystone.pp17
-rw-r--r--manifests/profile/base/neutron.pp4
-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/plugins/ml2.pp (renamed from manifests/profile/base/neutron/ml2.pp)17
-rw-r--r--manifests/profile/base/neutron/plugins/nuage.pp38
-rw-r--r--manifests/profile/base/neutron/plugins/opencontrail.pp38
-rw-r--r--manifests/profile/base/neutron/plugins/plumgrid.pp40
-rw-r--r--manifests/profile/base/neutron/server.pp15
-rw-r--r--manifests/profile/base/nova.pp41
-rw-r--r--manifests/profile/base/nova/api.pp50
-rw-r--r--manifests/profile/base/nova/compute.pp70
-rw-r--r--manifests/profile/base/nova/compute/libvirt.pp66
-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/libvirt.pp49
-rw-r--r--manifests/profile/base/nova/scheduler.pp36
-rw-r--r--manifests/profile/base/nova/vncproxy.pp35
-rw-r--r--manifests/profile/base/sahara/api.pp2
-rw-r--r--manifests/profile/base/sahara/engine.pp2
-rw-r--r--manifests/profile/base/snmp.pp50
-rw-r--r--manifests/profile/base/swift/proxy.pp1
-rw-r--r--manifests/profile/base/swift/storage.pp52
-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.pp109
-rw-r--r--manifests/profile/pacemaker/ceilometer/agent/central.pp58
-rw-r--r--manifests/profile/pacemaker/ceilometer/agent/notification.pp45
-rw-r--r--manifests/profile/pacemaker/ceilometer/api.pp45
-rw-r--r--manifests/profile/pacemaker/ceilometer/collector.pp57
-rw-r--r--manifests/profile/pacemaker/database/mongodb.pp74
-rw-r--r--manifests/profile/pacemaker/database/mongodbvalidator.pp37
-rw-r--r--manifests/profile/pacemaker/gnocchi.pp93
-rw-r--r--manifests/profile/pacemaker/gnocchi/api.pp46
-rw-r--r--manifests/profile/pacemaker/gnocchi/metricd.pp47
-rw-r--r--manifests/profile/pacemaker/gnocchi/statsd.pp47
-rw-r--r--manifests/profile/pacemaker/haproxy.pp2
-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.pp15
-rw-r--r--manifests/profile/pacemaker/loadbalancer.pp102
-rw-r--r--manifests/profile/pacemaker/neutron.pp7
-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.pp36
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/nuage.pp33
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/opencontrail.pp33
-rw-r--r--manifests/profile/pacemaker/neutron/plugins/plumgrid.pp33
-rw-r--r--manifests/profile/pacemaker/neutron/server.pp25
-rw-r--r--manifests/profile/pacemaker/nova.pp13
-rw-r--r--manifests/profile/pacemaker/nova/api.pp55
-rw-r--r--manifests/profile/pacemaker/nova/conductor.pp7
-rw-r--r--manifests/profile/pacemaker/nova/consoleauth.pp52
-rw-r--r--manifests/profile/pacemaker/nova/scheduler.pp52
-rw-r--r--manifests/profile/pacemaker/nova/vncproxy.pp52
-rw-r--r--manifests/profile/pacemaker/sahara.pp34
-rw-r--r--manifests/profile/pacemaker/sahara/api.pp50
-rw-r--r--manifests/profile/pacemaker/sahara/engine.pp51
88 files changed, 3120 insertions, 339 deletions
diff --git a/manifests/profile/base/ceilometer.pp b/manifests/profile/base/ceilometer.pp
new file mode 100644
index 0000000..88818de
--- /dev/null
+++ b/manifests/profile/base/ceilometer.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::ceilometer
+#
+# Ceilometer 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::ceilometer (
+ $step = hiera('step'),
+) {
+
+ if $step >= 3 {
+ include ::ceilometer
+ include ::ceilometer::config
+ }
+
+}
diff --git a/manifests/profile/base/ceilometer/agent/central.pp b/manifests/profile/base/ceilometer/agent/central.pp
new file mode 100644
index 0000000..02d6d1a
--- /dev/null
+++ b/manifests/profile/base/ceilometer/agent/central.pp
@@ -0,0 +1,38 @@
+# 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::ceilometer::agent::central
+#
+# Ceilometer Central Agent 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::ceilometer::agent::central (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceilometer
+
+ if $step >= 4 {
+ include ::ceilometer::agent::auth
+ include ::ceilometer::agent::central
+ }
+
+}
diff --git a/manifests/profile/base/ceilometer/agent/compute.pp b/manifests/profile/base/ceilometer/agent/compute.pp
new file mode 100644
index 0000000..3a7aa50
--- /dev/null
+++ b/manifests/profile/base/ceilometer/agent/compute.pp
@@ -0,0 +1,38 @@
+# 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::ceilometer::agent::compute
+#
+# Ceilometer Compute Agent 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::ceilometer::agent::compute (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceilometer
+
+ if $step >= 4 {
+ include ::ceilometer::agent::auth
+ include ::ceilometer::agent::compute
+ }
+
+}
diff --git a/manifests/profile/base/ceilometer/agent/notification.pp b/manifests/profile/base/ceilometer/agent/notification.pp
new file mode 100644
index 0000000..83a0234
--- /dev/null
+++ b/manifests/profile/base/ceilometer/agent/notification.pp
@@ -0,0 +1,38 @@
+# 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::ceilometer::agent::notification
+#
+# Ceilometer Notification Agent 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::ceilometer::agent::notification (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceilometer
+
+ if $step >= 4 {
+ include ::ceilometer::agent::auth
+ include ::ceilometer::agent::notification
+ }
+
+}
diff --git a/manifests/profile/base/ceilometer/api.pp b/manifests/profile/base/ceilometer/api.pp
new file mode 100644
index 0000000..e324c00
--- /dev/null
+++ b/manifests/profile/base/ceilometer/api.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::base::ceilometer::api
+#
+# Ceilometer API 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::ceilometer::api (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceilometer
+
+ if $step >= 4 {
+ include ::ceilometer::api
+ }
+
+}
diff --git a/manifests/profile/base/ceilometer/collector.pp b/manifests/profile/base/ceilometer/collector.pp
new file mode 100644
index 0000000..c294e56
--- /dev/null
+++ b/manifests/profile/base/ceilometer/collector.pp
@@ -0,0 +1,78 @@
+# 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::ceilometer::collector
+#
+# Ceilometer Collector 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::ceilometer::collector (
+ $step = hiera('step'),
+ $sync_db = true,
+) {
+
+ $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 {
+ include ::ceilometer::db::sync
+ }
+
+ 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/ceilometer/expirer.pp b/manifests/profile/base/ceilometer/expirer.pp
new file mode 100644
index 0000000..43d8c26
--- /dev/null
+++ b/manifests/profile/base/ceilometer/expirer.pp
@@ -0,0 +1,38 @@
+# 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::ceilometer::expirer
+#
+# Ceilometer Expirer 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::ceilometer::expirer (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceilometer
+
+ if $step >= 4 {
+ include ::ceilometer::expirer
+ Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" }
+ }
+
+}
diff --git a/manifests/profile/base/ceph.pp b/manifests/profile/base/ceph.pp
new file mode 100644
index 0000000..94166ac
--- /dev/null
+++ b/manifests/profile/base/ceph.pp
@@ -0,0 +1,80 @@
+# 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::ceph
+#
+# Ceph base profile for tripleo
+#
+# === Parameters
+#
+# [*ceph_ipv6*]
+# (Optional) Force daemons to bind on IPv6 addresses
+# Defaults to false
+#
+# [*ceph_mon_initial_members*]
+# (Optional) List of IP addresses to use as mon_initial_members
+# Defaults to undef
+#
+# [*ceph_mon_host*]
+# (Optional) List of IP addresses to use as mon_host
+# Deftauls to undef
+#
+# [*ceph_mon_host_v6*]
+# (Optional) List of IPv6 addresses, surrounded by brackets, used as
+# 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.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::ceph (
+ $ceph_ipv6 = false,
+ $ceph_mon_initial_members = undef,
+ $ceph_mon_host = undef,
+ $ceph_mon_host_v6 = undef,
+ $enable_ceph_storage = false,
+ $step = hiera('step'),
+) {
+
+ if $step >= 2 {
+ if $ceph_mon_initial_members {
+ $mon_initial_members = downcase($ceph_mon_initial_members)
+ } else {
+ $mon_initial_members = undef
+ }
+ if $ceph_ipv6 {
+ $mon_host = $ceph_mon_host_v6
+ } else {
+ $mon_host = $ceph_mon_host
+ }
+
+ class { '::ceph::profile::params':
+ mon_initial_members => $mon_initial_members,
+ mon_host => $mon_host,
+ }
+
+ include ::ceph::conf
+ }
+
+ # TODO: deprecated boolean
+ if $enable_ceph_storage {
+ include ::tripleo::profile::base::ceph::osd
+ }
+}
diff --git a/manifests/profile/base/ceph/client.pp b/manifests/profile/base/ceph/client.pp
new file mode 100644
index 0000000..851324a
--- /dev/null
+++ b/manifests/profile/base/ceph/client.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::ceph::client
+#
+# Ceph client 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::ceph::client (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceph
+
+ if $step >= 2 {
+ include ::ceph::profile::client
+ }
+}
diff --git a/manifests/profile/base/loadbalancer.pp b/manifests/profile/base/ceph/mon.pp
index 2f298f0..48c3721 100644
--- a/manifests/profile/base/loadbalancer.pp
+++ b/manifests/profile/base/ceph/mon.pp
@@ -12,33 +12,37 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-# == Class: tripleo::profile::base::loadbalancer
+# == Class: tripleo::profile::base::ceph::mon
#
-# Loadbalancer profile for tripleo
+# Ceph Monitor profile for tripleo
#
# === Parameters
#
+# [*ceph_pools*]
+# (Optional) List of pools to create
+# Defaults to []
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-# [*enable_load_balancer*]
-# (Optional) Whether or not loadbalancer is enabled.
-# Defaults to hiera('enable_load_balancer', true).
-#
-class tripleo::profile::base::loadbalancer (
- $enable_load_balancer = hiera('enable_load_balancer', true),
- $step = hiera('step'),
+class tripleo::profile::base::ceph::mon (
+ $ceph_pools = [],
+ $step = hiera('step'),
) {
- # TODO(emilien): remove this class once THT does not use it anymore
- warning('tripleo::profile::base::loadbalancer is deprecated and will be removed very soon.')
- if $step >= 1 {
- if $enable_load_balancer {
- include ::tripleo::haproxy
- }
+ include ::tripleo::profile::base::ceph
+
+ if $step >= 2 {
+ include ::ceph::profile::mon
}
+ if $step >= 4 {
+ ceph::pool { $ceph_pools :
+ pg_num => hiera('ceph::profile::params::osd_pool_default_pg_num'),
+ pgp_num => hiera('ceph::profile::params::osd_pool_default_pgp_num'),
+ size => hiera('ceph::profile::params::osd_pool_default_size'),
+ }
+ }
}
-
diff --git a/manifests/profile/base/ceph/osd.pp b/manifests/profile/base/ceph/osd.pp
new file mode 100644
index 0000000..a9224d3
--- /dev/null
+++ b/manifests/profile/base/ceph/osd.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::ceph::osd
+#
+# Ceph OSD profile for tripleo
+#
+# === Parameters
+#
+# [*ceph_osd_selinux_permissive*]
+# (Optional) Wheter to configure SELinux in permissive mode
+# Default to false
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::ceph::osd (
+ $ceph_osd_selinux_permissive = false,
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceph
+
+ if $step >= 2 {
+ if $ceph_osd_selinux_permissive {
+ exec { 'set selinux to permissive on boot':
+ command => "sed -ie 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config",
+ onlyif => "test -f /etc/selinux/config && ! grep '^SELINUX=permissive' /etc/selinux/config",
+ path => ['/usr/bin', '/usr/sbin'],
+ }
+
+ exec { 'set selinux to permissive':
+ command => 'setenforce 0',
+ onlyif => "which setenforce && getenforce | grep -i 'enforcing'",
+ path => ['/usr/bin', '/usr/sbin'],
+ } -> Class['ceph::profile::osd']
+ }
+
+ include ::ceph::profile::osd
+ }
+}
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/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/neutron/nuage.pp b/manifests/profile/base/gnocchi/statsd.pp
index 62e6c4f..830a128 100644
--- a/manifests/profile/base/neutron/nuage.pp
+++ b/manifests/profile/base/gnocchi/statsd.pp
@@ -1,4 +1,4 @@
-# Copyright 2014 Red Hat, Inc.
+# 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
@@ -12,20 +12,25 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-# == Class: tripleo::profile::base::neutron:nuage:
+# == Class: tripleo::profile::base::gnocchi::statsd
#
-# Nuage Neutron profile for tripleo
+# 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::neutron::nuage (
+
+class tripleo::profile::base::gnocchi::statsd (
$step = hiera('step'),
) {
- include ::tripleo::profile::base::neutron::server
+
+ include ::tripleo::profile::base::gnocchi
+
if $step >= 4 {
- include ::neutron::plugins::nuage
+ 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/ironic.pp b/manifests/profile/base/ironic.pp
new file mode 100644
index 0000000..139654b
--- /dev/null
+++ b/manifests/profile/base/ironic.pp
@@ -0,0 +1,43 @@
+# 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::ironic
+#
+# Ironic profile for TripleO
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+# [*sync_db*]
+# (Optional) Whether to run db sync
+# Defaults to true
+#
+class tripleo::profile::base::ironic (
+ $step = hiera('step'),
+ $sync_db = true,
+) {
+
+ if $step >= 3 {
+ include ::ironic
+
+ # Database is accessed by both API and conductor, hence it's here.
+ if $sync_db {
+ include ::ironic::db::mysql
+ include ::ironic::db::sync
+ }
+ }
+}
diff --git a/manifests/profile/pacemaker/neutron/ml2.pp b/manifests/profile/base/ironic/api.pp
index 6c6e580..1406e2d 100644
--- a/manifests/profile/pacemaker/neutron/ml2.pp
+++ b/manifests/profile/base/ironic/api.pp
@@ -12,14 +12,22 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-# == Class: tripleo::profile::pacemaker::neutron::ml2
+# == Class: tripleo::profile::base::ironic::conductor
#
-# Neutron ML2 driver Pacemaker HA profile for tripleo
+# Ironic API profile for TripleO
#
# === Parameters
#
-class tripleo::profile::pacemaker::neutron::ml2 {
- include ::neutron::params
- include ::tripleo::profile::pacemaker::neutron
- include ::tripleo::profile::base::neutron::ml2
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::ironic::api (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ironic
+ if $step >= 4 {
+ include ::ironic::api
+ }
}
diff --git a/manifests/profile/base/ironic/conductor.pp b/manifests/profile/base/ironic/conductor.pp
new file mode 100644
index 0000000..7a587a5
--- /dev/null
+++ b/manifests/profile/base/ironic/conductor.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::base::ironic::conductor
+#
+# Ironic conductor profile for TripleO
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::ironic::conductor (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ironic
+
+ if $step >= 4 {
+ include ::ironic::drivers::deploy
+ include ::ironic::drivers::ipmi
+ include ::ironic::drivers::pxe
+ include ::ironic::conductor
+ }
+}
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/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..1ee2d90 100644
--- a/manifests/profile/base/neutron.pp
+++ b/manifests/profile/base/neutron.pp
@@ -23,9 +23,9 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron (
- $step = hiera('step'),
+ $step = hiera('step'),
) {
- if $step >= 4 {
+ 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/plugins/ml2.pp
index 47b1b3c..8218c9e 100644
--- a/manifests/profile/base/neutron/ml2.pp
+++ b/manifests/profile/base/neutron/plugins/ml2.pp
@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-# == Class: tripleo::profile::base::neutron::ml2
+# == Class: tripleo::profile::base::neutron::plugins::ml2
#
-# Neutron ML2 driver profile for tripleo
+# Neutron ML2 plugin profile for tripleo
#
# === Parameters
#
@@ -22,19 +22,25 @@
# (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 (
+class tripleo::profile::base::neutron::plugins::ml2 (
$mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'),
+ $sync_db = true,
$step = hiera('step'),
) {
- if $step >= 4 {
+ 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
@@ -51,7 +57,6 @@ class tripleo::profile::base::neutron::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
new file mode 100644
index 0000000..5d3661e
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/nuage.pp
@@ -0,0 +1,38 @@
+# Copyright 2014 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::plugins::nuage
+#
+# Nuage Neutron profile for tripleo
+#
+# [*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::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
new file mode 100644
index 0000000..96d7421
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/opencontrail.pp
@@ -0,0 +1,38 @@
+# Copyright 2014 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::plugins::opencontrail
+#
+# Opencontrail Neutron profile for tripleo
+#
+# [*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::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
new file mode 100644
index 0000000..f5cd273
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/plumgrid.pp
@@ -0,0 +1,40 @@
+# 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,
+) {
+
+ 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 14af56e..8b5539e 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 >= 3 {
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..52a4c73 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -22,11 +22,48 @@
# (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 $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
}
+
+ 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
new file mode 100644
index 0000000..3b36c57
--- /dev/null
+++ b/manifests/profile/base/nova/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::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 >= 3 and $sync_db {
+ include ::nova::db::mysql
+ include ::nova::db::mysql_api
+ }
+
+ 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..c734906
--- /dev/null
+++ b/manifests/profile/base/nova/compute.pp
@@ -0,0 +1,70 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::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')
+#
+# [*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'),
+ $cinder_nfs_backend = hiera('cinder_enable_nfs_backend', false),
+) {
+
+ if $step >= 4 {
+ # deploy basic bits for nova
+ include ::tripleo::profile::base::nova
+
+ # deploy basic bits for nova-compute
+ include ::nova::compute
+
+ # deploy bits to connect nova compute to neutron
+ include ::nova::network::neutron
+
+ # When utilising images for deployment, we need to reset the iSCSI initiator name to make it unique
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1244328
+ exec { 'reset-iscsi-initiator-name':
+ command => '/bin/echo InitiatorName=$(/usr/sbin/iscsi-iname) > /etc/iscsi/initiatorname.iscsi',
+ onlyif => '/usr/bin/test ! -f /etc/iscsi/.initiator_reset',
+ before => File['/etc/iscsi/.initiator_reset'],
+ }
+ file { '/etc/iscsi/.initiator_reset':
+ ensure => present,
+ }
+ }
+
+ # 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
new file mode 100644
index 0000000..5b6f895
--- /dev/null
+++ b/manifests/profile/base/nova/compute/libvirt.pp
@@ -0,0 +1,66 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::compute::libvirt
+#
+# Nova Compute Libvirt 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::libvirt (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ include ::tripleo::profile::base::nova::compute
+
+ # Ceph + Libvirt
+ $rbd_ephemeral_storage = hiera('nova::compute::rbd::ephemeral_storage', false)
+ $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('nova::compute::rbd::libvirt_rbd_user')])
+ class { '::nova::compute::rbd':
+ libvirt_rbd_secret_key => $client_keys[$client_user]['secret'],
+ }
+ }
+
+ # TODO(emilien): Some work needs to be done in puppet-nova to separate nova-compute config
+ # when running libvirt and libvirt itself, so we allow micro-services deployments.
+ if str2bool(hiera('nova::use_ipv6', false)) {
+ $vncserver_listen = '::0'
+ } else {
+ $vncserver_listen = '0.0.0.0'
+ }
+
+ if $rbd_ephemeral_storage {
+ class { '::nova::compute::libvirt':
+ libvirt_disk_cachemodes => ['network=writeback'],
+ libvirt_hw_disk_discard => 'unmap',
+ vncserver_listen => $vncserver_listen,
+ }
+ } else {
+ class { '::nova::compute::libvirt' :
+ vncserver_listen => $vncserver_listen,
+ }
+ }
+
+ }
+
+}
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/libvirt.pp b/manifests/profile/base/nova/libvirt.pp
new file mode 100644
index 0000000..29ef372
--- /dev/null
+++ b/manifests/profile/base/nova/libvirt.pp
@@ -0,0 +1,49 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::libvirt
+#
+# Libvirt profile for tripleo. It will deploy Libvirt service and configure it.
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::nova::libvirt (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ include ::tripleo::profile::base::nova
+ include ::nova::compute::libvirt::services
+
+ file { ['/etc/libvirt/qemu/networks/autostart/default.xml',
+ '/etc/libvirt/qemu/networks/default.xml']:
+ ensure => absent,
+ before => Service['libvirt'],
+ }
+
+ # in case libvirt has been already running before the Puppet run, make
+ # sure the default network is destroyed
+ exec { 'libvirt-default-net-destroy':
+ command => '/usr/bin/virsh net-destroy default',
+ onlyif => '/usr/bin/virsh net-info default | /bin/grep -i "^active:\s*yes"',
+ before => Service['libvirt'],
+ }
+ }
+
+}
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/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/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/base/swift/storage.pp b/manifests/profile/base/swift/storage.pp
new file mode 100644
index 0000000..371cb0d
--- /dev/null
+++ b/manifests/profile/base/swift/storage.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::swift::storage
+#
+# Swift storage profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*enable_swift_storage*]
+# (Optional) enable_swift_storage
+# Deprecated: defaults to true
+#
+class tripleo::profile::base::swift::storage (
+ $step = hiera('step'),
+ # Deprecated conditional to support ControllerEnableSwiftStorage parameter
+ $enable_swift_storage = true,
+) {
+
+ if $step >= 4 {
+ if $enable_swift_storage {
+ include ::swift::storage::all
+ if(!defined(File['/srv/node'])) {
+ file { '/srv/node':
+ ensure => directory,
+ owner => 'swift',
+ group => 'swift',
+ require => Package['openstack-swift'],
+ }
+ }
+ $swift_components = ['account', 'container', 'object']
+ swift::storage::filter::recon { $swift_components : }
+ swift::storage::filter::healthcheck { $swift_components : }
+ }
+ }
+}
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
new file mode 100644
index 0000000..23021fc
--- /dev/null
+++ b/manifests/profile/pacemaker/ceilometer.pp
@@ -0,0 +1,109 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::ceilometer
+#
+# Ceilometer Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::pacemaker::ceilometer (
+ $bootstrap_node = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceilometer
+
+ $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
+ if $step >= 5 and $::hostname == downcase($bootstrap_node) {
+ if $ceilometer_backend == 'mysql' {
+ class { '::ceilometer::db::mysql':
+ require => Exec['galera-ready'],
+ }
+ }
+
+ # NOTE(emilien): the constraints won't live forever here as we're moving to
+ # pacemaker-lite architecture.
+
+ # Fedora doesn't know `require-all` parameter for constraints yet
+ if $::operatingsystem == 'Fedora' {
+ $redis_ceilometer_constraint_params = undef
+ } else {
+ $redis_ceilometer_constraint_params = 'require-all=false'
+ }
+ pacemaker::constraint::base { 'redis-then-ceilometer-central-constraint':
+ constraint_type => 'order',
+ first_resource => 'redis-master',
+ second_resource => "${::ceilometer::params::agent_central_service_name}-clone",
+ first_action => 'promote',
+ second_action => 'start',
+ constraint_params => $redis_ceilometer_constraint_params,
+ require => [Pacemaker::Resource::Ocf['redis'],
+ Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name]],
+ }
+ pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint':
+ constraint_type => 'order',
+ first_resource => 'openstack-core-clone',
+ second_resource => "${::ceilometer::params::agent_central_service_name}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name],
+ Pacemaker::Resource::Ocf['openstack-core']],
+ }
+ pacemaker::constraint::base { 'keystone-then-ceilometer-notification-constraint':
+ constraint_type => 'order',
+ first_resource => 'openstack-core-clone',
+ second_resource => "${::ceilometer::params::agent_notification_service_name}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name],
+ Pacemaker::Resource::Ocf['openstack-core']],
+ }
+ pacemaker::constraint::base { 'ceilometer-central-then-ceilometer-collector-constraint':
+ constraint_type => 'order',
+ first_resource => "${::ceilometer::params::agent_central_service_name}-clone",
+ second_resource => "${::ceilometer::params::collector_service_name}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name],
+ Pacemaker::Resource::Service[$::ceilometer::params::collector_service_name]],
+ }
+ pacemaker::constraint::base { 'ceilometer-collector-then-ceilometer-api-constraint':
+ constraint_type => 'order',
+ first_resource => "${::ceilometer::params::collector_service_name}-clone",
+ second_resource => "${::ceilometer::params::api_service_name}-clone",
+ first_action => 'start',
+ second_action => 'start',
+ require => [Pacemaker::Resource::Service[$::ceilometer::params::collector_service_name],
+ Pacemaker::Resource::Service[$::ceilometer::params::api_service_name]],
+ }
+ pacemaker::constraint::colocation { 'ceilometer-api-with-ceilometer-collector-colocation':
+ source => "${::ceilometer::params::api_service_name}-clone",
+ target => "${::ceilometer::params::collector_service_name}-clone",
+ score => 'INFINITY',
+ require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name],
+ Pacemaker::Resource::Service[$::ceilometer::params::collector_service_name]],
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/ceilometer/agent/central.pp b/manifests/profile/pacemaker/ceilometer/agent/central.pp
new file mode 100644
index 0000000..e227614
--- /dev/null
+++ b/manifests/profile/pacemaker/ceilometer/agent/central.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::pacemaker::ceilometer::agent::central
+#
+# Ceilometer Central Agent Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::pacemaker::ceilometer::agent::central (
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+) {
+
+ include ::ceilometer::params
+ include ::tripleo::profile::pacemaker::ceilometer
+ include ::tripleo::profile::base::ceilometer::agent::central
+
+ if $step >= 5 and downcase($::hostname) == $pacemaker_master {
+ $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
+ case downcase(hiera('ceilometer_backend')) {
+ /mysql/: {
+ pacemaker::resource::service { $::ceilometer::params::agent_central_service_name:
+ 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]],
+ }
+ }
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/ceilometer/agent/notification.pp b/manifests/profile/pacemaker/ceilometer/agent/notification.pp
new file mode 100644
index 0000000..868bb22
--- /dev/null
+++ b/manifests/profile/pacemaker/ceilometer/agent/notification.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::ceilometer::agent::notification
+#
+# Ceilometer Notification Agent Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::pacemaker::ceilometer::agent::notification (
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+) {
+
+ include ::ceilometer::params
+ include ::tripleo::profile::pacemaker::ceilometer
+ include ::tripleo::profile::base::ceilometer::agent::notification
+
+ if $step >= 5 and downcase($::hostname) == $pacemaker_master {
+ pacemaker::resource::service { $::ceilometer::params::agent_notification_service_name :
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/ceilometer/api.pp b/manifests/profile/pacemaker/ceilometer/api.pp
new file mode 100644
index 0000000..3006be8
--- /dev/null
+++ b/manifests/profile/pacemaker/ceilometer/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::pacemaker::ceilometer::api
+#
+# Ceilometer API Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::pacemaker::ceilometer::api (
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+) {
+
+ include ::ceilometer::params
+ include ::tripleo::profile::pacemaker::ceilometer
+ include ::tripleo::profile::base::ceilometer::api
+
+ if $step >= 5 and downcase($::hostname) == $pacemaker_master {
+ pacemaker::resource::service { $::ceilometer::params::api_service_name :
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
diff --git a/manifests/profile/pacemaker/ceilometer/collector.pp b/manifests/profile/pacemaker/ceilometer/collector.pp
new file mode 100644
index 0000000..2a838f2
--- /dev/null
+++ b/manifests/profile/pacemaker/ceilometer/collector.pp
@@ -0,0 +1,57 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::ceilometer::collector
+#
+# Ceilometer Collector Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*sync_db*]
+# (Optional) Whether to run db sync
+# Defaults to undef
+#
+class tripleo::profile::pacemaker::ceilometer::collector (
+ $pacemaker_master = hiera('bootstrap_nodeid'),
+ $step = hiera('step'),
+ $sync_db = true,
+) {
+
+ include ::ceilometer::params
+ include ::tripleo::profile::pacemaker::ceilometer
+
+ class { '::tripleo::profile::base::ceilometer::collector':
+ sync_db => (downcase($::hostname) == $pacemaker_master),
+ }
+
+ if $step >= 5 and downcase($::hostname) == $pacemaker_master {
+ $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
+ if $ceilometer_backend == 'mysql' {
+ Exec<| title == 'galera-ready'|> -> Class['ceilometer::db::mysql']
+ }
+ pacemaker::resource::service { $::ceilometer::params::collector_service_name :
+ clone_params => 'interleave=true',
+ }
+ }
+
+}
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/gnocchi.pp b/manifests/profile/pacemaker/gnocchi.pp
new file mode 100644
index 0000000..a6d472c
--- /dev/null
+++ b/manifests/profile/pacemaker/gnocchi.pp
@@ -0,0 +1,93 @@
+# 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 >= 2 and $pacemaker_master {
+ if $gnocchi_indexer_backend == 'mysql' {
+ class { '::gnocchi::db::mysql':
+ require => Exec['galera-ready'],
+ }
+ }
+ }
+
+ if $step >= 3 and $sync_db {
+ include ::gnocchi
+ include ::gnocchi::config
+ include ::gnocchi::client
+ 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/gnocchi/api.pp b/manifests/profile/pacemaker/gnocchi/api.pp
new file mode 100644
index 0000000..684527f
--- /dev/null
+++ b/manifests/profile/pacemaker/gnocchi/api.pp
@@ -0,0 +1,46 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::gnocchi::api
+#
+# Gnocchi profile for tripleo api
+#
+# === Parameters
+#
+# [*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')
+#
+# [*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,
+) {
+
+ include ::tripleo::profile::pacemaker::gnocchi
+
+ 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/haproxy.pp b/manifests/profile/pacemaker/haproxy.pp
index 58bb174..a7aca58 100644
--- a/manifests/profile/pacemaker/haproxy.pp
+++ b/manifests/profile/pacemaker/haproxy.pp
@@ -37,7 +37,7 @@ class tripleo::profile::pacemaker::haproxy (
$enable_load_balancer = hiera('enable_load_balancer', true)
) {
- include ::tripleo::profile::base::loadbalancer
+ include ::tripleo::profile::base::haproxy
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = 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 42c44d4..46a40db 100644
--- a/manifests/profile/pacemaker/keystone.pp
+++ b/manifests/profile/pacemaker/keystone.pp
@@ -46,23 +46,16 @@ 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
}
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/loadbalancer.pp b/manifests/profile/pacemaker/loadbalancer.pp
deleted file mode 100644
index 608d0e4..0000000
--- a/manifests/profile/pacemaker/loadbalancer.pp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 2016 Red Hat, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# == Class: tripleo::profile::pacemaker::loadbalancer
-#
-# Loadbalancer 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')
-#
-# [*enable_load_balancer*]
-# (Optional) Whether load balancing is enabled for this cluster
-# Defaults to hiera('enable_load_balancer', true)
-#
-class tripleo::profile::pacemaker::loadbalancer (
- $bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
- $enable_load_balancer = hiera('enable_load_balancer', true)
-) {
-
- # TODO(emilien): remove this class once THT does not use it anymore
- warning('tripleo::profile::pacemaker::loadbalancer is deprecated and will be removed very soon.')
-
- include ::tripleo::profile::base::loadbalancer
-
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
- if $step >= 2 and $pacemaker_master and $enable_load_balancer {
- # FIXME: we should not have to access tripleo::haproxy class
- # parameters here to configure pacemaker VIPs. The configuration
- # of pacemaker VIPs could move into puppet-tripleo or we should
- # make use of less specific hiera parameters here for the settings.
- pacemaker::resource::service { 'haproxy':
- clone_params => true,
- }
-
- $control_vip = hiera('controller_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_control_vip':
- vip_name => 'control',
- ip_address => $control_vip,
- }
-
- $public_vip = hiera('public_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_public_vip':
- ensure => $public_vip and $public_vip != $control_vip,
- vip_name => 'public',
- ip_address => $public_vip,
- }
-
- $redis_vip = hiera('redis_vip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_redis_vip':
- ensure => $redis_vip and $redis_vip != $control_vip,
- vip_name => 'redis',
- ip_address => $redis_vip,
- }
-
- $internal_api_vip = hiera('internal_api_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_internal_api_vip':
- ensure => $internal_api_vip and $internal_api_vip != $control_vip,
- vip_name => 'internal_api',
- ip_address => $internal_api_vip,
- }
-
- $storage_vip = hiera('storage_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_storage_vip':
- ensure => $storage_vip and $storage_vip != $control_vip,
- vip_name => 'storage',
- ip_address => $storage_vip,
- }
-
- $storage_mgmt_vip = hiera('storage_mgmt_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_storage_mgmt_vip':
- ensure => $storage_mgmt_vip and $storage_mgmt_vip != $control_vip,
- vip_name => 'storage_mgmt',
- ip_address => $storage_mgmt_vip,
- }
- }
-
-}
diff --git a/manifests/profile/pacemaker/neutron.pp b/manifests/profile/pacemaker/neutron.pp
index 03ccbc3..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,10 @@ class tripleo::profile::pacemaker::neutron (
stop => '/bin/true',
}
+ include ::tripleo::profile::base::neutron
+
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/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
new file mode 100644
index 0000000..6c9d8b1
--- /dev/null
+++ b/manifests/profile/pacemaker/neutron/plugins/ml2.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::pacemaker::neutron::plugins::ml2
+#
+# Neutron ML2 driver Pacemaker HA profile for tripleo
+#
+# === Parameters
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to hiera('bootstrap_nodeid', undef)
+#
+class tripleo::profile::pacemaker::neutron::plugins::ml2 (
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
+) {
+
+ include ::neutron::params
+ include ::tripleo::profile::pacemaker::neutron
+
+ class { '::tripleo::profile::base::neutron::plugins::ml2':
+ sync_db => ($::hostname == downcase($pacemaker_master))
+ }
+
+}
diff --git a/manifests/profile/pacemaker/neutron/plugins/nuage.pp b/manifests/profile/pacemaker/neutron/plugins/nuage.pp
new file mode 100644
index 0000000..ea40d38
--- /dev/null
+++ b/manifests/profile/pacemaker/neutron/plugins/nuage.pp
@@ -0,0 +1,33 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::neutron::plugins::nuage
+#
+# Nuage Neutron profile for tripleo pacemaker
+#
+# === Parameters
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to hiera('bootstrap_nodeid', undef)
+#
+class tripleo::profile::pacemaker::neutron::plugins::nuage (
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
+) {
+
+ class { '::tripleo::profile::base::neutron::plugins::nuage':
+ sync_db => ($::hostname == downcase($pacemaker_master))
+ }
+
+}
diff --git a/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp b/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp
new file mode 100644
index 0000000..8db3cb2
--- /dev/null
+++ b/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp
@@ -0,0 +1,33 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::pacemaker::neutron::plugins::opencontrail
+#
+# Opencontrail Neutron profile for tripleo pacemaker
+#
+# === Parameters
+#
+# [*pacemaker_master*]
+# (Optional) The hostname of the pacemaker master
+# Defaults to hiera('bootstrap_nodeid', undef)
+#
+class tripleo::profile::pacemaker::neutron::plugins::opencontrail (
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
+) {
+
+ class { '::tripleo::profile::base::neutron::plugins::opencontrail':
+ 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..57f9e31
--- /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', undef)
+#
+class tripleo::profile::pacemaker::neutron::plugins::plumgrid (
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
+) {
+
+ 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..acd7993 100644
--- a/manifests/profile/pacemaker/neutron/server.pp
+++ b/manifests/profile/pacemaker/neutron/server.pp
@@ -20,24 +20,29 @@
#
# [*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
-# 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'),
+ $pacemaker_master = hiera('bootstrap_nodeid', undef),
+ $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 >= 3 and $sync_db {
+ include ::neutron::db::mysql
+ }
+
+ if $step >= 4 or ( $step >= 3 and $sync_db ) {
+ include ::neutron::server::notifications
+ include ::neutron::server
}
}
diff --git a/manifests/profile/pacemaker/nova.pp b/manifests/profile/pacemaker/nova.pp
index 09aed61..13c6128 100644
--- a/manifests/profile/pacemaker/nova.pp
+++ b/manifests/profile/pacemaker/nova.pp
@@ -26,17 +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',
- }
-
- 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..30ab733
--- /dev/null
+++ b/manifests/profile/pacemaker/nova/api.pp
@@ -0,0 +1,55 @@
+# 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
+
+ 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),
+ }
+
+ 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/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
new file mode 100644
index 0000000..fb9428a
--- /dev/null
+++ b/manifests/profile/pacemaker/nova/consoleauth.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::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
+
+ 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
new file mode 100644
index 0000000..9e78c30
--- /dev/null
+++ b/manifests/profile/pacemaker/nova/scheduler.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::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
+
+ 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
new file mode 100644
index 0000000..ec71ca7
--- /dev/null
+++ b/manifests/profile/pacemaker/nova/vncproxy.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::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
+
+ 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',
+ }
+ }
+}