From: Peter Palfrader Date: Sun, 12 Jul 2015 15:35:59 +0000 (+0200) Subject: Add cgit for dgit (RT#5866) X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=e77736cb289ed2b2d3faf3f223a73cc43fad1f98;p=mirror%2Fdsa-puppet.git Add cgit for dgit (RT#5866) --- diff --git a/hieradata/common.yaml b/hieradata/common.yaml index af8c675e0..dfb82e1cf 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -38,6 +38,8 @@ roles: - coccia.debian.org api.ftp-master: - coccia.debian.org + dgit_browse: + - cgi-grnet-01.debian.org git_master: - adayevskaya.debian.org keyring: diff --git a/modules/roles/files/dgit/browse.dgit.debian.org b/modules/roles/files/dgit/browse.dgit.debian.org new file mode 100644 index 000000000..51c9dfd16 --- /dev/null +++ b/modules/roles/files/dgit/browse.dgit.debian.org @@ -0,0 +1,30 @@ +#Use common-dsa-vhost-https-redirect browse.dgit.debian.org + + + ServerName browse.dgit.debian.org + ServerAdmin dgit-owner@debian.org + + ErrorLog /var/log/apache2/browse.dgit.debian.org-ssl-error.log + CustomLog /var/log/apache2/browse.dgit.debian.org-ssl-access.log privacy + + #Use common-debian-service-ssl lintian.debian.org + #Use common-ssl-HSTS + + + UserDir disabled + + + Alias /cgit-css "/usr/share/cgit/" + Alias /static "/srv/dgit.debian.org/static" + ScriptAlias / "/usr/lib/cgit/cgit.cgi/" + + AllowOverride None + Options ExecCGI FollowSymlinks + + + AddOutputFilterByType DEFLATE text/html text/plain text/xml text/x-js text/javascript text/css + AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/x-javascript application/javascript + AddOutputFilterByType DEFLATE application/json + + +# vim:set syntax=apache: diff --git a/modules/roles/files/dgit/cgitrc b/modules/roles/files/dgit/cgitrc new file mode 100644 index 000000000..a73a785e0 --- /dev/null +++ b/modules/roles/files/dgit/cgitrc @@ -0,0 +1,25 @@ +# +# cgit config +# see cgitrc(5) for details + +css=/cgit-css/cgit.css +logo=/cgit-css/cgit.png + +root-title=gitweb.debian.org +root-desc=debian dgit's repository browser +logo=/static/logo.jpg + +enable-commit-graph=1 +enable-http-clone=0 + +source-filter=/usr/lib/cgit/filters/syntax-highlighting.py +mimetype.gif=image/gif +mimetype.html=text/html +mimetype.jpg=image/jpeg +mimetype.jpeg=image/jpeg +mimetype.pdf=application/pdf +mimetype.png=image/png +mimetype.svg=image/svg+xml + +max-repo-count=999999 +include=/srv/dgit.debian.org/etc/projects.cgit diff --git a/modules/roles/manifests/dgit_browse.pp b/modules/roles/manifests/dgit_browse.pp new file mode 100644 index 000000000..686c7f7f5 --- /dev/null +++ b/modules/roles/manifests/dgit_browse.pp @@ -0,0 +1,20 @@ +class roles::dgit_browse { + #ssl::service { 'wiki.debian.org': + # notify => Service['apache2'], + #} + #rsync::site { 'wiki': + # source => 'puppet:///modules/roles/wiki/rsyncd.conf', + #} + + package { 'cgi': ensure => installed, } + + file { '/etc/cgitrc': + source => 'puppet:///modules/roles/dgit/cgitrc', + } + + apache2::site { '010-browse.dgit.debian.org': + site => 'browse.dgit.debian.org', + source => 'puppet:///modules/roles/dgit/browse.dgit.debian.org', + } + +} diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index a4ef5967f..09de1f91e 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -247,4 +247,8 @@ class roles { if has_role('search_frontend') { include search_frontend } + + if has_role('dgit_browse') { + include dgit_browse + } }