Puppet Class: scaleio::mdm::installation
- Inherits:
- scaleio
- Defined in:
- manifests/mdm/installation.pp
Overview
install the MDM package either for an MDM or a TB and set the corresponding role
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'manifests/mdm/installation.pp', line 3
class scaleio::mdm::installation(
$is_tiebreaker = true,
$mdm_tb_ip = $is_tiebreaker ?{
true => $::scaleio::current_tb_ip,
false => $::scaleio::current_mdm_ip,
default => false,
}
) inherits scaleio{
ensure_packages(['python'])
# only do a new installation of the package
package_verifiable{ 'EMC-ScaleIO-mdm':
version => $scaleio::version,
manage_package => !$package_emc_scaleio_mdm_version,
tag => 'scaleio-install',
require => [Package['python'], Package['numactl']],
}
$actor_role_is_manager = $is_tiebreaker ? {
true => '0',
false => '1',
}
# set the actor role to manager
file_line { 'scaleio::mdm::installation::actor':
path => '/opt/emc/scaleio/mdm/cfg/conf.txt',
line => "actor_role_is_manager=${actor_role_is_manager}",
match => '^actor_role_is_manager=',
require => Package_verifiable['EMC-ScaleIO-mdm'],
} ~>
exec{ 'scaleio::mdm::installation::restart_mdm':
# give the mdm time to switch its role
command => 'systemctl restart mdm.service; sleep 15',
refreshonly => true,
}
if $scaleio::use_consul {
include ::consul
consul_kv{ "scaleio/${::scaleio::system_name}/cluster_setup/${mdm_tb_ip}":
value => 'ready',
require => Exec['scaleio::mdm::installation::restart_mdm'],
}
}
}
|