Skip to content

Redbiom install #2278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dist: precise
language: python
sudo: false
sudo: required
env:
global:
- PYTHON_VERSION=2.7
Expand All @@ -10,6 +10,7 @@ env:
- TEST_ADD_STUDIES=True COVER_PACKAGE="qiita_core qiita_ware"
before_install:
- redis-server --version
- sudo -H -u redis redis-server /etc/redis/redis.conf --port 7777 &
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
Expand All @@ -27,17 +28,32 @@ install:
# install a few of the dependencies that pip would otherwise try to install
# when intalling scikit-bio
- travis_retry conda create --yes -n qiita python=$PYTHON_VERSION pip nose flake8
pyzmq networkx pyparsing natsort mock future libgfortran seaborn
pyzmq networkx pyparsing natsort mock future libgfortran seaborn nltk
'pandas>=0.18' 'matplotlib>=1.1.0' 'scipy>0.13.0' 'numpy>=1.7' 'h5py>=2.3.1'
- source activate qiita
- pip install -U pip
- pip install sphinx sphinx-bootstrap-theme nose-timer codecov
- travis_retry pip install . --process-dependency-links
- 'echo "backend: Agg" > matplotlibrc'
- git clone https://github.com/nicolasff/webdis
- pushd webdis
- make
- ./webdis &
- popd
- travis_retry pip install . --process-dependency-links
# Install the biom plugin so we can run the analysis tests
- pip install https://github.com/qiita-spots/qiita_client/archive/master.zip
- pip install https://github.com/qiita-spots/qtp-biom/archive/master.zip --process-dependency-links
- export QIITA_SERVER_CERT=`pwd`/qiita_core/support_files/server.crt
# loading redbiom with Qiita's test set
# but first let's make sure redis is empty
# following https://github.com/biocore/redbiom/blob/master/Makefile
- export REDBIOM_HOST=http://127.0.0.1:7379
- curl -s http://127.0.0.1:7379/FLUSHALL > /dev/null
- redbiom admin scripts-writable
- redbiom admin create-context --name "qiita-test" --description "qiita-test context"
- redbiom admin load-sample-metadata --metadata `pwd`/qiita_db/support_files/test_data/templates/1_19700101-000000.txt
- redbiom admin load-sample-metadata-search --metadata `pwd`/qiita_db/support_files/test_data/templates/1_19700101-000000.txt
- 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
- mkdir ~/.qiita_plugins
- cp $PWD/qiita_core/support_files/BIOM\ type_2.1.4.conf ~/.qiita_plugins
before_script:
Expand Down
29 changes: 29 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Install the non-python dependencies

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

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

Expand Down Expand Up @@ -87,6 +88,27 @@ brew update
brew install homebrew/versions/redis28
```

### webdis

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.

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.

```
git clone https://github.com/nicolasff/webdis
pushd webdis
make
./webdis &
popd
# note that this assumes that Qiita is already installed
fp=`python -c 'import qiita_db; print qiita_db.__file__'`
qdbd=`dirname $fp`
redbiom admin scripts-writable
redbiom admin create-context --name "qiita-test" --description "qiita-test context"
redbiom admin load-sample-metadata --metadata ${qdbd}/support_files/test_data/templates/1_19700101-000000.txt
redbiom admin load-sample-metadata-search --metadata ${qdbd}/support_files/test_data/templates/1_19700101-000000.txt
redbiom admin load-sample-data --table ${qdbd}/support_files/test_data/processed_data/1_study_1001_closed_reference_otu_table.biom --context qiita-test
```

Install Qiita development version and its python dependencies
-------------------------------------------------------------
Expand Down Expand Up @@ -151,6 +173,13 @@ Next, make a test environment:
qiita-env make --no-load-ontologies
```

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:


```bash
export REDBIOM_HOST=http://my_host.com:7379
```

## Start Qiita

Start postgres (instructions vary depending on operating system and install method).
Expand Down
2 changes: 1 addition & 1 deletion qiita_core/support_files/config_test.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ EMAIL = example@domain.com
# ----------------------------- Redis settings --------------------------------
[redis]
HOST = localhost
PORT = 6379
PORT = 7777
PASSWORD =
# The redis database you will use, redis has a max of 16.
# Qiita should have its own database
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@
'natsort', 'networkx',
'scikit-bio == 0.4.2', 'wtforms == 2.0.1',
'sphinx-bootstrap-theme', 'Sphinx >= 1.2.2',
'gitpython', 'qiita-files'],
'gitpython', 'qiita-files', 'redbiom'],
dependency_links=[
'https://github.com/qiita-spots/qiita-files/archive/master.zip#'
'egg=qiita-files-0.1.0-dev'],
'egg=qiita-files-0.1.0-dev',
'https://github.com/biocore/redbiom/archive/master.zip#'
'egg=redbiom-2017.0.1.dev0'],
classifiers=classifiers
)