James E. Blair bd438453b8 Add status.o.o vhost to static.o.o.
Add a nice index page.

Proxy zuul-related status URLs to zuul.o.o.

Proxy release, reviews, and bugday URLs to old-wiki.openstack.org
which will point to the current wiki site.  This will let us move
status.o.o to static.o.o independent of when the individual status
pages are moved.

Change-Id: I695e281811cd8f6b27025f6626864ed4ea09cae9
Reviewed-on: https://review.openstack.org/18626
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-12-26 17:04:17 +00:00

120 lines
2.9 KiB
Puppet

# == Class: openstack_project::static
#
class openstack_project::static (
$sysadmins = []
) {
class { 'openstack_project::server':
iptables_public_tcp_ports => [22, 80, 443],
sysadmins => $sysadmins,
}
include openstack_project
class { 'jenkins::jenkinsuser':
ssh_key => $openstack_project::jenkins_ssh_key,
}
include apache
apache::vhost { 'tarballs.openstack.org':
port => 80,
priority => '50',
docroot => '/srv/static/tarballs',
require => File['/srv/static/tarballs'],
}
apache::vhost { 'ci.openstack.org':
port => 80,
priority => '50',
docroot => '/srv/static/ci',
require => File['/srv/static/ci'],
}
apache::vhost { 'logs.openstack.org':
port => 80,
priority => '50',
docroot => '/srv/static/logs',
require => File['/srv/static/logs'],
template => 'openstack_project/logs.vhost.erb',
}
apache::vhost { 'docs-draft.openstack.org':
port => 80,
priority => '50',
docroot => '/srv/static/docs-draft',
require => File['/srv/static/docs-draft'],
}
apache::vhost { 'status.openstack.org':
port => 80,
priority => '50',
docroot => '/srv/static/status',
template => 'openstack_project/status.vhost.erb',
require => File['/srv/static/status'],
}
file { '/srv/static':
ensure => directory,
}
file { '/srv/static/tarballs':
ensure => directory,
owner => 'jenkins',
group => 'jenkins',
require => User['jenkins'],
}
file { '/srv/static/ci':
ensure => directory,
owner => 'jenkins',
group => 'jenkins',
require => User['jenkins'],
}
file { '/srv/static/logs':
ensure => directory,
owner => 'jenkins',
group => 'jenkins',
require => User['jenkins'],
}
file { '/srv/static/logs/robots.txt':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_project/disallow_robots.txt',
require => File['/srv/static/logs'],
}
file { '/srv/static/docs-draft':
ensure => directory,
}
file { '/srv/static/docs-draft/robots.txt':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_project/disallow_robots.txt',
require => File['/srv/static/docs-draft'],
}
file { '/srv/static/status':
ensure => directory,
}
file { '/srv/static/status/index.html':
ensure => present,
source => 'puppet:///modules/openstack_project/status/index.html',
require => File['/srv/static/status'],
}
cron { 'gziplogs':
user => 'root',
hour => '*/6',
command => 'sleep $((RANDOM\%600)) && flock -n /var/run/gziplogs.lock find /srv/static/logs/ \( -name \*.txt -or -name \*.html \) -exec gzip \{\} \;',
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}
}