fuel-library/deployment/puppet/cluster/manifests/ntp_ocf.pp
Vladimir Kuklin 710553c1cc All the work done for fuel-library packaging
1) Package fuel library into three different
packages:
RPM: fuel-library6.1
ALL: fuel-ha-utils, fuel-misc

2) Install packages onto slave nodes
implements blueprint: package-fuel-components

Change-Id: Ie759857fb94db9aa94aaeaeda2c6ab5bb159cc9e
2015-05-15 02:44:53 +03:00

64 lines
1.3 KiB
Puppet

# == Class: cluster::ntp_ocf
#
# Configure OCF service for NTP managed by corosync/pacemaker
#
class cluster::ntp_ocf ( ) {
$service_name = 'p_ntp'
cs_resource { $service_name:
ensure => present,
primitive_class => 'ocf',
provided_by => 'fuel',
primitive_type => 'ns_ntp',
complex_type => 'clone',
ms_metadata => {
'interleave' => 'true',
},
metadata => {
'migration-threshold' => '3',
'failure-timeout' => '120',
},
parameters => {
'ns' => 'vrouter',
},
operations => {
'monitor' => {
'interval' => '20',
'timeout' => '10'
},
'start' => {
'timeout' => '30'
},
'stop' => {
'timeout' => '30'
},
},
} ->
cs_rsc_colocation { 'ntp-with-vrouter-ns':
ensure => present,
score => 'INFINITY',
primitives => [
"clone_${service_name}",
"clone_p_vrouter"
],
}
Cs_resource[$service_name] ~> Service[$service_name]
# file {'ntp-ocf':
# path =>'/usr/lib/ocf/resource.d/fuel/ns_ntp',
# mode => '0755',
# owner => root,
# group => root,
# source => 'puppet:///modules/cluster/ocf/ns_ntp',
#} ~>
service { $service_name:
name => $service_name,
enable => true,
ensure => 'running',
provider => 'pacemaker',
}
}