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(
Alessandro Costantini
committed
$main_address = $iaas::params::main_address,
$admin_address = $iaas::params::admin_address,
$public_interface = $iaas::params::public_interface,
$admin_interface = $iaas::params::admin_interface,
$hostnames = ['<hostname1>','<hostnameN>'],
$ips = ['<ip1>','<ipN>'],
Alessandro Costantini
committed
$dns_servers = $iaas::params::dns_servers,
$dns_searchdomain = $iaas::params::dns_searchdomain,
$percona_master = false,
$mysql_root_pwd = undef,
$keystone_pwd = 'keystone',
$glance_pwd = 'glance',
$nova_pwd = 'nova',
$cinder_pwd = 'cinder',
$neutron_pwd = 'neutron',
$heat_pwd = 'heat',
$mongo_master = false,
$mongo_bootstrap = false,
$mongo_key = 'Uf+8s0LbxIxNrbyEC1kw',
$mongo_password = undef,
$ceilometer_pwd = 'ceilometer',
$keepalived_priority = 100,
$keepalived_state = 'BACKUP',
$keepalived_notification_mail = 'account@domain1',
$keepalived_notification_mail_from = 'noreply-keepalived-ocpops1@cnaf.infn.it',
$keepalived_smtp_server = 'smtp.server1',
$haproxy_controller_hosts = ['<hostname1>','<hostnameN>'],
$haproxy_controller_ips = ['<ip1>','<ipN>'],
$rabbit_hostname = $hostname,
$rabbit_user = 'openstack',
$rabbit_password = 'openstack',
$rabbit_erlang = 'JTZEOFFHPRJOTLUWEFQR',
$zookeeper_id = undef,
class { 'iaas::profile::base':
Alessandro Costantini
committed
dns_servers => $dns_servers,
dns_searchdomain => $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,
Alessandro Costantini
committed
main_address => $main_address,
admin_address => $admin_address,
class { 'iaas::profile::keepalived':
Alessandro Costantini
committed
admin_interface => $admin_interface,
public_interface => $public_interface,
vip_admin_address => $admin_address,
vip_main_address => $main_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':
Alessandro Costantini
committed
admin_interface => $admin_interface,
node_hostname => $rabbit_hostname,
servers => $hostnames,
user => $rabbit_user,
password => $rabbit_password,
erlang => $rabbit_erlang,
}
class { 'iaas::profile::zookeeper':
Alessandro Costantini
committed
admin_interface => $admin_interface,
servers => $hostnames,
zookeeper_max_connections => 128,
zookeeper_id => $zookeeper_id
}
class { 'iaas::profile::mongodb':
Alessandro Costantini
committed
admin_interface => $admin_interface,
hosts => $hostnames,
master => $mongo_master,
bootstrap => $mongo_bootstrap,
key => $mongo_key,
password => $mongo_password,
mongouser => 'ceilometer',
mongopasswd => $ceilometer_pwd,
}