Add etherpad-dev node and host class.

We now host etherpad.openstack.org. To properly test upgrades and things
add a proper etherpad-dev host to puppet. Currently the configuration is
set to mimic that which is on etherpad.o.o. Once the -dev host is up and
running it will be used to test upgrades to more modern etherpad lite
and node.js version.

Also at some point we will probably want to use the puppetlabs-mysql
module to manage the mysql instances for etherpad. This dev host makes
that easier.

Change-Id: I63500026a1a38d7c4dd5b00cc869586eb2483497
Reviewed-on: https://review.openstack.org/14861
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan 2012-10-25 16:09:13 -07:00 committed by Jenkins
parent 4c66a792ec
commit 2ab81a00e4
1 changed files with 26 additions and 11 deletions

View File

@ -45,7 +45,9 @@ define buildsource(
class etherpad_lite (
$ep_user = 'eplite',
$base_log_dir = '/var/log',
$base_install_dir = '/opt/etherpad-lite'
$base_install_dir = '/opt/etherpad-lite',
$nodejs_version = 'v0.6.16',
$eplite_version = '',
) {
user { $ep_user:
@ -69,11 +71,11 @@ class etherpad_lite (
}
vcsrepo { "${base_install_dir}/nodejs":
ensure => present,
ensure => present,
provider => git,
source => 'https://github.com/joyent/node.git',
revision => 'v0.6.16',
require => Package['git']
source => 'https://github.com/joyent/node.git',
revision => $nodejs_version,
require => Package['git']
}
package { ['gzip',
@ -101,12 +103,25 @@ class etherpad_lite (
Vcsrepo["${base_install_dir}/nodejs"]]
}
vcsrepo { "${base_install_dir}/etherpad-lite":
ensure => present,
provider => git,
source => "https://github.com/Pita/etherpad-lite.git",
owner => $ep_user,
require => Package['git'],
# Allow existing install to exist without modifying its git repo.
# But give the option to specify versions for new installs.
if $eplite_version != '' {
vcsrepo { "${base_install_dir}/etherpad-lite":
ensure => present,
provider => git,
source => 'https://github.com/Pita/etherpad-lite.git',
owner => $ep_user,
revision => $eplite_version,
require => Package['git'],
}
} else {
vcsrepo { "${base_install_dir}/etherpad-lite":
ensure => present,
provider => git,
source => 'https://github.com/Pita/etherpad-lite.git',
owner => $ep_user,
require => Package['git'],
}
}
exec { 'install_etherpad_dependencies':