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',
# HAPROXY
$haproxy_controller_hosts = undef,
$haproxy_controller_ips = undef,
# RABBITMQ
$rabbit_hostname = undef,
$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,
mysql_cluster_servers => $hostnames,
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_servers => $haproxy_percona_servers,
# controller_hosts => $haproxy_controller_hosts,
# controller_ips => $haproxy_controller_ips,
# main_address => $main_address,
# admin_address => $admin_address,
# }
# class { 'iaas::profile::keepalived':
# state => $keepalived_state,
# priority => $keepalived_priority,
# }
# class { 'iaas::profile::rabbitmq':
# node_hostname => $rabbit_hostname,
# }
# class { 'iaas::profile::zookeeper':
# zookeeper_id => $zookeeper_id
# }
# class { 'iaas::profile::mongodb':
# master => $mongo_master,
# bootstrap => $mongo_bootstrap,
# }