summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-03-08 10:52:29 +0100
committerChristoph Helma <helma@in-silico.ch>2011-03-08 10:52:29 +0100
commit26037d5c6b734ce2afec34d1b2c5cd9ccafdcd3d (patch)
treee3b499ccf1809b0b21ad91b6d9511b3c090865ca
parentc6c57b1ef623b58de0bfe6402f056218d4dcbd69 (diff)
parentddd53ddcdf4dca13c6ac117655ff64edb8950fba (diff)
Merge branch 'master' of github.com:helma/opentox-install
Conflicts: config opentox-ruby.sh
-rw-r--r--aa-local.yaml38
-rw-r--r--aa-server.yaml38
-rw-r--r--config14
-rwxr-xr-xinstall2
-rw-r--r--nginx.conf4
-rw-r--r--opentox-ruby.sh7
-rw-r--r--production.yaml43
7 files changed, 96 insertions, 50 deletions
diff --git a/aa-local.yaml b/aa-local.yaml
new file mode 100644
index 0000000..593ba56
--- /dev/null
+++ b/aa-local.yaml
@@ -0,0 +1,38 @@
+# OpenSSO Authorization
+# set ":server: " to disable A&A
+:authorization:
+ :server: AA
+ :free_request: #request-method not controlled by A&A
+ - "GET"
+ - "POST"
+ - "HEAD"
+ - "DELETE"
+ - "PUT"
+ :authenticate_request: #only for authenticated user
+ - ""
+ :authorize_request: #only for authenticated and authorizeduser
+ - ""
+# Exceptions:
+ :free_uris: #request-method for uri not controlled by A&A
+ ? - :GET
+ : - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/algorithm/
+ - "http://SERVERNAME/model"
+ - "http://SERVERNAME/validation"
+ - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/validation\/[a-z,A-Z,\/,_\-]*$/
+ ? - :GET
+ - :POST
+ : - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/toxcreate/
+ - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/task/
+ - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/compound/
+
+ ? - :PUT
+ : - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/task/
+
+ :authorize_exceptions: #request-method for uri only authenticated, no authorization
+ ? - :POST
+ : - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/algorithm/
+ - "http://SERVERNAME/dataset"
+ - "http://SERVERNAME/model"
+ - "http://SERVERNAME/validation"
+ - !ruby/regexp /http\:\/\/ESCAPEDSERVERNAME\/validation\/[a-z,A-Z,\/,_\-]*$/
+
diff --git a/aa-server.yaml b/aa-server.yaml
new file mode 100644
index 0000000..593ba56
--- /dev/null
+++ b/aa-server.yaml
@@ -0,0 +1,38 @@
+# OpenSSO Authorization
+# set ":server: " to disable A&A
+:authorization:
+ :server: AA
+ :free_request: #request-method not controlled by A&A
+ - "GET"
+ - "POST"
+ - "HEAD"
+ - "DELETE"
+ - "PUT"
+ :authenticate_request: #only for authenticated user
+ - ""
+ :authorize_request: #only for authenticated and authorizeduser
+ - ""
+# Exceptions:
+ :free_uris: #request-method for uri not controlled by A&A
+ ? - :GET
+ : - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/algorithm/
+ - "http://SERVERNAME/model"
+ - "http://SERVERNAME/validation"
+ - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/validation\/[a-z,A-Z,\/,_\-]*$/
+ ? - :GET
+ - :POST
+ : - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/toxcreate/
+ - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/task/
+ - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/compound/
+
+ ? - :PUT
+ : - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/task/
+
+ :authorize_exceptions: #request-method for uri only authenticated, no authorization
+ ? - :POST
+ : - !ruby/regexp /http:\/\/ESCAPEDSERVERNAME\/algorithm/
+ - "http://SERVERNAME/dataset"
+ - "http://SERVERNAME/model"
+ - "http://SERVERNAME/validation"
+ - !ruby/regexp /http\:\/\/ESCAPEDSERVERNAME\/validation\/[a-z,A-Z,\/,_\-]*$/
+
diff --git a/config b/config
index cada2e2..6b18a2a 100644
--- a/config
+++ b/config
@@ -5,14 +5,18 @@
# Linux distribution (currently only debian)
distribution=debian
+# Choose a root password for the MySQL database
+# Please insert the correct password if mysql-server is already installed
+mysql_root=opentox
+
# Installation type
# Options:
-# gem Installs only the opentox-ruby gem (useful, if you want to use external services with the opentox-ruby DSL)
-# local local installation
-# server inter or intranet server
-type=local
+# gem installs only the opentox-ruby gem (useful, if you want to use external services with the opentox-ruby DSL)
+# local local installation (authentication and authorisation disabled)
+# server inter or intranet server (authentication and authorisation enabled)
+type=server
# Git branch of services
# Options: master test development
# "master" is the current stable version
-branch=master
+branch=development
diff --git a/install b/install
index 47e6be3..9a89730 100755
--- a/install
+++ b/install
@@ -6,7 +6,7 @@
. ./openbabel.sh
. ./kernlab.sh
. ./opentox-ruby.sh
-if [ $install = "all" ]
+if [ $install != "gem" ]
then
. ./nginx.sh
. ./redis.sh
diff --git a/nginx.conf b/nginx.conf
index f2c9bed..ce00e37 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -11,7 +11,9 @@ http {
passenger_root /opt/ruby-enterprise-1.8.7-2010.03/lib/ruby/gems/1.8/gems/PASSENGER;
passenger_ruby /opt/ruby-enterprise-1.8.7-2010.03/bin/ruby;
passenger_default_user opentox;
- passenger_log_level 3;
+ passenger_log_level 2;
+ passenger_spawn_method conservative;
+ #passenger_use_global_queue on;
include mime.types;
default_type application/octet-stream;
diff --git a/opentox-ruby.sh b/opentox-ruby.sh
index 67616c9..595ee36 100644
--- a/opentox-ruby.sh
+++ b/opentox-ruby.sh
@@ -10,6 +10,7 @@ dir=`pwd`
# create config file
servername=`hostname`.`dnsdomainname`
+escapedservername=`echo $servername|sed 's/\/\\\//'`
if [ $branch = "development" ]
then
logger=":logger: backtrace"
@@ -26,14 +27,16 @@ fi
mkdir -p $HOME/.opentox/config
mkdir -p $HOME/.opentox/log
-sed -e "s/SERVERNAME/$servername/;s/LOGGER/$logger/;s/AA/$aa/" production.yaml > $HOME/.opentox/config/production.yaml
+#sed -e "s/SERVERNAME/$servername/;s/LOGGER/$logger/;s/AA/$aa/" production.yaml > $HOME/.opentox/config/production.yaml
+sed -e "s/PASSWORD/$password/;s/SERVERNAME/$servername/;s/ESCAPEDSERVERNAME/$escapedservername/;s/LOGGER/$logger/;s/AA/$aa/" production.yaml > $HOME/.opentox/config/production.yaml
+sed -e "s/PASSWORD/$password/;s/SERVERNAME/$servername/;s/ESCAPEDSERVERNAME/$escapedservername/;s/LOGGER/$logger/;s/AA/$aa/" aa-$type.yaml >> $HOME/.opentox/config/production.yaml
# checkout development version and link lib to opentox-ruby gem
if [ $branch = "development" ]
then
mkdir -p /var/www/opentox
cd /var/www/opentox
- git clone http://github.com/mguetlein/opentox-ruby.git
+ git clone http://github.com/helma/opentox-ruby.git
cd opentox-ruby
git checkout -t origin/$branch
gem_lib=`gem which opentox-ruby`
diff --git a/production.yaml b/production.yaml
index ce19743..f6d19cd 100644
--- a/production.yaml
+++ b/production.yaml
@@ -18,45 +18,6 @@
# Uncomment for verbose logging
LOGGER
-#:logger: debug
-#:backtrace: true
+:logger: debug
+:backtrace: true
-# OpenSSO Authorization
-# set ":server: " to disable A&A
-:authorization:
- :server: AA
- :free_request: #request-method not controlled by A&A
- - "GET"
- - "POST"
- - "HEAD"
- - "DELETE"
- - "PUT"
- :authenticate_request: #only for authenticated user
- - ""
- :authorize_request: #only for authenticated and authorizeduser
- - ""
-# Exceptions:
- :free_uris: #request-method for uri not controlled by A&A
- ? - :GET
- : - !ruby/regexp /http:\/\/ot\-dev\.in\-silico\.ch\/algorithm/
- - "http://in-silico.ch/dataset"
- - "http://ot-dev.in-silico.ch/model"
- - "http://ot-dev.in-silico.ch/validation"
- - !ruby/regexp /http:\/\/ot\-dev\.in-silico\.ch\/validation\/[a-z,A-Z,\/,_\-]*$/
- ? - :GET
- - :POST
- : - !ruby/regexp /http:\/\/ot\-dev\.in\-silico\.ch\/toxcreate/
- - !ruby/regexp /http:\/\/ot\-dev\.in\-silico\.ch\/task/
- - !ruby/regexp /http:\/\/ot\-dev\.in\-silico\.ch\/compound/
-
- ? - :PUT
- : - !ruby/regexp /http:\/\/ot\-dev\.in\-silico\.ch\/task/
-
- :authorize_exceptions: #request-method for uri only authenticated, no authorization
- ? - :POST
- : - !ruby/regexp /http:\/\/ot\-dev\.in\-silico\.ch\/algorithm/
- - "http://ot-dev.in-silico.ch/dataset"
- - "http://ot-dev.in-silico.ch/model"
- - "http://ot-dev.in-silico.ch/validation"
- - !ruby/regexp /http\:\/\/ot-dev\.in\-silico\.ch\/validation\/[a-z,A-Z,\/,_\-]*$/
-