From 05a78629f18f28f6bdcfa4367ac6fb8fd0106d88 Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 21 Aug 2012 10:29:42 +0200 Subject: Select opentox-server version --- compound.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compound.gemspec b/compound.gemspec index 0d0e9d2..ba6d742 100644 --- a/compound.gemspec +++ b/compound.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 1.9.2' # specify any dependencies here; for example: - s.add_runtime_dependency "opentox-server", "#{VERSION}" + s.add_runtime_dependency "opentox-server", s.version s.add_runtime_dependency "rjb" s.add_runtime_dependency "openbabel" s.post_install_message = "Please configure your service in ~/.opentox/config/compound.rb" -- cgit v1.2.3 From 7ed03c0b9e51c7d15b02bda5fb15f333b7922bf8 Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 21 Aug 2012 10:30:31 +0200 Subject: Added compound installer. --- bin/compound-install | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 bin/compound-install diff --git a/bin/compound-install b/bin/compound-install new file mode 100755 index 0000000..8b79c6e --- /dev/null +++ b/bin/compound-install @@ -0,0 +1,62 @@ +#!/bin/sh + +# Installs Opentox Webservice. +# Author: Christoph Helma, Andreas Maunz. + +SELF=$(basename $0 -install) +[ "`id -u`" = "0" ] && echo "This script must be run as non-root." 1>&2 && exit 1 + +# Adjust ruby version here! +RUBY_NUM_VER="1.9.3-p194" + +echo +echo "Welcome to service installation ( to continue)." +read delete_me + + +# check wd is root of service +DIR=`pwd` +if echo $DIR | grep "$SELF/bin" >/dev/null 2>&1 ; then cd ..; fi + +# # # Boot the script + +# load base config, helper funs, environment +OT_CONFIG_DIR="$HOME/.opentox" +! [ -f "$OT_CONFIG_DIR/config/install/config.sh" ] && echo "config.sh not found." 1>&2 && exit 1 || . $OT_CONFIG_DIR/config/install/config.sh +! [ -f "$OT_PREFIX/install/utils.sh" ] && echo "utils.sh not found." 1>&2 && exit 1 || . $OT_PREFIX/install/utils.sh +[ -f $OT_CONFIG_DIR/opentox-ui.sh ] && . $OT_CONFIG_DIR/opentox-ui.sh # should have been done by user already +RUBY_DIR="$HOME/.rbenv/versions/$RUBY_NUM_VER" + + +# # # Install + +check_utils "rbenv find" +check_log $SELF + +if [ "$OT_BRANCH" = "development" ]; then + cmd="test -d $OT_PREFIX/opentox-server" && run_cmd "$cmd" "Opentox-server" + cmd="test -d $OT_PREFIX/opentox-client" && run_cmd "$cmd" "Opentox-client" +fi + + +# log directory for this service +[ -d $OT_CONFIG_DIR/config/$SELF ] || cmd="mkdir -p $OT_CONFIG_DIR/config/$SELF" && run_cmd "$cmd" "Config directory" + +# ruby +[ "`$RBENV local 2>/dev/null`" = "$RUBY_NUM_VER" ] || install_ruby + +# self +echo +install_with_bundler + +cmd="$OT_PREFIX/4S/bin/4s-backend-setup $SELF" && run_cmd "$cmd" "Create '$SELF' 4store backend" + +# config +[ -f $OT_CONFIG_DIR/config/$SELF.rb ] || touch $OT_CONFIG_DIR/config/$SELF.rb +if ! cat "$OT_CONFIG_DIR/config/$SELF.rb" | grep "four_store">/dev/null 2>&1; then echo '$four_store = { :uri => "http://localhost:9082", :user => "", :password => "" }' >> $OT_CONFIG_DIR/config/$SELF.rb; fi +if ! cat "$OT_DEFAULT_CONF" | grep "$SELF">/dev/null 2>&1; then echo '$compound = { :uri => "http://localhost:8082/compound" }' >> $OT_DEFAULT_CONF; fi + +notify + +# return to wd +cd "$DIR" -- cgit v1.2.3 From 140a59f922eefe3bbc428d559460f0f5ea4a9d26 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 21 Aug 2012 13:20:29 +0300 Subject: Removed Ruby Check --- bin/compound-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/compound-install b/bin/compound-install index 8b79c6e..967b02a 100755 --- a/bin/compound-install +++ b/bin/compound-install @@ -43,7 +43,7 @@ fi [ -d $OT_CONFIG_DIR/config/$SELF ] || cmd="mkdir -p $OT_CONFIG_DIR/config/$SELF" && run_cmd "$cmd" "Config directory" # ruby -[ "`$RBENV local 2>/dev/null`" = "$RUBY_NUM_VER" ] || install_ruby +install_ruby # self echo -- cgit v1.2.3 From b3f369b0f3ebddfd06b0709491ee0048b0a7c007 Mon Sep 17 00:00:00 2001 From: davor Date: Wed, 22 Aug 2012 12:47:53 +0200 Subject: Rm separated 4S bachend. --- bin/compound-install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/compound-install b/bin/compound-install index 967b02a..871293a 100755 --- a/bin/compound-install +++ b/bin/compound-install @@ -53,7 +53,8 @@ cmd="$OT_PREFIX/4S/bin/4s-backend-setup $SELF" && run_cmd "$cmd" "Create '$SELF' # config [ -f $OT_CONFIG_DIR/config/$SELF.rb ] || touch $OT_CONFIG_DIR/config/$SELF.rb -if ! cat "$OT_CONFIG_DIR/config/$SELF.rb" | grep "four_store">/dev/null 2>&1; then echo '$four_store = { :uri => "http://localhost:9082", :user => "", :password => "" }' >> $OT_CONFIG_DIR/config/$SELF.rb; fi +if ! cat "$OT_CONFIG_DIR/config/$SELF.rb" | grep "four_store">/dev/null 2>&1; then echo '$four_store = { :uri => "http://localhost:9088", :user => "", :password => "" }' >> $OT_CONFIG_DIR/config/$SELF.rb; fi +if ! cat "$OT_CONFIG_DIR/config/$SELF.rb" | grep "aa">/dev/null 2>&1; then echo '$aa = { :uri => nil }' >> $OT_CONFIG_DIR/config/$SELF.rb; fi if ! cat "$OT_DEFAULT_CONF" | grep "$SELF">/dev/null 2>&1; then echo '$compound = { :uri => "http://localhost:8082/compound" }' >> $OT_DEFAULT_CONF; fi notify -- cgit v1.2.3 From 068fe693a0ecd0aba769b20a0def1ac048ee45a1 Mon Sep 17 00:00:00 2001 From: davor Date: Wed, 22 Aug 2012 17:19:34 +0300 Subject: Rm 4S backend creation. --- bin/compound-install | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/compound-install b/bin/compound-install index 871293a..9b19210 100755 --- a/bin/compound-install +++ b/bin/compound-install @@ -49,8 +49,6 @@ install_ruby echo install_with_bundler -cmd="$OT_PREFIX/4S/bin/4s-backend-setup $SELF" && run_cmd "$cmd" "Create '$SELF' 4store backend" - # config [ -f $OT_CONFIG_DIR/config/$SELF.rb ] || touch $OT_CONFIG_DIR/config/$SELF.rb if ! cat "$OT_CONFIG_DIR/config/$SELF.rb" | grep "four_store">/dev/null 2>&1; then echo '$four_store = { :uri => "http://localhost:9088", :user => "", :password => "" }' >> $OT_CONFIG_DIR/config/$SELF.rb; fi -- cgit v1.2.3