From: Julien Cristau Date: Wed, 15 Aug 2018 06:31:18 +0000 (+0200) Subject: Prepare maintenance page for cdimage.d.o and friends X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=cf8d5329b22f25ab3c45f856742010b90ba0d061;p=mirror%2Fdsa-puppet.git Prepare maintenance page for cdimage.d.o and friends --- diff --git a/modules/roles/files/static-htdocs/cdimage-maintenance.html b/modules/roles/files/static-htdocs/cdimage-maintenance.html new file mode 100644 index 000000000..aa9bb9100 --- /dev/null +++ b/modules/roles/files/static-htdocs/cdimage-maintenance.html @@ -0,0 +1,18 @@ + + + + Service unavailable + + + +

Service unavailable

+ + The service you have requested is currently down for maintenance while our hosting partner performs some infrastructure work, see this message for details. +

+

+


+ DSA + + + + diff --git a/modules/roles/manifests/static_mirror.pp b/modules/roles/manifests/static_mirror.pp index 2dfc3336c..4bd30e3b0 100644 --- a/modules/roles/manifests/static_mirror.pp +++ b/modules/roles/manifests/static_mirror.pp @@ -235,4 +235,8 @@ class roles::static_mirror { ensure => absent, } + ssl::service { 'cdimage.debian.org': ensure => present, notify => Exec['service apache2 reload'], key => true, } + file { '/srv/static.debian.org/puppet/cdimage.debian.org/503.html': + source => 'puppet:///modules/roles/static-htdocs/cdimage-maintenance.html', + } } diff --git a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb index 943872840..67c2c6059 100644 --- a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb +++ b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb @@ -407,5 +407,48 @@ Use common-dsa-vhost-https-redirect archive.debian.net Use common-disabled-service + > + ServerName cdimage.debian.org + ServerAlias cloud.debian.org + ServerAlias get.debian.org + ServerAlias meetings-archive.debian.net + ServerAdmin debian-admin@debian.org + ErrorLog /var/log/apache2/cdimage.debian.org-error.log + CustomLog /var/log/apache2/cdimage.debian.org-access.log privacyssl + + + UserDir disabled + + DocumentRoot /srv/static.debian.org/puppet/cdimage.debian.org + + Require all granted + + RewriteEngine On + RewriteRule !^/503.html / [R=503] + ErrorDocument 503 /503.html + + + > + ServerName cdimage.debian.org + ServerAlias cloud.debian.org + ServerAlias get.debian.org + ServerAlias meetings-archive.debian.net + ServerAdmin debian-admin@debian.org + ErrorLog /var/log/apache2/cdimage.debian.org-error.log + CustomLog /var/log/apache2/cdimage.debian.org-access.log privacyssl + Use common-debian-service-ssl cdimage.debian.org + + + UserDir disabled + + DocumentRoot /srv/static.debian.org/puppet/cdimage.debian.org + + Require all granted + + RewriteEngine On + RewriteRule !^/503.html / [R=503] + ErrorDocument 503 /503.html + + # vim:ft=apache: