Commit 45243101 authored by Vivien Alger's avatar Vivien Alger

Install dependencies during software release install

parent 0157a8c1
......@@ -21,6 +21,7 @@ parts =
postgresql
nodejs
etherpad-lite-repository
install-deps
template
lxml-python
eggs
......@@ -58,7 +59,7 @@ mode = 0644
[instance-etherpad-lite]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-etherpad-lite.cfg
md5sum = a1afe0064ad799684d9aa20bdb313495
md5sum = fd7249be8988155110234c7bb877abb9
output = ${buildout:directory}/template-etherpad-lite.cfg
mode = 0644
......@@ -75,16 +76,25 @@ recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
mode = 0644
filename = run.sh.in
md5sum = 934c8acba9253e9d40e0259f46cc68b9
md5sum = eac870b5f30e735e109a48913af2fae3
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[template-deps-script]
recipe = slapos.recipe.download
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/${:filename}
mode = 0644
etherpad-location = ${etherpad-lite-repository:location}
nodejs-location = ${nodejs:location}
curl-location = ${curl:location}
postgre-location = ${postgresql:location}
mode = 0755
md5sum = 53d0d53d419bd9ee592d3e1a1c84c758
filename = installDeps.sh.in
md5sum = ea6f1500abf951972d575f0d8a63befa
location = ${buildout:parts-directory}/${:_buildout_section_name_}
output = ${etherpad-lite-repository:location}/bin/installDeps.sh
[install-deps]
recipe = plone.recipe.command
command = ${template-deps-script:output}
update-command = command
[lxml-python]
python = python2.7
......@@ -42,23 +42,13 @@ port = 9001
mode = 0644
output = $${directory:etherpad-conf}/settings.json
[etherpad-deps-script]
recipe = slapos.recipe.template
url = ${template-deps-script:location}/${template-deps-script:filename}
etherpad-location = $${directory:etherpad-repository-location}
nodejs-location = ${nodejs:location}
curl-location = ${curl:location}
mode = 0755
output = $${rootdirectory:bin}/installDeps.sh
[etherpad-run-script]
recipe = slapos.recipe.template
url = ${template-run-script:location}/${template-run-script:filename}
etherpad-location = ${etherpad-lite-repository:location}
etherpad-repository-location = $${directory:etherpad-repository-location}
nodejs-location = ${nodejs:location}
postgre-location = ${postgresql:location}
etherpad-deps-script-location = $${etherpad-deps-script:output}
etherpad-deps-script-location = ${template-deps-script:output}
etherpad-conf-location = $${etherpad-conf-generation:output}
etherpad-conf-name = settings-$${slap-connection:partition-id}.json
mode = 0755
......
[buildout]
extends =
common.cfg
parts +=
slapos.cookbook-repository
slapos.toolbox-repository
check-recipe
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.toolbox-repository
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = etherpad-lite
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link &&
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
\ No newline at end of file
#!/bin/sh
# Ugly setup
cd ${:etherpad-location}
export PATH=$PATH:${:postgre-location}/bin
#Is gnu-grep (ggrep) installed on SunOS (Solaris)
if [ $(uname) = "SunOS" ]; then
hash ggrep > /dev/null 2>&1 || {
......
......@@ -8,14 +8,8 @@ cp -R ${:etherpad-location}/* ${:etherpad-repository-location}
cd ${:etherpad-repository-location}
# XXX Vivien: very ugly, definitely need to find a cleaner way
cp ${:etherpad-deps-script-location} ${:etherpad-repository-location}/bin/installDeps.sh
cp ${:etherpad-conf-location} ${:etherpad-repository-location}/${:etherpad-conf-name}
export PATH=$PATH:${:postgre-location}/bin
#prepare the enviroment
bin/installDeps.sh $* || exit 1
#Move to the node folder and start
echo "start..."
${:nodejs-location}/bin/node node_modules/ep_etherpad-lite/node/server.js $*
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment