Merge "Added pypi hosting for AFS mirror slave"
This commit is contained in:
@@ -5,5 +5,54 @@ class openstack_project::mirror (
|
||||
) {
|
||||
|
||||
$mirror_root = '/afs/openstack.org/mirror'
|
||||
$pypi_root = "${mirror_root}/pypi"
|
||||
$www_root = '/var/www/mirror'
|
||||
|
||||
#####################################################
|
||||
# Build Apache Webroot
|
||||
file { "${www_root}":
|
||||
ensure => directory,
|
||||
owner => root,
|
||||
group => root,
|
||||
}
|
||||
|
||||
# Create the symlink to pypi.
|
||||
file { "${www_root}/pypi":
|
||||
ensure => link,
|
||||
target => "${pypi_root}/web",
|
||||
owner => root,
|
||||
group => root,
|
||||
require => [
|
||||
File["${www_root}"],
|
||||
]
|
||||
}
|
||||
|
||||
file { "${www_root}/robots.txt":
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
source => 'puppet:///modules/openstack_project/disallow_robots.txt',
|
||||
require => File["${www_root}"],
|
||||
}
|
||||
|
||||
#####################################################
|
||||
# Build VHost
|
||||
include ::httpd
|
||||
|
||||
if ! defined(Httpd::Mod['rewrite']) {
|
||||
httpd::mod { 'rewrite':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
::httpd::vhost { $vhost_name:
|
||||
port => 80,
|
||||
priority => '50',
|
||||
docroot => "${www_root}",
|
||||
template => 'openstack_project/mirror.vhost.erb',
|
||||
require => [
|
||||
File["${www_root}"],
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user