2012-11-15 14:25:13 -08:00
|
|
|
# == Class: openstack_project::static
|
|
|
|
#
|
2012-09-06 10:32:48 -07:00
|
|
|
class openstack_project::static (
|
2014-07-03 13:56:16 +10:00
|
|
|
$swift_authurl = '',
|
|
|
|
$swift_user = '',
|
|
|
|
$swift_key = '',
|
|
|
|
$swift_tenant_name = '',
|
|
|
|
$swift_region_name = '',
|
|
|
|
$swift_default_container = '',
|
2014-09-19 18:25:26 -07:00
|
|
|
$project_config_repo = '',
|
2015-10-08 20:42:07 +00:00
|
|
|
$ssl_cert_file = '',
|
|
|
|
$ssl_cert_file_contents = '',
|
|
|
|
$ssl_key_file = '',
|
|
|
|
$ssl_key_file_contents = '',
|
|
|
|
$ssl_chain_file = '',
|
|
|
|
$ssl_chain_file_contents = '',
|
2015-03-05 13:28:05 +01:00
|
|
|
$jenkins_gitfullname = 'OpenStack Jenkins',
|
|
|
|
$jenkins_gitemail = 'jenkins@openstack.org',
|
2012-09-06 10:32:48 -07:00
|
|
|
) {
|
2014-09-19 18:25:26 -07:00
|
|
|
class { 'project_config':
|
|
|
|
url => $project_config_repo,
|
|
|
|
}
|
|
|
|
|
2012-09-10 10:08:23 -07:00
|
|
|
include openstack_project
|
2012-08-15 09:30:14 -07:00
|
|
|
class { 'jenkins::jenkinsuser':
|
2015-03-05 13:28:05 +01:00
|
|
|
ssh_key => $openstack_project::jenkins_ssh_key,
|
|
|
|
gitfullname => $jenkins_gitfullname,
|
|
|
|
gitemail => $jenkins_gitemail,
|
2012-08-15 09:30:14 -07:00
|
|
|
}
|
|
|
|
|
2017-02-14 10:40:08 +11:00
|
|
|
# This will try to index our millions of logs and docs by default
|
|
|
|
# and cause all sorts of IO and disk-usage issues.
|
|
|
|
package { 'mlocate':
|
|
|
|
ensure => absent,
|
|
|
|
}
|
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
include ::httpd
|
|
|
|
include ::httpd::mod::wsgi
|
2012-08-10 15:38:08 -07:00
|
|
|
|
2015-12-04 17:12:23 +00:00
|
|
|
if ! defined(Httpd::Mod['rewrite']) {
|
|
|
|
httpd::mod { 'rewrite':
|
|
|
|
ensure => present,
|
|
|
|
}
|
2012-12-26 11:40:25 -08:00
|
|
|
}
|
2015-12-04 17:12:23 +00:00
|
|
|
|
|
|
|
if ! defined(Httpd::Mod['proxy']) {
|
|
|
|
httpd::mod { 'proxy':
|
|
|
|
ensure => present,
|
|
|
|
}
|
2012-12-26 11:40:25 -08:00
|
|
|
}
|
2015-12-04 17:12:23 +00:00
|
|
|
|
|
|
|
if ! defined(Httpd::Mod['proxy_http']) {
|
|
|
|
httpd::mod { 'proxy_http':
|
|
|
|
ensure => present,
|
|
|
|
}
|
2012-12-26 11:40:25 -08:00
|
|
|
}
|
|
|
|
|
2016-03-15 12:45:22 +11:00
|
|
|
if ! defined(Httpd::Mod['alias']) {
|
|
|
|
httpd::mod { 'alias': ensure => present }
|
|
|
|
}
|
|
|
|
|
2016-11-30 10:41:03 +01:00
|
|
|
if ! defined(Httpd::Mod['headers']) {
|
|
|
|
httpd::mod { 'headers': ensure => present }
|
|
|
|
}
|
|
|
|
|
2014-09-04 09:37:57 -07:00
|
|
|
if ! defined(File['/srv/static']) {
|
|
|
|
file { '/srv/static':
|
|
|
|
ensure => directory,
|
|
|
|
}
|
2013-03-28 14:49:10 -07:00
|
|
|
}
|
|
|
|
|
2015-10-08 20:42:07 +00:00
|
|
|
file { '/etc/ssl/certs':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0755',
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/ssl/private':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0700',
|
|
|
|
}
|
|
|
|
|
|
|
|
# To use the standard ssl-certs package snakeoil certificate, leave both
|
|
|
|
# $ssl_cert_file and $ssl_cert_file_contents empty. To use an existing
|
|
|
|
# certificate, specify its path for $ssl_cert_file and leave
|
|
|
|
# $ssl_cert_file_contents empty. To manage the certificate with puppet,
|
|
|
|
# provide $ssl_cert_file_contents and optionally specify the path to use for
|
|
|
|
# it in $ssl_cert_file.
|
|
|
|
if ($ssl_cert_file == '') and ($ssl_cert_file_contents == '') {
|
|
|
|
$cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
|
|
|
} else {
|
|
|
|
if $ssl_cert_file == '' {
|
|
|
|
$cert_file = "/etc/ssl/certs/${::fqdn}.pem"
|
|
|
|
} else {
|
|
|
|
$cert_file = $ssl_cert_file
|
|
|
|
}
|
|
|
|
if $ssl_cert_file_contents != '' {
|
|
|
|
file { $cert_file:
|
|
|
|
ensure => present,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
|
|
|
content => $ssl_cert_file_contents,
|
|
|
|
require => File['/etc/ssl/certs'],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# To use the standard ssl-certs package snakeoil key, leave both
|
|
|
|
# $ssl_key_file and $ssl_key_file_contents empty. To use an existing key,
|
|
|
|
# specify its path for $ssl_key_file and leave $ssl_key_file_contents empty.
|
|
|
|
# To manage the key with puppet, provide $ssl_key_file_contents and
|
|
|
|
# optionally specify the path to use for it in $ssl_key_file.
|
|
|
|
if ($ssl_key_file == '') and ($ssl_key_file_contents == '') {
|
|
|
|
$key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
|
|
|
|
} else {
|
|
|
|
if $ssl_key_file == '' {
|
|
|
|
$key_file = "/etc/ssl/private/${::fqdn}.key"
|
|
|
|
} else {
|
|
|
|
$key_file = $ssl_key_file
|
|
|
|
}
|
|
|
|
if $ssl_key_file_contents != '' {
|
|
|
|
file { $key_file:
|
|
|
|
ensure => present,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0600',
|
|
|
|
content => $ssl_key_file_contents,
|
|
|
|
require => File['/etc/ssl/private'],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# To avoid using an intermediate certificate chain, leave both
|
|
|
|
# $ssl_chain_file and $ssl_chain_file_contents empty. To use an existing
|
|
|
|
# chain, specify its path for $ssl_chain_file and leave
|
|
|
|
# $ssl_chain_file_contents empty. To manage the chain with puppet, provide
|
|
|
|
# $ssl_chain_file_contents and optionally specify the path to use for it in
|
|
|
|
# $ssl_chain_file.
|
|
|
|
if ($ssl_chain_file == '') and ($ssl_chain_file_contents == '') {
|
|
|
|
$chain_file = ''
|
|
|
|
} else {
|
|
|
|
if $ssl_chain_file == '' {
|
|
|
|
$chain_file = "/etc/ssl/certs/${::fqdn}_intermediate.pem"
|
|
|
|
} else {
|
|
|
|
$chain_file = $ssl_chain_file
|
|
|
|
}
|
|
|
|
if $ssl_chain_file_contents != '' {
|
|
|
|
file { $chain_file:
|
|
|
|
ensure => present,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
|
|
|
content => $ssl_chain_file_contents,
|
|
|
|
require => File['/etc/ssl/certs'],
|
|
|
|
before => File[$cert_file],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-28 14:49:10 -07:00
|
|
|
###########################################################
|
|
|
|
# Tarballs
|
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
::httpd::vhost { 'tarballs.openstack.org':
|
2015-10-13 18:32:27 +00:00
|
|
|
port => 443, # Is required despite not being used.
|
|
|
|
docroot => '/srv/static/tarballs',
|
|
|
|
priority => '50',
|
|
|
|
ssl => true,
|
|
|
|
template => 'openstack_project/static-http-and-https.vhost.erb',
|
|
|
|
vhost_name => 'tarballs.openstack.org',
|
|
|
|
require => [
|
|
|
|
File['/srv/static/tarballs'],
|
|
|
|
File[$cert_file],
|
|
|
|
File[$key_file],
|
|
|
|
],
|
2012-08-10 15:38:08 -07:00
|
|
|
}
|
|
|
|
|
2013-03-28 14:49:10 -07:00
|
|
|
file { '/srv/static/tarballs':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
require => User['jenkins'],
|
|
|
|
}
|
|
|
|
|
|
|
|
###########################################################
|
2015-04-16 15:39:12 +00:00
|
|
|
# legacy ci.openstack.org site redirect
|
2013-03-28 14:49:10 -07:00
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
::httpd::vhost { 'ci.openstack.org':
|
2015-04-16 15:39:12 +00:00
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/ci.vhost.erb',
|
2013-03-28 14:49:10 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
# Logs
|
2015-03-24 15:49:19 -07:00
|
|
|
class { 'openstackci::logserver':
|
|
|
|
jenkins_ssh_key => $openstack_project::jenkins_ssh_key,
|
|
|
|
domain => 'openstack.org',
|
2017-10-20 18:28:59 -04:00
|
|
|
ara_middleware => true,
|
2018-11-07 15:34:47 -05:00
|
|
|
wsgi_processes => 16,
|
2015-03-24 15:49:19 -07:00
|
|
|
swift_authurl => $swift_authurl,
|
|
|
|
swift_user => $swift_user,
|
|
|
|
swift_key => $swift_key,
|
|
|
|
swift_tenant_name => $swift_tenant_name,
|
|
|
|
swift_region_name => $swift_region_name,
|
|
|
|
swift_default_container => $swift_default_container,
|
2017-07-25 08:25:06 -07:00
|
|
|
readmes => {
|
|
|
|
'/*/*/*/*/*-tempest-dsvm*/*' => '/help/tempest-overview.html',
|
|
|
|
'/periodic*/*/*-tempest-dsvm*/*' => '/help/tempest-overview.html',
|
|
|
|
'/*/*/*/*/*-tempest-dsvm*/*/logs/' => '/help/tempest-logs.html',
|
|
|
|
'/periodic*/*/*-tempest-dsvm*/*/logs/' => '/help/tempest-logs.html',
|
2017-07-25 12:47:05 -07:00
|
|
|
'/*/*/*/*/*tripleo-ci-*/*/logs/' => '/help/tripleo-quickstart-logs.html'
|
2017-07-25 08:25:06 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-31 13:54:28 -07:00
|
|
|
::httpd::vhost { "logs.opendev.org":
|
|
|
|
port => 443,
|
|
|
|
priority => '50',
|
|
|
|
ssl => true,
|
|
|
|
docroot => '/srv/static/logs',
|
|
|
|
require => File['/srv/static/logs'],
|
|
|
|
vhost_name => 'logs.opendev.org',
|
|
|
|
template => 'openstack_project/logs.vhost.erb',
|
|
|
|
}
|
|
|
|
|
2017-07-25 08:25:06 -07:00
|
|
|
vcsrepo { '/opt/devstack-gate':
|
|
|
|
ensure => latest,
|
|
|
|
provider => git,
|
|
|
|
revision => 'master',
|
2019-04-20 18:00:29 +00:00
|
|
|
source => 'https://opendev.org/openstack/devstack-gate',
|
2017-07-25 08:25:06 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
file { '/srv/static/logs/help':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0755',
|
|
|
|
require => File['/srv/static/logs'],
|
|
|
|
}
|
|
|
|
file { '/srv/static/logs/help/tempest-logs.html':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0444',
|
|
|
|
source => 'file:///opt/devstack-gate/help/tempest-logs.html',
|
|
|
|
require => [File['/srv/static/logs/help'], Vcsrepo['/opt/devstack-gate']],
|
|
|
|
}
|
|
|
|
file { '/srv/static/logs/help/tempest-overview.html':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0444',
|
|
|
|
source => 'file:///opt/devstack-gate/help/tempest-overview.html',
|
|
|
|
require => [File['/srv/static/logs/help'], Vcsrepo['/opt/devstack-gate']],
|
2013-03-25 11:30:37 -07:00
|
|
|
}
|
|
|
|
|
2017-07-25 12:47:05 -07:00
|
|
|
vcsrepo { '/opt/tripleo-ci':
|
|
|
|
ensure => latest,
|
|
|
|
provider => git,
|
|
|
|
revision => 'master',
|
2019-04-20 18:00:29 +00:00
|
|
|
source => 'https://opendev.org/openstack/tripleo-ci',
|
2017-07-25 12:47:05 -07:00
|
|
|
}
|
|
|
|
file { '/srv/static/logs/help/tripleo-quickstart-logs.html':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0444',
|
|
|
|
source => 'file:///opt/tripleo-ci/docs/tripleo-quickstart-logs.html',
|
|
|
|
require => [File['/srv/static/logs/help'], Vcsrepo['/opt/tripleo-ci']],
|
|
|
|
}
|
|
|
|
|
2014-11-07 20:09:46 +00:00
|
|
|
###########################################################
|
|
|
|
# Security
|
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
::httpd::vhost { 'security.openstack.org':
|
2015-02-11 21:59:50 +00:00
|
|
|
port => 443, # Is required despite not being used.
|
|
|
|
docroot => '/srv/static/security',
|
|
|
|
priority => '50',
|
|
|
|
ssl => true,
|
2015-10-13 18:13:48 +00:00
|
|
|
template => 'openstack_project/static-https-redirect.vhost.erb',
|
2015-02-11 21:59:50 +00:00
|
|
|
vhost_name => 'security.openstack.org',
|
2015-10-08 20:42:07 +00:00
|
|
|
require => [
|
|
|
|
File['/srv/static/security'],
|
|
|
|
File[$cert_file],
|
|
|
|
File[$key_file],
|
|
|
|
],
|
2014-11-07 20:09:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
file { '/srv/static/security':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
require => User['jenkins'],
|
|
|
|
}
|
|
|
|
|
2014-11-02 15:25:08 +00:00
|
|
|
###########################################################
|
2016-09-05 14:18:31 +02:00
|
|
|
# Governance (TC and UC) & Election
|
2016-03-15 12:45:22 +11:00
|
|
|
|
|
|
|
# Extra aliases and directories needed for vhost template:
|
|
|
|
$governance_aliases = {
|
2016-09-05 14:18:31 +02:00
|
|
|
'/election/' => '/srv/static/election/',
|
2017-11-23 14:10:02 +01:00
|
|
|
'/sigs/' => '/srv/static/sigs/',
|
2016-11-30 10:44:28 +01:00
|
|
|
'/tc/' => '/srv/static/tc/',
|
2016-09-05 14:18:31 +02:00
|
|
|
'/uc/' => '/srv/static/uc/',
|
2016-03-15 12:45:22 +11:00
|
|
|
}
|
2016-11-30 11:09:29 +01:00
|
|
|
# Extra redirects needed for vhost template:
|
|
|
|
$governance_redirects = {
|
2016-12-08 11:40:00 +01:00
|
|
|
'/badges/' => '/tc/badges/',
|
2016-11-30 11:09:29 +01:00
|
|
|
'/goals/' => '/tc/goals/',
|
|
|
|
'/reference/' => '/tc/reference/',
|
|
|
|
'/resolutions/' => '/tc/resolutions/',
|
|
|
|
}
|
2016-03-15 12:45:22 +11:00
|
|
|
# One of these must also be the docroot
|
|
|
|
$governance_directories = [
|
|
|
|
'/srv/static/election',
|
|
|
|
'/srv/static/governance',
|
2017-11-23 14:10:02 +01:00
|
|
|
'/srv/static/sigs',
|
2016-11-09 15:56:07 +01:00
|
|
|
'/srv/static/tc',
|
2016-09-05 14:18:31 +02:00
|
|
|
'/srv/static/uc',
|
2016-03-15 12:45:22 +11:00
|
|
|
]
|
2014-11-02 15:25:08 +00:00
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
::httpd::vhost { 'governance.openstack.org':
|
2016-07-01 23:17:38 +00:00
|
|
|
port => 443, # Is required despite not being used.
|
2016-12-08 11:23:48 +01:00
|
|
|
docroot => '/srv/static/governance',
|
2016-07-01 23:17:38 +00:00
|
|
|
priority => '50',
|
|
|
|
ssl => true,
|
2016-03-15 12:45:22 +11:00
|
|
|
template => 'openstack_project/static-governance.vhost.erb',
|
2016-07-01 23:17:38 +00:00
|
|
|
vhost_name => 'governance.openstack.org',
|
|
|
|
require => [
|
2016-03-15 12:45:22 +11:00
|
|
|
File[$governance_directories],
|
2015-10-22 17:34:54 +00:00
|
|
|
File[$cert_file],
|
|
|
|
File[$key_file],
|
|
|
|
],
|
2014-11-02 15:25:08 +00:00
|
|
|
}
|
|
|
|
|
2016-03-15 12:45:22 +11:00
|
|
|
file { $governance_directories:
|
2014-11-02 15:25:08 +00:00
|
|
|
ensure => directory,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
require => User['jenkins'],
|
|
|
|
}
|
|
|
|
|
2014-07-10 12:38:15 -04:00
|
|
|
###########################################################
|
|
|
|
# Specs
|
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
::httpd::vhost { 'specs.openstack.org':
|
2015-10-22 17:35:45 +00:00
|
|
|
port => 443, # Is required despite not being used.
|
|
|
|
docroot => '/srv/static/specs',
|
|
|
|
priority => '50',
|
|
|
|
ssl => true,
|
|
|
|
template => 'openstack_project/static-http-and-https.vhost.erb',
|
|
|
|
vhost_name => 'specs.openstack.org',
|
|
|
|
require => [
|
|
|
|
File['/srv/static/specs'],
|
|
|
|
File[$cert_file],
|
|
|
|
File[$key_file],
|
|
|
|
],
|
2014-07-10 12:38:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
file { '/srv/static/specs':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
require => User['jenkins'],
|
|
|
|
}
|
|
|
|
|
2014-11-01 22:55:18 +00:00
|
|
|
###########################################################
|
|
|
|
# legacy summit.openstack.org site redirect
|
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
::httpd::vhost { 'summit.openstack.org':
|
2014-11-01 22:55:18 +00:00
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/summit.vhost.erb',
|
|
|
|
}
|
|
|
|
|
2014-10-21 18:41:14 +00:00
|
|
|
###########################################################
|
2017-03-08 09:30:59 -06:00
|
|
|
# legacy site redirects
|
2014-10-21 18:41:14 +00:00
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
::httpd::vhost { 'devstack.org':
|
2014-10-21 18:41:14 +00:00
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
serveraliases => ['*.devstack.org'],
|
2017-03-08 09:30:59 -06:00
|
|
|
template => 'openstack_project/legacy.vhost.erb',
|
|
|
|
}
|
|
|
|
|
|
|
|
::httpd::vhost { 'cinder.openstack.org':
|
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/legacy.vhost.erb',
|
|
|
|
}
|
|
|
|
|
|
|
|
::httpd::vhost { 'glance.openstack.org':
|
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/legacy.vhost.erb',
|
|
|
|
}
|
|
|
|
|
|
|
|
::httpd::vhost { 'horizon.openstack.org':
|
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/legacy.vhost.erb',
|
|
|
|
}
|
|
|
|
|
|
|
|
::httpd::vhost { 'keystone.openstack.org':
|
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/legacy.vhost.erb',
|
|
|
|
}
|
|
|
|
|
|
|
|
::httpd::vhost { 'nova.openstack.org':
|
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/legacy.vhost.erb',
|
|
|
|
}
|
|
|
|
|
|
|
|
::httpd::vhost { 'qa.openstack.org':
|
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/legacy.vhost.erb',
|
|
|
|
}
|
|
|
|
|
|
|
|
::httpd::vhost { 'swift.openstack.org':
|
|
|
|
port => 80,
|
|
|
|
priority => '50',
|
|
|
|
docroot => 'MEANINGLESS_ARGUMENT',
|
|
|
|
template => 'openstack_project/legacy.vhost.erb',
|
2014-10-21 18:41:14 +00:00
|
|
|
}
|
2015-06-23 20:58:54 +00:00
|
|
|
|
|
|
|
###########################################################
|
|
|
|
# Trystack
|
|
|
|
|
2015-07-06 13:05:17 -04:00
|
|
|
::httpd::vhost { 'trystack.openstack.org':
|
2015-10-22 17:38:33 +00:00
|
|
|
port => 443, # Is required despite not being used.
|
2015-08-10 10:36:55 -04:00
|
|
|
docroot => '/opt/trystack',
|
2015-10-22 17:38:33 +00:00
|
|
|
priority => '50',
|
|
|
|
ssl => true,
|
|
|
|
template => 'openstack_project/static-http-and-https.vhost.erb',
|
|
|
|
vhost_name => 'trystack.openstack.org',
|
2015-08-14 11:03:28 -04:00
|
|
|
serveraliases => ['trystack.org', 'www.trystack.org'],
|
2015-10-22 17:38:33 +00:00
|
|
|
require => [
|
|
|
|
Vcsrepo['/opt/trystack'],
|
|
|
|
File[$cert_file],
|
|
|
|
File[$key_file],
|
|
|
|
],
|
2015-06-23 20:58:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
vcsrepo { '/opt/trystack':
|
|
|
|
ensure => latest,
|
|
|
|
provider => git,
|
|
|
|
revision => 'master',
|
2019-04-20 18:00:29 +00:00
|
|
|
source => 'https://opendev.org/x/trystack-site',
|
2015-06-23 20:58:54 +00:00
|
|
|
}
|
2016-01-12 17:55:02 +00:00
|
|
|
|
|
|
|
###########################################################
|
|
|
|
# Releases
|
|
|
|
|
|
|
|
::httpd::vhost { 'releases.openstack.org':
|
|
|
|
port => 443, # Is required despite not being used.
|
|
|
|
docroot => '/srv/static/releases',
|
|
|
|
priority => '50',
|
|
|
|
ssl => true,
|
2017-06-30 20:30:54 +00:00
|
|
|
template => 'openstack_project/static-https-redirect.vhost.erb',
|
2016-01-12 17:55:02 +00:00
|
|
|
vhost_name => 'releases.openstack.org',
|
|
|
|
require => [
|
|
|
|
File['/srv/static/releases'],
|
2017-06-30 20:30:54 +00:00
|
|
|
File[$cert_file],
|
|
|
|
File[$key_file],
|
2016-01-12 17:55:02 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/srv/static/releases':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
require => User['jenkins'],
|
|
|
|
}
|
2017-01-30 14:35:45 +11:00
|
|
|
|
2017-06-28 12:07:19 -05:00
|
|
|
###########################################################
|
|
|
|
# service-types.openstack.org
|
|
|
|
|
|
|
|
::httpd::vhost { 'service-types.openstack.org':
|
|
|
|
port => 443, # Is required despite not being used.
|
|
|
|
docroot => '/srv/static/service-types',
|
|
|
|
priority => '50',
|
|
|
|
ssl => true,
|
|
|
|
template => 'openstack_project/static-https-redirect.vhost.erb',
|
|
|
|
vhost_name => 'service-types.openstack.org',
|
|
|
|
require => [
|
|
|
|
File['/srv/static/service-types'],
|
|
|
|
File[$cert_file],
|
|
|
|
File[$key_file],
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/srv/static/service-types':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
require => User['jenkins'],
|
|
|
|
}
|
|
|
|
|
2017-01-30 14:35:45 +11:00
|
|
|
|
|
|
|
# Until Apache 2.4.24 the event MPM has some issues scalability
|
|
|
|
# bottlenecks that were seen to drop connections, especially on
|
|
|
|
# larger files; see
|
|
|
|
# https://httpd.apache.org/docs/2.4/mod/event.html
|
|
|
|
#
|
|
|
|
# The main advantage of event MPM is for keep-alive requests which
|
|
|
|
# are not really a big issue on this static file server. Therefore
|
|
|
|
# we switch to the threaded worker MPM as a workaround. This can be
|
|
|
|
# reconsidered when the apache version running is sufficient to
|
|
|
|
# avoid these problems.
|
|
|
|
|
|
|
|
httpd::mod { 'mpm_event': ensure => 'absent' }
|
|
|
|
httpd::mod { 'mpm_worker': ensure => 'present' }
|
|
|
|
|
2012-08-10 15:38:08 -07:00
|
|
|
}
|