summaryrefslogtreecommitdiff
path: root/puppet/modules/site_shorewall
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_shorewall')
-rw-r--r--puppet/modules/site_shorewall/manifests/couchdb.pp5
-rw-r--r--puppet/modules/site_shorewall/manifests/couchdb/bigcouch.pp21
2 files changed, 19 insertions, 7 deletions
diff --git a/puppet/modules/site_shorewall/manifests/couchdb.pp b/puppet/modules/site_shorewall/manifests/couchdb.pp
index 1ef91bb0..73bed62b 100644
--- a/puppet/modules/site_shorewall/manifests/couchdb.pp
+++ b/puppet/modules/site_shorewall/manifests/couchdb.pp
@@ -6,12 +6,9 @@ class site_shorewall::couchdb {
$couch_server = $stunnel['couch_server']
$couch_stunnel_port = $couch_server['accept']
- # see http://stackoverflow.com/questions/8459949/bigcouch-cluster-connection-issue#comment10467603_8463814
- $erlang_vm_port = '9001'
-
# define macro for incoming services
file { '/etc/shorewall/macro.leap_couchdb':
- content => "PARAM - - tcp ${couch_stunnel_port},${erlang_vm_port}",
+ content => "PARAM - - tcp ${couch_stunnel_port}",
notify => Service['shorewall'],
require => Package['shorewall']
}
diff --git a/puppet/modules/site_shorewall/manifests/couchdb/bigcouch.pp b/puppet/modules/site_shorewall/manifests/couchdb/bigcouch.pp
index a8320df8..20740650 100644
--- a/puppet/modules/site_shorewall/manifests/couchdb/bigcouch.pp
+++ b/puppet/modules/site_shorewall/manifests/couchdb/bigcouch.pp
@@ -3,15 +3,22 @@ class site_shorewall::couchdb::bigcouch {
include site_shorewall::defaults
$stunnel = hiera('stunnel')
- $epmd_clients = $stunnel['epmd_clients']
+ # Erlang Port Mapper Daemon (epmd) stunnel server/clients
+ $epmd_clients = $stunnel['epmd_clients']
$epmd_server = $stunnel['epmd_server']
$epmd_server_port = $epmd_server['accept']
$epmd_server_connect = $epmd_server['connect']
+ # Erlang Distributed Node Protocol (ednp) stunnel server/clients
+ $ednp_clients = $stunnel['ednp_clients']
+ $ednp_server = $stunnel['ednp_server']
+ $ednp_server_port = $ednp_server['accept']
+ $ednp_server_connect = $ednp_server['connect']
+
# define macro for incoming services
file { '/etc/shorewall/macro.leap_bigcouch':
- content => "PARAM - - tcp ${epmd_server_port}",
+ content => "PARAM - - tcp ${epmd_server_port},${ednp_server_port}",
notify => Service['shorewall'],
require => Package['shorewall']
}
@@ -24,13 +31,21 @@ class site_shorewall::couchdb::bigcouch {
order => 300;
}
+ # setup DNAT rules for each epmd
$epmd_shorewall_dnat_defaults = {
'source' => '$FW',
'proto' => 'tcp',
'destinationport' => regsubst($epmd_server_connect, '^([0-9.]+:)([0-9]+)$', '\2')
}
-
create_resources(site_shorewall::couchdb::dnat, $epmd_clients, $epmd_shorewall_dnat_defaults)
+ # setup DNAT rules for each ednp
+ $ednp_shorewall_dnat_defaults = {
+ 'source' => '$FW',
+ 'proto' => 'tcp',
+ 'destinationport' => regsubst($ednp_server_connect, '^([0-9.]+:)([0-9]+)$', '\2')
+ }
+ create_resources(site_shorewall::couchdb::dnat, $ednp_clients, $ednp_shorewall_dnat_defaults)
+
}