From 1c63985d4100ca7a7e90b03f8e6b9412ec71d20b Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Mon, 31 Oct 2011 10:52:22 +0100 Subject: Fixing symlink creation: restored '/' at end of target path --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 375d22f..79c6569 100644 --- a/README +++ b/README @@ -67,7 +67,7 @@ otupdate() { 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}-4}` + 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" -- cgit v1.2.3 From a6c10ced1118e9b6513a1a24456c5bf35dda7b4b Mon Sep 17 00:00:00 2001 From: David Vorgrimmler Date: Fri, 11 Nov 2011 11:05:06 +0100 Subject: Added tmp folder to .opentox --- opentox-ruby.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/opentox-ruby.sh b/opentox-ruby.sh index 5f8cc65..70d502b 100755 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -66,6 +66,7 @@ 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 -- cgit v1.2.3 From c81acb5265a6a281d2757710f36e2e6e2e48986e Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 15 Nov 2011 14:04:05 +0100 Subject: Added support for PORT --- aa-local.yaml | 30 +++++++++++++++--------------- aa-server.yaml | 30 +++++++++++++++--------------- config.sh | 1 + nginx.conf | 14 +++++++------- nginx.sh | 5 +++++ opentox-ruby.sh | 4 ++-- production.yaml | 14 +++++++------- 7 files changed, 52 insertions(+), 46 deletions(-) diff --git a/aa-local.yaml b/aa-local.yaml index 260c72e..5ca2b72 100644 --- a/aa-local.yaml +++ b/aa-local.yaml @@ -15,25 +15,25 @@ # Exceptions: :free_uris: #request-method for uri not controlled by A&A ? - :GET - : - !ruby/regexp /http:\/\/ESCAPEDSERVER\/algorithm/ - - "http://SERVERNAME/model" - - "http://SERVERNAME/dataset" - - "http://SERVERNAME/validation" - - !ruby/regexp /http:\/\/ESCAPEDSERVER\/validation\/resources/ - - !ruby/regexp /http:\/\/ESCAPEDSERVER\/validation\/[a-z,A-Z,\/,_\-]*$/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/algorithm/ + - "http://SERVERNAMEPORT/model" + - "http://SERVERNAMEPORT/dataset" + - "http://SERVERNAMEPORT/validation" + - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/validation\/resources/ + - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/validation\/[a-z,A-Z,\/,_\-]*$/ ? - :GET - :POST - : - !ruby/regexp /http:\/\/ESCAPEDSERVER\/toxcreate\/[a-z,A-Z,\/,_\-]*$/ - - !ruby/regexp /http:\/\/ESCAPEDSERVER\/task/ - - !ruby/regexp /http:\/\/ESCAPEDSERVER\/compound/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/toxcreate\/[a-z,A-Z,\/,_\-]*$/ + - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/task/ + - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/compound/ - !ruby/regexp /sign_(in|out)$/ ? - :PUT - : - !ruby/regexp /http:\/\/ESCAPEDSERVER\/task/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/task/ :authorize_exceptions: #request-method for uri only authenticated, no authorization ? - :POST - : - !ruby/regexp /http:\/\/ESCAPEDSERVER\/algorithm/ - - "http://SERVERNAME/dataset" - - "http://SERVERNAME/model" - - "http://SERVERNAME/validation" - - !ruby/regexp /http\:\/\/ESCAPEDSERVER\/validation\/[a-z,A-Z,\/,_\-]*$/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/algorithm/ + - "http://SERVERNAMEPORT/dataset" + - "http://SERVERNAMEPORT/model" + - "http://SERVERNAMEPORT/validation" + - !ruby/regexp /http\:\/\/ESCAPEDSERVERPORT\/validation\/[a-z,A-Z,\/,_\-]*$/ diff --git a/aa-server.yaml b/aa-server.yaml index 260c72e..5ca2b72 100644 --- a/aa-server.yaml +++ b/aa-server.yaml @@ -15,25 +15,25 @@ # Exceptions: :free_uris: #request-method for uri not controlled by A&A ? - :GET - : - !ruby/regexp /http:\/\/ESCAPEDSERVER\/algorithm/ - - "http://SERVERNAME/model" - - "http://SERVERNAME/dataset" - - "http://SERVERNAME/validation" - - !ruby/regexp /http:\/\/ESCAPEDSERVER\/validation\/resources/ - - !ruby/regexp /http:\/\/ESCAPEDSERVER\/validation\/[a-z,A-Z,\/,_\-]*$/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/algorithm/ + - "http://SERVERNAMEPORT/model" + - "http://SERVERNAMEPORT/dataset" + - "http://SERVERNAMEPORT/validation" + - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/validation\/resources/ + - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/validation\/[a-z,A-Z,\/,_\-]*$/ ? - :GET - :POST - : - !ruby/regexp /http:\/\/ESCAPEDSERVER\/toxcreate\/[a-z,A-Z,\/,_\-]*$/ - - !ruby/regexp /http:\/\/ESCAPEDSERVER\/task/ - - !ruby/regexp /http:\/\/ESCAPEDSERVER\/compound/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/toxcreate\/[a-z,A-Z,\/,_\-]*$/ + - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/task/ + - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/compound/ - !ruby/regexp /sign_(in|out)$/ ? - :PUT - : - !ruby/regexp /http:\/\/ESCAPEDSERVER\/task/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/task/ :authorize_exceptions: #request-method for uri only authenticated, no authorization ? - :POST - : - !ruby/regexp /http:\/\/ESCAPEDSERVER\/algorithm/ - - "http://SERVERNAME/dataset" - - "http://SERVERNAME/model" - - "http://SERVERNAME/validation" - - !ruby/regexp /http\:\/\/ESCAPEDSERVER\/validation\/[a-z,A-Z,\/,_\-]*$/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/algorithm/ + - "http://SERVERNAMEPORT/dataset" + - "http://SERVERNAMEPORT/model" + - "http://SERVERNAMEPORT/validation" + - !ruby/regexp /http\:\/\/ESCAPEDSERVERPORT\/validation\/[a-z,A-Z,\/,_\-]*$/ diff --git a/config.sh b/config.sh index ae90af3..dcd4db3 100755 --- a/config.sh +++ b/config.sh @@ -22,6 +22,7 @@ REDIS_NUM_VER="2.2.2" # 4) Server settings. NGINX_SERVERNAME="localhost" WWW_DEST="$OT_PREFIX/www" +PORT="" # leave empty for port 80 otherwise set to e.g. ":8080" # Done. diff --git a/nginx.conf b/nginx.conf index c89efe2..4dcf81a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -8,14 +8,14 @@ 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_root /home/ot0/opentox-ruby/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.9; + passenger_ruby /home/ot0/opentox-ruby/ruby-enterprise-1.8.7-2011.03/bin/ruby; + passenger_default_user ot0; passenger_log_level 2; passenger_spawn_method conservative; #passenger_use_global_queue on; - include NGINX_DEST/conf/mime.types; + include /home/ot0/opentox-ruby/nginx/conf/mime.types; default_type application/octet-stream; sendfile on; @@ -23,11 +23,11 @@ http { # webservices server { - listen 80; + listen PORT; client_max_body_size 5000m; - server_name SERVERNAME; + server_name toxcreate3; location / { - root WWW_DEST; + root /home/ot0/opentox-ruby/www; passenger_enabled on; } passenger_base_uri /compound; diff --git a/nginx.sh b/nginx.sh index 800165e..3a872bc 100755 --- a/nginx.sh +++ b/nginx.sh @@ -53,6 +53,11 @@ servername=`hostname` $GIT checkout nginx.conf>>$LOG 2>&1 cmd="sed -i -e \"s,PASSENGER,$passenger,;s,SERVERNAME,$servername,;s,RUBY_DEST,$RUBY_DEST,;s,NGINX_DEST,$NGINX_DEST,;s,WWW_DEST,$WWW_DEST,\" ./nginx.conf" && run_cmd "$cmd" "Config" cmd="sed -i -e \"s,USER,`whoami`,\" ./nginx.conf" && run_cmd "$cmd" "User" +PORT=`echo "$PORT" | sed 's/^.//g'` +if [ -z "$PORT" ]; then + PORT=80 +fi +cmd="sed -i -e \"s,PORT,$PORT,\" ./nginx.conf" && run_cmd "$cmd" "Port" cmd="cp ./nginx.conf \"$NGINX_DEST/conf\"" && run_cmd "$cmd" "Copy" if [ ! -f $NGINX_CONF ]; then diff --git a/opentox-ruby.sh b/opentox-ruby.sh index 70d502b..03d6316 100755 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -71,8 +71,8 @@ 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,\" 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,\" aa-$OT_INSTALL.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,PORT,$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,PORT,$PORT,\" aa-$OT_INSTALL.yaml >> $HOME/.opentox/config/production.yaml" && run_cmd "$cmd" "Config 1" if [ "$OT_BRANCH" = "development" ] || expr match "$OT_BRANCH" "release"; then mkdir -p $WWW_DEST/opentox >>$LOG 2>&1 diff --git a/production.yaml b/production.yaml index 09efad0..d133cd0 100644 --- a/production.yaml +++ b/production.yaml @@ -2,13 +2,13 @@ :services: # make sure to enter a full uri (including training slash) - opentox-compound: "http://SERVERNAME/compound/" - opentox-dataset: "http://SERVERNAME/dataset/" - opentox-algorithm: "http://SERVERNAME/algorithm/" - opentox-model: "http://SERVERNAME/model/" - opentox-task: "http://SERVERNAME/task/" - opentox-toxcreate: "http://SERVERNAME/toxcreate/" - opentox-validation: "http://SERVERNAME/validation/" + opentox-compound: "http://SERVERNAMEPORT/compound/" + opentox-dataset: "http://SERVERNAMEPORT/dataset/" + opentox-algorithm: "http://SERVERNAMEPORT/algorithm/" + opentox-model: "http://SERVERNAMEPORT/model/" + opentox-task: "http://SERVERNAMEPORT/task/" + opentox-toxcreate: "http://SERVERNAMEPORT/toxcreate/" + opentox-validation: "http://SERVERNAMEPORT/validation/" opentox-ontology: "http://apps.ideaconsult.net:8080/ontology" :json_hosts: -- cgit v1.2.3 From 4f89b9975ba06d9e2fffe862b3a12978cab5155b Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 15 Nov 2011 14:28:49 +0100 Subject: Minor fixes --- base-install.sh | 2 +- config.sh | 4 ++-- nginx.conf | 2 +- openbabel.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/base-install.sh b/base-install.sh index 373df1f..90abb6e 100644 --- a/base-install.sh +++ b/base-install.sh @@ -27,7 +27,7 @@ fi touch $OT_UI_CONF # Pkgs -packs="binutils build-essential git-core gnuplot hostname libcurl4-openssl-dev libgsl0-dev libreadline5-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libxslt1-dev lsb-release psmisc pwgen raptor-utils r-base r-base-core r-base-dev sqlite3 sun-java6-jdk wget xsltproc zlib1g-dev" +packs="binutils build-essential git-core gnuplot hostname libcurl4-openssl-dev libgsl0-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libxslt1-dev lsb-release psmisc pwgen raptor-utils r-base r-base-core r-base-dev sqlite3 sun-java6-jdk wget xsltproc zlib1g-dev" echo echo "Base Packages:" diff --git a/config.sh b/config.sh index dcd4db3..e0b20e0 100755 --- a/config.sh +++ b/config.sh @@ -20,9 +20,9 @@ KL_NUM_VER="0.9-11" REDIS_NUM_VER="2.2.2" # 4) Server settings. -NGINX_SERVERNAME="localhost" +NGINX_SERVERNAME="toxcreate3.in-silico.ch" WWW_DEST="$OT_PREFIX/www" -PORT="" # leave empty for port 80 otherwise set to e.g. ":8080" +PORT=":8080" # leave empty for port 80 otherwise set to e.g. ":8080" # Done. diff --git a/nginx.conf b/nginx.conf index 4dcf81a..6ee1662 100644 --- a/nginx.conf +++ b/nginx.conf @@ -23,7 +23,7 @@ http { # webservices server { - listen PORT; + listen 8080; client_max_body_size 5000m; server_name toxcreate3; location / { diff --git a/openbabel.sh b/openbabel.sh index 4e55ff8..4b6cfc0 100755 --- a/openbabel.sh +++ b/openbabel.sh @@ -76,7 +76,7 @@ fi echo "Bindings:" OB_DONE=false . "$OT_UI_CONF" -mkdir "$OB_DEST_BINDINGS">/dev/null 2>&1 +mkdir -p "$OB_DEST_BINDINGS">/dev/null 2>&1 if [ ! -d "$OB_DEST_BINDINGS" ]; then echo "Install directory '$OB_DEST_BINDINGS' is not available! Aborting..." exit 1 -- cgit v1.2.3 From 1835d2c61269c1025dac1ba1c5ed5a940cfaa5ff Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 15 Nov 2011 14:53:00 +0100 Subject: Removed sudo --- README | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README b/README index 79c6569..64efe39 100644 --- a/README +++ b/README @@ -18,8 +18,8 @@ Even if we officially support only *one* distro (currently Debian 6.0.1), I test After running the installer, configure the system by editing the startup file of your favorite shell (in my case, BASH with the file ~ /. bashrc) to include ~/.opentox-ui.sh (in my case with 'source ...'). This file is the only one that the installer creates outside OT_PREFIX. Thus, the system is fully configured: If you now open a new shell, all environment variables will be adjusted. To start the system I run the following (but that is not part of the installer): -sudo nohup $HOME/opentox-ruby/redis-2.2.2/src/redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf & -sudo nohup $HOME/opentox-ruby/nginx/sbin/nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf & +nohup $HOME/opentox-ruby/redis-2.2.2/src/redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf & +nohup $HOME/opentox-ruby/nginx/sbin/nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf & To uninstall the system simply delete the link from the startup file: Done. To save disc space delete directory OT_PREFIX. Anyone can run multiple Opentox versions on the same machine: Just install again, but to a different OT_PREFIX. The switch works manually: Include the sh__ot.sh files from the desired OT_PREFIX in $HOME/opentox-ui.sh (only one installation may be activated at any time). @@ -76,11 +76,11 @@ otupdate() { # Start the server otstart() { otkill - sudo bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" - sudo bash -c "source $HOME/.opentox-ui.sh; nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &" + bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" + bash -c "source $HOME/.opentox-ui.sh; nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &" sleep 2 - if ! pgrep nginx>/dev/null 2>&1; then echo "Failed to start nginx."; fi - if ! pgrep redis-server>/dev/null 2>&1; then echo "Failed to start redis."; fi + 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 @@ -91,14 +91,14 @@ alias ottail='tail -f $HOME/.opentox/log/production.log' # Reload the server otreload() { - sudo bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" + bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" } # Kill the server otkill() { - sudo killall nginx >/dev/null 2>&1 - sudo bash -c "source $HOME/.opentox-ui.sh; redis-cli shutdown >/dev/null 2>&1" + killall nginx >/dev/null 2>&1 + bash -c "source $HOME/.opentox-ui.sh; redis-cli shutdown >/dev/null 2>&1" while ps ax | grep PassengerWatchdog | grep -v grep >/dev/null 2>&1; do sleep 1; done while ps ax | grep Rack | grep -v grep >/dev/null 2>&1; do sleep 1; done - for p in `pgrep R 2>/dev/null`; do sudo kill -9 $p; done + for p in `pgrep -u $USER R 2>/dev/null`; do kill -9 $p; done } -- cgit v1.2.3 From 5c62ba3b7b259f25729d2f0d651147627e141cf8 Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 15 Nov 2011 15:34:07 +0100 Subject: Search full name in gem list --- opentox-ruby.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentox-ruby.sh b/opentox-ruby.sh index 03d6316..7da9263 100755 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -39,7 +39,7 @@ echo echo "Opentox-ruby ('$LOG'):" for mygem in opentox-ruby builder jeweler; do - if ! $GEM list | grep "$mygem" >/dev/null 2>&1; then + if ! $GEM list | sed 's/\ .*//g' | grep -x "$mygem" >/dev/null 2>&1; then cmd="$GEM install $mygem" && run_cmd "$cmd" "$mygem" fi done -- cgit v1.2.3 From 8dd7e636e80f3024ba059d3b1fb46db534436363 Mon Sep 17 00:00:00 2001 From: ot1 Date: Wed, 16 Nov 2011 09:21:24 +0100 Subject: Better hint for colons --- config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.sh b/config.sh index e0b20e0..cdc0309 100755 --- a/config.sh +++ b/config.sh @@ -22,7 +22,7 @@ REDIS_NUM_VER="2.2.2" # 4) Server settings. NGINX_SERVERNAME="toxcreate3.in-silico.ch" WWW_DEST="$OT_PREFIX/www" -PORT=":8080" # leave empty for port 80 otherwise set to e.g. ":8080" +PORT="" # set to empty string ("") for port 80 otherwise set to port *using colons* e.g. ":8080" # Done. -- cgit v1.2.3 From 3246032fbd4b04b1e944bf6d2239dec5c48872f2 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 09:32:47 +0100 Subject: Added hint to pubkey at github --- config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.sh b/config.sh index cdc0309..e7415b3 100755 --- a/config.sh +++ b/config.sh @@ -7,7 +7,7 @@ # 1) Base setup OT_DIST="debian" # Linux distribution (debian) OT_INSTALL="local" # Type (gem, local, server) -OT_BRANCH="development" # Maturity (development, master) +OT_BRANCH="development" # Maturity (development -you need SSH key at Github-, master) # 2) Where all binaries are installed. OT_PREFIX="$HOME/opentox-ruby" -- cgit v1.2.3 From 4c578f36fded69cfe49fd00f6dea8013a6cba4bd Mon Sep 17 00:00:00 2001 From: ot1 Date: Wed, 16 Nov 2011 10:41:22 +0100 Subject: Fixed PORT in nginx.conf --- config.sh | 3 ++- nginx.conf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.sh b/config.sh index cdc0309..222cd7a 100755 --- a/config.sh +++ b/config.sh @@ -8,6 +8,7 @@ OT_DIST="debian" # Linux distribution (debian) OT_INSTALL="local" # Type (gem, local, server) OT_BRANCH="development" # Maturity (development, master) +# NOTE: For branches other than 'master' you have to have your public SSH key at Github and must be a member of 'opentox-ruby' group. # 2) Where all binaries are installed. OT_PREFIX="$HOME/opentox-ruby" @@ -22,7 +23,7 @@ REDIS_NUM_VER="2.2.2" # 4) Server settings. NGINX_SERVERNAME="toxcreate3.in-silico.ch" WWW_DEST="$OT_PREFIX/www" -PORT="" # set to empty string ("") for port 80 otherwise set to port *using colons* e.g. ":8080" +PORT=":8081" # set to empty string ("") for port 80 otherwise set to port *using colons* e.g. ":8080" # Done. diff --git a/nginx.conf b/nginx.conf index 6ee1662..4dcf81a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -23,7 +23,7 @@ http { # webservices server { - listen 8080; + listen PORT; client_max_body_size 5000m; server_name toxcreate3; location / { -- cgit v1.2.3 From e675838dffb7826da8e71fa2b692afe6ef1d0869 Mon Sep 17 00:00:00 2001 From: ot1 Date: Wed, 16 Nov 2011 11:00:05 +0100 Subject: Fixed otkill: only my processes --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 64efe39..7d06d5c 100644 --- a/README +++ b/README @@ -98,7 +98,7 @@ otreload() { otkill() { killall nginx >/dev/null 2>&1 bash -c "source $HOME/.opentox-ui.sh; redis-cli shutdown >/dev/null 2>&1" - while ps ax | grep PassengerWatchdog | grep -v grep >/dev/null 2>&1; do sleep 1; done - while ps ax | grep Rack | grep -v grep >/dev/null 2>&1; do sleep 1; done + 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 } -- cgit v1.2.3 From 2ddf9dd65a657a3ecf5a636e8e3f66fad581ab6a Mon Sep 17 00:00:00 2001 From: ot1 Date: Wed, 16 Nov 2011 11:18:15 +0100 Subject: Fixed nginx.conf --- nginx.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nginx.conf b/nginx.conf index 4dcf81a..4372940 100644 --- a/nginx.conf +++ b/nginx.conf @@ -8,14 +8,14 @@ http { server_names_hash_bucket_size 256; - passenger_root /home/ot0/opentox-ruby/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.9; - passenger_ruby /home/ot0/opentox-ruby/ruby-enterprise-1.8.7-2011.03/bin/ruby; - passenger_default_user ot0; + 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 /home/ot0/opentox-ruby/nginx/conf/mime.types; + include NGINX_DEST/conf/mime.types; default_type application/octet-stream; sendfile on; @@ -25,9 +25,9 @@ http { server { listen PORT; client_max_body_size 5000m; - server_name toxcreate3; + server_name SERVERNAME; location / { - root /home/ot0/opentox-ruby/www; + root WWW_DEST; passenger_enabled on; } passenger_base_uri /compound; -- cgit v1.2.3 From 28d4c0a14a8f4b66d9d0f03e55097c22280b8fdd Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 12:42:16 +0100 Subject: Fixed branch keeping --- README | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index 7d06d5c..db3b9c0 100644 --- a/README +++ b/README @@ -31,12 +31,12 @@ otconfig() { source $HOME/.opentox-ui.sh } -# Update the development version +# 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 $d ; cd $d ; git pull ; echo ; cd - ; done + 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~ @@ -102,3 +102,4 @@ otkill() { 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 } + -- cgit v1.2.3 From 69fa1d589bce1d6b17ea9948cce3cb80a7f84819 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 13:47:03 +0100 Subject: Added support for OHM port --- config.sh | 3 ++- opentox-ruby.sh | 4 ++-- production.yaml | 2 ++ redis.sh | 4 ++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config.sh b/config.sh index 9d227ef..9ebd47d 100755 --- a/config.sh +++ b/config.sh @@ -22,7 +22,8 @@ REDIS_NUM_VER="2.2.2" # 4) Server settings. NGINX_SERVERNAME="toxcreate3.in-silico.ch" WWW_DEST="$OT_PREFIX/www" -PORT=":8081" # set to empty string ("") for port 80 otherwise set to port *using colons* e.g. ":8080" +PORT=":8081" # set to empty string ("") for port 80 otherwise set to port *using colon* e.g. ":8080" +OHM_PORT="6379" # set to port (no colon) # Done. diff --git a/opentox-ruby.sh b/opentox-ruby.sh index 7da9263..f6fa077 100755 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -71,8 +71,8 @@ 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,PORT,$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,PORT,$PORT,\" aa-$OT_INSTALL.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,PORT,$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,PORT,$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 diff --git a/production.yaml b/production.yaml index d133cd0..709b133 100644 --- a/production.yaml +++ b/production.yaml @@ -17,6 +17,8 @@ - "webservices.in-silico.ch" - "opentox.informatik.uni-freiburg.de" +:ohm_port: OHM_PORT + # Uncomment for verbose logging LOGGER :logger: debug diff --git a/redis.sh b/redis.sh index 2f55539..a670cff 100755 --- a/redis.sh +++ b/redis.sh @@ -59,6 +59,10 @@ if ! $REDIS_DONE; then 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 -- cgit v1.2.3 From 483d87ed8064573f60194f7936701d21f8728e61 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 15:21:07 +0100 Subject: Fixed PORT to NGINX_PORT --- aa-server.yaml | 30 +++++++++++++++--------------- config.sh | 4 ++-- nginx.conf | 12 ++++++------ nginx.sh | 8 ++++---- opentox-ruby.sh | 4 ++-- production.yaml | 14 +++++++------- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/aa-server.yaml b/aa-server.yaml index 5ca2b72..aa08799 100644 --- a/aa-server.yaml +++ b/aa-server.yaml @@ -15,25 +15,25 @@ # Exceptions: :free_uris: #request-method for uri not controlled by A&A ? - :GET - : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/algorithm/ - - "http://SERVERNAMEPORT/model" - - "http://SERVERNAMEPORT/dataset" - - "http://SERVERNAMEPORT/validation" - - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/validation\/resources/ - - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/validation\/[a-z,A-Z,\/,_\-]*$/ + : - !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:\/\/ESCAPEDSERVERPORT\/toxcreate\/[a-z,A-Z,\/,_\-]*$/ - - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/task/ - - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/compound/ + : - !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:\/\/ESCAPEDSERVERPORT\/task/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/task/ :authorize_exceptions: #request-method for uri only authenticated, no authorization ? - :POST - : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/algorithm/ - - "http://SERVERNAMEPORT/dataset" - - "http://SERVERNAMEPORT/model" - - "http://SERVERNAMEPORT/validation" - - !ruby/regexp /http\:\/\/ESCAPEDSERVERPORT\/validation\/[a-z,A-Z,\/,_\-]*$/ + : - !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/config.sh b/config.sh index 9ebd47d..a50b05b 100755 --- a/config.sh +++ b/config.sh @@ -22,8 +22,8 @@ REDIS_NUM_VER="2.2.2" # 4) Server settings. NGINX_SERVERNAME="toxcreate3.in-silico.ch" WWW_DEST="$OT_PREFIX/www" -PORT=":8081" # set to empty string ("") for port 80 otherwise set to port *using colon* e.g. ":8080" -OHM_PORT="6379" # set to port (no colon) +NGINX_PORT=":8081" # set to empty string ("") for port 80 otherwise set to port *using colon* e.g. ":8080" +OHM_PORT="6380" # set to port (no colon) # Done. diff --git a/nginx.conf b/nginx.conf index 4372940..6a8186a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -8,14 +8,14 @@ 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_root /home/am/opentox-ruby/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.9; + passenger_ruby /home/am/opentox-ruby/ruby-enterprise-1.8.7-2011.03/bin/ruby; + passenger_default_user am; passenger_log_level 2; passenger_spawn_method conservative; #passenger_use_global_queue on; - include NGINX_DEST/conf/mime.types; + include /home/am/opentox-ruby/nginx/conf/mime.types; default_type application/octet-stream; sendfile on; @@ -25,9 +25,9 @@ http { server { listen PORT; client_max_body_size 5000m; - server_name SERVERNAME; + server_name z21mn; location / { - root WWW_DEST; + root /home/am/opentox-ruby/www; passenger_enabled on; } passenger_base_uri /compound; diff --git a/nginx.sh b/nginx.sh index 3a872bc..32efc96 100755 --- a/nginx.sh +++ b/nginx.sh @@ -53,11 +53,11 @@ servername=`hostname` $GIT checkout nginx.conf>>$LOG 2>&1 cmd="sed -i -e \"s,PASSENGER,$passenger,;s,SERVERNAME,$servername,;s,RUBY_DEST,$RUBY_DEST,;s,NGINX_DEST,$NGINX_DEST,;s,WWW_DEST,$WWW_DEST,\" ./nginx.conf" && run_cmd "$cmd" "Config" cmd="sed -i -e \"s,USER,`whoami`,\" ./nginx.conf" && run_cmd "$cmd" "User" -PORT=`echo "$PORT" | sed 's/^.//g'` -if [ -z "$PORT" ]; then - PORT=80 +NGINX_PORT=`echo "$NGINX_PORT" | sed 's/^.//g'` +if [ -z "$NGINX_PORT" ]; then + NGINX_PORT=80 fi -cmd="sed -i -e \"s,PORT,$PORT,\" ./nginx.conf" && run_cmd "$cmd" "Port" +cmd="sed -i -e \"s,NGINX_PORT,$NGINX_PORT,\" ./nginx.conf" && run_cmd "$cmd" "NGINX_PORT" cmd="cp ./nginx.conf \"$NGINX_DEST/conf\"" && run_cmd "$cmd" "Copy" if [ ! -f $NGINX_CONF ]; then diff --git a/opentox-ruby.sh b/opentox-ruby.sh index f6fa077..ec7f5c2 100755 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -71,8 +71,8 @@ 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,PORT,$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,PORT,$PORT,;s,OHM_PORT,$OHM_PORT,\" aa-$OT_INSTALL.yaml >> $HOME/.opentox/config/production.yaml" && run_cmd "$cmd" "Config 2" +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 diff --git a/production.yaml b/production.yaml index 709b133..e0f39d4 100644 --- a/production.yaml +++ b/production.yaml @@ -2,13 +2,13 @@ :services: # make sure to enter a full uri (including training slash) - opentox-compound: "http://SERVERNAMEPORT/compound/" - opentox-dataset: "http://SERVERNAMEPORT/dataset/" - opentox-algorithm: "http://SERVERNAMEPORT/algorithm/" - opentox-model: "http://SERVERNAMEPORT/model/" - opentox-task: "http://SERVERNAMEPORT/task/" - opentox-toxcreate: "http://SERVERNAMEPORT/toxcreate/" - opentox-validation: "http://SERVERNAMEPORT/validation/" + 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: -- cgit v1.2.3 From 21240d7fad96d6e2205f497f44de16a4658e4516 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 15:23:04 +0100 Subject: Fixed PORT to NGINX_PORT --- aa-local.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/aa-local.yaml b/aa-local.yaml index 5ca2b72..aa08799 100644 --- a/aa-local.yaml +++ b/aa-local.yaml @@ -15,25 +15,25 @@ # Exceptions: :free_uris: #request-method for uri not controlled by A&A ? - :GET - : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/algorithm/ - - "http://SERVERNAMEPORT/model" - - "http://SERVERNAMEPORT/dataset" - - "http://SERVERNAMEPORT/validation" - - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/validation\/resources/ - - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/validation\/[a-z,A-Z,\/,_\-]*$/ + : - !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:\/\/ESCAPEDSERVERPORT\/toxcreate\/[a-z,A-Z,\/,_\-]*$/ - - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/task/ - - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/compound/ + : - !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:\/\/ESCAPEDSERVERPORT\/task/ + : - !ruby/regexp /http:\/\/ESCAPEDSERVERNGINX_PORT\/task/ :authorize_exceptions: #request-method for uri only authenticated, no authorization ? - :POST - : - !ruby/regexp /http:\/\/ESCAPEDSERVERPORT\/algorithm/ - - "http://SERVERNAMEPORT/dataset" - - "http://SERVERNAMEPORT/model" - - "http://SERVERNAMEPORT/validation" - - !ruby/regexp /http\:\/\/ESCAPEDSERVERPORT\/validation\/[a-z,A-Z,\/,_\-]*$/ + : - !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,\/,_\-]*$/ -- cgit v1.2.3 From 80115dd66a89823fac1dac4690a6c8e87b530a2b Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 15:25:00 +0100 Subject: Fixed PORT to NGINX_PORT --- nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 6a8186a..0ff4dec 100644 --- a/nginx.conf +++ b/nginx.conf @@ -23,7 +23,7 @@ http { # webservices server { - listen PORT; + listen NGINX_PORT; client_max_body_size 5000m; server_name z21mn; location / { -- cgit v1.2.3 From 18880d3774f9f93cba7341f93498ca33fdabc169 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 16:03:14 +0100 Subject: Fixed PORT to NGINX_PORT --- nginx.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nginx.conf b/nginx.conf index 0ff4dec..9f87adf 100644 --- a/nginx.conf +++ b/nginx.conf @@ -8,14 +8,14 @@ http { server_names_hash_bucket_size 256; - passenger_root /home/am/opentox-ruby/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.9; - passenger_ruby /home/am/opentox-ruby/ruby-enterprise-1.8.7-2011.03/bin/ruby; - passenger_default_user am; + 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 /home/am/opentox-ruby/nginx/conf/mime.types; + include NGINX_DEST/conf/mime.types; default_type application/octet-stream; sendfile on; @@ -25,9 +25,9 @@ http { server { listen NGINX_PORT; client_max_body_size 5000m; - server_name z21mn; + server_name SERVERNAME; location / { - root /home/am/opentox-ruby/www; + root WWW_DEST; passenger_enabled on; } passenger_base_uri /compound; -- cgit v1.2.3 From ecb20ea48a05feb74f86408ccd27ecc274d08080 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 17:20:46 +0100 Subject: Separate file for ot-tools --- README | 84 ++++---------------------------------------------------- ot-tools-user.sh | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 79 deletions(-) create mode 100644 ot-tools-user.sh diff --git a/README b/README index db3b9c0..00ed726 100644 --- a/README +++ b/README @@ -13,7 +13,11 @@ Here are some of my goals when writing the installer: - Encapsulated (everything is installed in a sub-directory in $HOME) - Logged (all non-elemtary actions are logged) -Even if we officially support only *one* distro (currently Debian 6.0.1), I tested the installer successfully on various Ubuntus. In the README at the top are the requirements of the installer. By default, everything is installed to $HOME/opentox-ruby (=OT_PREFIX). The configs go to OT_PREFIX/.sh__ot.sh for each package. + +Configure your system in config.sh. +NOTE for variable NGINX_PORT: leave this empty or set to ":80" to use port 80. If you do this, use the ot-scripts in "ot-tools-root.sh". Otherwise, if NGINX_PORT >1024, use ot-scripts in "ot-tools-user.sh". + +Even if we officially support only *one* distro (currently Debian 6.0.1), I tested the installer successfully on various Ubuntus. In this README at the top are the requirements of the installer. By default, everything is installed to $HOME/opentox-ruby (=OT_PREFIX). The configs go to OT_PREFIX/.sh__ot.sh for each package. After running the installer, configure the system by editing the startup file of your favorite shell (in my case, BASH with the file ~ /. bashrc) to include ~/.opentox-ui.sh (in my case with 'source ...'). This file is the only one that the installer creates outside OT_PREFIX. Thus, the system is fully configured: If you now open a new shell, all environment variables will be adjusted. @@ -24,82 +28,4 @@ nohup $HOME/opentox-ruby/nginx/sbin/nginx -c $HOME/opentox-ruby/nginx/conf/nginx To uninstall the system simply delete the link from the startup file: Done. To save disc space delete directory OT_PREFIX. Anyone can run multiple Opentox versions on the same machine: Just install again, but to a different OT_PREFIX. The switch works manually: Include the sh__ot.sh files from the desired OT_PREFIX in $HOME/opentox-ui.sh (only one installation may be activated at any time). -Some useful scripts to put in your ~/.bashrc in case you are using bash (assuming OT_PREFIX is '~/opentox-ruby'): - -# 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() { - otkill - bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" - bash -c "source $HOME/.opentox-ui.sh; 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() { - bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" -} - -# Kill the server -otkill() { - killall nginx >/dev/null 2>&1 - bash -c "source $HOME/.opentox-ui.sh; redis-cli 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/ot-tools-user.sh b/ot-tools-user.sh new file mode 100644 index 0000000..64f26d3 --- /dev/null +++ b/ot-tools-user.sh @@ -0,0 +1,80 @@ +# 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() { + otkill + bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" + bash -c "source $HOME/.opentox-ui.sh; 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() { + bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" +} + +# Kill the server +otkill() { + killall nginx >/dev/null 2>&1 + bash -c "source $HOME/.opentox-ui.sh; redis-cli 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 +} + -- cgit v1.2.3 From 47cdf2243d076ade575894fdefe14f99107e2160 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 17:30:08 +0100 Subject: Using separate files for ot-tools --- README | 3 +-- ot-tools-root.sh | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 ot-tools-root.sh diff --git a/README b/README index 00ed726..7828109 100644 --- a/README +++ b/README @@ -14,8 +14,7 @@ Here are some of my goals when writing the installer: - Logged (all non-elemtary actions are logged) -Configure your system in config.sh. -NOTE for variable NGINX_PORT: leave this empty or set to ":80" to use port 80. If you do this, use the ot-scripts in "ot-tools-root.sh". Otherwise, if NGINX_PORT >1024, use ot-scripts in "ot-tools-user.sh". +Configure your system in config.sh. NOTE for variable NGINX_PORT: leave this empty or set to ":80" to use port 80. If you do this, use the ot-scripts in "ot-tools-root.sh". Otherwise, if NGINX_PORT >1024, use ot-scripts in "ot-tools-user.sh". Even if we officially support only *one* distro (currently Debian 6.0.1), I tested the installer successfully on various Ubuntus. In this README at the top are the requirements of the installer. By default, everything is installed to $HOME/opentox-ruby (=OT_PREFIX). The configs go to OT_PREFIX/.sh__ot.sh for each package. diff --git a/ot-tools-root.sh b/ot-tools-root.sh new file mode 100644 index 0000000..eec6780 --- /dev/null +++ b/ot-tools-root.sh @@ -0,0 +1,79 @@ +# 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() { + otkill + sudo bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" + sudo bash -c "source $HOME/.opentox-ui.sh; 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() { + sudo bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" +} + +# Kill the server +otkill() { + sudo killall -u root nginx >/dev/null 2>&1 + sudo bash -c "source $HOME/.opentox-ui.sh; redis-cli 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 +} -- cgit v1.2.3 From 7776175ac7166537408d30e6a8f7210f8e9a9a3d Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 16 Nov 2011 17:41:40 +0100 Subject: Port 80 default --- config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.sh b/config.sh index 9ebd47d..1886f89 100755 --- a/config.sh +++ b/config.sh @@ -22,7 +22,7 @@ REDIS_NUM_VER="2.2.2" # 4) Server settings. NGINX_SERVERNAME="toxcreate3.in-silico.ch" WWW_DEST="$OT_PREFIX/www" -PORT=":8081" # set to empty string ("") for port 80 otherwise set to port *using colon* e.g. ":8080" +PORT="" # set to empty string ("") for port 80 otherwise set to port *using colon* e.g. ":8080" OHM_PORT="6379" # set to port (no colon) # Done. -- cgit v1.2.3 From 5017e2f3b8865db62c2420cd0101426a46a8714f Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 17 Nov 2011 09:00:16 +0100 Subject: Fixed nginx installer --- nginx.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nginx.sh b/nginx.sh index 32efc96..ed8a3df 100755 --- a/nginx.sh +++ b/nginx.sh @@ -53,12 +53,15 @@ servername=`hostname` $GIT checkout nginx.conf>>$LOG 2>&1 cmd="sed -i -e \"s,PASSENGER,$passenger,;s,SERVERNAME,$servername,;s,RUBY_DEST,$RUBY_DEST,;s,NGINX_DEST,$NGINX_DEST,;s,WWW_DEST,$WWW_DEST,\" ./nginx.conf" && run_cmd "$cmd" "Config" cmd="sed -i -e \"s,USER,`whoami`,\" ./nginx.conf" && run_cmd "$cmd" "User" -NGINX_PORT=`echo "$NGINX_PORT" | sed 's/^.//g'` + if [ -z "$NGINX_PORT" ]; then NGINX_PORT=80 +else + NGINX_PORT=`echo "$NGINX_PORT" | sed 's/^.//g'` fi cmd="sed -i -e \"s,NGINX_PORT,$NGINX_PORT,\" ./nginx.conf" && run_cmd "$cmd" "NGINX_PORT" cmd="cp ./nginx.conf \"$NGINX_DEST/conf\"" && run_cmd "$cmd" "Copy" +$GIT checkout nginx.conf>>$LOG 2>&1 if [ ! -f $NGINX_CONF ]; then echo "if ! echo \"\$PATH\" | grep \"$NGINX_DEST\">/dev/null 2>&1; then export PATH=$NGINX_DEST/sbin:\$PATH; fi" >> "$NGINX_CONF" -- cgit v1.2.3 From 025e9ed0ef3aae6cfd0b0f3c2c2e122d50ac008d Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 17 Nov 2011 09:14:48 +0100 Subject: Re-enabled OB_DONE, always using public checkout --- openbabel.sh | 22 +++++++++++----------- opentox-webservices.sh | 6 +----- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/openbabel.sh b/openbabel.sh index 4b6cfc0..3d45f00 100755 --- a/openbabel.sh +++ b/openbabel.sh @@ -86,15 +86,15 @@ else fi fi -#if ! $OB_DONE ; then - OB_SRC_DIR="/tmp/$OB_VER/scripts/ruby/" - cd "$OB_SRC_DIR" - cmd="ruby extconf.rb --with-openbabel-include=$OB_DEST/include/openbabel-2.0 --with-openbabel-lib=$OB_DEST/lib" && run_cmd "$cmd" "Code" - cmd="make" && run_cmd "$cmd" "Make" - cmd="cp openbabel.so $OB_DEST_BINDINGS" && run_cmd "$cmd" "Install" - cmd="ln -sf $OB_DEST_BINDINGS/openbabel.so $RUBY_DEST/lib/ruby/site_ruby/1.8/`uname -m`-linux/" && run_cmd "$cmd" "Link" - cd "$DIR" - . "`pwd`/utils.sh" - cmd="ruby test-ob-rb.rb" && run_cmd "$cmd" "Load" -#fi +if ! $OB_DONE ; then + OB_SRC_DIR="/tmp/$OB_VER/scripts/ruby/" + cd "$OB_SRC_DIR" + cmd="ruby extconf.rb --with-openbabel-include=$OB_DEST/include/openbabel-2.0 --with-openbabel-lib=$OB_DEST/lib" && run_cmd "$cmd" "Code" + cmd="make" && run_cmd "$cmd" "Make" + cmd="cp openbabel.so $OB_DEST_BINDINGS" && run_cmd "$cmd" "Install" + cmd="ln -sf $OB_DEST_BINDINGS/openbabel.so $RUBY_DEST/lib/ruby/site_ruby/1.8/`uname -m`-linux/" && run_cmd "$cmd" "Link" + cd "$DIR" + . "`pwd`/utils.sh" + cmd="ruby test-ob-rb.rb" && run_cmd "$cmd" "Load" +fi diff --git a/opentox-webservices.sh b/opentox-webservices.sh index ef98ded..c4fbd16 100755 --- a/opentox-webservices.sh +++ b/opentox-webservices.sh @@ -46,11 +46,7 @@ mkdir -p "$WWW_DEST/opentox" >>$LOG 2>&1 cd "$WWW_DEST/opentox" >>$LOG 2>&1 for s in compound dataset algorithm model toxcreate task validation; do rm -rf "$s" >>$LOG 2>&1 - if [ "$OT_BRANCH" = "development" ] || expr match "$OT_BRANCH" "release"; then - $GIT clone "git@github.com:opentox/$s.git" "$s" >>$LOG 2>&1 - else - $GIT clone "git://github.com/opentox/$s.git" "$s" >>$LOG 2>&1 - fi + $GIT clone "git://github.com/opentox/$s.git" "$s" >>$LOG 2>&1 cd "$s" >>$LOG 2>&1 $GIT checkout -b $OT_BRANCH origin/$OT_BRANCH >>$LOG 2>&1 #rm -rf public >>$LOG 2>&1 -- cgit v1.2.3 From 64e21f3e1916c989786a2c329e922f7932e330ee Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 17 Nov 2011 09:36:12 +0100 Subject: Fixed otkill (ohm port) --- ot-tools-root.sh | 2 +- ot-tools-user.sh | 2 +- redis.sh | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ot-tools-root.sh b/ot-tools-root.sh index eec6780..b6ebfcc 100644 --- a/ot-tools-root.sh +++ b/ot-tools-root.sh @@ -72,7 +72,7 @@ otreload() { # Kill the server otkill() { sudo killall -u root nginx >/dev/null 2>&1 - sudo bash -c "source $HOME/.opentox-ui.sh; redis-cli shutdown >/dev/null 2>&1" + sudo bash -c "source $HOME/.opentox-ui.sh; 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 index 64f26d3..ede3d7b 100644 --- a/ot-tools-user.sh +++ b/ot-tools-user.sh @@ -72,7 +72,7 @@ otreload() { # Kill the server otkill() { killall nginx >/dev/null 2>&1 - bash -c "source $HOME/.opentox-ui.sh; redis-cli shutdown >/dev/null 2>&1" + bash -c "source $HOME/.opentox-ui.sh; 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/redis.sh b/redis.sh index a670cff..ad3b695 100755 --- a/redis.sh +++ b/redis.sh @@ -67,6 +67,7 @@ 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 -- cgit v1.2.3 From 6857244ddd2fd79f2a8f70341227e7ebdcf34b05 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 17 Nov 2011 10:02:47 +0100 Subject: Fixed otconfig in ot-functions --- ot-tools-root.sh | 11 +++++++---- ot-tools-user.sh | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ot-tools-root.sh b/ot-tools-root.sh index b6ebfcc..7e1233b 100644 --- a/ot-tools-root.sh +++ b/ot-tools-root.sh @@ -50,9 +50,10 @@ otupdate() { # Start the server otstart() { + otconfig otkill - sudo bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" - sudo bash -c "source $HOME/.opentox-ui.sh; nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &" + 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 @@ -66,13 +67,15 @@ alias ottail='tail -f $HOME/.opentox/log/production.log' # Reload the server otreload() { - sudo bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" + otconfig + sudo bash -c "nginx -s reload" } # Kill the server otkill() { + otconfig sudo killall -u root nginx >/dev/null 2>&1 - sudo bash -c "source $HOME/.opentox-ui.sh; redis-cli -p $OHM_PORT shutdown >/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 index ede3d7b..1ad02f4 100644 --- a/ot-tools-user.sh +++ b/ot-tools-user.sh @@ -50,9 +50,10 @@ otupdate() { # Start the server otstart() { + otconfig otkill - bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" - bash -c "source $HOME/.opentox-ui.sh; nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &" + bash -c "nohup redis-server $HOME/opentox-ruby/redis-2.2.2/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 @@ -66,13 +67,15 @@ alias ottail='tail -f $HOME/.opentox/log/production.log' # Reload the server otreload() { - bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" + otconfig + bash -c "nginx -s reload" } # Kill the server otkill() { + otconfig killall nginx >/dev/null 2>&1 - bash -c "source $HOME/.opentox-ui.sh; redis-cli -p $OHM_PORT shutdown >/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 -- cgit v1.2.3 From 6f7c4d138916a12d9aab0fc4cad8c4d6b472742b Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 17 Nov 2011 13:17:55 +0100 Subject: Fixed deletion of /tmp/passenger --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 6a1e84f..9dee38c 100755 --- a/install +++ b/install @@ -16,7 +16,7 @@ echo cmd="sudo echo -n \"\"" && run_cmd "$cmd" "Acquire privileges" echo "Cleaning up /tmp files." -sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* /tmp/passenger* +sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* . "./base-install.sh" . "./ruby.sh" -- cgit v1.2.3 From d231bd32f9be394119fa877b1b059a79986ee050 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 17 Nov 2011 13:44:31 +0100 Subject: Fixed NGINX_PORT string --- config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.sh b/config.sh index 1886f89..60dff2a 100755 --- a/config.sh +++ b/config.sh @@ -22,7 +22,7 @@ REDIS_NUM_VER="2.2.2" # 4) Server settings. NGINX_SERVERNAME="toxcreate3.in-silico.ch" WWW_DEST="$OT_PREFIX/www" -PORT="" # set to empty string ("") for port 80 otherwise set to port *using colon* e.g. ":8080" +NGINX_PORT="" # set to empty string ("") for port 80 otherwise set to port *using colon* e.g. ":8080" OHM_PORT="6379" # set to port (no colon) # Done. -- cgit v1.2.3 From d2bf668856c63e2682aba0df3a504a1bac6ec7f3 Mon Sep 17 00:00:00 2001 From: davor Date: Mon, 21 Nov 2011 12:57:53 +0100 Subject: Installer stores tmp files in $HOME/tmp and backups the existing system. --- install | 31 ++++++++++++++++++++++++++++--- kernlab.sh | 4 ++-- nginx.sh | 2 +- openbabel.sh | 10 +++++----- opentox-ruby.sh | 2 +- opentox-webservices.sh | 2 +- redis.sh | 2 +- ruby.sh | 8 ++++---- 8 files changed, 43 insertions(+), 18 deletions(-) diff --git a/install b/install index 9dee38c..88ef63e 100755 --- a/install +++ b/install @@ -7,7 +7,32 @@ if [ "$(id -u)" = "0" ]; then exit 1 fi -LOG="/tmp/`basename $0`-log.txt" +echo +echo "Warning! If all IST services are stoppped press return, else to stop installation." +echo "Note: Your data will be backupped." +read help_var +echo + +mkdir -p $HOME/tmp/ +if [ -f "$HOME/.opentox-ui.sh" ] +then + mv -b -v $HOME/.opentox-ui.sh $HOME/.opentox-ui.sh~ +else + echo "$HOME/.opentox-ui.sh does not exist." +fi +if [ -d "$HOME/.opentox" ] +then + mv -b -v -T $HOME/.opentox $HOME/.opentox~ +else + echo "$HOME/.opentox does not exist." +fi +if [ -d "$HOME/opentox-ruby" ] +then + mv -b -v -T $HOME/opentox-ruby $HOME/opentox-ruby~ +else + echo "$HOME/opentox-ruby does not exist." +fi +LOG="$HOME/tmp/`basename $0`-log.txt" . "./utils.sh" echo echo "Opentox-ruby installation." @@ -15,8 +40,8 @@ echo "You may need to give root password for some privileged actions right now a echo cmd="sudo echo -n \"\"" && run_cmd "$cmd" "Acquire privileges" -echo "Cleaning up /tmp files." -sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* +echo "Cleaning up $HOME/tmp files." +rm -rf $HOME/tmp/openbabel* $HOME/tmp/kernlab* $HOME/tmp/ruby* . "./base-install.sh" . "./ruby.sh" diff --git a/kernlab.sh b/kernlab.sh index 2fba2a8..511874b 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -26,7 +26,7 @@ if [ ! -e "$R" ]; then fi # Pkg -LOG="/tmp/`basename $0`-log.txt" +LOG="$HOME/tmp/`basename $0`-log.txt" echo echo "Kernlab ('$LOG')." @@ -46,7 +46,7 @@ fi if ! $R_DONE; then - cd /tmp + 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" diff --git a/nginx.sh b/nginx.sh index ed8a3df..cb8c6b6 100755 --- a/nginx.sh +++ b/nginx.sh @@ -26,7 +26,7 @@ if [ ! -e "$GIT" ]; then fi -LOG="/tmp/`basename $0`-log.txt" +LOG="$HOME/tmp/`basename $0`-log.txt" echo echo "Nginx ('$LOG'):" diff --git a/openbabel.sh b/openbabel.sh index 3d45f00..3016d95 100755 --- a/openbabel.sh +++ b/openbabel.sh @@ -21,7 +21,7 @@ if [ ! -e "$WGET" ]; then fi # Pkg -LOG="/tmp/`basename $0`-log.txt" +LOG="$HOME/tmp/`basename $0`-log.txt" echo echo "Openbabel ('$OB_DEST', '$LOG'):" @@ -38,13 +38,13 @@ else fi if [ ! $OB_DONE ]; then - cd "/tmp">>$LOG 2>/dev/null + cd "$HOME/tmp">>$LOG 2>/dev/null URI="http://downloads.sourceforge.net/project/openbabel/openbabel/$OB_NUM_VER/$OB_VER.tar.gz?use_mirror=kent" - if ! [ -d "/tmp/$OB_VER" ]; then + if ! [ -d "$HOME/tmp/$OB_VER" ]; then cmd="$WGET $URI" && run_cmd "$cmd" "Download" cmd="tar zxf $OB_VER.tar.gz?use_mirror=kent $OB_VER" && run_cmd "$cmd" "Unpack" fi - cd "/tmp/$OB_VER">>$LOG 2>/dev/null + cd "$HOME/tmp/$OB_VER">>$LOG 2>/dev/null cmd="./configure --prefix=$OB_DEST" && run_cmd "$cmd" "Configure" cmd="make" && run_cmd "$cmd" "Make" @@ -87,7 +87,7 @@ else fi if ! $OB_DONE ; then - OB_SRC_DIR="/tmp/$OB_VER/scripts/ruby/" + OB_SRC_DIR="$HOME/tmp/$OB_VER/scripts/ruby/" cd "$OB_SRC_DIR" cmd="ruby extconf.rb --with-openbabel-include=$OB_DEST/include/openbabel-2.0 --with-openbabel-lib=$OB_DEST/lib" && run_cmd "$cmd" "Code" cmd="make" && run_cmd "$cmd" "Make" diff --git a/opentox-ruby.sh b/opentox-ruby.sh index ec7f5c2..9705682 100755 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -33,7 +33,7 @@ fi # Pkg -LOG="/tmp/`basename $0`-log.txt" +LOG="$HOME/tmp/`basename $0`-log.txt" echo echo "Opentox-ruby ('$LOG'):" diff --git a/opentox-webservices.sh b/opentox-webservices.sh index c4fbd16..cc53d04 100755 --- a/opentox-webservices.sh +++ b/opentox-webservices.sh @@ -37,7 +37,7 @@ if [ ! -e "$RUBY" ]; then exit 1 fi -LOG="/tmp/`basename $0`-log.txt" +LOG="$HOME/tmp/`basename $0`-log.txt" echo echo "Webservices ('$LOG'):" diff --git a/redis.sh b/redis.sh index ad3b695..f07d119 100755 --- a/redis.sh +++ b/redis.sh @@ -19,7 +19,7 @@ if [ ! -e "$WGET" ]; then exit 1 fi -LOG="/tmp/`basename $0`-log.txt" +LOG="$HOME/tmp/`basename $0`-log.txt" echo echo "Redis ('$LOG'):" diff --git a/ruby.sh b/ruby.sh index a1b8cbe..2e53384 100755 --- a/ruby.sh +++ b/ruby.sh @@ -21,7 +21,7 @@ if [ ! -e "$WGET" ]; then fi # Pkg -LOG="/tmp/`basename $0`-log.txt" +LOG="$HOME/tmp/`basename $0`-log.txt" echo echo "Ruby Enterprise edition ('$RUBY_DEST', '$LOG')." @@ -38,13 +38,13 @@ else fi if [ ! $RUBY_DONE ]; then - cd /tmp + cd $HOME/tmp URI="http://rubyenterpriseedition.googlecode.com/files/$RUBY_VER.tar.gz" - if ! [ -d "/tmp/$RUBY_VER" ]; then + if ! [ -d "$HOME/tmp/$RUBY_VER" ]; then cmd="$WGET $URI" && run_cmd "$cmd" "Download" cmd="tar xzf $RUBY_VER.tar.gz" && run_cmd "$cmd" "Unpack" fi - cmd="sh /tmp/$RUBY_VER/installer --dont-install-useful-gems --no-dev-docs --auto=$RUBY_DEST" && run_cmd "$cmd" "Install" + cmd="sh $HOME/tmp/$RUBY_VER/installer --dont-install-useful-gems --no-dev-docs --auto=$RUBY_DEST" && run_cmd "$cmd" "Install" fi -- cgit v1.2.3 From 066dee09478c87c83951c15cced72e604fb9db3d Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 22 Nov 2011 14:06:34 +0100 Subject: Added ambit_descriptors.yaml --- ambit_descriptors.yaml | 124 +++++++++++++++++++++++++++++++++++++++++++++++++ opentox-ruby.sh | 1 + 2 files changed, 125 insertions(+) create mode 100644 ambit_descriptors.yaml diff --git a/ambit_descriptors.yaml b/ambit_descriptors.yaml new file mode 100644 index 0000000..19e66f9 --- /dev/null +++ b/ambit_descriptors.yaml @@ -0,0 +1,124 @@ +--- +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.LengthOverBreadthDescriptor: + :category: "geometrical" + :name: "Length Over Breadth" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.KierHallSmartsDescriptor: + :category: "topological" + :name: "Kier & Hall SMARTS" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.FragmentComplexityDescriptor: + :category: "topological" + :name: "Fragment Complexity" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.APolDescriptor: + :category: "electronic" + :name: "Atomic Polarizabilities" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.LargestChainDescriptor: + :category: "constitutional" + :name: "Largest Chain" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.ChiPathDescriptor: + :category: "topological" + :name: "Chi Path Indices" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.PetitjeanNumberDescriptor: + :category: "topological" + :name: "Petitjean Number" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.LongestAliphaticChainDescriptor: + :category: "constitutional" + :name: "Longest Aliphatic Chain" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.KappaShapeIndicesDescriptor: + :category: "topological" + :name: "Kier and Hall kappa molecular shape indices" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.AromaticBondsCountDescriptor: + :category: "constitutional" + :name: "Aromatic Bonds Count" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.CPSADescriptor: + :category: "electronic" + :name: "Charged Partial Surface Areas" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.VAdjMaDescriptor: + :category: "topological" + :name: "Vertex adjacency information magnitude" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.AutocorrelationDescriptorMass: + :category: "topological" + :name: "Moreau-Broto Autocorrelation (mass) descriptors" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.RuleOfFiveDescriptor: + :category: "constitutional" + :name: "Lipinski's Rule of Five" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.GravitationalIndexDescriptor: + :category: "geometrical" + :name: "Gravitational Index" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.WienerNumbersDescriptor: + :category: "topological" + :name: "Wiener Numbers" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.ChiPathClusterDescriptor: + :category: "topological" + :name: "Chi Path-Cluster Indices" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.AtomCountDescriptor: + :category: "constitutional" + :name: "Atoms Count" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.MomentOfInertiaDescriptor: + :category: "geometrical" + :name: "Moments of Inertia" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.CarbonTypesDescriptor: + :category: "topological" + :name: "Carbon Types" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.AutocorrelationDescriptorPolarizability: + :category: "topological" + :name: "Moreau-Broto Autocorrelation (polarizability) descriptors" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.EccentricConnectivityIndexDescriptor: + :category: "topological" + :name: "Eccentric Connectivity Index" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.BCUTDescriptor: + :category: "hybrid" + :name: "BCUT" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.AromaticAtomsCountDescriptor: + :category: "constitutional" + :name: "Aromatic Atoms Count" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.WHIMDescriptor: + :category: "hybrid" + :name: "WHIM" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.ALOGPDescriptor: + :category: "constitutional" + :name: "ALogP" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.XLogPDescriptor: + :category: "constitutional" + :name: "XLogP" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.PetitjeanShapeIndexDescriptor: + :category: "topological" + :name: "Petitjean Number" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.MDEDescriptor: + :category: "topological" + :name: "Molecular Distance Edge" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.ChiChainDescriptor: + :category: "topological" + :name: "Chi Chain Indices" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.BondCountDescriptor: + :category: "constitutional" + :name: "Bonds Count" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.MannholdLogPDescriptor: + :category: "constitutional" + :name: "Mannhold LogP" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.BPolDescriptor: + :category: "electronic" + :name: "Bond Polarizabilities" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.AutocorrelationDescriptorCharge: + :category: "topological" + :name: "Moreau-Broto Autocorrelation (charge) descriptors" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.ZagrebIndexDescriptor: + :category: "topological" + :name: "Zagreb Index" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.ChiClusterDescriptor: + :category: "topological" + :name: "Chi Cluster Indices" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.RotatableBondsCountDescriptor: + :category: "constitutional" + :name: "Rotatable Bonds Count" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.TPSADescriptor: + :category: "topological" + :name: "Topological Polar Surface Area" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.HBondDonorCountDescriptor: + :category: "electronic" + :name: "Hydrogen Bond Donors" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.HBondAcceptorCountDescriptor: + :category: "electronic" + :name: "Hydrogen Bond Acceptors" +http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.LargestPiSystemDescriptor: + :category: "constitutional" + :name: "Largest Pi Chain" diff --git a/opentox-ruby.sh b/opentox-ruby.sh index ec7f5c2..d53d5ba 100755 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -73,6 +73,7 @@ $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" +cmd="cp ambit_descriptors.yaml $HOME/.opentox/config/" && run_cmd "$cmd" "Ambit" if [ "$OT_BRANCH" = "development" ] || expr match "$OT_BRANCH" "release"; then mkdir -p $WWW_DEST/opentox >>$LOG 2>&1 -- cgit v1.2.3 From 7acb3bc7db272581b9055c8e073aa7b07206f6fe Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 23 Nov 2011 09:49:21 +0100 Subject: Minor improvements --- opentox-webservices.sh | 8 ++++---- update | 16 ---------------- 2 files changed, 4 insertions(+), 20 deletions(-) delete mode 100755 update diff --git a/opentox-webservices.sh b/opentox-webservices.sh index cc53d04..88f864c 100755 --- a/opentox-webservices.sh +++ b/opentox-webservices.sh @@ -65,21 +65,21 @@ cmd="$GIT submodule update" && run_cmd "$cmd" "Fminer Update" cd "libfminer/libbbrc">>$LOG 2>&1 $GIT checkout $OT_BRANCH>>$LOG 2>&1 $GIT pull >>$LOG 2>&1 -cd - +cd - >>$LOG 2>&1 cd "libfminer/liblast">>$LOG 2>&1 $GIT checkout $OT_BRANCH>>$LOG 2>&1 $GIT pull >>$LOG 2>&1 -cd - +cd - >>$LOG 2>&1 for mylib in bbrc last; do cmd="sed -i 's,^INCLUDE_OB.*,INCLUDE_OB\ =\ -I$OB_DEST/include/openbabel-2.0,g' $WWW_DEST/opentox/algorithm/libfminer/lib$mylib/Makefile; sed -i 's,^LDFLAGS_OB.*,LDFLAGS_OB\ =\ -L$OB_DEST/lib,g' $WWW_DEST/opentox/algorithm/libfminer/lib$mylib/Makefile" && run_cmd "$cmd" "Makefile $mylib (OB)" cmd="sed -i 's,^INCLUDE_RB.*,INCLUDE_RB\ =\ -I$RUBY_DEST/lib/ruby/1.8/`uname -m`-linux,g' $WWW_DEST/opentox/algorithm/libfminer/lib$mylib/Makefile" && run_cmd "$cmd" "Makefile $mylib (RB)" done cd "libfminer/libbbrc">>$LOG 2>&1 cmd="make ruby" && run_cmd "$cmd" "Make BBRC" -cd - +cd - >>$LOG 2>&1 cd "libfminer/liblast">>$LOG 2>&1 cmd="make ruby" && run_cmd "$cmd" "Make LAST" -cd - +cd - >>$LOG 2>&1 cd "last-utils">>$LOG 2>&1 $GIT checkout $OT_BRANCH>>$LOG 2>&1 $GIT pull >>$LOG 2>&1 diff --git a/update b/update deleted file mode 100755 index 77183ed..0000000 --- a/update +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -. /etc/profile -gem update opentox-ruby -dir=`pwd` -cd /var/www/opentox -for s in *; do - echo $s - cd $s - git pull - cd - -done -cd /var/www/algorithm -rake fminer:update -kill `cat /opt/nginx/logs/nginx.pid` -/opt/nginx/sbin/nginx -cd $dir -- cgit v1.2.3 From 0475b661fc3eaaf916a49e9a08aec17be2e94df1 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 23 Nov 2011 09:53:05 +0100 Subject: Minor improvements --- opentox-webservices.sh | 8 ++++---- update | 16 ---------------- 2 files changed, 4 insertions(+), 20 deletions(-) delete mode 100755 update diff --git a/opentox-webservices.sh b/opentox-webservices.sh index cc53d04..88f864c 100755 --- a/opentox-webservices.sh +++ b/opentox-webservices.sh @@ -65,21 +65,21 @@ cmd="$GIT submodule update" && run_cmd "$cmd" "Fminer Update" cd "libfminer/libbbrc">>$LOG 2>&1 $GIT checkout $OT_BRANCH>>$LOG 2>&1 $GIT pull >>$LOG 2>&1 -cd - +cd - >>$LOG 2>&1 cd "libfminer/liblast">>$LOG 2>&1 $GIT checkout $OT_BRANCH>>$LOG 2>&1 $GIT pull >>$LOG 2>&1 -cd - +cd - >>$LOG 2>&1 for mylib in bbrc last; do cmd="sed -i 's,^INCLUDE_OB.*,INCLUDE_OB\ =\ -I$OB_DEST/include/openbabel-2.0,g' $WWW_DEST/opentox/algorithm/libfminer/lib$mylib/Makefile; sed -i 's,^LDFLAGS_OB.*,LDFLAGS_OB\ =\ -L$OB_DEST/lib,g' $WWW_DEST/opentox/algorithm/libfminer/lib$mylib/Makefile" && run_cmd "$cmd" "Makefile $mylib (OB)" cmd="sed -i 's,^INCLUDE_RB.*,INCLUDE_RB\ =\ -I$RUBY_DEST/lib/ruby/1.8/`uname -m`-linux,g' $WWW_DEST/opentox/algorithm/libfminer/lib$mylib/Makefile" && run_cmd "$cmd" "Makefile $mylib (RB)" done cd "libfminer/libbbrc">>$LOG 2>&1 cmd="make ruby" && run_cmd "$cmd" "Make BBRC" -cd - +cd - >>$LOG 2>&1 cd "libfminer/liblast">>$LOG 2>&1 cmd="make ruby" && run_cmd "$cmd" "Make LAST" -cd - +cd - >>$LOG 2>&1 cd "last-utils">>$LOG 2>&1 $GIT checkout $OT_BRANCH>>$LOG 2>&1 $GIT pull >>$LOG 2>&1 diff --git a/update b/update deleted file mode 100755 index 77183ed..0000000 --- a/update +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -. /etc/profile -gem update opentox-ruby -dir=`pwd` -cd /var/www/opentox -for s in *; do - echo $s - cd $s - git pull - cd - -done -cd /var/www/algorithm -rake fminer:update -kill `cat /opt/nginx/logs/nginx.pid` -/opt/nginx/sbin/nginx -cd $dir -- cgit v1.2.3 From 10937ac1b0e62deb51bf3f2c619ed82a4f89bb62 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 24 Nov 2011 16:29:25 +0100 Subject: minor improvements --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index 88ef63e..705ff44 100755 --- a/install +++ b/install @@ -13,24 +13,24 @@ echo "Note: Your data will be backupped." read help_var echo -mkdir -p $HOME/tmp/ +mkdir -p $HOME/tmp/ >/dev/null 2>&1 if [ -f "$HOME/.opentox-ui.sh" ] then mv -b -v $HOME/.opentox-ui.sh $HOME/.opentox-ui.sh~ else - echo "$HOME/.opentox-ui.sh does not exist." + echo "$HOME/.opentox-ui.sh does not found (nothing to backup)." fi if [ -d "$HOME/.opentox" ] then mv -b -v -T $HOME/.opentox $HOME/.opentox~ else - echo "$HOME/.opentox does not exist." + echo "$HOME/.opentox does not found (nothing to backup)." fi if [ -d "$HOME/opentox-ruby" ] then mv -b -v -T $HOME/opentox-ruby $HOME/opentox-ruby~ else - echo "$HOME/opentox-ruby does not exist." + echo "$HOME/opentox-ruby does not found (nothing to backup)." fi LOG="$HOME/tmp/`basename $0`-log.txt" . "./utils.sh" -- cgit v1.2.3 From 7d7a277cd3c2a56a044aa5364c3a651e03a60652 Mon Sep 17 00:00:00 2001 From: ot1 Date: Wed, 30 Nov 2011 08:52:54 +0100 Subject: Supporting MLR install --- kernlab.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kernlab.sh b/kernlab.sh index 511874b..8139747 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -45,13 +45,17 @@ else fi -if ! $R_DONE; then +if $R_DONE; then cd $HOME/tmp + export R_LIBS="$KL_DEST" # To install non-global + URI="http://cran.r-project.org/src/contrib/Archive/kernlab/kernlab_$KL_VER.tar.gz" - cmd="$WGET $URI" && run_cmd "$cmd" "Download" + cmd="$WGET $URI" && run_cmd "$cmd" "Download KL" + cmd="$R CMD INSTALL kernlab_$KL_VER.tar.gz" && run_cmd "$cmd" "Install KL" - export R_LIBS="$KL_DEST" # To install non-global - cmd="$R CMD INSTALL kernlab_$KL_VER.tar.gz" && run_cmd "$cmd" "Install" + URI="http://cran.r-project.org/src/contrib/pls_2.3-0.tar.gz" + cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" + cmd="$R CMD INSTALL kernlab_$KL_VER.tar.gz" && run_cmd "$cmd" "Install PLS" fi -- cgit v1.2.3 From 582753e3f256b7b9329dd6750731ed7a27ae5b87 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Mon, 5 Dec 2011 13:55:49 +0100 Subject: Fixed backup. --- install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install b/install index 705ff44..a486660 100755 --- a/install +++ b/install @@ -14,21 +14,22 @@ read help_var echo mkdir -p $HOME/tmp/ >/dev/null 2>&1 +DATE=`date +_%Y%m%d_%H_%M` if [ -f "$HOME/.opentox-ui.sh" ] then - mv -b -v $HOME/.opentox-ui.sh $HOME/.opentox-ui.sh~ + mv -v --backup=numbered $HOME/.opentox-ui.sh $HOME/.opentox-ui.sh$DATE else echo "$HOME/.opentox-ui.sh does not found (nothing to backup)." fi if [ -d "$HOME/.opentox" ] then - mv -b -v -T $HOME/.opentox $HOME/.opentox~ + mv -v --backup=numbered -T $HOME/.opentox $HOME/.opentox$DATE else echo "$HOME/.opentox does not found (nothing to backup)." fi if [ -d "$HOME/opentox-ruby" ] then - mv -b -v -T $HOME/opentox-ruby $HOME/opentox-ruby~ + mv -v --backup=numbered -T $HOME/opentox-ruby $HOME/opentox-ruby$DATE else echo "$HOME/opentox-ruby does not found (nothing to backup)." fi -- cgit v1.2.3 From d13ae21e492357bb93947998a298bb1a7af1a625 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Mon, 5 Dec 2011 14:01:05 +0100 Subject: Fixed backup. --- install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install b/install index 705ff44..a486660 100755 --- a/install +++ b/install @@ -14,21 +14,22 @@ read help_var echo mkdir -p $HOME/tmp/ >/dev/null 2>&1 +DATE=`date +_%Y%m%d_%H_%M` if [ -f "$HOME/.opentox-ui.sh" ] then - mv -b -v $HOME/.opentox-ui.sh $HOME/.opentox-ui.sh~ + mv -v --backup=numbered $HOME/.opentox-ui.sh $HOME/.opentox-ui.sh$DATE else echo "$HOME/.opentox-ui.sh does not found (nothing to backup)." fi if [ -d "$HOME/.opentox" ] then - mv -b -v -T $HOME/.opentox $HOME/.opentox~ + mv -v --backup=numbered -T $HOME/.opentox $HOME/.opentox$DATE else echo "$HOME/.opentox does not found (nothing to backup)." fi if [ -d "$HOME/opentox-ruby" ] then - mv -b -v -T $HOME/opentox-ruby $HOME/opentox-ruby~ + mv -v --backup=numbered -T $HOME/opentox-ruby $HOME/opentox-ruby$DATE else echo "$HOME/opentox-ruby does not found (nothing to backup)." fi -- cgit v1.2.3 From 4ad029cf4123a436822bd829a42e87ff9b634ef0 Mon Sep 17 00:00:00 2001 From: ot1 Date: Mon, 5 Dec 2011 14:59:31 +0100 Subject: Added RB --- kernlab.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernlab.sh b/kernlab.sh index 8139747..52006dc 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -55,7 +55,11 @@ if $R_DONE; then URI="http://cran.r-project.org/src/contrib/pls_2.3-0.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" - cmd="$R CMD INSTALL kernlab_$KL_VER.tar.gz" && run_cmd "$cmd" "Install PLS" + cmd="$R CMD INSTALL pls_2.3.0.tar.gz" && run_cmd "$cmd" "Install PLS" + + URI="http://cran.r-project.org/src/contrib/robustbase_0.7-8.tar.gz" + cmd="$WGET $URI" && run_cmd "$cmd" "Download RB" + cmd="$R CMD INSTALL robustbase_0.7-8.tar.gz" && run_cmd "$cmd" "Install RB" fi -- cgit v1.2.3 From 13218d2158ace60f02d0d2d4b0bbaf4f980c61c3 Mon Sep 17 00:00:00 2001 From: ot1 Date: Mon, 5 Dec 2011 15:00:42 +0100 Subject: Fixed installation of pls --- kernlab.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernlab.sh b/kernlab.sh index 8139747..4faf08c 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -55,7 +55,7 @@ if $R_DONE; then URI="http://cran.r-project.org/src/contrib/pls_2.3-0.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" - cmd="$R CMD INSTALL kernlab_$KL_VER.tar.gz" && run_cmd "$cmd" "Install PLS" + cmd="$R CMD INSTALL pls_2.3-0.tar.gz" && run_cmd "$cmd" "Install PLS" fi -- cgit v1.2.3 From 23cd09e039577124fa27b5b0f72509dd058bd308 Mon Sep 17 00:00:00 2001 From: davor Date: Mon, 5 Dec 2011 15:25:10 +0100 Subject: Fixed if statement. --- kernlab.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernlab.sh b/kernlab.sh index 4faf08c..582950f 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -45,7 +45,7 @@ else fi -if $R_DONE; then +if ! $R_DONE; then cd $HOME/tmp export R_LIBS="$KL_DEST" # To install non-global -- cgit v1.2.3 From 0924b25654d554a5c6a3fa99e6902227dfe0f6d3 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 7 Dec 2011 10:30:50 +0100 Subject: Added LEAPS package --- kernlab.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernlab.sh b/kernlab.sh index f73d376..3ee6aff 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -60,6 +60,10 @@ if ! $R_DONE; then URI="http://cran.r-project.org/src/contrib/robustbase_0.7-8.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download RB" cmd="$R CMD INSTALL robustbase_0.7-8.tar.gz" && run_cmd "$cmd" "Install RB" + + URI="http://cran.r-project.org/src/contrib/leaps_2.9.tar.gz" + cmd="$WGET $URI" && run_cmd "$cmd" "Download LEAPS" + cmd="$R CMD INSTALL leaps_2.9.tar.gz" && run_cmd "$cmd" "Install LEAPS" fi -- cgit v1.2.3 From 4de5abc3c49d8cdb01866f5a038e9a1597fb5ae8 Mon Sep 17 00:00:00 2001 From: davor Date: Fri, 9 Dec 2011 16:39:14 +0100 Subject: Fixed typo --- kernlab.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernlab.sh b/kernlab.sh index 3ee6aff..11e5637 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -55,7 +55,7 @@ if ! $R_DONE; then URI="http://cran.r-project.org/src/contrib/pls_2.3-0.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" - cmd="$R CMD INSTALL pls_2.3.0.tar.gz" && run_cmd "$cmd" "Install PLS" + cmd="$R CMD INSTALL pls_2.3-0.tar.gz" && run_cmd "$cmd" "Install PLS" URI="http://cran.r-project.org/src/contrib/robustbase_0.7-8.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download RB" -- cgit v1.2.3 From 89658d67203e00dedd2a795fceb61d954d07b2d5 Mon Sep 17 00:00:00 2001 From: davor Date: Sun, 11 Dec 2011 22:17:06 +0100 Subject: Updated download path to new version (robustbase_0.8-0) --- kernlab.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernlab.sh b/kernlab.sh index 11e5637..c4fc206 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -57,9 +57,9 @@ if ! $R_DONE; then cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" cmd="$R CMD INSTALL pls_2.3-0.tar.gz" && run_cmd "$cmd" "Install PLS" - URI="http://cran.r-project.org/src/contrib/robustbase_0.7-8.tar.gz" + URI="http://cran.r-project.org/src/contrib/robustbase_0.8-0.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download RB" - cmd="$R CMD INSTALL robustbase_0.7-8.tar.gz" && run_cmd "$cmd" "Install RB" + cmd="$R CMD INSTALL robustbase_0.8-0.tar.gz" && run_cmd "$cmd" "Install RB" URI="http://cran.r-project.org/src/contrib/leaps_2.9.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download LEAPS" -- cgit v1.2.3 From d56d27d7e7804521c8b8dce7c273fbb4e5ddd86c Mon Sep 17 00:00:00 2001 From: davor Date: Mon, 12 Dec 2011 10:58:18 +0100 Subject: Changed download path to archive version --- kernlab.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernlab.sh b/kernlab.sh index c4fc206..a833bd9 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -57,9 +57,9 @@ if ! $R_DONE; then cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" cmd="$R CMD INSTALL pls_2.3-0.tar.gz" && run_cmd "$cmd" "Install PLS" - URI="http://cran.r-project.org/src/contrib/robustbase_0.8-0.tar.gz" + URI="http://cran.r-project.org/src/contrib/00Archive/robustbase/robustbase_0.7-8.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download RB" - cmd="$R CMD INSTALL robustbase_0.8-0.tar.gz" && run_cmd "$cmd" "Install RB" + cmd="$R CMD INSTALL robustbase_0.7-8.tar.gz" && run_cmd "$cmd" "Install RB" URI="http://cran.r-project.org/src/contrib/leaps_2.9.tar.gz" cmd="$WGET $URI" && run_cmd "$cmd" "Download LEAPS" -- cgit v1.2.3 From 600466723755e0440fff0f908bfddc2ef3f05fa5 Mon Sep 17 00:00:00 2001 From: davor Date: Mon, 12 Dec 2011 11:43:08 +0100 Subject: Removed static download url for r packages. They have to be downloaded manually (only temporarily). --- kernlab.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/kernlab.sh b/kernlab.sh index a833bd9..c4bafbd 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -53,16 +53,20 @@ if ! $R_DONE; then cmd="$WGET $URI" && run_cmd "$cmd" "Download KL" cmd="$R CMD INSTALL kernlab_$KL_VER.tar.gz" && run_cmd "$cmd" "Install KL" - URI="http://cran.r-project.org/src/contrib/pls_2.3-0.tar.gz" - cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" + + echo "Warning! If you already downloaded pls_2.3-0.tar.gz , robustbase_0.7-8.tar.gz and leaps_2.9.tar.gz from http://cran.r-project.org/src/contrib/ into $HOME/tmp/ press return, else to stop installation." + read help_var2 + echo + #URI="http://cran.r-project.org/src/contrib/pls_2.3-0.tar.gz" + #cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" cmd="$R CMD INSTALL pls_2.3-0.tar.gz" && run_cmd "$cmd" "Install PLS" - URI="http://cran.r-project.org/src/contrib/00Archive/robustbase/robustbase_0.7-8.tar.gz" - cmd="$WGET $URI" && run_cmd "$cmd" "Download RB" + #URI="http://cran.r-project.org/src/contrib/00Archive/robustbase/robustbase_0.7-8.tar.gz" + #cmd="$WGET $URI" && run_cmd "$cmd" "Download RB" cmd="$R CMD INSTALL robustbase_0.7-8.tar.gz" && run_cmd "$cmd" "Install RB" - URI="http://cran.r-project.org/src/contrib/leaps_2.9.tar.gz" - cmd="$WGET $URI" && run_cmd "$cmd" "Download LEAPS" + #URI="http://cran.r-project.org/src/contrib/leaps_2.9.tar.gz" + #cmd="$WGET $URI" && run_cmd "$cmd" "Download LEAPS" cmd="$R CMD INSTALL leaps_2.9.tar.gz" && run_cmd "$cmd" "Install LEAPS" fi -- cgit v1.2.3 From 73747676c8afa6188c87ea6795f3db940ab59b9c Mon Sep 17 00:00:00 2001 From: am Date: Tue, 20 Dec 2011 11:22:58 +0100 Subject: Fixed bugs 1., 2., 6. of http://goo.gl/1InHw --- base-install.sh | 2 +- config.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base-install.sh b/base-install.sh index 90abb6e..5fccec5 100644 --- a/base-install.sh +++ b/base-install.sh @@ -27,7 +27,7 @@ fi touch $OT_UI_CONF # Pkgs -packs="binutils build-essential git-core gnuplot hostname libcurl4-openssl-dev libgsl0-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libxslt1-dev lsb-release psmisc pwgen raptor-utils r-base r-base-core r-base-dev sqlite3 sun-java6-jdk wget xsltproc zlib1g-dev" +packs="binutils build-essential git-core gnuplot hostname libcurl4-openssl-dev libgsl0-dev libreadline6-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libxslt1-dev lsb-release openjdk-6-jdk psmisc pwgen raptor-utils r-base r-base-core r-base-dev sqlite3 wget xsltproc zlib1g-dev" echo echo "Base Packages:" diff --git a/config.sh b/config.sh index 60dff2a..87b19b7 100755 --- a/config.sh +++ b/config.sh @@ -11,13 +11,13 @@ OT_BRANCH="development" # Maturity (development -you need SSH k # 2) Where all binaries are installed. OT_PREFIX="$HOME/opentox-ruby" -OT_JAVA_HOME="/usr/lib/jvm/java-6-sun" +OT_JAVA_HOME="/usr/lib/jvm/java-6-openjdk" # 3) What versions to install. RUBY_NUM_VER="1.8.7-2011.03" OB_NUM_VER="2.2.3" KL_NUM_VER="0.9-11" -REDIS_NUM_VER="2.2.2" +REDIS_NUM_VER="2.4.4" # 4) Server settings. NGINX_SERVERNAME="toxcreate3.in-silico.ch" -- cgit v1.2.3 From 2ea961e226bb202dc95332c782dd3bc5448e57b3 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 20 Dec 2011 11:27:01 +0100 Subject: Fixed bug 7. of http://goo.gl/1InHw --- ot-tools-user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ot-tools-user.sh b/ot-tools-user.sh index 1ad02f4..57c6c00 100644 --- a/ot-tools-user.sh +++ b/ot-tools-user.sh @@ -52,7 +52,7 @@ otupdate() { otstart() { otconfig otkill - bash -c "nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" + 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 -- cgit v1.2.3 From 4a6edd6921869f5ab53acd882f3bff276c31463a Mon Sep 17 00:00:00 2001 From: davor Date: Thu, 29 Dec 2011 16:19:03 +0100 Subject: cpsa in own category --- ambit_descriptors.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambit_descriptors.yaml b/ambit_descriptors.yaml index 19e66f9..1e2c347 100644 --- a/ambit_descriptors.yaml +++ b/ambit_descriptors.yaml @@ -30,7 +30,7 @@ http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descr :category: "constitutional" :name: "Aromatic Bonds Count" http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.CPSADescriptor: - :category: "electronic" + :category: "cpsa" :name: "Charged Partial Surface Areas" http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.VAdjMaDescriptor: :category: "topological" -- cgit v1.2.3 From 2da57e942972fcfe85ad3bf0671ab82e128fb292 Mon Sep 17 00:00:00 2001 From: gebele Date: Fri, 13 Jan 2012 14:05:16 +0100 Subject: fixed search param -S for already installed packs --- base-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-install.sh b/base-install.sh index 5fccec5..73c9e37 100644 --- a/base-install.sh +++ b/base-install.sh @@ -34,7 +34,7 @@ echo "Base Packages:" pack_arr="" for p in $packs; do - if $DPKG -s "$p" >/dev/null 2>&1; then + if $DPKG -S "$p" >/dev/null 2>&1; then printf "%50s%30s\n" "'$p'" "Y" else printf "%50s%30s\n" "'$p'" "N" -- cgit v1.2.3 From b6fb537437568bdf274451554663d8273151ffe8 Mon Sep 17 00:00:00 2001 From: davor Date: Mon, 16 Jan 2012 13:12:26 +0100 Subject: fixed search param -S for already installed packs --- base-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-install.sh b/base-install.sh index 90abb6e..a1ee2bf 100644 --- a/base-install.sh +++ b/base-install.sh @@ -34,7 +34,7 @@ echo "Base Packages:" pack_arr="" for p in $packs; do - if $DPKG -s "$p" >/dev/null 2>&1; then + if $DPKG -S "$p" >/dev/null 2>&1; then printf "%50s%30s\n" "'$p'" "Y" else printf "%50s%30s\n" "'$p'" "N" -- cgit v1.2.3 From 33babc8050bf00dba4929cb35d65bef926c9b7b4 Mon Sep 17 00:00:00 2001 From: micha Date: Mon, 16 Jan 2012 19:00:36 +0100 Subject: Task cleanup method --- aa-local.yaml | 2 ++ aa-server.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/aa-local.yaml b/aa-local.yaml index aa08799..75cccd0 100644 --- a/aa-local.yaml +++ b/aa-local.yaml @@ -29,6 +29,8 @@ - !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 diff --git a/aa-server.yaml b/aa-server.yaml index aa08799..75cccd0 100644 --- a/aa-server.yaml +++ b/aa-server.yaml @@ -29,6 +29,8 @@ - !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 -- cgit v1.2.3 From 2e53016f91abb5af7e9cd24f336fce5f121c92ae Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 31 Jan 2012 09:04:16 +0100 Subject: Adjusted R installation --- config.sh | 4 ++-- kernlab.sh | 46 ++++++++++++++-------------------------------- 2 files changed, 16 insertions(+), 34 deletions(-) diff --git a/config.sh b/config.sh index 60dff2a..b553594 100755 --- a/config.sh +++ b/config.sh @@ -34,7 +34,7 @@ RUBY_CONF="$OT_PREFIX/.sh_ruby_ot" REDIS_CONF="$OT_PREFIX/.sh_redis_ot" NGINX_CONF="$OT_PREFIX/.sh_nginx_ot" OB_CONF="$OT_PREFIX/.sh_OB_ot" -KL_CONF="$OT_PREFIX/.sh_R_ot" +R_CONF="$OT_PREFIX/.sh_R_ot" RUBY_VER="ruby-enterprise-$RUBY_NUM_VER" OB_VER="openbabel-$OB_NUM_VER" @@ -44,7 +44,7 @@ REDIS_VER="$REDIS_NUM_VER" RUBY_DEST="$OT_PREFIX/$RUBY_VER" OB_DEST="$OT_PREFIX/$OB_VER" OB_DEST_BINDINGS="$OT_PREFIX/openbabel-ruby-install" -KL_DEST="$OT_PREFIX/r-packages" +R_DEST="$OT_PREFIX/r-packages" NGINX_DEST="$OT_PREFIX/nginx" REDIS_DEST="$OT_PREFIX/redis-$REDIS_VER" diff --git a/kernlab.sh b/kernlab.sh index c4bafbd..2df0b8e 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -32,53 +32,35 @@ 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..." +mkdir "$R_DEST" >/dev/null 2>&1 +if [ ! -d "$R_DEST" ]; then + echo "Install directory '$R_DEST' is not available! Aborting..." exit 1 else - if ! rmdir "$KL_DEST" >/dev/null 2>&1; then # if not empty this will fail + if ! rmdir "$R_DEST" >/dev/null 2>&1; then # if not empty this will fail R_DONE=true else - mkdir "$KL_DEST" >/dev/null 2>&1 + mkdir "$R_DEST" >/dev/null 2>&1 fi fi if ! $R_DONE; then cd $HOME/tmp - export R_LIBS="$KL_DEST" # To install non-global - - URI="http://cran.r-project.org/src/contrib/Archive/kernlab/kernlab_$KL_VER.tar.gz" - cmd="$WGET $URI" && run_cmd "$cmd" "Download KL" - cmd="$R CMD INSTALL kernlab_$KL_VER.tar.gz" && run_cmd "$cmd" "Install KL" - - - echo "Warning! If you already downloaded pls_2.3-0.tar.gz , robustbase_0.7-8.tar.gz and leaps_2.9.tar.gz from http://cran.r-project.org/src/contrib/ into $HOME/tmp/ press return, else to stop installation." - read help_var2 - echo - #URI="http://cran.r-project.org/src/contrib/pls_2.3-0.tar.gz" - #cmd="$WGET $URI" && run_cmd "$cmd" "Download PLS" - cmd="$R CMD INSTALL pls_2.3-0.tar.gz" && run_cmd "$cmd" "Install PLS" - - #URI="http://cran.r-project.org/src/contrib/00Archive/robustbase/robustbase_0.7-8.tar.gz" - #cmd="$WGET $URI" && run_cmd "$cmd" "Download RB" - cmd="$R CMD INSTALL robustbase_0.7-8.tar.gz" && run_cmd "$cmd" "Install RB" - - #URI="http://cran.r-project.org/src/contrib/leaps_2.9.tar.gz" - #cmd="$WGET $URI" && run_cmd "$cmd" "Download LEAPS" - cmd="$R CMD INSTALL leaps_2.9.tar.gz" && run_cmd "$cmd" "Install LEAPS" + export R_LIBS="$R_DEST" # To install non-global + options(repos="http://mirrors.softliste.de/cran") # set mirror to avoid questioning the user + install.packages(c("caret", "doMC", "e1071", "foreach", "iterators", "kernlab", "multicore", "plyr", "reshape")) fi -if [ ! -f $KL_CONF ]; then +if [ ! -f $R_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'." + echo "if echo \"\$R_LIBS\" | grep -v \"$R_DEST\">/dev/null 2>&1; then export R_LIBS=\"$R_DEST\"; fi" >> "$R_CONF" + echo "if ! [ -d \"$R_DEST\" ]; then echo \"\$0: '$R_DEST' is not a directory!\"; fi" >> "$R_CONF" + echo "R package destination has been stored in '$R_CONF'." - if ! grep "$KL_CONF" $OT_UI_CONF >/dev/null 2>&1 ; then - echo ". \"$KL_CONF\"" >> $OT_UI_CONF + if ! grep "$R_CONF" $OT_UI_CONF >/dev/null 2>&1 ; then + echo ". \"$R_CONF\"" >> $OT_UI_CONF fi fi -- cgit v1.2.3 From 9282f0715873f96cf43c23261a808dc00fb78914 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 31 Jan 2012 10:07:01 +0100 Subject: Fixed R lib install --- config.sh | 2 -- install | 6 +++--- kernlab.sh | 5 ++--- packs.R | 6 ++++++ 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 packs.R diff --git a/config.sh b/config.sh index b553594..afe2012 100755 --- a/config.sh +++ b/config.sh @@ -16,7 +16,6 @@ OT_JAVA_HOME="/usr/lib/jvm/java-6-sun" # 3) What versions to install. RUBY_NUM_VER="1.8.7-2011.03" OB_NUM_VER="2.2.3" -KL_NUM_VER="0.9-11" REDIS_NUM_VER="2.2.2" # 4) Server settings. @@ -38,7 +37,6 @@ R_CONF="$OT_PREFIX/.sh_R_ot" RUBY_VER="ruby-enterprise-$RUBY_NUM_VER" OB_VER="openbabel-$OB_NUM_VER" -KL_VER="$KL_NUM_VER" REDIS_VER="$REDIS_NUM_VER" RUBY_DEST="$OT_PREFIX/$RUBY_VER" diff --git a/install b/install index a486660..b0422b5 100755 --- a/install +++ b/install @@ -19,19 +19,19 @@ if [ -f "$HOME/.opentox-ui.sh" ] then mv -v --backup=numbered $HOME/.opentox-ui.sh $HOME/.opentox-ui.sh$DATE else - echo "$HOME/.opentox-ui.sh does not found (nothing to backup)." + echo "$HOME/.opentox-ui.sh not found (nothing to backup)." fi if [ -d "$HOME/.opentox" ] then mv -v --backup=numbered -T $HOME/.opentox $HOME/.opentox$DATE else - echo "$HOME/.opentox does not found (nothing to backup)." + echo "$HOME/.opentox not found (nothing to backup)." fi if [ -d "$HOME/opentox-ruby" ] then mv -v --backup=numbered -T $HOME/opentox-ruby $HOME/opentox-ruby$DATE else - echo "$HOME/opentox-ruby does not found (nothing to backup)." + echo "$HOME/opentox-ruby not found (nothing to backup)." fi LOG="$HOME/tmp/`basename $0`-log.txt" . "./utils.sh" diff --git a/kernlab.sh b/kernlab.sh index 2df0b8e..aad125d 100755 --- a/kernlab.sh +++ b/kernlab.sh @@ -46,10 +46,9 @@ fi if ! $R_DONE; then - cd $HOME/tmp export R_LIBS="$R_DEST" # To install non-global - options(repos="http://mirrors.softliste.de/cran") # set mirror to avoid questioning the user - install.packages(c("caret", "doMC", "e1071", "foreach", "iterators", "kernlab", "multicore", "plyr", "reshape")) + cmd="$R CMD BATCH packs.R" && run_cmd "$cmd" "R packages" + eval "$cmd" fi diff --git a/packs.R b/packs.R new file mode 100644 index 0000000..b130360 --- /dev/null +++ b/packs.R @@ -0,0 +1,6 @@ +# CRAN package installer for opentox-ruby +# AM, 2012 + +# set mirror to avoid questioning the user +options(repos="http://mirrors.softliste.de/cran") +install.packages(c("caret", "doMC", "e1071", "foreach", "iterators", "kernlab", "multicore", "plyr", "reshape")) -- cgit v1.2.3 From ca56463e893e0d058dc5571e673d2fbfe14508b2 Mon Sep 17 00:00:00 2001 From: davor Date: Thu, 9 Feb 2012 09:29:22 +0100 Subject: Added R packages: "randomForest","RANN" --- packs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packs.R b/packs.R index b130360..b6b1930 100644 --- a/packs.R +++ b/packs.R @@ -3,4 +3,4 @@ # set mirror to avoid questioning the user options(repos="http://mirrors.softliste.de/cran") -install.packages(c("caret", "doMC", "e1071", "foreach", "iterators", "kernlab", "multicore", "plyr", "reshape")) +install.packages(c("caret", "doMC", "e1071", "foreach", "iterators", "kernlab", "multicore", "plyr", "reshape", "randomForest", "RANN")) -- cgit v1.2.3 From dc9337579e3a1f04bd3da39eafc598e99e945f8f Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 14 Feb 2012 11:41:31 +0100 Subject: Fixed PATH problem and replaced redis version. --- ot-tools-root.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ot-tools-root.sh b/ot-tools-root.sh index 7e1233b..a46293a 100644 --- a/ot-tools-root.sh +++ b/ot-tools-root.sh @@ -52,8 +52,8 @@ otupdate() { 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 &" + sudo bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-*/redis.conf >/dev/null 2>&1 &" + sudo bash -c "source $HOME/.opentox-ui.sh; 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 -- cgit v1.2.3 From 6f754e8504fbf1f47339f5485b01820833d5e2a1 Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 14 Feb 2012 12:06:22 +0100 Subject: Fixed PATH problem in otreload. --- ot-tools-root.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ot-tools-root.sh b/ot-tools-root.sh index a46293a..da3bd69 100644 --- a/ot-tools-root.sh +++ b/ot-tools-root.sh @@ -68,7 +68,7 @@ alias ottail='tail -f $HOME/.opentox/log/production.log' # Reload the server otreload() { otconfig - sudo bash -c "nginx -s reload" + sudo bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" } # Kill the server -- cgit v1.2.3 From 50faf0c3cbd7ce76fa388e9207a1e9993fd450f7 Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 14 Feb 2012 12:10:06 +0100 Subject: Fixed PATH problem in otkill --- ot-tools-root.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ot-tools-root.sh b/ot-tools-root.sh index da3bd69..064ea29 100644 --- a/ot-tools-root.sh +++ b/ot-tools-root.sh @@ -75,7 +75,7 @@ otreload() { otkill() { otconfig sudo killall -u root nginx >/dev/null 2>&1 - sudo bash -c "redis-cli -p $OHM_PORT shutdown >/dev/null 2>&1" + sudo bash -c "source $HOME/.opentox-ui.sh; 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 -- cgit v1.2.3 From 803ae809cc5092e082ee527dac6eb25c1a63dcf3 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Thu, 1 Mar 2012 10:07:49 +0100 Subject: add passenger_max_pool_size to nginx.conf with value 30 --- nginx.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/nginx.conf b/nginx.conf index 9f87adf..c15dc02 100644 --- a/nginx.conf +++ b/nginx.conf @@ -14,6 +14,7 @@ http { passenger_log_level 2; passenger_spawn_method conservative; #passenger_use_global_queue on; + passenger_max_pool_size 30; include NGINX_DEST/conf/mime.types; default_type application/octet-stream; -- cgit v1.2.3