Class cluster as separate step

Move the class cluster out of controller.pp

Related blueprint fuel-library-modularization
Change-Id: I43dbccc2b5ad16e607dd8fa8b157f2ee7df5c38c
This commit is contained in:
Stanislav Makar 2015-02-02 13:58:23 +00:00 committed by Aleksandr Didenko
parent 6435016559
commit d5668d4255
5 changed files with 23 additions and 25 deletions

View File

@ -57,17 +57,4 @@ class cluster (
Package['corosync'] -> File['ocf-fuel-path']
Package<| title == 'pacemaker' |> -> File['ocf-fuel-path']
file { 'ns-ipaddr2-ocf':
path =>'/usr/lib/ocf/resource.d/fuel/ns_IPaddr2',
mode => '0755',
owner => root,
group => root,
source => 'puppet:///modules/cluster/ocf/ns_IPaddr2',
}
Package['pacemaker'] -> File['ns-ipaddr2-ocf']
File<| title == 'ocf-fuel-path' |> -> File['ns-ipaddr2-ocf']
}
#
###

View File

@ -126,8 +126,6 @@ class mysql::server (
unless => "test -d $mysql::params::datadir/mysql",
}
Class['openstack::corosync'] -> Cs_resource["p_${service_name}"]
file { '/tmp/repl_create.sql' :
ensure => present,
content => template('mysql/repl_create.sql.erb'),

View File

@ -0,0 +1,6 @@
notice('MODULAR: cluster.pp')
class { '::cluster':
internal_address => hiera('internal_address'),
unicast_addresses => ipsort(values(hiera('controller_internal_addresses'))),
}

View File

@ -0,0 +1,9 @@
- id: cluster
type: puppet
groups: [primary-controller, controller]
required_for: [top-role-controller, deploy]
requires: [hosts, firewall]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/cluster/cluster.pp
puppet_modules: /etc/puppet/modules
timeout: 3600

View File

@ -483,6 +483,14 @@ class compact_controller (
}
class virtual_ips () {
file { 'ns-ipaddr2-ocf':
path =>'/usr/lib/ocf/resource.d/fuel/ns_IPaddr2',
mode => '0755',
owner => root,
group => root,
source => 'puppet:///modules/cluster/ocf/ns_IPaddr2',
}
cluster::virtual_ips { $::vip_keys:
vips => $::vips,
}
@ -551,13 +559,6 @@ if $use_ceph {
#################################################################
include osnailyfacter::test_controller
class { '::cluster':
stage => 'corosync_setup',
internal_address => $::internal_address,
unicast_addresses => $::controller_nodes,
}
Class['::cluster']->
class { 'virtual_ips' :
stage => 'corosync_setup',
}
@ -889,9 +890,6 @@ package { 'screen':
ensure => present,
}
# Make corosync and pacemaker setup and configuration before all services provided by pacemaker
Class['openstack::corosync'] -> Service<| provider=='pacemaker' |>
# Reduce swapiness on controllers, see LP#1413702
sysctl::value { 'vm.swappiness':
value => "10"