Added wheel hosting for AFS mirror slave
This patch adds a vhost that exposes /afs/openstack.org/mirror/wheel to the internet under <hostname>/wheel. It also adds appropriate rewrite rules. Change-Id: Id514a76f7759b663b2ea3a3ec4aa2dfe083d6666
This commit is contained in:
parent
320dd74280
commit
b107426201
@ -6,6 +6,8 @@ class openstack_project::mirror (
|
||||
|
||||
$mirror_root = '/afs/.openstack.org/mirror'
|
||||
$pypi_root = "${mirror_root}/pypi"
|
||||
$wheel_root = "${mirror_root}/wheel"
|
||||
|
||||
$www_base = '/var/www'
|
||||
$www_root = "${www_base}/mirror"
|
||||
|
||||
@ -37,6 +39,17 @@ class openstack_project::mirror (
|
||||
]
|
||||
}
|
||||
|
||||
# Create the symlink to wheel.
|
||||
file { "${www_root}/wheel":
|
||||
ensure => link,
|
||||
target => "${wheel_root}",
|
||||
owner => root,
|
||||
group => root,
|
||||
require => [
|
||||
File["${www_root}"],
|
||||
]
|
||||
}
|
||||
|
||||
file { "${www_root}/robots.txt":
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
|
@ -34,6 +34,14 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
||||
RewriteCond %{DOCUMENT_ROOT}/pypi/simple/$1/$1$2 -d
|
||||
RewriteRule ^/pypi/simple/([^/])([^/]*)(/.*)?$ /pypi/simple/$1/$1$2$3 [L]
|
||||
|
||||
# Wheel URL's are:
|
||||
# /wheel/{distro}-{distro-version}/a/a/a-etc.whl
|
||||
# /wheel/{distro}-{distro-version}/a/abcd/abcd-etc.whl
|
||||
# /wheel/{distro}-{distro-version}/a/abcde/abcde-etc.whl
|
||||
RewriteCond %{REQUEST_URI} ^/wheel/([^/]+)/([^/])([^/]*)
|
||||
RewriteCond %{DOCUMENT_ROOT}/wheel/$1/$2/$2$3 -d
|
||||
RewriteRule ^/wheel/([^/]+)/([^/])([^/]*)(/.*)?$ /wheel/$1/$2/$2$3$4 [L]
|
||||
|
||||
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
|
||||
LogLevel warn
|
||||
CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined
|
||||
|
Loading…
Reference in New Issue
Block a user