Merge "Added wheel hosting for AFS mirror slave"

This commit is contained in:
Jenkins 2016-02-02 23:32:20 +00:00 committed by Gerrit Code Review
commit fb5ba14341
2 changed files with 21 additions and 0 deletions

View File

@ -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',

View File

@ -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