Skip to content

Commit

Permalink
Merge pull request #171 from SubstraFoundation/dev
Browse files Browse the repository at this point in the history
0.0.8
  • Loading branch information
GuillaumeCisco authored May 27, 2019
2 parents 3e50f8c + a43f3df commit 0f7ab01
Show file tree
Hide file tree
Showing 60 changed files with 1,497 additions and 1,457 deletions.
6 changes: 6 additions & 0 deletions .cicd/agent-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ spec:
volumeMounts:
- { name: tmp, mountPath: /tmp }
- { name: docker, mountPath: /var/run/docker.sock }
- { name: kaniko-secret, mountPath: /secret }
env:
- { name: GOOGLE_APPLICATION_CREDENTIALS, value: /secret/kaniko-secret.json }
volumes:
- name: tmp
hostPath: { path: /tmp, type: Directory }
- name: docker
hostPath: { path: /var/run/docker.sock, type: File }
- name: kaniko-secret
secret:
secretName: kaniko-secret
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ pipeline {

steps {
sh "apt update"
sh "apt install curl && mkdir -p /tmp/download && curl -L https://download.docker.com/linux/static/stable/x86_64/docker-18.06.3-ce.tgz | tar -xz -C /tmp/download && mv /tmp/download/docker/docker /usr/local/bin/"
sh "docker login -u _json_key --password-stdin https://eu.gcr.io/substra-208412/ < /secret/kaniko-secret.json"
sh "apt install -y python3-pip python3-dev build-essential gfortran musl-dev postgresql-contrib git curl netcat"

dir("substrabac") {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ It will drop the databases if they are already created, then create them and gra
- With django migrations
```shell
SUBSTRABAC_ORG=owkin SUBSTRABAC_DEFAULT_PORT=8000 python substrabac/manage.py migrate --settings=substrabac.settings.dev
SUBSTRABAC_ORG=chu-nantes SUBSTRABAC_DEFAULT_PORT=8001 python substrabac/manage.py migrate --settings=substrabac.settings.dev```
SUBSTRABAC_ORG=chu-nantes SUBSTRABAC_DEFAULT_PORT=8001 python substrabac/manage.py migrate --settings=substrabac.settings.dev
```

###### With fixtures (fixtures container has been run from substra-network, old behavior for testing)
Expand Down Expand Up @@ -143,7 +143,7 @@ Execute this command in the `substrabac/substrabac` folder.
Note the use of the development settings.

```shell
DJANGO_SETTINGS_MODULE=substrabac.settings.dev SUBSTRABAC_ORG=owkin SUBSTRABAC_DEFAULT_PORT=8000 celery -E -A substrabac worker -l info -B -n owkin -Q owkin,scheduler, celery --hostname owkin.scheduler
DJANGO_SETTINGS_MODULE=substrabac.settings.dev SUBSTRABAC_ORG=owkin SUBSTRABAC_DEFAULT_PORT=8000 celery -E -A substrabac worker -l info -B -n owkin -Q owkin,scheduler,celery --hostname owkin.scheduler
DJANGO_SETTINGS_MODULE=substrabac.settings.dev SUBSTRABAC_ORG=owkin SUBSTRABAC_DEFAULT_PORT=8000 celery -E -A substrabac worker -l info -B -n owkin -Q owkin,owkin.worker,celery --hostname owkin.worker
DJANGO_SETTINGS_MODULE=substrabac.settings.dev SUBSTRABAC_ORG=owkin SUBSTRABAC_DEFAULT_PORT=8000 celery -E -A substrabac worker -l info -B -n owkin -Q owkin,owkin.dryrunner,celery --hostname owkin.dryrunner
DJANGO_SETTINGS_MODULE=substrabac.settings.dev SUBSTRABAC_ORG=chu-nantes SUBSTRABAC_DEFAULT_PORT=8001 celery -E -A substrabac worker -l info -B -n chunantes -Q chu-nantes,scheduler,celery --hostname chu-nantes.scheduler
Expand Down
4 changes: 2 additions & 2 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
BASEDIR=$(dirname "$0")

# if version not passed in, default to latest released version
export VERSION=1.3.0
export VERSION=1.4.1
# if ca version not passed in, default to latest released version
export CA_VERSION=$VERSION
# current version of thirdparty images (couchdb, kafka and zookeeper) released
export THIRDPARTY_IMAGE_VERSION=0.4.10
export THIRDPARTY_IMAGE_VERSION=0.4.15
export ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')")
export MARCH=$(uname -m)

Expand Down
3 changes: 0 additions & 3 deletions docker/celerybeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ RUN pip3 install -r requirements.txt
COPY ./substrabac/libs /usr/src/app/libs
COPY ./substrabac/substrapp /usr/src/app/substrapp
COPY ./substrabac/substrabac /usr/src/app/substrabac

RUN sed -i 's/localhost/rabbit/g' /usr/src/app/substrabac/celery.py

2 changes: 0 additions & 2 deletions docker/celeryworker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ COPY ./substrabac/fake_metrics /usr/src/app/fake_metrics
COPY ./substrabac/fake_data_sample /usr/src/app/fake_data_sample
COPY ./substrabac/substrapp /usr/src/app/substrapp
COPY ./substrabac/substrabac /usr/src/app/substrabac

RUN sed -i 's/localhost/rabbit/g' /usr/src/app/substrabac/celery.py
4 changes: 4 additions & 0 deletions docker/postgresql/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ psql -U ${USER} -d substrabac_owkin -c "GRANT ALL PRIVILEGES ON DATABASE substra

createdb -U ${USER} -E UTF8 substrabac_chunantes
psql -U ${USER} -d substrabac_chunantes -c "GRANT ALL PRIVILEGES ON DATABASE substrabac_chunantes to substrabac;ALTER ROLE substrabac WITH SUPERUSER CREATEROLE CREATEDB;"


createdb -U ${USER} -E UTF8 substrabac_clb
psql -U ${USER} -d substrabac_clb -c "GRANT ALL PRIVILEGES ON DATABASE substrabac_clb to substrabac;ALTER ROLE substrabac WITH SUPERUSER CREATEROLE CREATEDB;"
Loading

0 comments on commit 0f7ab01

Please sign in to comment.