system-config/modules/openstack_project/manifests/wiki.pp
Jeremy Stanley 4dca9fde53 Setup ReCaptcha in Wiki to Prevent Spam
Plumb wg_recaptchapublickey and wg_recaptchaprivatekey variables
through from hiera into the mediawiki module for wiki.openstack.org.

Change-Id: I0f184c9bfa2bdaaca2478500d8f3b418c9bf77ae
Depends-On: Idfa2c01fb9d31f06643d6c82438c33db1ff33009
2016-07-14 19:34:44 +00:00

86 lines
2.4 KiB
Puppet

# == Class: openstack_project::wiki
#
class openstack_project::wiki (
$mysql_root_password = '',
$sysadmins = [],
$ssl_cert_file_contents = '',
$ssl_key_file_contents = '',
$ssl_chain_file_contents = '',
$wg_dbpassword = undef,
$wg_secretkey = undef,
$wg_upgradekey = undef,
$wg_recaptchapublickey = undef,
$wg_recaptchaprivatekey = undef,
$wg_googleanalyticsaccount = undef,
) {
package { ['openssl', 'ssl-cert', 'subversion']:
ensure => present;
}
class { 'openstack_project::server':
iptables_public_tcp_ports => [80, 443],
sysadmins => $sysadmins,
}
realize (
User::Virtual::Localuser['rlane'],
User::Virtual::Localuser['mkiss'],
User::Virtual::Localuser['maxwell'],
)
class { 'mediawiki':
role => 'all',
mediawiki_location => '/srv/mediawiki/w',
mediawiki_images_location => '/srv/mediawiki/images',
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',
ssl_cert_file_contents => $ssl_cert_file_contents,
ssl_key_file_contents => $ssl_key_file_contents,
ssl_chain_file_contents => $ssl_chain_file_contents,
wg_dbpassword => $wg_dbpassword,
wg_secretkey => $wg_secretkey,
wg_upgradekey => $wg_upgradekey,
wg_recaptchapublickey => $wg_recaptchapublickey,
wg_recaptchaprivatekey => $wg_recaptchaprivatekey,
wg_googleanalyticsaccount => $wg_googleanalyticsaccount,
}
class { 'memcached':
max_memory => 2048,
listen_ip => '127.0.0.1',
tcp_port => 11000,
udp_port => 11000,
}
class { 'mysql::server':
root_password => $mysql_root_password,
override_options => {
'mysqld' => {
'default-storage-engine' => 'InnoDB',
}
},
}
include mysql::server::account_security
mysql_backup::backup { 'wiki':
require => Class['mysql::server'],
}
include bup
bup::site { 'rs-ord':
backup_user => 'bup-wiki',
backup_server => 'ci-backup-rs-ord.openstack.org',
}
class { '::elasticsearch':
es_template_config => {
'bootstrap.mlockall' => true,
'discovery.zen.ping.unicast.hosts' => ['localhost'],
},
version => '1.3.2',
heap_size => '1g',
}
}