system-config/modules/openstack_project/manifests/wiki.pp
Clark Boylan 23896c8094 Backup review and wiki MySQL DBs.
* modules/openstack_project/manifests/review_dev.pp: Remove
mysql_backup, gerrit.pp will do this for review_dev now.

* modules/openstack_project/manifests/gerrit.pp: Put MySQL backups in
central Gerrit manifest. This will backup MySQL locally for review and
review-dev.

* modules/openstack_project/manifests/wiki.pp: Backup wiki MySQL DB
locally wth the mysql_backup module.

These changes make it possible to do offsite DB backups with bup by
first backing up the databases locally.

Change-Id: I932b439c153e461fa9c6b454e132137949bd08df
2013-08-28 12:07:15 -07:00

60 lines
1.6 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 = ''
) {
include openssl
include subversion
class { 'openstack_project::server':
iptables_public_tcp_ports => [80, 443],
sysadmins => $sysadmins,
}
realize (
User::Virtual::Localuser['rlane'],
)
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,
}
class { 'memcached':
max_memory => 2048,
listen_ip => '127.0.0.1',
tcp_port => 11000,
udp_port => 11000,
}
class { 'mysql::server':
config_hash => {
'root_password' => $mysql_root_password,
'default_engine' => 'InnoDB',
'bind_address' => '127.0.0.1',
}
}
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',
}
}