cloud::spof: add red hat support
Use another puppet module to configure Pacemaker with Corosync and allow to run Ceilometer Agent Central and Heat Engine in HA on Red Hat systems.
This commit is contained in:
@@ -110,6 +110,9 @@ mod 'mysql',
|
|||||||
mod 'ntp',
|
mod 'ntp',
|
||||||
:git => 'git://github.com/enovance/puppetlabs-ntp.git',
|
:git => 'git://github.com/enovance/puppetlabs-ntp.git',
|
||||||
:ref => 'eb02ba2937ce86fb609ae41499767244b78ec58d'
|
:ref => 'eb02ba2937ce86fb609ae41499767244b78ec58d'
|
||||||
|
mod 'pacemaker',
|
||||||
|
:git => 'git://github.com/enovance/puppet-pacemaker.git',
|
||||||
|
:ref => '1102d9861d8a63cc1577bc97a4415b9ff7488038'
|
||||||
mod 'rabbitmq',
|
mod 'rabbitmq',
|
||||||
:git => 'git://github.com/enovance/puppetlabs-rabbitmq.git',
|
:git => 'git://github.com/enovance/puppetlabs-rabbitmq.git',
|
||||||
:ref => '25420cb3c26c9a8432ab519d43c094d614d4fec4'
|
:ref => '25420cb3c26c9a8432ab519d43c094d614d4fec4'
|
||||||
|
@@ -23,6 +23,11 @@
|
|||||||
# (optional) Interface used by Corosync to send multicast traffic
|
# (optional) Interface used by Corosync to send multicast traffic
|
||||||
# Defaults to '127.0.0.1'
|
# Defaults to '127.0.0.1'
|
||||||
#
|
#
|
||||||
|
# [*cluster_members*]
|
||||||
|
# (required) Members of the cluster.
|
||||||
|
# Should be an array
|
||||||
|
# Defaults to ['127.0.0.1']
|
||||||
|
#
|
||||||
# [*multicast_address*]
|
# [*multicast_address*]
|
||||||
# (optionnal) IP address used to send multicast traffic
|
# (optionnal) IP address used to send multicast traffic
|
||||||
# Defaults to '239.1.1.2'
|
# Defaults to '239.1.1.2'
|
||||||
@@ -30,9 +35,43 @@
|
|||||||
|
|
||||||
class cloud::spof(
|
class cloud::spof(
|
||||||
$cluster_ip = '127.0.0.1',
|
$cluster_ip = '127.0.0.1',
|
||||||
|
$cluster_members = false,
|
||||||
$multicast_address = '239.1.1.2'
|
$multicast_address = '239.1.1.2'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if $::operatingsystem == 'RedHat' {
|
||||||
|
if ! $cluster_members {
|
||||||
|
fail('cluster_members is a required parameter.')
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'pacemaker::corosync':
|
||||||
|
cluster_name => 'openstack_cluster',
|
||||||
|
cluster_members => $cluster_members
|
||||||
|
}
|
||||||
|
|
||||||
|
class {'pacemaker::stonith':
|
||||||
|
disable => true
|
||||||
|
} ->
|
||||||
|
file { '/usr/lib/ocf/resource.d/heartbeat/ceilometer-agent-central':
|
||||||
|
source => 'puppet:///modules/cloud/heartbeat/ceilometer-agent-central',
|
||||||
|
mode => '0755',
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
} ->
|
||||||
|
pcmk_resource { 'ceilometer-agent-central':
|
||||||
|
primitive_type => 'ocf:heartbeat:ceilometer-agent-central'
|
||||||
|
} ->
|
||||||
|
file { '/usr/lib/ocf/resource.d/heartbeat/heat-engine':
|
||||||
|
source => 'puppet:///modules/cloud/heartbeat/heat-engine',
|
||||||
|
mode => '0755',
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
} ->
|
||||||
|
pcmk_resource { 'heat-engine':
|
||||||
|
primitive_type => 'ocf:heartbeat:heat-engine'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
class { 'corosync':
|
class { 'corosync':
|
||||||
enable_secauth => false,
|
enable_secauth => false,
|
||||||
authkey => '/var/lib/puppet/ssl/certs/ca.pem',
|
authkey => '/var/lib/puppet/ssl/certs/ca.pem',
|
||||||
@@ -96,6 +135,8 @@ class cloud::spof(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Run OpenStack SPOF service and disable them since they will be managed by Corosync.
|
# Run OpenStack SPOF service and disable them since they will be managed by Corosync.
|
||||||
class { 'cloud::orchestration::engine':
|
class { 'cloud::orchestration::engine':
|
||||||
|
Reference in New Issue
Block a user