summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2012-03-22 16:04:10 +0100
committerAndreas Maunz <andreas@maunz.de>2012-03-22 16:04:10 +0100
commit9f08f7fb5987576cdfc386396f490889ff648127 (patch)
tree996c18a4891015b5048a64f79c1ed5aaaf5e3594
parent1130cf2d6e254b6b16358244116a4837352cb5bd (diff)
File deletions
-rw-r--r--aa-local.yaml41
-rw-r--r--aa-server.yaml41
-rwxr-xr-x[-rw-r--r--]base-install.sh0
-rwxr-xr-xconfig.sh3
-rwxr-xr-xenvironment_update.sh77
-rwxr-xr-xinstall14
-rwxr-xr-xkernlab.sh71
-rw-r--r--nginx.conf42
-rwxr-xr-xopenbabel.sh1
-rwxr-xr-xopentox-ruby.sh91
-rw-r--r--ot-tools-root.sh82
-rw-r--r--ot-tools-user.sh83
-rw-r--r--production.yaml26
-rwxr-xr-xredis.sh79
-rwxr-xr-xruby.sh78
-rw-r--r--test-ob-rb.rb1
16 files changed, 3 insertions, 727 deletions
diff --git a/aa-local.yaml b/aa-local.yaml
deleted file mode 100644
index 75cccd0..0000000
--- a/aa-local.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-# OpenSSO Authorization
-# set ":server: " to disable A&A
-:authorization:
- :server: AA
- :free_request: #request-method not controlled by A&A
- - "GET"
- - "POST"
- - "HEAD"
- - "DELETE"
- - "PUT"
- :authenticate_request: #only for authenticated user
- - ""
- :authorize_request: #only for authenticated and authorizeduser
- - ""
-# Exceptions:
- :free_uris: #request-method for uri not controlled by A&A
- ? - :GET
- : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/algorithm/
- - "http://SERVERNAMENGINX_PORT/model"
- - "http://SERVERNAMENGINX_PORT/dataset"
- - "http://SERVERNAMENGINX_PORT/validation"
- - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/validation\/resources/
- - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/validation\/[a-z,A-Z,\/,_\-]*$/
- ? - :GET
- - :POST
- : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/toxcreate\/[a-z,A-Z,\/,_\-]*$/
- - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/task/
- - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/compound/
- - !ruby/regexp /sign_(in|out)$/
- ? - :PUT
- : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/task/
- ? - :DELETE
- : - "http://SERVERNAMENGINX_PORT/task/cleanup"
-
- :authorize_exceptions: #request-method for uri only authenticated, no authorization
- ? - :POST
- : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/algorithm/
- - "http://SERVERNAMENGINX_PORT/dataset"
- - "http://SERVERNAMENGINX_PORT/model"
- - "http://SERVERNAMENGINX_PORT/validation"
- - !ruby/regexp /http\:\/\/ESCAPEDSERVERNGINX_PORT\/validation\/[a-z,A-Z,\/,_\-]*$/
diff --git a/aa-server.yaml b/aa-server.yaml
deleted file mode 100644
index 75cccd0..0000000
--- a/aa-server.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-# OpenSSO Authorization
-# set ":server: " to disable A&A
-:authorization:
- :server: AA
- :free_request: #request-method not controlled by A&A
- - "GET"
- - "POST"
- - "HEAD"
- - "DELETE"
- - "PUT"
- :authenticate_request: #only for authenticated user
- - ""
- :authorize_request: #only for authenticated and authorizeduser
- - ""
-# Exceptions:
- :free_uris: #request-method for uri not controlled by A&A
- ? - :GET
- : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/algorithm/
- - "http://SERVERNAMENGINX_PORT/model"
- - "http://SERVERNAMENGINX_PORT/dataset"
- - "http://SERVERNAMENGINX_PORT/validation"
- - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/validation\/resources/
- - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/validation\/[a-z,A-Z,\/,_\-]*$/
- ? - :GET
- - :POST
- : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/toxcreate\/[a-z,A-Z,\/,_\-]*$/
- - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/task/
- - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/compound/
- - !ruby/regexp /sign_(in|out)$/
- ? - :PUT
- : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/task/
- ? - :DELETE
- : - "http://SERVERNAMENGINX_PORT/task/cleanup"
-
- :authorize_exceptions: #request-method for uri only authenticated, no authorization
- ? - :POST
- : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/algorithm/
- - "http://SERVERNAMENGINX_PORT/dataset"
- - "http://SERVERNAMENGINX_PORT/model"
- - "http://SERVERNAMENGINX_PORT/validation"
- - !ruby/regexp /http\:\/\/ESCAPEDSERVERNGINX_PORT\/validation\/[a-z,A-Z,\/,_\-]*$/
diff --git a/base-install.sh b/base-install.sh
index e9e0860..e9e0860 100644..100755
--- a/base-install.sh
+++ b/base-install.sh
diff --git a/config.sh b/config.sh
index 5bf084c..bd7f1ab 100755
--- a/config.sh
+++ b/config.sh
@@ -21,8 +21,7 @@ REDIS_NUM_VER="2.2.2"
# 4) Server settings.
NGINX_SERVERNAME="toxcreate3.in-silico.ch"
WWW_DEST="$OT_PREFIX/www"
-UNICORN_PORT="" # set to empty string ("") for port 80 otherwise set to port *using colon* e.g. ":8080"
-OHM_PORT="" # set to port (no colon)
+OHM_PORT="6381" # set to port (no colon)
# Done.
diff --git a/environment_update.sh b/environment_update.sh
deleted file mode 100755
index d0beae4..0000000
--- a/environment_update.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-# Update script for OpenTox-ruby and webservices
-# Authors: Andreas Maunz, David Vorgrimmler
-# This script updates a productiv version of IST Opentox Services. All data will be saved and recovered.
-# Make sure your web services are down befor running this script.
-# You may modify some variables e.g. HOME, OTPREFIX, BACKUP_DIR.
-# opentox/install is needed and has to be configured
-
-HOME="/home/opentox"
-. $HOME/.opentox-ui.sh
-
-OTPREFIX="$HOME/opentox"
-BACKUP_DIR="$OTPREFIX/ot-server-backup"
-mkdir $BACKUP_DIR >/dev/null 2>&1
-mkdir -p $BACKUP_DIR/tmp/dataset/public >/dev/null 2>&1
-mkdir -p $BACKUP_DIR/tmp/model/public >/dev/null 2>&1
-mkdir -p $BACKUP_DIR/tmp/validation >/dev/null 2>&1
-#mkdir -p $BACKUP_DIR/tmp/log >/dev/null 2>&1
-
-
-echo "Creating backup of www..."
-TAR_NAME=$BACKUP_DIR/"www_`date +%y%m%d`.tar.gz"
-
-if [ -e $TAR_NAME ] || tar czvf $TAR_NAME "$OTPREFIX/opentox-ruby/www"; then
- echo
- echo "Will delete www in 10s! Press Ctrl+C to abort..."
- sleep 10
- sudo rm -rf "$OTPREFIX/opentox-ruby/www"
-fi
-
-
-NGINX="`which nginx`"
-RAKE="`which rake`"
-
-if ! [ -e "$RAKE" ]; then
- echo "Rake not found."
- exit 1
-fi
-if ! [ -e "$NGINX" ]; then
- echo "Nginx not found."
- exit 1
-fi
-if ! cd "$OTPREFIX/install"; then
- echo "$OTPREFIX/install dir not found"
-fi
-
-
-OTINSTALL="$OTPREFIX/install/opentox-webservices.sh"
-if ! [ -e "$OTINSTALL" ]; then
- echo "$OTINSTALL not found."
- exit 1
-fi
-chmod +x $OTINSTALL
-`$OTINSTALL`
-echo "$OTINSTALL script end."
-
-
-OTRUBYINSTALL="$OTPREFIX/install/opentox-ruby.sh"
-if ! [ -e "$OTRUBYINSTALL" ]; then
- echo "$OTRUBYINSTALL not found."
- exit 1
-fi
-chmod +x $OTRUBYINSTALL
-`$OTRUBYINSTALL`
-echo "$OTRUBYINSTALL script end."
-
-
-echo "Extracting backup of www..."
-cd /
-DEST_DATASET=`echo "$OTPREFIX/opentox-ruby/www/opentox/dataset/public/*yaml" | sed 's/.\(.*\)/\1/'`
-DEST_MODEL=`echo "$OTPREFIX/opentox-ruby/www/opentox/model/public/*yaml" | sed 's/.\(.*\)/\1/'`
-DEST_REPORTS=`echo "$OTPREFIX/opentox-ruby/www/opentox/validation/reports" | sed 's/.\(.*\)/\1/'`
-tar xzvf $TAR_NAME --wildcards $DEST_DATASET
-tar xzvf $TAR_NAME --wildcards $DEST_MODEL
-tar xzvf $TAR_NAME $DEST_REPORTS
-cd -
-echo "End of script."
diff --git a/install b/install
index a486660..c3cf9a4 100755
--- a/install
+++ b/install
@@ -45,22 +45,10 @@ echo "Cleaning up $HOME/tmp files."
rm -rf $HOME/tmp/openbabel* $HOME/tmp/kernlab* $HOME/tmp/ruby*
. "./base-install.sh"
-. "./ruby.sh"
. "./openbabel.sh"
-. "./kernlab.sh"
-. "./opentox-ruby.sh"
-
-if [ "$install" != "gem" ]
-then
- . "./nginx.sh"
- . "./redis.sh"
- . "./opentox-webservices.sh"
-fi
echo
echo "Installation finished and system configured."
echo "Destination: '$OT_PREFIX'"
-echo "Nginx: '$NGINX_DEST'"
-echo "Redis: '$REDIS_DEST'"
-echo "IMPORTANT: Include the file '$OT_UI_CONF' in your shell or system startup to have the system automatically configured."
+echo "IMPORTANT: Include '$OT_UI_CONF' in your shell or system startup to have the system automatically configured."
echo
diff --git a/kernlab.sh b/kernlab.sh
deleted file mode 100755
index 511874b..0000000
--- a/kernlab.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-#
-# Installs Kernlab.
-# Author: Christoph Helma, Andreas Maunz.
-#
-
-. "`pwd`/utils.sh"
-DIR="`pwd`"
-
-if [ "$(id -u)" = "0" ]; then
- echo "This script must be run as non-root." 1>&2
- exit 1
-fi
-
-# Utils
-WGET="`which wget`"
-if [ ! -e "$WGET" ]; then
- echo "'wget' missing. Install 'wget' first. Aborting..."
- exit 1
-fi
-
-R="`which R`"
-if [ ! -e "$R" ]; then
- echo "'R' missing. Install 'R' first. Aborting..."
- exit 1
-fi
-
-# Pkg
-LOG="$HOME/tmp/`basename $0`-log.txt"
-
-echo
-echo "Kernlab ('$LOG')."
-
-R_DONE=false
-mkdir "$KL_DEST" >/dev/null 2>&1
-if [ ! -d "$KL_DEST" ]; then
- echo "Install directory '$KL_DEST' is not available! Aborting..."
- exit 1
-else
- if ! rmdir "$KL_DEST" >/dev/null 2>&1; then # if not empty this will fail
- R_DONE=true
- else
- mkdir "$KL_DEST" >/dev/null 2>&1
- fi
-fi
-
-
-if ! $R_DONE; then
- cd $HOME/tmp
- URI="http://cran.r-project.org/src/contrib/Archive/kernlab/kernlab_$KL_VER.tar.gz"
- cmd="$WGET $URI" && run_cmd "$cmd" "Download"
-
- export R_LIBS="$KL_DEST" # To install non-global
- cmd="$R CMD INSTALL kernlab_$KL_VER.tar.gz" && run_cmd "$cmd" "Install"
-fi
-
-
-if [ ! -f $KL_CONF ]; then
-
- echo "if echo \"\$R_LIBS\" | grep -v \"$KL_DEST\">/dev/null 2>&1; then export R_LIBS=\"$KL_DEST\"; fi" >> "$KL_CONF"
- echo "if ! [ -d \"$KL_DEST\" ]; then echo \"\$0: '$KL_DEST' is not a directory!\"; fi" >> "$KL_CONF"
- echo "R package destination has been stored in '$KL_CONF'."
-
- if ! grep "$KL_CONF" $OT_UI_CONF >/dev/null 2>&1 ; then
- echo ". \"$KL_CONF\"" >> $OT_UI_CONF
- fi
-
-fi
-
-cd "$DIR"
-
diff --git a/nginx.conf b/nginx.conf
deleted file mode 100644
index 9f87adf..0000000
--- a/nginx.conf
+++ /dev/null
@@ -1,42 +0,0 @@
-worker_processes 10;
-
-events {
- worker_connections 1024;
-}
-
-http {
-
- server_names_hash_bucket_size 256;
-
- passenger_root RUBY_DEST/lib/ruby/gems/1.8/gems/PASSENGER;
- passenger_ruby RUBY_DEST/bin/ruby;
- passenger_default_user USER;
- passenger_log_level 2;
- passenger_spawn_method conservative;
- #passenger_use_global_queue on;
-
- include NGINX_DEST/conf/mime.types;
- default_type application/octet-stream;
-
- sendfile on;
- keepalive_timeout 65;
-
- # webservices
- server {
- listen NGINX_PORT;
- client_max_body_size 5000m;
- server_name SERVERNAME;
- location / {
- root WWW_DEST;
- passenger_enabled on;
- }
- passenger_base_uri /compound;
- passenger_base_uri /dataset;
- passenger_base_uri /algorithm;
- passenger_base_uri /model;
- passenger_base_uri /task;
- passenger_base_uri /validation;
- passenger_base_uri /toxcreate;
- }
-
-}
diff --git a/openbabel.sh b/openbabel.sh
index 367fb28..b51ed17 100755
--- a/openbabel.sh
+++ b/openbabel.sh
@@ -74,3 +74,4 @@ if [ ! -f "$OB_CONF" ]; then
fi
+cd "$DIR"
diff --git a/opentox-ruby.sh b/opentox-ruby.sh
deleted file mode 100755
index 9705682..0000000
--- a/opentox-ruby.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-#
-# Installs Opentox-ruby gem.
-# Author: Christoph Helma, Andreas Maunz.
-#
-
-. "`pwd`/utils.sh"
-DIR="`pwd`"
-
-if [ "$(id -u)" = "0" ]; then
- echo "This script must be run as non-root." 1>&2
- exit 1
-fi
-
-# Utils
-GIT="`which git`"
-if [ ! -e "$GIT" ]; then
- echo "'git' missing. Install 'git' first. Aborting..."
- exit 1
-fi
-
-GEM="`which gem`"
-if [ ! -e "$GEM" ]; then
- echo "'gem' missing. Install 'gem' first. Aborting..."
- exit 1
-fi
-
-RAKE="`which rake`"
-if [ ! -e "$RAKE" ]; then
- echo "'rake' missing. Install 'rake' first. Aborting..."
- exit 1
-fi
-
-
-# Pkg
-LOG="$HOME/tmp/`basename $0`-log.txt"
-
-echo
-echo "Opentox-ruby ('$LOG'):"
-
-for mygem in opentox-ruby builder jeweler; do
- if ! $GEM list | sed 's/\ .*//g' | grep -x "$mygem" >/dev/null 2>&1; then
- cmd="$GEM install $mygem" && run_cmd "$cmd" "$mygem"
- fi
-done
-
-
-servername="`hostname`"
-serverdomain="`dnsdomainname`"
-if [ -n "$serverdomain" ]; then
- servername="$servername"."$serverdomain"
-fi
-escapedserver="`echo $servername | sed 's/\/\\\//'`"
-
-if [ "$OT_BRANCH" = "development" ]; then
- logger=":logger: backtrace"
-else
- logger=""
-fi
-
-if [ "$OT_INSTALL" = "server" ]; then
- aa="https:\/\/opensso.in-silico.ch"
-else
- aa=""
-fi
-
-mkdir -p "$HOME/.opentox/config" >>$LOG 2>&1
-mkdir -p "$HOME/.opentox/log" >>$LOG 2>&1
-mkdir -p "$HOME/.opentox/tmp" >>$LOG 2>&1
-
-$GIT checkout production.yaml >>$LOG 2>&1
-$GIT checkout aa-$OT_INSTALL.yaml >>$LOG 2>&1
-
-cmd="sed -e \"s,SERVERNAME,$servername,;s,ESCAPEDSERVER,$escapedserver,;s,LOGGER,$logger,;s,AA,$aa,;s,WWW_DEST,$WWW_DEST,;s,NGINX_PORT,$NGINX_PORT,;s,OHM_PORT,$OHM_PORT,\" production.yaml > $HOME/.opentox/config/production.yaml" && run_cmd "$cmd" "Config 1"
-cmd="sed -e \"s,SERVERNAME,$servername,;s,ESCAPEDSERVER,$escapedserver,;s,LOGGER,$logger,;s,AA,$aa,;s,WWW_DEST,$WWW_DEST,;s,NGINX_PORT,$NGINX_PORT,;s,OHM_PORT,$OHM_PORT,\" aa-$OT_INSTALL.yaml >> $HOME/.opentox/config/production.yaml" && run_cmd "$cmd" "Config 2"
-
-if [ "$OT_BRANCH" = "development" ] || expr match "$OT_BRANCH" "release"; then
- mkdir -p $WWW_DEST/opentox >>$LOG 2>&1
- cd $WWW_DEST/opentox >>$LOG 2>&1
- rm -rf opentox-ruby >>$LOG 2>&1
- $GIT clone git://github.com/opentox/opentox-ruby.git >>$LOG 2>&1
- cd opentox-ruby >>$LOG 2>&1
- $GIT checkout -b $OT_BRANCH origin/$OT_BRANCH >>$LOG 2>&1
- cmd="$RAKE install" && run_cmd "$cmd" "Install"
- GEM_LIB=`$GEM which opentox-ruby | sed 's/\/opentox-ruby.rb//'`
- rm -rf "$GEM_LIB~" >>$LOG 2>&1
- mv "$GEM_LIB" "$GEM_LIB~" >>$LOG 2>&1
- cmd="ln -sf $WWW_DEST/opentox/opentox-ruby/lib $GEM_LIB" && run_cmd "$cmd" "Linking back"
-fi
-
-cd "$DIR"
diff --git a/ot-tools-root.sh b/ot-tools-root.sh
deleted file mode 100644
index 7e1233b..0000000
--- a/ot-tools-root.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-# Some useful scripts to put in your ~/.bashrc in case you are using bash (assuming OT_PREFIX is '~/opentox-ruby'):
-# USE ONLY IF YOUR NGINX PORT IS less or equal to 1024 (PRIVILEGED)
-
-# Load server config
-otconfig() {
- source $HOME/.opentox-ui.sh
-}
-
-# Update the version
-otupdate() {
- START_DIR=`pwd`
- otconfig
- cd $HOME/opentox-ruby/www/opentox
- for d in `find -not -name "." -type d -maxdepth 1 2>/dev/null`; do echo ; echo $d ; cd $d ; MYBRANCH=`git branch | grep "*" | sed 's/.*\ //g'`; git pull origin $MYBRANCH ; cd - ; done
- cd $HOME/opentox-ruby/www/opentox/algorithm/libfminer
- mv libbbrc/Makefile libbbrc/Makefile~
- mv liblast/Makefile liblast/Makefile~
- if ! git pull; then
- echo "Error! Pull for Fminer failed."
- return 1
- fi
- mv libbbrc/Makefile~ libbbrc/Makefile
- mv liblast/Makefile~ liblast/Makefile
- make -C libbbrc/ clean
- make -C libbbrc/ ruby
- make -C liblast/ clean
- make -C liblast/ ruby
- cd -
- cd $HOME/opentox-ruby/www/opentox/algorithm/last-utils
- if ! git pull; then
- echo "Error! Pull for Last-Utils failed."
- return 1
- fi
- cd -
- cd opentox-ruby
- LINK_DIR=`gem which opentox-ruby | sed 's/\/opentox-ruby.rb//'`
- if [ -h $LINK_DIR ]; then
- rm -f $LINK_DIR
- fi
- rake install
- if ! [ -h $LINK_DIR ]; then
- echo "Warning! Your lib $LINK_DIR is no symlink. Linking back for you..."
- rm -rf "$LINK_DIR~"
- mv "$LINK_DIR" "$LINK_DIR~"
- ln -sf $HOME/opentox-ruby/www/opentox/opentox-ruby/lib `echo ${LINK_DIR::${#LINK_DIR}-3}`
- fi
- echo "Please execute 'otstart' to restart."
- cd "$START_DIR"
-}
-
-# Start the server
-otstart() {
- otconfig
- otkill
- sudo bash -c "nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &"
- sudo bash -c "nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &"
- sleep 2
- if ! pgrep -u root nginx>/dev/null 2>&1; then echo "Failed to start nginx."; fi
- if ! pgrep -u root redis-server>/dev/null 2>&1; then echo "Failed to start redis."; fi
-}
-
-# Display log
-alias otless='less $HOME/.opentox/log/production.log'
-
-# Tail log
-alias ottail='tail -f $HOME/.opentox/log/production.log'
-
-# Reload the server
-otreload() {
- otconfig
- sudo bash -c "nginx -s reload"
-}
-
-# Kill the server
-otkill() {
- otconfig
- sudo killall -u root nginx >/dev/null 2>&1
- sudo bash -c "redis-cli -p $OHM_PORT shutdown >/dev/null 2>&1"
- while sudo ps x | grep PassengerWatchdog | grep -v grep >/dev/null 2>&1; do sleep 1; done
- while sudo ps x | grep Rack | grep -v grep >/dev/null 2>&1; do sleep 1; done
- for p in `pgrep -u root R 2>/dev/null`; do sudo kill -9 $p; done
-}
diff --git a/ot-tools-user.sh b/ot-tools-user.sh
deleted file mode 100644
index 57c6c00..0000000
--- a/ot-tools-user.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-# Some useful scripts to put in your ~/.bashrc in case you are using bash (assuming OT_PREFIX is '~/opentox-ruby'):
-# USE ONLY IF YOUR NGINX PORT IS >1024 (NOT PRIVILEGED)
-
-# Load server config
-otconfig() {
- source $HOME/.opentox-ui.sh
-}
-
-# Update the version
-otupdate() {
- START_DIR=`pwd`
- otconfig
- cd $HOME/opentox-ruby/www/opentox
- for d in `find -not -name "." -type d -maxdepth 1 2>/dev/null`; do echo ; echo $d ; cd $d ; MYBRANCH=`git branch | grep "*" | sed 's/.*\ //g'`; git pull origin $MYBRANCH ; cd - ; done
- cd $HOME/opentox-ruby/www/opentox/algorithm/libfminer
- mv libbbrc/Makefile libbbrc/Makefile~
- mv liblast/Makefile liblast/Makefile~
- if ! git pull; then
- echo "Error! Pull for Fminer failed."
- return 1
- fi
- mv libbbrc/Makefile~ libbbrc/Makefile
- mv liblast/Makefile~ liblast/Makefile
- make -C libbbrc/ clean
- make -C libbbrc/ ruby
- make -C liblast/ clean
- make -C liblast/ ruby
- cd -
- cd $HOME/opentox-ruby/www/opentox/algorithm/last-utils
- if ! git pull; then
- echo "Error! Pull for Last-Utils failed."
- return 1
- fi
- cd -
- cd opentox-ruby
- LINK_DIR=`gem which opentox-ruby | sed 's/\/opentox-ruby.rb//'`
- if [ -h $LINK_DIR ]; then
- rm -f $LINK_DIR
- fi
- rake install
- if ! [ -h $LINK_DIR ]; then
- echo "Warning! Your lib $LINK_DIR is no symlink. Linking back for you..."
- rm -rf "$LINK_DIR~"
- mv "$LINK_DIR" "$LINK_DIR~"
- ln -sf $HOME/opentox-ruby/www/opentox/opentox-ruby/lib `echo ${LINK_DIR::${#LINK_DIR}-3}`
- fi
- echo "Please execute 'otstart' to restart."
- cd "$START_DIR"
-}
-
-# Start the server
-otstart() {
- otconfig
- otkill
- bash -c "nohup redis-server $HOME/opentox-ruby/redis-*/redis.conf >/dev/null 2>&1 &"
- bash -c "nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &"
- sleep 2
- if ! pgrep -u $USER nginx>/dev/null 2>&1; then echo "Failed to start nginx."; fi
- if ! pgrep -u $USER redis-server>/dev/null 2>&1; then echo "Failed to start redis."; fi
-}
-
-# Display log
-alias otless='less $HOME/.opentox/log/production.log'
-
-# Tail log
-alias ottail='tail -f $HOME/.opentox/log/production.log'
-
-# Reload the server
-otreload() {
- otconfig
- bash -c "nginx -s reload"
-}
-
-# Kill the server
-otkill() {
- otconfig
- killall nginx >/dev/null 2>&1
- bash -c "redis-cli -p $OHM_PORT shutdown >/dev/null 2>&1"
- while ps x | grep PassengerWatchdog | grep -v grep >/dev/null 2>&1; do sleep 1; done
- while ps x | grep Rack | grep -v grep >/dev/null 2>&1; do sleep 1; done
- for p in `pgrep -u $USER R 2>/dev/null`; do kill -9 $p; done
-}
-
diff --git a/production.yaml b/production.yaml
deleted file mode 100644
index e0f39d4..0000000
--- a/production.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-:base_dir: WWW_DEST
-
-:services:
-# make sure to enter a full uri (including training slash)
- opentox-compound: "http://SERVERNAMENGINX_PORT/compound/"
- opentox-dataset: "http://SERVERNAMENGINX_PORT/dataset/"
- opentox-algorithm: "http://SERVERNAMENGINX_PORT/algorithm/"
- opentox-model: "http://SERVERNAMENGINX_PORT/model/"
- opentox-task: "http://SERVERNAMENGINX_PORT/task/"
- opentox-toxcreate: "http://SERVERNAMENGINX_PORT/toxcreate/"
- opentox-validation: "http://SERVERNAMENGINX_PORT/validation/"
- opentox-ontology: "http://apps.ideaconsult.net:8080/ontology"
-
-:json_hosts:
- - "localhost"
- - "SERVERNAME"
- - "webservices.in-silico.ch"
- - "opentox.informatik.uni-freiburg.de"
-
-:ohm_port: OHM_PORT
-
-# Uncomment for verbose logging
-LOGGER
-:logger: debug
-:backtrace: true
-
diff --git a/redis.sh b/redis.sh
deleted file mode 100755
index f07d119..0000000
--- a/redis.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-#
-# Installs Redis.
-# Author: Christoph Helma, Andreas Maunz.
-#
-
-. "`pwd`/utils.sh"
-DIR=`pwd`
-
-if [ "$(id -u)" = "0" ]; then
- echo "This script must be run as non-root." 1>&2
- exit 1
-fi
-
-# Utils
-WGET="`which wget`"
-if [ ! -e "$WGET" ]; then
- echo "'wget' missing. Install 'wget' first. Aborting..."
- exit 1
-fi
-
-LOG="$HOME/tmp/`basename $0`-log.txt"
-
-echo
-echo "Redis ('$LOG'):"
-
-
-REDIS_DONE=false
-mkdir "$REDIS_DEST" >/dev/null 2>&1
-if [ ! -d "$REDIS_DEST" ]; then
- echo "Install directory '$REDIS_DEST' is not available! Aborting..."
- exit 1
-else
- if ! rmdir "$REDIS_DEST" >/dev/null 2>&1; then # if not empty this will fail
- REDIS_DONE=true
- fi
-fi
-
-if ! $REDIS_DONE; then
- echo "vm.overcommit_memory = 1" | sudo tee -a /etc/sysctl.conf >>$LOG 2>&1
-
- cd $OT_PREFIX
- URI="http://redis.googlecode.com/files/redis-$REDIS_VER.tar.gz"
- if ! [ -d "redis-$REDIS_VER" ]; then
- cmd="$WGET $URI" && run_cmd "$cmd" "Download"
- cmd="tar zxf redis-$REDIS_VER.tar.gz" && run_cmd "$cmd" "Unpack"
- fi
- cd redis-$REDIS_VER >>$LOG 2>&1
- cmd="make" && run_cmd "$cmd" "Make"
-
- if ! grep "daemonize yes" $REDIS_SERVER_CONF >>$LOG 2>&1 ; then
- echo "daemonize yes" > $REDIS_SERVER_CONF 2>$LOG
- fi
-
- if ! grep "dir `pwd`" $REDIS_SERVER_CONF >>$LOG 2>&1 ; then
- echo "dir `pwd`" >> $REDIS_SERVER_CONF 2>$LOG
- fi
-
- if ! grep "save 900 1" $REDIS_SERVER_CONF >>$LOG 2>&1 ; then
- echo "save 900 1" >> $REDIS_SERVER_CONF 2>$LOG
- fi
-
- if ! grep "port $OHM_PORT" $REDIS_SERVER_CONF >>$LOG 2>&1 ; then
- echo "port $OHM_PORT" >> $REDIS_SERVER_CONF 2>$LOG
- fi
-fi
-
-if [ ! -f $REDIS_CONF ]; then
- echo "if ! echo \"\$PATH\" | grep \"$REDIS_DEST\">/dev/null 2>&1; then export PATH=$REDIS_DEST/src:\$PATH; fi" >> "$REDIS_CONF"
- echo "export OHM_PORT=$OHM_PORT" >> "$REDIS_CONF"
- echo "Redis configuration has been stored in '$REDIS_CONF'."
-
- if ! grep ". \"$REDIS_CONF\"" $OT_UI_CONF; then
- echo ". \"$REDIS_CONF\"" >> $OT_UI_CONF
- fi
-
-fi
-
-cd "$DIR"
diff --git a/ruby.sh b/ruby.sh
deleted file mode 100755
index b88cfe2..0000000
--- a/ruby.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-#
-# Installs Ruby enterprise edition and passenger gem.
-# A configuration file is created and included in your '$OT_UI_CONF'.
-# Author: Christoph Helma, Andreas Maunz.
-#
-
-. "`pwd`/utils.sh"
-DIR="`pwd`"
-
-if [ "$(id -u)" = "0" ]; then
- echo "This script must be run as non-root." 1>&2
- exit 1
-fi
-
-# Utils
-WGET="`which wget`"
-if [ ! -e "$WGET" ]; then
- echo "'wget' missing. Install 'wget' first. Aborting..."
- exit 1
-fi
-RBENV="`which rbenv`"
-if [ ! -e "$RBENV" ]; then
- echo "'rbenv' missing. Install 'rbenv' first. Aborting..."
- exit 1
-fi
-
-# Pkg
-LOG="$HOME/tmp/`basename $0`-log.txt"
-
-echo
-echo "Ruby ('$RUBY_DEST', '$LOG')."
-
-
-mkdir "$RUBY_DEST" >/dev/null 2>&1
-if [ ! -d "$RUBY_DEST" ]; then
- echo "Install directory '$RUBY_DEST' is not available! Aborting..."
- exit 1
-else
- if ! rmdir "$RUBY_DEST" >/dev/null 2>&1; then # if not empty this will fail
- RUBY_DONE=true
- fi
-fi
-
-if [ ! $RUBY_DONE ]; then
- cd $HOME/tmp
- URI="http://ftp.ruby-lang.org/pub/ruby/1.9/$RUBY_VER.tar.gz"
- if ! [ -d "$RUBY_VER" ]; then
- cmd="$WGET $URI" && run_cmd "$cmd" "Download"
- cmd="tar xzf $RUBY_VER.tar.gz" && run_cmd "$cmd" "Unpack"
- fi
- cmd="cd $RUBY_VER" && run_cmd "$cmd" "cd"
- cmd="./configure --prefix=$RUBY_DEST" && run_cmd "$cmd" "Configure"
- cmd="make" && run_cmd "$cmd" "Make"
- cmd="make install" && run_cmd "$cmd" "Install"
- cmd="cd -" && run_cmd "$cmd" "cd"
-fi
-
-cmd="$RBENV rehash" && run_cmd "$cmd" "Rbenv Update"
-
-
-#GEM="`which gem`"
-#if [ ! -e "$GEM" ]; then
-# echo "'gem' missing. Install 'gem' first. Aborting..."
-# exit 1
-#fi
-#
-#export PATH="$RUBY_DEST/bin:$PATH"
-#cmd="$GEM sources -a http://gemcutter.org" && run_cmd "$cmd" "Add Gemcutter"
-#cmd="$GEM sources -a http://rubygems.org" && run_cmd "$cmd" "Add Rubygems"
-#GEMCONF="gem: --no-ri --no-rdoc"
-#if ! grep "$GEMCONF" $HOME/.gemrc >>$LOG 2>&1; then
-# echo "$GEMCONF" | tee -a $HOME/.gemrc >>$LOG 2>&1
-#fi
-
-
-
-cd "$DIR"
diff --git a/test-ob-rb.rb b/test-ob-rb.rb
deleted file mode 100644
index 62fda1e..0000000
--- a/test-ob-rb.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'openbabel'