2012-11-15 22:25:13 +00:00
|
|
|
# == Class: openstack_project::wiki
|
|
|
|
#
|
2012-09-06 17:32:48 +00:00
|
|
|
class openstack_project::wiki (
|
2012-11-15 22:25:13 +00:00
|
|
|
$mysql_root_password = '',
|
2012-12-18 22:11:43 +00:00
|
|
|
$sysadmins = [],
|
|
|
|
$ssl_cert_file_contents = '',
|
|
|
|
$ssl_key_file_contents = '',
|
2016-02-23 18:08:07 +00:00
|
|
|
$ssl_chain_file_contents = '',
|
|
|
|
$wg_dbpassword = undef,
|
|
|
|
$wg_secretkey = undef,
|
|
|
|
$wg_upgradekey = undef,
|
2016-02-24 21:29:55 +00:00
|
|
|
$wg_captchaquestions = {},
|
2016-02-23 18:08:07 +00:00
|
|
|
$wg_googleanalyticsaccount = undef,
|
2012-09-06 17:32:48 +00:00
|
|
|
) {
|
2012-07-30 07:23:41 +00:00
|
|
|
|
2015-01-28 17:56:03 +00:00
|
|
|
package { ['openssl', 'ssl-cert', 'subversion']:
|
2014-10-06 23:47:44 +00:00
|
|
|
ensure => present;
|
|
|
|
}
|
|
|
|
|
2012-07-21 02:38:57 +00:00
|
|
|
class { 'openstack_project::server':
|
2012-09-06 17:32:48 +00:00
|
|
|
iptables_public_tcp_ports => [80, 443],
|
2012-11-15 22:25:13 +00:00
|
|
|
sysadmins => $sysadmins,
|
2012-07-21 02:38:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
realize (
|
2012-11-15 22:25:13 +00:00
|
|
|
User::Virtual::Localuser['rlane'],
|
2016-02-25 16:30:02 +00:00
|
|
|
User::Virtual::Localuser['mkiss'],
|
2016-06-14 19:06:05 +00:00
|
|
|
User::Virtual::Localuser['maxwell'],
|
2012-07-21 02:38:57 +00:00
|
|
|
)
|
2012-07-30 07:23:41 +00:00
|
|
|
|
|
|
|
class { 'mediawiki':
|
2016-02-23 18:08:07 +00:00
|
|
|
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,
|
2016-02-24 21:29:55 +00:00
|
|
|
wg_captchaquestions => $wg_captchaquestions,
|
2016-02-23 18:08:07 +00:00
|
|
|
wg_googleanalyticsaccount => $wg_googleanalyticsaccount,
|
2012-07-30 07:23:41 +00:00
|
|
|
}
|
|
|
|
class { 'memcached':
|
|
|
|
max_memory => 2048,
|
2012-11-15 22:25:13 +00:00
|
|
|
listen_ip => '127.0.0.1',
|
|
|
|
tcp_port => 11000,
|
|
|
|
udp_port => 11000,
|
2012-07-30 07:23:41 +00:00
|
|
|
}
|
2012-11-15 22:25:13 +00:00
|
|
|
class { 'mysql::server':
|
2015-12-15 01:13:32 +00:00
|
|
|
root_password => $mysql_root_password,
|
|
|
|
override_options => {
|
|
|
|
'mysqld' => {
|
|
|
|
'default-storage-engine' => 'InnoDB',
|
|
|
|
}
|
|
|
|
},
|
2012-07-30 07:23:41 +00:00
|
|
|
}
|
|
|
|
include mysql::server::account_security
|
2013-01-16 17:28:04 +00:00
|
|
|
|
2013-08-28 19:07:15 +00:00
|
|
|
mysql_backup::backup { 'wiki':
|
|
|
|
require => Class['mysql::server'],
|
|
|
|
}
|
|
|
|
|
2013-01-16 17:28:04 +00:00
|
|
|
include bup
|
|
|
|
bup::site { 'rs-ord':
|
|
|
|
backup_user => 'bup-wiki',
|
|
|
|
backup_server => 'ci-backup-rs-ord.openstack.org',
|
|
|
|
}
|
2013-09-23 22:11:10 +00:00
|
|
|
|
2013-10-17 23:06:38 +00:00
|
|
|
class { '::elasticsearch':
|
2013-10-22 01:30:43 +00:00
|
|
|
es_template_config => {
|
|
|
|
'bootstrap.mlockall' => true,
|
|
|
|
'discovery.zen.ping.unicast.hosts' => ['localhost'],
|
|
|
|
},
|
2014-09-08 18:59:54 +00:00
|
|
|
version => '1.3.2',
|
2013-10-22 01:30:43 +00:00
|
|
|
heap_size => '1g',
|
2013-09-23 22:11:10 +00:00
|
|
|
}
|
|
|
|
|
2012-07-21 02:38:57 +00:00
|
|
|
}
|