aboutsummaryrefslogtreecommitdiff
path: root/doc/README.org
blob: adb545f674e57c7f9b97da7338171dd7126e5b26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#+TITLE: Installing GeneNetwork services

* Table of Contents                                                     :TOC:
 - [[#introduction][Introduction]]
 - [[#source-deployment][Source deployment]]
   - [[#install-guix][Install guix]]
   - [[#checkout-the-git-repositories][Checkout the git repositories]]
   - [[#install-gn2][Install GN2]]
   - [[#run-gn2][Run GN2]]
   - [[#run-mysql-server][Run MySQL server]]
   - [[#notes][Notes]]
 - [[#source-deployment-and-other-information-on-reproducibility][Source deployment and other information on reproducibility]]

* Introduction

Large system deployments tend to get very complex. In this document we
explain the GeneNetwork deployment system which is based on GNU Guix
(see also Pjotr's [[https://github.com/pjotrp/guix-notes/blob/master/README.md][Guix-notes]]). The Guix system can be used to install
GN with all its files and dependencies.

The official installation path is via a GNU Guix installation from a
checked out version of the Guix package tree (this is required for
reproducibility).

* Source deployment

** Install guix

Deploying from source is also straightforward. Install GNU Guix using
a binary tar ball as described [[https://github.com/pjotrp/guix-notes][here]].

If it works you should be able to install a package with

: guix package -i hello

** Checkout the git repositories

Check out the two relevant guix and guix-bioinformatics git
repositories:

#+begin_src bash
cd ~
mkdir genenetwork
cd genenetwork
git clone https://github.com/genenetwork/guix-bioinformatics
git clone --recursive --branch gn-latest https://github.com/genenetwork/guix guix-gn-latest
cd guix-gn-latest
#+end_src bash

*** Update the path

Now make sure the guix update path is inline with ours

#+begin_src bash
mkdir -p ~/.config/guix
ln -s ~/genenetwork/guix-gn-latest ~/.config/guix/latest
#+end_src bash

** Install GN2

#+begin_src bash
export GUIX_PACKAGE_PATH=~/genenetwork/guix-bioinformatics/
guix package -i genenetwork2
#+end_src bash

** Run GN2

#+begin_src bash
export PATH=~/.guix-profile/bin:$PATH
genenetwork2
#+end_src bash

will start the default server which listens on port 5003.

** 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';

** Notes

At some point you may decide to create, install and run a recent
version of the guix-daemon by compiling the guix repository. Follow
[[https://github.com/pjotrp/guix-notes/blob/master/INSTALL.org#building-gnu-guix-from-source-using-guix][these]] steps carefully.

* Source deployment and other information on reproducibility

See the document [[GUIX-Reproducible-from-source.org]].