Add debug mirror
authorPeter Palfrader <peter@palfrader.org>
Sun, 20 Dec 2015 11:55:01 +0000 (12:55 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sun, 20 Dec 2015 11:55:01 +0000 (12:55 +0100)
hieradata/common.yaml
modules/roles/manifests/debug_mirror.pp [new file with mode: 0644]
modules/roles/manifests/init.pp
modules/roles/templates/apache-debug.mirrors.debian.org.conf.erb [new file with mode: 0644]

index 1b9d846..0e85c99 100644 (file)
@@ -170,3 +170,6 @@ roles:
     - gombert.debian.org
   veyepar.debian.org:
     - vittoria.debian.org
+  mirror_debug:
+    - klecker.debian.org
+    - mirror-isc.debian.org
diff --git a/modules/roles/manifests/debug_mirror.pp b/modules/roles/manifests/debug_mirror.pp
new file mode 100644 (file)
index 0000000..c2ec74a
--- /dev/null
@@ -0,0 +1,11 @@
+class roles::debug_mirror {
+       $vhost_listen = $::hostname ? {
+               klecker => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80',
+               default => '*:80',
+       }
+
+       apache2::site { '010-debug.mirrors.debian.org':
+               site   => 'debug.mirrors.debian.org',
+               content => template('roles/apache-debug.mirrors.debian.org.erb'),
+       }
+}
index aaada64..fb46df7 100644 (file)
@@ -69,6 +69,10 @@ class roles {
                include roles::www_mirror
        }
 
+       if has_role('mirror_debug') {
+               include roles::debug_mirror
+       }
+
        if has_role('ftp.d.o') {
                include roles::ftp
        }
diff --git a/modules/roles/templates/apache-debug.mirrors.debian.org.conf.erb b/modules/roles/templates/apache-debug.mirrors.debian.org.conf.erb
new file mode 100644 (file)
index 0000000..58f7de0
--- /dev/null
@@ -0,0 +1,26 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+<VirtualHost 130.89.148.14:80 [2001:610:1908:b000::148:14]:80>
+<VirtualHost <%= vhost_listen %> >
+        ServerAdmin webmaster@debian.org
+        ServerName debug.mirrors.debian.org
+
+        RedirectMatch "^/$" /debian-debug/
+        Alias /debian-debug /srv/mirrors/debian-debug
+
+        ErrorLog /var/log/apache2/debug.mirrors.debian.org-error.log
+        LogLevel warn
+        CustomLog /var/log/apache2/debug.mirrors.debian.org-access.log privacy
+
+        <Directory /srv/mirrors/debian-debug>
+                Require all granted
+                IndexOptions NameWidth=* +SuppressDescription
+                Options +Indexes
+                Options +FollowSymLinks
+        </Directory>
+</VirtualHost>
+
+