Skip to content

Commit

Permalink
Working on the readthedocs and travis-ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
faical-yannick-congo committed Feb 3, 2019
1 parent 453b8b6 commit 3598eec
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 14 deletions.
30 changes: 18 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
language: python
env:
DOCKER_COMPOSE_VERSION=1.23.2

python:
- "2.7"

services: mongodb
before_install:
- sudo apt-get update
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine
- docker-compose --version
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose --version
- echo $TRAVIS_BUILD_DIR

# command to install dependencies
install:
- "pip install -r requirements.txt"
- "pip install Lxml==3.4.0"
install:
- docker-compose build -f travis-compose.yaml

before_script:
- sleep 15 #mongo may not be responded directly. See http://docs.travis-ci.com/user/database-setup/#MongoDB
- mongo --version
- docker-compose up -d -f travis-compose.yaml

notifications:
email: "yannick.congo@gmail.com"

# command to run tests
script:
- nosetests -w $TRAVIS_BUILD_DIR/ddsmdb/test --with-doctest -v
script:
- cat corr-setup/test/test_corrapi.txt
- cart corr-setup/test/test_corrcloud.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ api micro-service (corrapi) which is a restfull service that is the interface de
tools. The cloud micro-service which is a second restfull service (corrcloud) dedicated to the view
micro-service (corrview) which is the frontend exposed to web users. Finally a nginx service takes care of
unifying the access to the corrcloud, corrapi and corrview. Information on how to launch a CoRR instance is
provided in [LAUNCH](./LAUNCH.md) and also in videos (click on the corr youtube badge above.).
provided in LAUNCH.md and also in videos (click on the corr youtube badge above.).
</p>

## Citation
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def setup(app):
'README.md',
'LAUNCH.md',
'USE.md',
'LICENSE'
'LICENSE',
)

for fpath in files_to_copy:
Expand Down
113 changes: 113 additions & 0 deletions travis-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
version: '2.1'
services:
corrdb:
build:
context: ./corr-db
image: palingwende/corrdb:0.2
healthcheck:
test: ["CMD", "curl", "-f", "http://corrdb:28017"]
interval: 1m
timeout: 1m
retries: 10
volumes:
- $TRAVIS_BUILD_DIR/corr-setup/data:/data
corrapi:
build:
context: ./corr-api
image: palingwende/corrapi:0.2
healthcheck:
test: ["CMD", "curl", "-f", "http://corrapi:5100/corr/api/v0.2/public/api/status"]
interval: 1m
timeout: 1m
retries: 10
volumes:
- $TRAVIS_BUILD_DIR/corr-setup/corr-storage:/home/corradmin/corr-storage
- $TRAVIS_BUILD_DIR/corr-setup/s3:/home/corradmin/s3
- $TRAVIS_BUILD_DIR/corr-setup/log:/home/corradmin/log
- $TRAVIS_BUILD_DIR/corr-setup/config/config-api.py:/home/corradmin/corr-api/config.py
depends_on:
corrdb:
condition: service_healthy
links:
- corrdb
corrcloud:
build:
context: ./corr-cloud
image: palingwende/corrcloud:0.2
healthcheck:
test: ["CMD", "curl", "-f", "http://corrcloud:5200/cloud/v0.2/public/cloud/status"]
interval: 1m
timeout: 1m
retries: 10
volumes:
- $TRAVIS_BUILD_DIR/corr-setup/corr-storage:/home/corradmin/corr-storage
- $TRAVIS_BUILD_DIR/corr-setup/s3:/home/corradmin/s3
- $TRAVIS_BUILD_DIR/corr-setup/log:/home/corradmin/log
- $TRAVIS_BUILD_DIR/corr-setup/credentials:/home/corradmin/credentials
- $TRAVIS_BUILD_DIR/corr-setup/config/config-cloud.py:/home/corradmin/corr-cloud/config.py
depends_on:
corrdb:
condition: service_healthy
corrapi:
condition: service_healthy
links:
- corrdb
- corrapi
corrview:
build:
context: ./corr-view
image: palingwende/corrview:0.2
healthcheck:
test: ["CMD", "curl", "-f", "http://corrview:5000"]
interval: 1m
timeout: 1m
retries: 10
volumes:
- $TRAVIS_BUILD_DIR/corr-setup/config/config-view.js:/home/corradmin/corr-view/frontend/js/config.js
- $TRAVIS_BUILD_DIR/corr-setup/config/custom.json:/home/corradmin/corr-view/frontend/xml/custom.json
- $TRAVIS_BUILD_DIR/corr-setup/log/corrview.log:/home/corradmin/corrview.log
depends_on:
corrcloud:
condition: service_healthy
links:
- corrcloud
nginx:
image: nginx:latest
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "https://0.0.0.0:443"]
interval: 1m
timeout: 1m
retries: 10
ports:
- "80:80"
- "443:443"
depends_on:
corrview:
condition: service_healthy
links:
- corrview
- corrcloud
- corrapi
volumes:
- $TRAVIS_BUILD_DIR/corr-setup/nginx/nginx.conf:/etc/nginx/nginx.conf
- $TRAVIS_BUILD_DIR/corr-setup/nginx/corr.conf:/etc/nginx/conf.d/default.conf
- $TRAVIS_BUILD_DIR/corr-setup/log/nginx-error.log:/var/nginx/error.log
- $TRAVIS_BUILD_DIR/corr-setup/log/nginx-access.log:/var/nginx/access.log
- $TRAVIS_BUILD_DIR/corr-setup/nginx/corr.cer:/etc/nginx/ssl/corr.cer
- $TRAVIS_BUILD_DIR/corr-setup/nginx/corr.key:/etc/nginx/ssl/corr.key
- $TRAVIS_BUILD_DIR/corr-setup/nginx/corr.crt:/etc/nginx/ssl/corr.bundle.crt
corrtest:
build:
context: ./corr-test
image: palingwende/corrtest:0.2
depends_on:
corrview:
condition: service_healthy
links:
- corrview
- corrcloud
- corrapi
- corrdb
volumes:
- $TRAVIS_BUILD_DIR/corr-setup/test:/home/corradmin/test

0 comments on commit 3598eec

Please sign in to comment.