diff options
Diffstat (limited to 'manifests/profile/pacemaker')
-rw-r--r-- | manifests/profile/pacemaker/apache.pp | 48 | ||||
-rw-r--r-- | manifests/profile/pacemaker/ceilometer/collector.pp | 4 | ||||
-rw-r--r-- | manifests/profile/pacemaker/cinder/api.pp | 4 | ||||
-rw-r--r-- | manifests/profile/pacemaker/glance.pp | 4 | ||||
-rw-r--r-- | manifests/profile/pacemaker/gnocchi.pp | 7 | ||||
-rw-r--r-- | manifests/profile/pacemaker/gnocchi/api.pp | 11 | ||||
-rw-r--r-- | manifests/profile/pacemaker/heat/engine.pp | 4 | ||||
-rw-r--r-- | manifests/profile/pacemaker/keystone.pp | 11 | ||||
-rw-r--r-- | manifests/profile/pacemaker/neutron/plugins/ml2.pp | 13 | ||||
-rw-r--r-- | manifests/profile/pacemaker/neutron/plugins/nuage.pp | 13 | ||||
-rw-r--r-- | manifests/profile/pacemaker/neutron/plugins/opencontrail.pp | 13 | ||||
-rw-r--r-- | manifests/profile/pacemaker/neutron/plugins/plumgrid.pp | 13 | ||||
-rw-r--r-- | manifests/profile/pacemaker/nova/api.pp | 4 | ||||
-rw-r--r-- | manifests/profile/pacemaker/nova/conductor.pp | 5 | ||||
-rw-r--r-- | manifests/profile/pacemaker/sahara/engine.pp | 4 |
15 files changed, 76 insertions, 82 deletions
diff --git a/manifests/profile/pacemaker/apache.pp b/manifests/profile/pacemaker/apache.pp new file mode 100644 index 0000000..f23d3e7 --- /dev/null +++ b/manifests/profile/pacemaker/apache.pp @@ -0,0 +1,48 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::pacemaker::apache +# +# Apache Pacemaker HA profile for tripleo +# +# === Parameters +# +# [*bootstrap_node*] +# (Optional) The hostname of the node responsible for bootstrapping tasks +# Defaults to hiera('bootstrap_nodeid') +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::pacemaker::apache ( + $bootstrap_node = hiera('bootstrap_nodeid'), + $step = hiera('step'), +) { + + if $::hostname == downcase($bootstrap_node) { + $pacemaker_master = true + } else { + $pacemaker_master = false + } + + if $step >= 5 and $pacemaker_master { + include ::apache::params + pacemaker::resource::service { $::apache::params::service_name: + clone_params => 'interleave=true', + verify_on_create => true, + } + } +} diff --git a/manifests/profile/pacemaker/ceilometer/collector.pp b/manifests/profile/pacemaker/ceilometer/collector.pp index 2a838f2..6610a07 100644 --- a/manifests/profile/pacemaker/ceilometer/collector.pp +++ b/manifests/profile/pacemaker/ceilometer/collector.pp @@ -40,9 +40,7 @@ class tripleo::profile::pacemaker::ceilometer::collector ( include ::ceilometer::params include ::tripleo::profile::pacemaker::ceilometer - class { '::tripleo::profile::base::ceilometer::collector': - sync_db => (downcase($::hostname) == $pacemaker_master), - } + include ::tripleo::profile::base::ceilometer::collector if $step >= 5 and downcase($::hostname) == $pacemaker_master { $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb')) diff --git a/manifests/profile/pacemaker/cinder/api.pp b/manifests/profile/pacemaker/cinder/api.pp index 2c9cedf..6354244 100644 --- a/manifests/profile/pacemaker/cinder/api.pp +++ b/manifests/profile/pacemaker/cinder/api.pp @@ -45,9 +45,7 @@ class tripleo::profile::pacemaker::cinder::api ( $pacemaker_master = false } - class { '::tripleo::profile::base::cinder::api': - sync_db => $pacemaker_master, - } + include ::tripleo::profile::base::cinder::api if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::cinder::params::api_service : diff --git a/manifests/profile/pacemaker/glance.pp b/manifests/profile/pacemaker/glance.pp index 10f4f03..91fddf6 100644 --- a/manifests/profile/pacemaker/glance.pp +++ b/manifests/profile/pacemaker/glance.pp @@ -76,9 +76,7 @@ class tripleo::profile::pacemaker::glance ( } include ::tripleo::profile::base::glance::api - class { '::tripleo::profile::base::glance::registry': - sync_db => $pacemaker_master, - } + include ::tripleo::profile::base::glance::registry if $step >= 4 { if $glance_backend == 'file' and $glance_file_pcmk_manage { diff --git a/manifests/profile/pacemaker/gnocchi.pp b/manifests/profile/pacemaker/gnocchi.pp index a6d472c..98d1b36 100644 --- a/manifests/profile/pacemaker/gnocchi.pp +++ b/manifests/profile/pacemaker/gnocchi.pp @@ -31,16 +31,11 @@ # 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' |> { @@ -64,7 +59,7 @@ class tripleo::profile::pacemaker::gnocchi ( } } - if $step >= 3 and $sync_db { + if $step >= 3 and $pacemaker_master { include ::gnocchi include ::gnocchi::config include ::gnocchi::client diff --git a/manifests/profile/pacemaker/gnocchi/api.pp b/manifests/profile/pacemaker/gnocchi/api.pp index 684527f..da65731 100644 --- a/manifests/profile/pacemaker/gnocchi/api.pp +++ b/manifests/profile/pacemaker/gnocchi/api.pp @@ -18,29 +18,18 @@ # # === 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/heat/engine.pp b/manifests/profile/pacemaker/heat/engine.pp index 47b8a09..158c138 100644 --- a/manifests/profile/pacemaker/heat/engine.pp +++ b/manifests/profile/pacemaker/heat/engine.pp @@ -39,9 +39,7 @@ class tripleo::profile::pacemaker::heat::engine ( } include ::tripleo::profile::pacemaker::heat - class { '::tripleo::profile::base::heat::engine': - sync_db => $pacemaker_master, - } + include ::tripleo::profile::base::heat::engine if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::heat::params::engine_service_name : diff --git a/manifests/profile/pacemaker/keystone.pp b/manifests/profile/pacemaker/keystone.pp index 46a40db..e8e12a3 100644 --- a/manifests/profile/pacemaker/keystone.pp +++ b/manifests/profile/pacemaker/keystone.pp @@ -46,17 +46,11 @@ class tripleo::profile::pacemaker::keystone ( if $::hostname == downcase($bootstrap_node) { $pacemaker_master = true - $manage_roles = true } else { $pacemaker_master = false - $manage_roles = false } - class { '::tripleo::profile::base::keystone': - sync_db => $pacemaker_master, - manage_roles => $manage_roles, - manage_endpoint => $manage_roles - } + include ::tripleo::profile::base::keystone if $step >= 5 and $pacemaker_master and $enable_load_balancer { pacemaker::constraint::base { 'haproxy-then-keystone-constraint': @@ -82,6 +76,9 @@ class tripleo::profile::pacemaker::keystone ( require => [Pacemaker::Resource::Ocf['rabbitmq'], Pacemaker::Resource::Ocf['openstack-core']], } + File['/etc/keystone/ssl/certs/ca.pem'] -> Pacemaker::Resource::Service[$::apache::params::service_name] + File['/etc/keystone/ssl/private/signing_key.pem'] -> Pacemaker::Resource::Service[$::apache::params::service_name] + File['/etc/keystone/ssl/certs/signing_cert.pem'] -> Pacemaker::Resource::Service[$::apache::params::service_name] } } diff --git a/manifests/profile/pacemaker/neutron/plugins/ml2.pp b/manifests/profile/pacemaker/neutron/plugins/ml2.pp index 6c9d8b1..e5e13b7 100644 --- a/manifests/profile/pacemaker/neutron/plugins/ml2.pp +++ b/manifests/profile/pacemaker/neutron/plugins/ml2.pp @@ -18,19 +18,12 @@ # # === 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), -) { +class tripleo::profile::pacemaker::neutron::plugins::ml2 +{ include ::neutron::params include ::tripleo::profile::pacemaker::neutron - class { '::tripleo::profile::base::neutron::plugins::ml2': - sync_db => ($::hostname == downcase($pacemaker_master)) - } + include ::tripleo::profile::base::neutron::plugins::ml2 } diff --git a/manifests/profile/pacemaker/neutron/plugins/nuage.pp b/manifests/profile/pacemaker/neutron/plugins/nuage.pp index ea40d38..de00761 100644 --- a/manifests/profile/pacemaker/neutron/plugins/nuage.pp +++ b/manifests/profile/pacemaker/neutron/plugins/nuage.pp @@ -18,16 +18,9 @@ # # === 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::pacemaker::neutron::plugins::nuage +{ - class { '::tripleo::profile::base::neutron::plugins::nuage': - sync_db => ($::hostname == downcase($pacemaker_master)) - } + include ::tripleo::profile::base::neutron::plugins::nuage } diff --git a/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp b/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp index 8db3cb2..f1568e9 100644 --- a/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp +++ b/manifests/profile/pacemaker/neutron/plugins/opencontrail.pp @@ -18,16 +18,9 @@ # # === 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::pacemaker::neutron::plugins::opencontrail +{ - class { '::tripleo::profile::base::neutron::plugins::opencontrail': - sync_db => ($::hostname == downcase($pacemaker_master)) - } + include ::tripleo::profile::base::neutron::plugins::opencontrail } diff --git a/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp b/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp index 57f9e31..7313ef9 100644 --- a/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp +++ b/manifests/profile/pacemaker/neutron/plugins/plumgrid.pp @@ -18,16 +18,9 @@ # # === 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::pacemaker::neutron::plugins::plumgrid +{ - class { '::tripleo::profile::base::neutron::plugins::plumgrid': - sync_db => ($::hostname == downcase($pacemaker_master)) - } + include ::tripleo::profile::base::neutron::plugins::plumgrid } diff --git a/manifests/profile/pacemaker/nova/api.pp b/manifests/profile/pacemaker/nova/api.pp index 30ab733..8a6dc8d 100644 --- a/manifests/profile/pacemaker/nova/api.pp +++ b/manifests/profile/pacemaker/nova/api.pp @@ -42,9 +42,7 @@ class tripleo::profile::pacemaker::nova::api ( stop => '/bin/true', } - class { '::tripleo::profile::base::nova::api': - sync_db => (downcase($::hostname) == $pacemaker_master), - } + include ::tripleo::profile::base::nova::api if $step >= 5 and downcase($::hostname) == $pacemaker_master { pacemaker::resource::service { $::nova::params::api_service_name: diff --git a/manifests/profile/pacemaker/nova/conductor.pp b/manifests/profile/pacemaker/nova/conductor.pp index 495c92e..3d5e41e 100644 --- a/manifests/profile/pacemaker/nova/conductor.pp +++ b/manifests/profile/pacemaker/nova/conductor.pp @@ -47,6 +47,11 @@ class tripleo::profile::pacemaker::nova::conductor ( pacemaker::resource::service { $::nova::params::conductor_service_name: clone_params => 'interleave=true', } + # If Service['nova-compute'] is in catalog, make sure we start it after + # nova-conductor pcmk resource. + # Also make sure to restart nova-compute if nova-conductor pcmk resource changed + # the state, since nova-compute is deployed at a previous step. + Pacemaker::Resource::Service[$::nova::params::conductor_service_name] ~> Service<| title == 'nova-compute' |> } } diff --git a/manifests/profile/pacemaker/sahara/engine.pp b/manifests/profile/pacemaker/sahara/engine.pp index 6265e80..850c645 100644 --- a/manifests/profile/pacemaker/sahara/engine.pp +++ b/manifests/profile/pacemaker/sahara/engine.pp @@ -39,9 +39,7 @@ class tripleo::profile::pacemaker::sahara::engine ( } include ::tripleo::profile::pacemaker::sahara - class { '::tripleo::profile::base::sahara::engine': - sync_db => $pacemaker_master - } + include ::tripleo::profile::base::sahara::engine if $step >= 5 and $pacemaker_master { pacemaker::resource::service { $::sahara::params::engine_service_name : |