Revert "Add NPM mirror hosting to unified mirrors"
This reverts commit e47c469cc690db071f8b8d727080d36961e82a72. Change-Id: I7a09640cff418b55ce061a785162960db713c00c
This commit is contained in:
parent
e47c469cc6
commit
80cd50c593
@ -7,7 +7,6 @@ class openstack_project::mirror (
|
||||
$mirror_root = '/afs/openstack.org/mirror'
|
||||
$pypi_root = "${mirror_root}/pypi"
|
||||
$wheel_root = "${mirror_root}/wheel"
|
||||
$npm_root = "${mirror_root}/npm"
|
||||
|
||||
$www_base = '/var/www'
|
||||
$www_root = "${www_base}/mirror"
|
||||
@ -62,16 +61,6 @@ class openstack_project::mirror (
|
||||
]
|
||||
}
|
||||
|
||||
file { "${www_root}/npm":
|
||||
ensure => link,
|
||||
target => "${npm_root}",
|
||||
owner => root,
|
||||
group => root,
|
||||
require => [
|
||||
File["${www_root}"],
|
||||
]
|
||||
}
|
||||
|
||||
file { "${www_root}/robots.txt":
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
@ -91,12 +80,6 @@ class openstack_project::mirror (
|
||||
}
|
||||
}
|
||||
|
||||
if ! defined(Httpd::Mod['substitute']) {
|
||||
httpd::mod { 'substitute':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
::httpd::vhost { $vhost_name:
|
||||
port => 80,
|
||||
priority => '50',
|
||||
|
@ -42,22 +42,6 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
||||
RewriteCond %{DOCUMENT_ROOT}/wheel/$1/$2/$2$3 -d
|
||||
RewriteRule ^/wheel/([^/]+)/([^/])([^/]*)(/.*)?$ /wheel/$1/$2/$2$3$4 [L]
|
||||
|
||||
<Directory <%= @docroot %>/npm/>
|
||||
DirectoryIndex index.json
|
||||
|
||||
# npm's URL's are:
|
||||
# /npm/-/index.json
|
||||
# /npm/a/aabc/index.json
|
||||
# /npm/a/aabc/latest/index.json
|
||||
# /npm/a/aabc/-/aabc-0.0.0.tgz
|
||||
RewriteCond %{REQUEST_URI} ^/npm/([^/])([^/]*)
|
||||
RewriteCond %{DOCUMENT_ROOT}/npm/$1/$1$2 -d
|
||||
RewriteRule ^([^/])([^/]*)(/.*)?$ $1/$1$2$3 [L]
|
||||
|
||||
AddOutputFilterByType SUBSTITUTE application/json
|
||||
Substitute "s/localhost/<%= @srvname %>\/npm/ni"
|
||||
</Directory>
|
||||
|
||||
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…
x
Reference in New Issue
Block a user