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(
# GLOBAL
$hostnames = ['<hostname1>','<hostnameN>'],
# MYSQL
$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',
# MONGODB
$mongo_master = false,
$mongo_bootstrap = false,
# KEEPALIVED
$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
$zookeeper_id = undef,
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::main_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::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':
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':
# zookeeper_id => $zookeeper_id
# }
# class { 'iaas::profile::mongodb':
# master => $mongo_master,
# bootstrap => $mongo_bootstrap,
# }