Merge "Move out server class from elasticsearch_node.pp"
This commit is contained in:
commit
2966b2e221
@ -461,10 +461,18 @@ node /^subunit-worker\d+\.openstack\.org$/ {
|
||||
# Node-OS: precise
|
||||
node /^elasticsearch0[1-7]\.openstack\.org$/ {
|
||||
$group = "elasticsearch"
|
||||
class { 'openstack_project::elasticsearch_node':
|
||||
$iptables_nodes_rule = regsubst ($elasticsearch_nodes,
|
||||
'^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 9200:9400 -s \1 -j ACCEPT')
|
||||
$iptables_clients_rule = regsubst ($elasticsearch_clients,
|
||||
'^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 9200:9400 -s \1 -j ACCEPT')
|
||||
$iptables_rule = flatten([$iptables_nodes_rule, $iptables_clients_rule])
|
||||
class { 'openstack_project::server':
|
||||
iptables_public_tcp_ports => [22],
|
||||
iptables_rules6 => $iptables_rule,
|
||||
iptables_rules4 => $iptables_rule,
|
||||
sysadmins => hiera('sysadmins', []),
|
||||
elasticsearch_nodes => $elasticsearch_nodes,
|
||||
elasticsearch_clients => $elasticsearch_clients,
|
||||
}
|
||||
class { 'openstack_project::elasticsearch_node':
|
||||
discover_nodes => $elasticsearch_nodes,
|
||||
}
|
||||
}
|
||||
|
@ -15,22 +15,9 @@
|
||||
# Elasticsearch server glue class.
|
||||
#
|
||||
class openstack_project::elasticsearch_node (
|
||||
$elasticsearch_nodes = [],
|
||||
$elasticsearch_clients = [],
|
||||
$discover_nodes = ['localhost'],
|
||||
$heap_size = '30g',
|
||||
$sysadmins = []
|
||||
) {
|
||||
$iptables_nodes_rule = regsubst ($elasticsearch_nodes, '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 9200:9400 -s \1 -j ACCEPT')
|
||||
$iptables_clients_rule = regsubst ($elasticsearch_clients, '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 9200:9400 -s \1 -j ACCEPT')
|
||||
$iptables_rule = flatten([$iptables_nodes_rule, $iptables_clients_rule])
|
||||
class { 'openstack_project::server':
|
||||
iptables_public_tcp_ports => [22],
|
||||
iptables_rules6 => $iptables_rule,
|
||||
iptables_rules4 => $iptables_rule,
|
||||
sysadmins => $sysadmins,
|
||||
}
|
||||
|
||||
class { 'logstash::elasticsearch': }
|
||||
|
||||
class { '::elasticsearch':
|
||||
|
Loading…
Reference in New Issue
Block a user