port 6081 should be allowed via snapshot
[mirror/dsa-puppet.git] / modules / roles / manifests / snapshot_web.pp
index be21714..b4d6703 100644 (file)
@@ -29,9 +29,8 @@ class roles::snapshot_web {
                }
        }
 
-       @ferm::rule { 'dsa-snapshot-varnish-v4':
-               rule  => '&SERVICE(tcp, 6081)',
-       }
+       # varnish cache
+       ###############
        @ferm::rule { 'dsa-nat-snapshot-varnish-v4':
                table => 'nat',
                chain => 'PREROUTING',
@@ -47,6 +46,7 @@ class roles::snapshot_web {
                content => template('roles/snapshot/snapshot.debian.org.vcl.erb'),
        }
 
+       # the ipv6 port 80 is owned by varnish
        file { '/etc/apache2/ports.conf':
                content  => @("EOF"),
                        Listen 0.0.0.0:80
@@ -55,4 +55,17 @@ class roles::snapshot_web {
                require => Package['apache2'],
                notify  => Service['apache2'],
        }
+
+       # haproxy ssl termination
+       #########################
+       include haproxy
+       file { '/etc/haproxy/haproxy.cfg':
+               content => template('roles/snapshot/haproxy.cfg.erb'),
+               require => Package['haproxy'],
+               notify  => Service['haproxy'],
+       }
+       ssl::service { 'snapshot.debian.org':
+               notify  => Service['haproxy'],
+               key => true,
+       }
 }