Newer
Older
# == Class iaas::role::rhmk
#
# Ruolo RHMK (RabbitMQ, HAproxy, MySql/Mongodb, Keepalived).
# https://support.ba.infn.it/redmine/projects/automaticocp/wiki/Keepalived_HAProxy_MySQLPercona_e_RabbitMQ_in_HA_su_testbed_Puppet
#
# === Parameters:
#
# [*percona_master*]
# Default a false. Da settare a true per avviare percona in bootstrap mode.
# [*mongo_master*]
#
class iaas::role::rhmk(
$hostnames = $iaas::params::hostnames,
$ips = $iaas::params::ips,
$percona_master = $iaas::params::percona_master,
$mysql_root_pwd = $iaas::params::mysql_root_pwd,
$keystone_pwd = $iaas::params::keystone_pwd,
$glance_pwd = $iaas::params::glance_pwd,
$nova_pwd = $iaas::params::nova_pwd,
$cinder_pwd = $iaas::params::cinder_pwd,
$neutron_pwd = $iaas::params::neutron_pwd,
$heat_pwd = $iaas::params::heat_pwd,
$mongo_master = $iaas::params::mongo_master,
$mongo_bootstrap = $iaas::params::mongo_bootstrap,
$mongo_key = $iaas::params::mongo_key,
$mongo_password = $iaas::params::mongo_password,
$ceilometer_pwd = $iaas::params::ceilometer_pwd,
$keepalived_priority = $iaas::params::keepalived_priority,
$keepalived_state = $iaas::params::keepalived_state,
$keepalived_notification_mail = $iaas::params::keepalived_notification_mail,
$keepalived_notification_mail_from = $iaas::params::keepalived_notification_mail_from,
$keepalived_smtp_server = $iaas::params::keepalived_smtp_server,
$haproxy_controller_hosts = $iaas::params::haproxy_controller_hosts,
$haproxy_controller_ips = $iaas::params::haproxy_controller_ips,
$rabbit_hostname = $iaas::params::rabbit_hostname,
$rabbit_user = $iaas::params::rabbit_user,
$rabbit_password = $iaas::params::rabbit_password,
$rabbit_erlang = $iaas::params::rabbit_erlang,
$zookeeper_id = $iaas::params::zookeeper_id,
class { 'iaas::profile::base':
dns_servers => $iaas::params::dns_servers,
dns_searchdomain => $iaas::params::dns_searchdomain,
} ->
class { 'iaas::profile::database':
percona_master => $percona_master,
root_password => $mysql_root_pwd,
keystone_pwd => $keystone_pwd,
glance_pwd => $glance_pwd,
nova_pwd => $nova_pwd,
cinder_pwd => $cinder_pwd,
neutron_pwd => $neutron_pwd,
heat_pwd => $heat_pwd,
} ->
class { 'iaas::profile::haproxy':
percona_hosts => $hostnames,
percona_ips => $ips,
controller_hosts => $haproxy_controller_hosts,
controller_ips => $haproxy_controller_ips,
main_address => $iaas::params::public_address,
admin_address => $iaas::params::admin_address,
}
class { 'iaas::profile::keepalived':
admin_interface => $iaas::params::admin_interface,
public_interface => $iaas::params::public_interface,
vip_admin_address => $iaas::params::admin_address,
vip_main_address => $iaas::params::public_address,
state => $keepalived_state,
priority => $keepalived_priority,
notification_email => $notification_email,
notification_email_from => $notification_email_from,
smtp_server => $smtp_server,
}
class { 'iaas::profile::rabbitmq':
admin_interface => $iaas::params::admin_interface,
node_hostname => $rabbit_hostname,
servers => $hostnames,
user => $rabbit_user,
password => $rabbit_password,
erlang => $rabbit_erlang,
}
class { 'iaas::profile::zookeeper':
admin_interface => $iaas::params::admin_interface,
servers => $hostnames,
zookeeper_max_connections => 128,
zookeeper_id => $zookeeper_id
}
class { 'iaas::profile::mongodb':
admin_interface => $iaas::params::admin_interface,
hosts => $hostnames,
master => $mongo_master,
bootstrap => $mongo_bootstrap,
key => $mongo_key,
password => $mongo_password,
mongouser => 'ceilometer',
mongopasswd => $ceilometer_pwd,
}