diff options
author | Micah Anderson <micah@riseup.net> | 2013-04-04 12:50:30 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-04-04 12:50:30 -0400 |
commit | 2c53c5023b925cb596e3f450f194482eade1fbeb (patch) | |
tree | 2f29b02cf9be45209212bd08cfa453554b97e264 /puppet/modules/site_shorewall | |
parent | c228491af3929e07766903c3ce29a06fab86ad63 (diff) |
add Erlang Distributed Node Protocol Port json entry under bigcouch
setup ednp_server and ednp_client stunnels
update couchdb puppet submodule to support configurable ednp_port parameter and general module cleanup
pass ednp_port to couchdb setup so that it is configured in the vm.args template
clarify in comments the difference between the epmd and ednp ports
remove hard-coded erlang_vm_port variable and instead setup shorewall to allow for the stunnel connection only
setup dnat rules for the ednp client connections
Diffstat (limited to 'puppet/modules/site_shorewall')
-rw-r--r-- | puppet/modules/site_shorewall/manifests/couchdb.pp | 5 | ||||
-rw-r--r-- | puppet/modules/site_shorewall/manifests/couchdb/bigcouch.pp | 21 |
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) + } |