puppet-tripleo/manifests/profile/pacemaker/compute_instanceha.pp
Michele Baldessari bf009921b9 Instance HA support
This commit is the puppet-tripleo part that implements the instance HA
spec. It only adds a couple of pacemaker resources and stonith devices
when instance HA is activated via an environment variable.

The compute nodes that take part in instance HA need to have the
following services added to them:
OS::TripleO::Services::ComputeInstanceHA
OS::TripleO::Services::PacemakerRemote

More detailed info will be added to the docs.

blueprint instance-ha

Change-Id: I4d1908242e9513a225d2b1da06ed4ee769ee10f7
2017-12-06 11:42:53 +01:00

34 lines
974 B
Puppet

# == Class: tripleo::profile::pacemaker::compute_instanceha
#
# Configures Compute nodes for Instance HA
#
# === Parameters:
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
#
# [*enable_instanceha*]
# (Optional) Boolean driving the Instance HA controlplane configuration
# Defaults to false
#
class tripleo::profile::pacemaker::compute_instanceha (
$step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
$enable_instanceha = hiera('tripleo::instanceha', false),
) {
if $step >= 2 and $enable_instanceha {
pacemaker::property { 'compute-instanceha-role-node-property':
property => 'compute-instanceha-role',
value => true,
tries => $pcs_tries,
node => $::hostname,
}
}
}