blob: ecc9b799c81302762c6256b7117f834112407359 (
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
#+TITLE: Installing GeneNetwork services
* Table of Contents :TOC:
- [[#introduction][Introduction]]
- [[#binary-deployment][Binary deployment]]
- [[#install-guix-using-a-tar-ball][Install Guix using a tar ball]]
- [[#fix-locale][Fix locale]]
- [[#authorize-our-archives][Authorize our archives]]
- [[#download-and-install-the-gn2-archive][Download and install the GN2 archive]]
- [[#source-deployment][Source deployment]]
- [[#install-guix][Install guix]]
- [[#checkout-the-git-repositories][Checkout the git repositories]]
- [[#run-guix-daemon][Run guix-daemon]]
- [[#install-gn2][Install GN2]]
- [[#run-gn2][Run GN2]]
- [[#run-mysql-server][Run MySQL server]]
- [[#other][Other]]
- [[#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.
* Binary deployment
Note binary deployment is not working pending a few improvements
to GNU Guix. See source deployment instead.
** Install Guix using a tar ball
GN can be deployed either as a binary tarball or as a GNU Guix
package. First install GNU Guix following the instructions of the
[[https://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html#Binary-Installation][binary installation]] using a tar ball from [[https://www.gnu.org/software/guix/download/][here]].
With guix-daemon running you should be able to install the hello
package:
: guix package -i hello
** Fix locale
You may want to
#+begin_src sh :lang bash
export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
export LC_ALL=en_US.utf8
#+end_src sh :lang bash
** Authorize our archives
Next add our archive key to guix (as root):
#+begin_src scheme
echo "(public-key
(ecc
(curve Ed25519)
(q #E9A95686D8437186302E07C7AB9BF3913F435026C2D389AF27D9C66FD6EBB649#)
)
)
"|guix archive --authorize
#+end_src scheme
if you have trouble finding a suitable guix try
: ls /gnu/store/*guix-*/bin/guix
and you should be able to use this directly, e.g.
: alias guix=/gnu/store/632msbms2yaldfnlrb5lbnlnmn9yjisw-guix-0.9.0/bin/guix
: guix --version
** Download and install the GN2 archive
Find the archive on
http://files.genenetwork.org/software/
download and install with
#+begin_src bash
guix archive --import < genenetwork2-data-hash.nar
#+end_src bash
and you should see a list of packages installing, e.g.
#+begin_src bash
importing path `/gnu/store/l1zs2drn3zdzl5ysjcmhibcpa35p9zfc-python2-mysqlclient-1.3.7'
importing path `/gnu/store/n7kfg4knibvblggy8ci2liscl7vz5wkg-python2-parallel-1.6.4'
importing path `/gnu/store/qvv16qwlq59gp5d07lwbf5n8ndsi3il3-python2-sqlalchemy-1.0.11'
importing path `/gnu/store/qw872mbmr9ir0a9drv9xw9pvjk05ywwy-python2-xlsxwriter-0.8.4'
importing path `/gnu/store/wc112m1xfy3p08v14bdzay2ki2rirdsm-pylmm-gn2-1.0-3c6d1cac8'
importing path `/gnu/store/zfkcy17c2ks3cd9ks14irdabqvmlfpyn-python2-flask-sqlalchemy-2.1'
importing path `/gnu/store/cgcjdiz1qylbc372gc3nda3372ihkpqb-genenetwork2-2.0-a8fcff4'
(etc.)
#+end_src bash
The following packages need to be added and the R path set
: export R_LIBS_SITE="/home/wrk/.guix-profile/site-library/"
: guix package -i /gnu/store/w0dqg9dshq53j8xhcnqgvnvms2s6y5k5-r-wgcna-1.49-425bc170cc0873ddbd414675ac40f6d4d724c7cb
: guix package -i /gnu/store/k60bdlm0v7xic88j2z5c1jb1jvc371mn-r-qtl-1.38-4
You can add the last one to your profile
: guix package -i /gnu/store/cgcjdiz1qylbc372gc3nda3372ihkpqb-genenetwork2-2.0-a8fcff
: export PATH=~/.guix-profile/bin:$PATH
: genenetwork2
or run it directly with
: /gnu/store/cgcjdiz1qylbc372gc3nda3372ihkpqb-genenetwork2-2.0-a8fcff/bin/genenetwork2
* 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]].
** Checkout the git repositories
Check out the guix and guix-bioinformatics 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
** Run guix-daemon
At this 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.
** Install GN2
#+begin_src bash
env GUIX_PACKAGE_PATH=../guix-bioinformatics/ \
./pre-inst-env 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';
** Other
Update guix with a 'guix pull' and make guix visible in the path.
More information exists also in my [[https://github.com/pjotrp/guix-notes/blob/master/INSTALL.org][guix-notes]].
With guix running you should be able to install python, for example.
: guix package -i python2
This will make python appear in $HOME/.guix-profile/bin/python. Suggested
environment settings can be seen with
: guix package --search-paths
* Source deployment and other information on reproducibility
See the document [[GUIX-Reproducible-from-source.org]].
|