Go back to using self compiled node.js.
The version of node.js packaged by ubuntu does not seem to play nice with require-kernel and etherpad-lite. Go back to compiling version 0.6.16 of node.js which is tested and appears to be working. Change-Id: Ib9bda5d7acbda06561398a0c715b28e46edb531d
This commit is contained in:
parent
194aaa84b8
commit
25919b7644
@ -44,6 +44,39 @@ define git_repo (
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# define to build from source using ./configure && make && make install.
|
||||||
|
define buildsource(
|
||||||
|
$dir = $title,
|
||||||
|
$user = 'root',
|
||||||
|
$creates = '/nonexistant/file'
|
||||||
|
) {
|
||||||
|
|
||||||
|
exec { "./configure in ${dir}":
|
||||||
|
command => './configure',
|
||||||
|
path => "/usr/bin:/bin:/usr/local/bin:${dir}",
|
||||||
|
user => $user,
|
||||||
|
cwd => $dir,
|
||||||
|
creates => $creates
|
||||||
|
} ->
|
||||||
|
|
||||||
|
exec { "make in ${dir}":
|
||||||
|
command => 'make',
|
||||||
|
path => '/usr/bin:/bin',
|
||||||
|
user => $user,
|
||||||
|
cwd => $dir,
|
||||||
|
creates => $creates
|
||||||
|
} ->
|
||||||
|
|
||||||
|
exec { "make install in ${dir}":
|
||||||
|
command => 'make install',
|
||||||
|
path => '/usr/bin:/bin',
|
||||||
|
user => $user,
|
||||||
|
cwd => $dir,
|
||||||
|
creates => $creates
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
# Class to install etherpad lite. Puppet acts a lot like a package manager
|
# Class to install etherpad lite. Puppet acts a lot like a package manager
|
||||||
# through this class.
|
# through this class.
|
||||||
#
|
#
|
||||||
@ -86,18 +119,39 @@ class etherpad_lite (
|
|||||||
mode => 0664,
|
mode => 0664,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git_repo { 'nodejs_repo':
|
||||||
|
repo => 'https://github.com/joyent/node.git',
|
||||||
|
dest => "${base_install_dir}/nodejs",
|
||||||
|
branch => 'v0.6.16-release',
|
||||||
|
clone_only => 'true',
|
||||||
|
require => Package['git']
|
||||||
|
}
|
||||||
|
|
||||||
package { ['gzip',
|
package { ['gzip',
|
||||||
'curl',
|
'curl',
|
||||||
'python',
|
'python',
|
||||||
'libssl-dev',
|
'libssl-dev',
|
||||||
'pkg-config',
|
'pkg-config',
|
||||||
'abiword',
|
'abiword',
|
||||||
'build-essential',
|
'build-essential']:
|
||||||
'nodejs',
|
|
||||||
'npm',]:
|
|
||||||
ensure => present
|
ensure => present
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package { ['nodejs', 'npm']:
|
||||||
|
ensure => purged
|
||||||
|
}
|
||||||
|
|
||||||
|
buildsource { "${base_install_dir}/nodejs":
|
||||||
|
creates => '/usr/local/bin/node',
|
||||||
|
require => [Package['gzip'],
|
||||||
|
Package['curl'],
|
||||||
|
Package['python'],
|
||||||
|
Package['libssl-dev'],
|
||||||
|
Package['pkg-config'],
|
||||||
|
Package['build-essential'],
|
||||||
|
Git_repo['nodejs_repo']]
|
||||||
|
}
|
||||||
|
|
||||||
git_repo { 'etherpad_repo':
|
git_repo { 'etherpad_repo':
|
||||||
repo => 'https://github.com/Pita/etherpad-lite.git',
|
repo => 'https://github.com/Pita/etherpad-lite.git',
|
||||||
dest => "${base_install_dir}/etherpad-lite",
|
dest => "${base_install_dir}/etherpad-lite",
|
||||||
@ -113,16 +167,9 @@ class etherpad_lite (
|
|||||||
cwd => "${base_install_dir}/etherpad-lite",
|
cwd => "${base_install_dir}/etherpad-lite",
|
||||||
environment => "HOME=${base_log_dir}/${ep_user}",
|
environment => "HOME=${base_log_dir}/${ep_user}",
|
||||||
require => [Git_repo['etherpad_repo'],
|
require => [Git_repo['etherpad_repo'],
|
||||||
Package['gzip'],
|
Buildsource["${base_install_dir}/nodejs"]],
|
||||||
Package['curl'],
|
before => File["${base_install_dir}/etherpad-lite/settings.json"],
|
||||||
Package['python'],
|
creates => "${base_install_dir}/etherpad-lite/node_modules"
|
||||||
Package['libssl-dev'],
|
|
||||||
Package['pkg-config'],
|
|
||||||
Package['build-essential'],
|
|
||||||
Package['nodejs'],
|
|
||||||
Package['npm']
|
|
||||||
],
|
|
||||||
before => File["${base_install_dir}/etherpad-lite/settings.json"]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/init/etherpad-lite.conf':
|
file { '/etc/init/etherpad-lite.conf':
|
||||||
|
@ -20,7 +20,7 @@ end script
|
|||||||
|
|
||||||
script
|
script
|
||||||
cd $EPHOME
|
cd $EPHOME
|
||||||
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \
|
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- /usr/local/bin/node node_modules/ep_etherpad-lite/node/server.js \
|
||||||
>> $EPLOGS/access.log \
|
>> $EPLOGS/access.log \
|
||||||
2>> $EPLOGS/error.log
|
2>> $EPLOGS/error.log
|
||||||
end script
|
end script
|
||||||
|
Loading…
Reference in New Issue
Block a user