Skip to content

Commit 42dd9a9

Browse files
authored
Merge pull request #2278 from antgonza/redbiom-install
Redbiom install
2 parents 45e0175 + 21549c1 commit 42dd9a9

File tree

4 files changed

+53
-6
lines changed

4 files changed

+53
-6
lines changed

.travis.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dist: precise
22
language: python
3-
sudo: false
3+
sudo: required
44
env:
55
global:
66
- PYTHON_VERSION=2.7
@@ -10,6 +10,7 @@ env:
1010
- TEST_ADD_STUDIES=True COVER_PACKAGE="qiita_core qiita_ware"
1111
before_install:
1212
- redis-server --version
13+
- sudo -H -u redis redis-server /etc/redis/redis.conf --port 7777 &
1314
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
1415
- chmod +x miniconda.sh
1516
- ./miniconda.sh -b
@@ -27,17 +28,32 @@ install:
2728
# install a few of the dependencies that pip would otherwise try to install
2829
# when intalling scikit-bio
2930
- travis_retry conda create --yes -n qiita python=$PYTHON_VERSION pip nose flake8
30-
pyzmq networkx pyparsing natsort mock future libgfortran seaborn
31+
pyzmq networkx pyparsing natsort mock future libgfortran seaborn nltk
3132
'pandas>=0.18' 'matplotlib>=1.1.0' 'scipy>0.13.0' 'numpy>=1.7' 'h5py>=2.3.1'
3233
- source activate qiita
3334
- pip install -U pip
3435
- pip install sphinx sphinx-bootstrap-theme nose-timer codecov
35-
- travis_retry pip install . --process-dependency-links
3636
- 'echo "backend: Agg" > matplotlibrc'
37+
- git clone https://github.com/nicolasff/webdis
38+
- pushd webdis
39+
- make
40+
- ./webdis &
41+
- popd
42+
- travis_retry pip install . --process-dependency-links
3743
# Install the biom plugin so we can run the analysis tests
3844
- pip install https://github.com/qiita-spots/qiita_client/archive/master.zip
3945
- pip install https://github.com/qiita-spots/qtp-biom/archive/master.zip --process-dependency-links
4046
- export QIITA_SERVER_CERT=`pwd`/qiita_core/support_files/server.crt
47+
# loading redbiom with Qiita's test set
48+
# but first let's make sure redis is empty
49+
# following https://github.com/biocore/redbiom/blob/master/Makefile
50+
- export REDBIOM_HOST=http://127.0.0.1:7379
51+
- curl -s http://127.0.0.1:7379/FLUSHALL > /dev/null
52+
- redbiom admin scripts-writable
53+
- redbiom admin create-context --name "qiita-test" --description "qiita-test context"
54+
- redbiom admin load-sample-metadata --metadata `pwd`/qiita_db/support_files/test_data/templates/1_19700101-000000.txt
55+
- redbiom admin load-sample-metadata-search --metadata `pwd`/qiita_db/support_files/test_data/templates/1_19700101-000000.txt
56+
- redbiom admin load-sample-data --table `pwd`/qiita_db/support_files/test_data/processed_data/1_study_1001_closed_reference_otu_table.biom --context qiita-test
4157
- mkdir ~/.qiita_plugins
4258
- cp $PWD/qiita_core/support_files/BIOM\ type_2.1.4.conf ~/.qiita_plugins
4359
before_script:

INSTALL.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Install the non-python dependencies
6060

6161
* [PostgreSQL](http://www.postgresql.org/download/) (minimum required version 9.3.5, we have tested most extensively with 9.3.6)
6262
* [redis-server](http://redis.io) (we have tested most extensively with 2.8.17)
63+
* [webdis] (https://github.com/nicolasff/webdis) (latest version should be fine but we have tested the most with 9ee6fe2 - Feb 6, 2016)
6364

6465
There are several options to install these dependencies depending on your needs:
6566

@@ -87,6 +88,27 @@ brew update
8788
brew install homebrew/versions/redis28
8889
```
8990

91+
### webdis
92+
93+
Note that this is the only package that assumes that Qiita is already installed (due to library dependencies). Also, that the general suggestion is to have 2 redis servers running, one for webdis/redbiom and the other for Qiita. The reason for multiple redis servers is so that the redbiom cache can be flushed without impacting the operation of the qiita server itself.
94+
95+
The following instructions install, compile and pre-populates the redbiom redis DB so we assume that redis is running on the default port and that Qiita is fully installed as the redbiom package is installed with Qiita.
96+
97+
```
98+
git clone https://github.com/nicolasff/webdis
99+
pushd webdis
100+
make
101+
./webdis &
102+
popd
103+
# note that this assumes that Qiita is already installed
104+
fp=`python -c 'import qiita_db; print qiita_db.__file__'`
105+
qdbd=`dirname $fp`
106+
redbiom admin scripts-writable
107+
redbiom admin create-context --name "qiita-test" --description "qiita-test context"
108+
redbiom admin load-sample-metadata --metadata ${qdbd}/support_files/test_data/templates/1_19700101-000000.txt
109+
redbiom admin load-sample-metadata-search --metadata ${qdbd}/support_files/test_data/templates/1_19700101-000000.txt
110+
redbiom admin load-sample-data --table ${qdbd}/support_files/test_data/processed_data/1_study_1001_closed_reference_otu_table.biom --context qiita-test
111+
```
90112

91113
Install Qiita development version and its python dependencies
92114
-------------------------------------------------------------
@@ -151,6 +173,13 @@ Next, make a test environment:
151173
qiita-env make --no-load-ontologies
152174
```
153175

176+
Finally, redbiom relies on the REDBIOM_HOST environment variable to set the URL to query. By default is set to Qiita redbiom public repository. To change it you could do:
177+
178+
179+
```bash
180+
export REDBIOM_HOST=http://my_host.com:7379
181+
```
182+
154183
## Start Qiita
155184

156185
Start postgres (instructions vary depending on operating system and install method).

qiita_core/support_files/config_test.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ EMAIL = example@domain.com
9191
# ----------------------------- Redis settings --------------------------------
9292
[redis]
9393
HOST = localhost
94-
PORT = 6379
94+
PORT = 7777
9595
PASSWORD =
9696
# The redis database you will use, redis has a max of 16.
9797
# Qiita should have its own database

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@
110110
'natsort', 'networkx',
111111
'scikit-bio == 0.4.2', 'wtforms == 2.0.1',
112112
'sphinx-bootstrap-theme', 'Sphinx >= 1.2.2',
113-
'gitpython', 'qiita-files'],
113+
'gitpython', 'qiita-files', 'redbiom'],
114114
dependency_links=[
115115
'https://github.com/qiita-spots/qiita-files/archive/master.zip#'
116-
'egg=qiita-files-0.1.0-dev'],
116+
'egg=qiita-files-0.1.0-dev',
117+
'https://github.com/biocore/redbiom/archive/master.zip#'
118+
'egg=redbiom-2017.0.1.dev0'],
117119
classifiers=classifiers
118120
)

0 commit comments

Comments
 (0)