diff options
author | pjotrp | 2016-02-16 10:30:27 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-04-20 08:30:21 +0000 |
commit | c76299fa981add7b8cf56126c8d7ffeb9a6c4034 (patch) | |
tree | e5892fcefc84486107cc45791e198cabfe8f8305 | |
parent | f1a9ce85521180b9204d14203677a92f944e2859 (diff) | |
download | genenetwork2-c76299fa981add7b8cf56126c8d7ffeb9a6c4034.tar.gz |
Successful startup of GN2 with MySQL
-rwxr-xr-x | bin/genenetwork2 | 8 | ||||
-rw-r--r-- | doc/README.org | 49 |
2 files changed, 56 insertions, 1 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2 index d0177045..a48e8b93 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -8,8 +8,14 @@ SCRIPT=$(readlink -f "$0") GN2_BASE_PATH=$(dirname $(dirname "$SCRIPT")) echo $GN2_BASE_PATH +settings=$1 +if [ -z $settings ]; then settings=$GN2_BASE_PATH/etc/default_settings.py ; fi export PYTHONPATH=$GN2_BASE_PATH/wqflask:$PYTHONPATH -export WQFLASK_SETTINGS=$GN2_BASE_PATH/etc/default_settings.py +export WQFLASK_SETTINGS=$settings + +# start the redis server +redis-server & cd $GN2_BASE_PATH/wqflask +echo "Starting with $settings" /usr/bin/env python runserver.py diff --git a/doc/README.org b/doc/README.org index 8e0823de..375a5d20 100644 --- a/doc/README.org +++ b/doc/README.org @@ -3,6 +3,8 @@ * Table of Contents :TOC: - [[#introduction][Introduction]] - [[#binary-deployment-wip][Binary deployment (WIP)]] + - [[#run-mysql-server][Run MySQL server]] + - [[#start-the-gn2-server][Start the GN2 server]] - [[#source-deployment-and-other-information-on-reproducibility][Source deployment and other information on reproducibility]] * Introduction @@ -16,6 +18,53 @@ explain the GeneNetwork deployment system which is based on GNU Guix GN can be deployed either as a binary tarball or as a GNU Guix package. +** Run MySQL server + +At this point we require the underlying distribution to install +and run mysqld. + +Download one of + +http://files.genenetwork.org/raw_database/ +https://s3.amazonaws.com/genenetwork2/db_webqtl_s.zip + +Check the md5sum. + +After installation inflate the database binary in the MySQL directory +(this is subject to change soon) + +: chown -R mysql:mysql db_webqtl_s/ +: chmod 700 db_webqtl_s/ +: chmod 660 db_webqtl_s/* + +restart MySQL service (mysqld). Login as root and + +: mysql> show databases; +: +--------------------+ +: | Database | +: +--------------------+ +: | information_schema | +: | db_webqtl_s | +: | mysql | +: | performance_schema | +: +--------------------+ + +Set permissions and match password in your settings file below: + +: mysql> grant all privileges on db_webqtl_s.* to gn2@"localhost" identified by 'mysql_password'; + +** Start the GN2 server + +Copy the default_settings.py file and modify + +: DB_URI = """mysql://gn2:mysql_password@localhost/db_webqtl""" +: SQLALCHEMY_DATABASE_URI = 'mysql://gn2:mysql_password/db_webqtl' +: SECRET_KEY = 'secret_key' + +Start the server with your settings file + +: ./bin/genenetwork2 ~/my_gn2_settings.py + * Source deployment and other information on reproducibility See the document [[GUIX-Reproducible-from-source.org]]. |