From a230a09d8f68b3efe34b9c53dd14e244d5296a1a Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 16 Apr 2015 15:39:12 +0000 Subject: [PATCH] Add redirects from ci.o.o to docs.o.o/infra We're moving the content of http://ci.openstack.org to http://docs.openstack.org/infra and will use this to redirect old deep links once the content is in place. It's safe to land this in the meantime since it won't be hit until we switch DNS for ci.openstack.org. Change-Id: I6c6091e1dd18931211691972c408db8f3bf81719 --- modules/openstack_project/manifests/static.pp | 17 +++++--------- .../openstack_project/templates/ci.vhost.erb | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 modules/openstack_project/templates/ci.vhost.erb diff --git a/modules/openstack_project/manifests/static.pp b/modules/openstack_project/manifests/static.pp index 826ba2aee9..54cd561760 100644 --- a/modules/openstack_project/manifests/static.pp +++ b/modules/openstack_project/manifests/static.pp @@ -62,20 +62,13 @@ class openstack_project::static ( } ########################################################### - # CI + # legacy ci.openstack.org site redirect apache::vhost { 'ci.openstack.org': - port => 80, - priority => '50', - docroot => '/srv/static/ci', - require => File['/srv/static/ci'], - } - - file { '/srv/static/ci': - ensure => directory, - owner => 'jenkins', - group => 'jenkins', - require => User['jenkins'], + port => 80, + priority => '50', + docroot => 'MEANINGLESS_ARGUMENT', + template => 'openstack_project/ci.vhost.erb', } ########################################################### diff --git a/modules/openstack_project/templates/ci.vhost.erb b/modules/openstack_project/templates/ci.vhost.erb new file mode 100644 index 0000000000..8f87633062 --- /dev/null +++ b/modules/openstack_project/templates/ci.vhost.erb @@ -0,0 +1,22 @@ +# ************************************ +# Managed by Puppet +# ************************************ + +NameVirtualHost <%= @vhost_name %>:<%= @port %> +:<%= @port %>> + ServerName <%= @srvname %> + + RewriteEngine On + RewriteRule ^/jenkins-job-builder/(.*) http://docs.openstack.org/infra/jenkins-job-builder/$1 [last,redirect=permanent] + RewriteRule ^/nodepool/(.*) http://docs.openstack.org/infra/nodepool/$1 [last,redirect=permanent] + RewriteRule ^/openstackid/(.*) http://docs.openstack.org/infra/openstackid/$1 [last,redirect=permanent] + RewriteRule ^/shade/(.*) http://docs.openstack.org/infra/shade/$1 [last,redirect=permanent] + RewriteRule ^/storyboard/(.*) http://docs.openstack.org/infra/storyboard/$1 [last,redirect=permanent] + RewriteRule ^/zuul/(.*) http://docs.openstack.org/infra/zuul/$1 [last,redirect=permanent] + RewriteRule ^/(.*) http://docs.openstack.org/infra/system-config/$1 [last,redirect=permanent] + + ErrorLog /var/log/apache2/<%= @name %>_error.log + LogLevel warn + CustomLog /var/log/apache2/<%= @name %>_access.log combined + ServerSignature Off +