Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #261 from NBISweden/feature/pgp
Browse files Browse the repository at this point in the history
Ditching GnuPG
  • Loading branch information
blankdots authored Mar 9, 2018
2 parents 617491b + 5226e0b commit d6055c4
Show file tree
Hide file tree
Showing 125 changed files with 2,498 additions and 2,325 deletions.
17 changes: 4 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ before_install:
# https://elk-docker.readthedocs.io/#es-not-starting-max-map-count
# mostly used by ELK stack; Solving issue #252
# - sudo sysctl -w vm.max_map_count=262144
- |
cd deployments/docker
# make -C images pull # Not used at the moment, cuz we don't manage to build from cache
make -C images images
make bootstrap
- cd deployments/docker
- make bootstrap
- sudo chown -R travis private

install:
- docker network create cega
Expand All @@ -22,17 +20,10 @@ script:
# https://docs.travis-ci.com/user/database-setup/#ElasticSearch
# takes a few seconds to start and that delays everything
# comment out sleep if no ELK stack is used; Solving issue #252
# - sleep 20
- sleep 10
- cd ../../tests
- mvn test -B

after_success:
- |
if [ "$TRAVIS_BRANCH" == "dev" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
make -C ../deployments/docker/images -j 4 push
fi
notifications:
email: false
slack:
Expand Down
7 changes: 6 additions & 1 deletion deployments/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ help:
@echo "where <target> is: 'bootstrap', 'up', 'all-up', 'ps', 'down', 'network' or 'clean'\n"

private bootstrap:
@docker run --rm -it -v ${PWD}:/ega -v ${PWD}/../../extras/db.sql:/tmp/db.sql nbisweden/ega-bootstrap ${ARGS}
@docker run --rm -it \
-v ${PWD}:/ega \
-v ${PWD}/../../extras/db.sql:/tmp/db.sql \
-v ${PWD}/../../extras/generate_pgp_key.py:/tmp/generate_pgp_key.py \
--entrypoint /ega/bootstrap/boot.sh \
nbisweden/ega-base ${ARGS}

network:
@docker network inspect cega &>/dev/null || docker network create cega &>/dev/null
Expand Down
7 changes: 1 addition & 6 deletions deployments/docker/bootstrap/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@ HERE=$(dirname ${BASH_SOURCE[0]})
PRIVATE=${HERE}/../private
DOT_ENV=${HERE}/../.env
SETTINGS=${HERE}/settings
EXTRAS=${HERE}/../../../extras

# Defaults
VERBOSE=no
FORCE=yes
OPENSSL=openssl
GPG=gpg2
GPG_CONF=gpgconf

function usage {
echo "Usage: $0 [options]"
echo -e "\nOptions are:"
echo -e "\t--openssl <value> \tPath to the Openssl executable [Default: ${OPENSSL}]"
echo -e "\t--gpg <value> \tPath to the GnuPG executable [Default: ${GPG}]"
echo -e "\t--gpgconf <value> \tPath to the GnuPG conf executable [Default: ${GPG_CONF}]"
echo ""
echo -e "\t--verbose, -v \tShow verbose output"
echo -e "\t--polite, -p \tDo not force the re-creation of the subfolders. Ask instead"
Expand All @@ -35,8 +32,6 @@ while [[ $# -gt 0 ]]; do
--help|-h) usage; exit 0;;
--verbose|-v) VERBOSE=yes;;
--polite|-p) FORCE=no;;
--gpg) GPG=$2; shift;;
--gpgconf) GPG_CONF=$2; shift;;
--openssl) OPENSSL=$2; shift;;
--) shift; break;;
*) echo "$0: error - unrecognized option $1" 1>&2; usage; exit 1;; esac
Expand Down
9 changes: 8 additions & 1 deletion deployments/docker/bootstrap/cega_users.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,24 @@ services:
cega-users:
env_file: cega/env
image: nbisweden/ega-cega-users
image: nbisweden/ega-base
hostname: cega-users
container_name: cega-users
ports:
- "9100:80"
expose:
- "80"
volumes:
- ./cega/users:/cega/users:rw
- ../images/cega-users/users.html:/cega/users.html
- ../images/cega-users/server.py:/cega/server.py
# - ../..:/root/.local/lib/python3.6/site-packages:ro
restart: on-failure:3
networks:
- cega
command: ["python3.6", "/cega/server.py"]
EOF

# For the compose file
Expand Down
Loading

0 comments on commit d6055c4

Please sign in to comment.