From 2f2f6bf857a8ca8ce04ee98b221b0feaa95d5284 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Mar 2011 09:34:09 +0000 Subject: updated for redis --- aa-local.yaml | 38 ++++++++++++++++++++++++++++++++++++++ aa-server.yaml | 38 ++++++++++++++++++++++++++++++++++++++ config | 15 +++++---------- install | 2 +- nginx.conf | 4 +++- opentox-ruby.sh | 6 ++++-- production.yaml | 43 ++----------------------------------------- 7 files changed, 91 insertions(+), 55 deletions(-) create mode 100644 aa-local.yaml create mode 100644 aa-server.yaml 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 6ff7cee..6b18a2a 100644 --- a/config +++ b/config @@ -9,19 +9,14 @@ distribution=debian # Please insert the correct password if mysql-server is already installed mysql_root=opentox -# Services to be installed -# Options: -# gem Installs only the opentox-ruby gem (useful, if you want to use external services with the opentox-ruby DSL) -# all Installs all IST/ALU services (useful for local and server installations) -install=all - # Installation type # Options: -# 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 7e64344..999c2ef 100755 --- a/install +++ b/install @@ -7,7 +7,7 @@ . ./openbabel.sh . ./kernlab.sh . ./opentox-ruby.sh -if [ $install = "all" ] +if [ $install != "gem" ] then . ./opentox-webservices.sh . ./mysql-setup.sh diff --git a/nginx.conf b/nginx.conf index add5f85..3484bf8 100644 --- a/nginx.conf +++ b/nginx.conf @@ -11,7 +11,9 @@ http { passenger_root /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/PASSENGER; passenger_ruby /opt/ruby-enterprise-1.8.7-2010.02/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 449b746..8d31ccd 100644 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -11,6 +11,7 @@ dir=`pwd` # create config file password=`pwgen 8 1` servername=`hostname`.`dnsdomainname` +escapedservername=`echo $servername|sed 's/\/\\\//'` if [ $branch = "development" ] then logger=":logger: backtrace" @@ -27,14 +28,15 @@ fi mkdir -p $HOME/.opentox/config mkdir -p $HOME/.opentox/log -sed -e "s/PASSWORD/$password/;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 b1f59de..443c3b5 100644 --- a/production.yaml +++ b/production.yaml @@ -26,45 +26,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,\/,_\-]*$/ - -- cgit v1.2.3