c1ffb9f145
* manifests/site.pp: Pass new mysql DB variables to openstack::etherpad*. * modules/etherpad_lite/manifests/apache.pp: Fix broken /etc/ssl/certs permissions (0700 -> 0755). * modules/etherpad_lite/manifests/init.pp: Update default nodejs and etherpad versions. Remove ep_headings plugin install. New plugin define should be used for this instead. Stop making the etherpad-lite ref to checkout optional (defaults to develop). Note these changes are probably not going to be backward compat. * modules/etherpad_lite/manifests/plugin.pp: Define to install etherpad lite plugins. * modules/etherpad_lite/manifests/site.pp: Simplify DB support and remove support for the dirty DB type. * modules/etherpad_lite/templates/etherpad-lite_settings.json.erb: Bring settings erb up to par with latest template. * modules/etherpad_lite/templates/etherpadlite.vhost.erb: Update rewrite rules for new etherpad. Instead of allowing nice pad urls rooted at / redirect these url to /p/padname. Etherpad does not deal well with a change in root path as /p/ is hardcoded in many places. * modules/openstack_project/manifests/etherpad.pp * modules/openstack_project/manifests/etherpad_dev.pp: Update to use new etherpad module setup. MySQL DBs are now externally managed, pass in needed connection info. * modules/mysql_backup/manifests/backup_remote.pp: New define to backup remote DB servers. * modules/mysql_backup/templates/my.cnf.erb: Template for a my.cnf to be used by the cron in backup_remote.pp. Allows for easy connectivity from server using MySQL DB as root. Change-Id: I1250297674b91e81d59cd28c07c52e09967ca548
77 lines
1.9 KiB
Puppet
77 lines
1.9 KiB
Puppet
# == Class: etherpad_lite::site
|
|
#
|
|
class etherpad_lite::site (
|
|
$database_password,
|
|
$sessionKey = '',
|
|
$dbType = 'mysql',
|
|
$database_user = 'eplite',
|
|
$database_name = 'etherpad-lite',
|
|
$database_host = 'localhost'
|
|
) {
|
|
|
|
include etherpad_lite
|
|
|
|
$base = $etherpad_lite::base_install_dir
|
|
|
|
service { 'etherpad-lite':
|
|
ensure => running,
|
|
enable => true,
|
|
subscribe => File["${base}/etherpad-lite/settings.json"],
|
|
}
|
|
|
|
file { "${base}/etherpad-lite/settings.json":
|
|
ensure => present,
|
|
content => template('etherpad_lite/etherpad-lite_settings.json.erb'),
|
|
replace => true,
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => '0600',
|
|
require => Class['etherpad_lite'],
|
|
}
|
|
|
|
file { "${base}/etherpad-lite/src/static/custom/pad.js":
|
|
ensure => present,
|
|
source => 'puppet:///modules/etherpad_lite/pad.js',
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => '0644',
|
|
require => Class['etherpad_lite'],
|
|
}
|
|
|
|
file { "${base}/etherpad-lite/src/static/robots.txt":
|
|
ensure => present,
|
|
source => 'puppet:///modules/etherpad_lite/robots.txt',
|
|
owner => $etherpad_lite::ep_user,
|
|
group => $etherpad_lite::ep_user,
|
|
mode => '0644',
|
|
require => Class['etherpad_lite'],
|
|
}
|
|
|
|
include logrotate
|
|
logrotate::file { 'epliteerror':
|
|
log => "${base}/${etherpad_lite::ep_user}/error.log",
|
|
options => [
|
|
'compress',
|
|
'copytruncate',
|
|
'missingok',
|
|
'rotate 7',
|
|
'daily',
|
|
'notifempty',
|
|
],
|
|
require => Service['etherpad-lite'],
|
|
}
|
|
|
|
logrotate::file { 'epliteaccess':
|
|
log => "${base}/${etherpad_lite::ep_user}/access.log",
|
|
options => [
|
|
'compress',
|
|
'copytruncate',
|
|
'missingok',
|
|
'rotate 7',
|
|
'daily',
|
|
'notifempty',
|
|
],
|
|
require => Service['etherpad-lite'],
|
|
}
|
|
}
|