summaryrefslogtreecommitdiff
path: root/puppet/modules/site_shorewall/manifests/couchdb.pp
blob: 1ef91bb08b20eafebe838ae9baac286b4c78ab97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class site_shorewall::couchdb {

  include site_shorewall::defaults

  $stunnel = hiera('stunnel')
  $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}",
    notify  => Service['shorewall'],
    require => Package['shorewall']
  }

  shorewall::rule {
      'net2fw-couchdb':
        source      => 'net',
        destination => '$FW',
        action      => 'leap_couchdb(ACCEPT)',
        order       => 200;
  }

}