Puppet Class: cloud::spof

Defined in:
manifests/spof.pp

Overview

Parameters:

  • cluster_ip (Any) (defaults to: $os_params::cluster_ip)
  • multicast_address (Any) (defaults to: '239.1.1.2')


31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'manifests/spof.pp', line 31

class cloud::spof(
  $cluster_ip        = $os_params::cluster_ip,
  $multicast_address = '239.1.1.2'
) {

  class { 'corosync':
    enable_secauth    => false,
    authkey           => '/var/lib/puppet/ssl/certs/ca.pem',
    bind_address      => $cluster_ip,
    multicast_address => $multicast_address
  }

  corosync::service { 'pacemaker':
    version => '0',
  }

  Package['corosync'] ->
  cs_property {
    'no-quorum-policy':         value => 'ignore';
    'stonith-enabled':          value => 'false';
    'pe-warn-series-max':       value => 1000;
    'pe-input-series-max':      value => 1000;
    'cluster-recheck-interval': value => '5min';
  } ->
  file { '/usr/lib/ocf/resource.d/heartbeat/ceilometer-agent-central':
    source  => 'puppet:///modules/cloud/heartbeat/ceilometer-agent-central',
    mode    => '0755',
    owner   => 'root',
    group   => 'root',
  } ->
  cs_primitive { 'ceilometer-agent-central':
    primitive_class => 'ocf',
    primitive_type  => 'ceilometer-agent-central',
    provided_by     => 'heartbeat',
    operations      => {
      'monitor' => {
        interval => '10s',
        timeout  => '30s'
      },
      'start'   => {
        interval => '0',
        timeout  => '30s',
        on-fail  => 'restart'
      }
    }
  } ->
  file { '/usr/lib/ocf/resource.d/heartbeat/heat-engine':
    source  => 'puppet:///modules/cloud/heartbeat/heat-engine',
    mode    => '0755',
    owner   => 'root',
    group   => 'root',
  } ->
  cs_primitive { 'heat-engine':
    primitive_class => 'ocf',
    primitive_type  => 'heat-engine',
    provided_by     => 'heartbeat',
    operations      => {
      'monitor' => {
        interval => '10s',
        timeout  => '30s'
      },
      'start'   => {
        interval => '0',
        timeout  => '30s',
        on-fail  => 'restart'
      }
    }
  }

  # Run OpenStack SPOF service and disable them since they will be managed by Corosync.
  class { 'cloud::orchestration::engine':
    enabled => false,
  }

  class { 'cloud::telemetry::centralagent':
    enabled => false,
  }

}