git.dgit
authorPeter Palfrader <peter@palfrader.org>
Mon, 13 Jul 2015 14:51:59 +0000 (16:51 +0200)
committerPeter Palfrader <peter@palfrader.org>
Mon, 13 Jul 2015 14:51:59 +0000 (16:51 +0200)
hieradata/common.yaml
modules/roles/files/dgit/git.dgit.debian.org [new file with mode: 0644]
modules/roles/manifests/dgit_git.pp [new file with mode: 0644]
modules/roles/manifests/init.pp

index dfb82e1..b4e63df 100644 (file)
@@ -40,6 +40,8 @@ roles:
     - coccia.debian.org
   dgit_browse:
     - cgi-grnet-01.debian.org
+  dgit_git:
+    - cgi-grnet-01.debian.org
   git_master:
     - adayevskaya.debian.org
   keyring:
diff --git a/modules/roles/files/dgit/git.dgit.debian.org b/modules/roles/files/dgit/git.dgit.debian.org
new file mode 100644 (file)
index 0000000..4eafe3f
--- /dev/null
@@ -0,0 +1,37 @@
+#Use common-dsa-vhost-https-redirect git.dgit.debian.org
+
+<VirtualHost *:80>
+       ServerName git.dgit.debian.org
+       ServerAdmin dgit-owner@debian.org
+
+       ErrorLog /var/log/apache2/git.dgit.debian.org-ssl-error.log
+       CustomLog /var/log/apache2/git.dgit.debian.org-ssl-access.log privacy
+
+       #Use common-debian-service-ssl git.dgit.debian.org
+       #Use common-ssl-HSTS
+
+       <IfModule mod_userdir.c>
+               UserDir disabled
+       </IfModule>
+
+       DocumentRoot /srv/dgit.debian.org/unpriv/repos
+       <Directory /srv/dgit.debian.org/unpriv/repos>
+               AllowOverride None
+               Options SymlinksIfOwnerMatch Indexes
+               IndexOptions FancyIndexing NameWidth=*
+       </Directory>
+
+       SetEnv GIT_PROJECT_ROOT /srv/dgit.debian.org/unpriv/repos
+       AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$          /srv/dgit.debian.org/unpriv/repos/$1
+       AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /srv/dgit.debian.org/unpriv/repos/$1
+       ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
+
+       RewriteEngine On
+       RewriteRule ^/$ http://browse.dgit.debian.org/ [L,R=301]
+       RewriteRule ^/git/?$ http://browse.dgit.debian.org/ [L,R=301]
+
+       RewriteRule ^/git/ - [L]
+       RewriteRule ^/(.*) /git/$1 [PT,L]
+</VirtualHost>
+
+# vim:set syntax=apache:
diff --git a/modules/roles/manifests/dgit_git.pp b/modules/roles/manifests/dgit_git.pp
new file mode 100644 (file)
index 0000000..33838cd
--- /dev/null
@@ -0,0 +1,11 @@
+class roles::dgit_browse {
+       #ssl::service { 'git.dgit.debian.org':
+       #       notify => Service['apache2'],
+       #}
+
+       apache2::site { '010-git.dgit.debian.org':
+               site    => 'git.dgit.debian.org',
+               source => 'puppet:///modules/roles/dgit/git.dgit.debian.org',
+       }
+
+}
index 09de1f9..edf4d3e 100644 (file)
@@ -251,4 +251,7 @@ class roles {
        if has_role('dgit_browse') {
                include dgit_browse
        }
+       if has_role('dgit_git') {
+               include dgit_git
+       }
 }