aboutsummaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'puppet')
-rw-r--r--puppet/all-nodes-config.yaml4
-rw-r--r--puppet/ceph-storage-post-puppet.yaml9
-rw-r--r--puppet/compute-post-puppet.yaml9
-rw-r--r--puppet/controller-post-puppet.yaml9
-rw-r--r--puppet/manifests/overcloud_controller.pp88
-rw-r--r--puppet/swift-storage-post.yaml9
6 files changed, 98 insertions, 30 deletions
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml
index 7a4df796..9345e5c5 100644
--- a/puppet/all-nodes-config.yaml
+++ b/puppet/all-nodes-config.yaml
@@ -54,10 +54,10 @@ resources:
list_join:
- ','
- {get_param: controller_ips}
- rabbit_node_names:
+ rabbit_node_ips:
list_join:
- ','
- - {get_param: controller_names}
+ - {get_param: controller_ips}
mongo_node_ips:
list_join:
- ','
diff --git a/puppet/ceph-storage-post-puppet.yaml b/puppet/ceph-storage-post-puppet.yaml
index 53ecbe1f..93cc8d1d 100644
--- a/puppet/ceph-storage-post-puppet.yaml
+++ b/puppet/ceph-storage-post-puppet.yaml
@@ -22,3 +22,12 @@ resources:
properties:
servers: {get_param: servers}
config: {get_resource: CephStoragePuppetConfig}
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ depends_on: CephStorageDeployment_Step1
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
+
diff --git a/puppet/compute-post-puppet.yaml b/puppet/compute-post-puppet.yaml
index 9b7eb0cf..26c1a979 100644
--- a/puppet/compute-post-puppet.yaml
+++ b/puppet/compute-post-puppet.yaml
@@ -23,3 +23,12 @@ resources:
properties:
servers: {get_param: servers}
config: {get_resource: ComputePuppetConfig}
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ depends_on: ComputePuppetDeployment
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
+
diff --git a/puppet/controller-post-puppet.yaml b/puppet/controller-post-puppet.yaml
index 009a10ae..debd7154 100644
--- a/puppet/controller-post-puppet.yaml
+++ b/puppet/controller-post-puppet.yaml
@@ -71,3 +71,12 @@ resources:
config: {get_resource: ControllerPuppetConfig}
input_values:
step: 3
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ depends_on: ControllerDeploymentOvercloudServices_Step4
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
+
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index b1ccf3d7..7e7f2fb2 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -24,23 +24,25 @@ if !str2bool(hiera('enable_package_install', 'false')) {
}
}
+$enable_pacemaker = str2bool(hiera('enable_pacemaker'))
+$enable_keepalived = !$enable_pacemaker
+if $::hostname == downcase(hiera('bootstrap_nodeid')) {
+ $pacemaker_master = true
+} else {
+ $pacemaker_master = false
+}
+
if hiera('step') >= 1 {
$controller_node_ips = split(hiera('controller_node_ips'), ',')
- $enable_pacemaker = str2bool(hiera('enable_pacemaker'))
- $enable_keepalived = !$enable_pacemaker
class { '::tripleo::loadbalancer' :
controller_hosts => $controller_node_ips,
+ manage_vip => $enable_keepalived,
}
if $enable_pacemaker {
$pacemaker_cluster_members = regsubst(hiera('controller_node_ips'), ',', ' ', 'G')
- if $::hostname == downcase(hiera('bootstrap_nodeid')) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
user { 'hacluster':
ensure => present,
} ->
@@ -54,6 +56,19 @@ if hiera('step') >= 1 {
class { '::pacemaker::stonith':
disable => true,
}
+ if $pacemaker_master {
+ $control_vip = hiera('tripleo::loadbalancer::controller_virtual_ip')
+ pacemaker::resource::ip { 'control_vip':
+ ip_address => $control_vip,
+ }
+ $public_vip = hiera('tripleo::loadbalancer::public_virtual_ip')
+ pacemaker::resource::ip { 'public_vip':
+ ip_address => $public_vip,
+ }
+ pacemaker::resource::systemd { 'haproxy':
+ clone => true,
+ }
+ }
}
}
@@ -168,29 +183,46 @@ if hiera('step') >= 2 {
allowed_hosts => $allowed_hosts,
}
- $rabbit_nodes = split(downcase(hiera('rabbit_node_names', $::hostname)), ',')
- if count($rabbit_nodes) > 1 {
- $rabbit_cluster = true
- }
- else {
- $rabbit_cluster = false
- }
- class { 'rabbitmq':
- config_cluster => $rabbit_cluster,
- cluster_nodes => $rabbit_nodes,
- node_ip_address => hiera('controller_host'),
- }
- if $rabbit_cluster {
- rabbitmq_policy { 'ha-all@/':
- pattern => '^(?!amq\.).*',
- definition => {
- 'ha-mode' => 'all',
- 'ha-sync-mode' => 'automatic',
+ if $enable_pacemaker {
+ # the module ignores erlang_cookie if cluster_config is false
+ file { '/var/lib/rabbitmq/.erlang.cookie':
+ ensure => 'present',
+ owner => 'rabbitmq',
+ group => 'rabbitmq',
+ mode => '0400',
+ content => hiera('rabbitmq::erlang_cookie'),
+ replace => true,
+ } ->
+ class { '::rabbitmq':
+ service_manage => false,
+ environment_variables => {
+ 'RABBITMQ_NODENAME' => "rabbit@$::hostname",
},
}
- }
- rabbitmq_vhost { '/':
- provider => 'rabbitmqctl',
+ if $pacemaker_master {
+ pacemaker::resource::ocf { 'rabbitmq':
+ resource_name => 'heartbeat:rabbitmq-cluster',
+ options => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'',
+ clone => true,
+ require => Class['::rabbitmq'],
+ }
+ }
+ } else {
+ $rabbit_nodes = split(hiera('rabbit_node_ips'), ',')
+ if count($rabbit_nodes) > 1 {
+ class { '::rabbitmq':
+ config_cluster => true,
+ cluster_nodes => $rabbit_nodes,
+ }
+ rabbitmq_policy { 'ha-all@/':
+ pattern => '^(?!amq\.).*',
+ definition => {
+ 'ha-mode' => 'all',
+ },
+ }
+ } else {
+ include ::rabbitmq
+ }
}
# pre-install swift here so we can build rings
diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml
index edceba97..3e01fe77 100644
--- a/puppet/swift-storage-post.yaml
+++ b/puppet/swift-storage-post.yaml
@@ -37,3 +37,12 @@ resources:
properties:
servers: {get_param: servers}
config: {get_resource: StorageRingbuilderPuppetConfig}
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ depends_on: StorageRingbuilderDeployment_Step2
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
+