f378933d4e
os-loganalyze has replaced htmlify-screen-log which is no longer used Change-Id: I5656bcd086669febbb82e438ced15ee92dd973b1
200 lines
4.8 KiB
Puppet
200 lines
4.8 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
|
|
include apache::mod::wsgi
|
|
|
|
a2mod { 'rewrite':
|
|
ensure => present,
|
|
}
|
|
a2mod { 'proxy':
|
|
ensure => present,
|
|
}
|
|
a2mod { 'proxy_http':
|
|
ensure => present,
|
|
}
|
|
|
|
file { '/srv/static':
|
|
ensure => directory,
|
|
}
|
|
|
|
###########################################################
|
|
# Tarballs
|
|
|
|
apache::vhost { 'tarballs.openstack.org':
|
|
port => 80,
|
|
priority => '50',
|
|
docroot => '/srv/static/tarballs',
|
|
require => File['/srv/static/tarballs'],
|
|
}
|
|
|
|
file { '/srv/static/tarballs':
|
|
ensure => directory,
|
|
owner => 'jenkins',
|
|
group => 'jenkins',
|
|
require => User['jenkins'],
|
|
}
|
|
|
|
###########################################################
|
|
# CI
|
|
|
|
apache::vhost { 'ci.openstack.org':
|
|
port => 80,
|
|
priority => '50',
|
|
docroot => '/srv/static/ci',
|
|
require => File['/srv/static/ci'],
|
|
}
|
|
|
|
file { '/srv/static/ci':
|
|
ensure => directory,
|
|
owner => 'jenkins',
|
|
group => 'jenkins',
|
|
require => User['jenkins'],
|
|
}
|
|
|
|
###########################################################
|
|
# Logs
|
|
|
|
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 { 'logs-dev.openstack.org':
|
|
port => 80,
|
|
priority => '51',
|
|
docroot => '/srv/static/logs',
|
|
require => File['/srv/static/logs'],
|
|
template => 'openstack_project/logs-dev.vhost.erb',
|
|
}
|
|
|
|
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'],
|
|
}
|
|
|
|
vcsrepo { '/opt/os-loganalyze':
|
|
ensure => latest,
|
|
provider => git,
|
|
revision => 'master',
|
|
source => 'https://git.openstack.org/openstack-infra/os-loganalyze',
|
|
}
|
|
|
|
exec { 'install_os-loganalyze':
|
|
command => 'python setup.py install',
|
|
cwd => '/opt/os-loganalyze',
|
|
path => '/bin:/usr/bin',
|
|
refreshonly => true,
|
|
subscribe => Vcsrepo['/opt/os-loganalyze'],
|
|
}
|
|
|
|
file { '/srv/static/logs/help':
|
|
ensure => directory,
|
|
recurse => true,
|
|
purge => true,
|
|
force => true,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0755',
|
|
source => 'puppet:///modules/openstack_project/logs/help',
|
|
require => File['/srv/static/logs'],
|
|
}
|
|
|
|
file { '/usr/local/sbin/log_archive_maintenance.sh':
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0744',
|
|
source => 'puppet:///modules/openstack_project/log_archive_maintenance.sh',
|
|
}
|
|
|
|
cron { 'gziprmlogs':
|
|
user => 'root',
|
|
minute => '0',
|
|
hour => '7',
|
|
weekday => '6',
|
|
command => 'bash /usr/local/sbin/log_archive_maintenance.sh',
|
|
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
|
|
require => File['/usr/local/sbin/log_archive_maintenance.sh'],
|
|
}
|
|
|
|
###########################################################
|
|
# Docs-draft
|
|
|
|
apache::vhost { 'docs-draft.openstack.org':
|
|
port => 80,
|
|
priority => '50',
|
|
docroot => '/srv/static/docs-draft',
|
|
require => File['/srv/static/docs-draft'],
|
|
}
|
|
|
|
file { '/srv/static/docs-draft':
|
|
ensure => directory,
|
|
owner => 'jenkins',
|
|
group => 'jenkins',
|
|
require => User['jenkins'],
|
|
}
|
|
|
|
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'],
|
|
}
|
|
|
|
###########################################################
|
|
# Pypi Mirror
|
|
|
|
apache::vhost { 'pypi.openstack.org':
|
|
port => 80,
|
|
priority => '50',
|
|
docroot => '/srv/static/pypi',
|
|
require => File['/srv/static/pypi'],
|
|
}
|
|
|
|
file { '/srv/static/pypi':
|
|
ensure => directory,
|
|
owner => 'jenkins',
|
|
group => 'jenkins',
|
|
require => User['jenkins'],
|
|
}
|
|
|
|
file { '/srv/static/pypi/robots.txt':
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0444',
|
|
source => 'puppet:///modules/openstack_project/disallow_robots.txt',
|
|
require => File['/srv/static/pypi'],
|
|
}
|
|
}
|