3cab5e4d84
Change-Id: I276641d55e966cd76013cae847061c3ac7996864 Reviewed-on: https://review.openstack.org/17094 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
27 lines
879 B
Puppet
27 lines
879 B
Puppet
# Class to configure graphite on a node.
|
|
# Takes a list of sysadmin email addresses as a parameter. Exim will be
|
|
# configured to email cron spam and other alerts to this list of admins.
|
|
class openstack_project::graphite (
|
|
$sysadmins = [],
|
|
$graphite_admin_user = '',
|
|
$graphite_admin_email = '',
|
|
$graphite_admin_password ='',
|
|
$statsd_hosts = [],
|
|
) {
|
|
|
|
# Turn a list of hostnames into a list of iptables rules
|
|
$rules = regsubst ($statsd_hosts, '^(.*)$', '-m udp -p udp -s \1 --dport 8125 -j ACCEPT')
|
|
|
|
class { 'openstack_project::server':
|
|
iptables_public_tcp_ports => [80, 443],
|
|
iptables_rules4 => $rules,
|
|
sysadmins => $sysadmins,
|
|
}
|
|
|
|
class { '::graphite':
|
|
graphite_admin_user => $graphite_admin_user,
|
|
graphite_admin_email => $graphite_admin_email,
|
|
graphite_admin_password => $graphite_admin_password,
|
|
}
|
|
}
|