Use a host group for wiki.o.o

In keeping with our decision in Austin to start appending ordinal
suffixes to hostnames for new server instances, switch the node
definition for wiki.openstack.org to allow a new
wiki01.openstack.org to match. The production server has Puppet
temporarily disabled, and the FQDN hiera keys have already been
moved to a new "wiki" group file.

As a requirement for this work, also purge remaining "FQDNisms" from
the openstack_project::wiki class by making the site name a classvar
and removing redundant SSL filenames which now merely mirror the
defaults in the mediawiki module anyway.

Change-Id: I950cb68ecd34e82f0da6b10bf2b93fb2c349286f
This commit is contained in:
Jeremy Stanley 2016-08-29 19:49:45 +00:00
parent 1f0985832a
commit f65cef27fe
3 changed files with 7 additions and 6 deletions

View File

@ -370,10 +370,12 @@ node 'etherpad-dev.openstack.org' {
}
# Node-OS: trusty
node 'wiki.openstack.org' {
node /^wiki\d+\.openstack\.org$/ {
$group = "wiki"
class { 'openstack_project::wiki':
sysadmins => hiera('sysadmins', []),
serveradmin => hiera('infra_apache_serveradmin'),
site_hostname => 'wiki.openstack.org',
ssl_cert_file_contents => hiera('ssl_cert_file_contents'),
ssl_key_file_contents => hiera('ssl_key_file_contents'),
ssl_chain_file_contents => hiera('ssl_chain_file_contents'),

View File

@ -10,4 +10,5 @@ afs afs*.*.openstack.org
wheel-mirror *wheel-mirror-*.openstack.org
afsadmin mirror-update.openstack.org:release.slave.openstack.org
signing signing*.ci.openstack.org
wiki wiki*.openstack.org
disabled ci-backup-rs-ord.openstack.org:ask-staging.openstack.org:db368fcd-e61a-4294-a5cb-851c16650f7a:wiki.openstack.org

View File

@ -1,6 +1,7 @@
# == Class: openstack_project::wiki
#
class openstack_project::wiki (
$site_hostname,
$sysadmins = [],
$serveradmin = undef,
$ssl_cert_file_contents = '',
@ -37,10 +38,7 @@ class openstack_project::wiki (
mediawiki_location => '/srv/mediawiki/w',
mediawiki_images_location => '/srv/mediawiki/images',
serveradmin => $serveradmin,
site_hostname => $::fqdn,
ssl_cert_file => "/etc/ssl/certs/${::fqdn}.pem",
ssl_key_file => "/etc/ssl/private/${::fqdn}.key",
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
site_hostname => $site_hostname,
ssl_cert_file_contents => $ssl_cert_file_contents,
ssl_key_file_contents => $ssl_key_file_contents,
ssl_chain_file_contents => $ssl_chain_file_contents,
@ -54,7 +52,7 @@ class openstack_project::wiki (
wg_recaptchasecretkey => $wg_recaptchasecretkey,
wg_googleanalyticsaccount => $wg_googleanalyticsaccount,
wg_sitename => 'OpenStack',
wg_logo => "https://${::fqdn}/w/images/thumb/c/c4/OpenStack_Logo_-_notext.png/30px-OpenStack_Logo_-_notext.png",
wg_logo => "https://${site_hostname}/w/images/thumb/c/c4/OpenStack_Logo_-_notext.png/30px-OpenStack_Logo_-_notext.png",
}
class { 'memcached':
max_memory => 2048,