diff options
author | drebs <drebs@leap.se> | 2017-04-19 10:18:27 +0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-04-19 11:49:42 +0200 |
commit | 40f2cb8b1f07b1346e01ff69b57e14c492f1cd0b (patch) | |
tree | 9cab2f54014ffb7a56e1d75fd5ef0a70369afd63 /scripts/docker/files/bin/run-server.sh | |
parent | a4558ea4874e0de3561f228b41ef0a94a2e4c326 (diff) |
[test] remove docker scripts from this repo
Docker scripts are only used for CI and do not need to be in this
repository. Beause of that, we decided to moved the docker scripts to a
private repository where dockerfiles for other parts of leap also live.
Diffstat (limited to 'scripts/docker/files/bin/run-server.sh')
-rwxr-xr-x | scripts/docker/files/bin/run-server.sh | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/scripts/docker/files/bin/run-server.sh b/scripts/docker/files/bin/run-server.sh deleted file mode 100755 index feedee7e..00000000 --- a/scripts/docker/files/bin/run-server.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh - -# Start a soledad server inside a docker container. -# -# This script will: -# -# - eventually checkout a specific branch from a specific soledad remote. -# -# - create everything a soledad server needs to run (certificate, backend -# server database, tables, etc. -# -# - eventually preload the server database with a number of documents equal -# to SOLEDAD_PRELOAD_NUM, and with payload size equal to -# SOLEDAD_PRELOAD_SIZE. -# -# - run the soledad server. -# -# This script is meant to be copied to the docker container and run upon -# container start. - -CMD="/usr/local/soledad/setup-test-env.py" - -#--------------------------------------------------------------------------- -# eventually checkout a specific branch from a specific remote -#--------------------------------------------------------------------------- - -REPO="/var/local/soledad" - -if [ ! -z "${SOLEDAD_REMOTE}" ]; then - git -C ${REPO} remote set-url origin ${SOLEDAD_REMOTE} - git -C ${REPO} fetch origin -fi - -if [ ! -z "${SOLEDAD_BRANCH}" ]; then - git -C ${REPO} checkout ${SOLEDAD_BRANCH} -fi - -#--------------------------------------------------------------------------- -# setup environment for running soledad server -#--------------------------------------------------------------------------- - -${CMD} couch start -${CMD} user-db create -${CMD} token-db create -${CMD} token-db insert-token -${CMD} shared-db create -${CMD} cert create - -#--------------------------------------------------------------------------- -# write a configuration file for the perf test -#--------------------------------------------------------------------------- - -if [ "${SOLEDAD_PRELOAD_NUM}" -gt 0 ]; then - cd /var/local/soledad-perf - - cat > defaults.conf <<EOF -[server] -host = http://127.0.0.1:2424 - -[client] -uuid = 1234567890abcdef -basedir = /tmp/soledad_client_test -passphrase = 12345678 - -[sync] -num_docs = ${SOLEDAD_PRELOAD_NUM} -payload = /tmp/payload -payload_size = ${SOLEDAD_PRELOAD_SIZE} -auth_token = an-auth-token - -[test] -stats_file = ./out/stats.json -EOF - - echo "Preloading server database..." - ./scripts/preload_server_database.py -fi - -#--------------------------------------------------------------------------- -# actually run the server -#--------------------------------------------------------------------------- - -if [ "${1}" = "--drop-to-shell" ]; then - /bin/bash - exit 0 -fi - -echo "Starting soledad server..." -${CMD} soledad-server start --no-daemonize |