Decouple server from graphite manifest
It involves a removal of openstack_project::graphite class because it's not adding any extra functionality than calling directly to graphite puppet module. Change-Id: Ibb15ac85f428f43521c22bba6083889f27305b19
This commit is contained in:
parent
04c2028603
commit
0a527c42e9
@ -230,14 +230,24 @@ node 'puppetdb.openstack.org' {
|
|||||||
|
|
||||||
# Node-OS: precise
|
# Node-OS: precise
|
||||||
node 'graphite.openstack.org' {
|
node 'graphite.openstack.org' {
|
||||||
class { 'openstack_project::graphite':
|
$statsd_hosts = ['logstash.openstack.org',
|
||||||
sysadmins => hiera('sysadmins', []),
|
'nodepool.openstack.org',
|
||||||
|
'zuul.openstack.org']
|
||||||
|
|
||||||
|
# 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_rules6 => $rules,
|
||||||
|
iptables_rules4 => $rules,
|
||||||
|
sysadmins => hiera('sysadmins', [])
|
||||||
|
}
|
||||||
|
|
||||||
|
class { '::graphite':
|
||||||
graphite_admin_user => hiera('graphite_admin_user', 'username'),
|
graphite_admin_user => hiera('graphite_admin_user', 'username'),
|
||||||
graphite_admin_email => hiera('graphite_admin_email', 'email@example.com'),
|
graphite_admin_email => hiera('graphite_admin_email', 'email@example.com'),
|
||||||
graphite_admin_password => hiera('graphite_admin_password', 'XXX'),
|
graphite_admin_password => hiera('graphite_admin_password', 'XXX'),
|
||||||
statsd_hosts => ['logstash.openstack.org',
|
|
||||||
'nodepool.openstack.org',
|
|
||||||
'zuul.openstack.org'],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
# Class to configure graphite on a node.
|
|
||||||
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_rules6 => $rules,
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user