summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2016-06-12 13:23:56 -0300
committerdrebs <drebs@leap.se>2016-06-22 17:51:18 -0300
commit756b22ccfa789f2e270282a91812f66f84b8fb3a (patch)
tree22386f25495868e2325d05ccc677a63ccc843341 /scripts
parent78d61dfaadf9bcac7258a33738c660b238b7bf27 (diff)
[test] improve docker scripts README file
Diffstat (limited to 'scripts')
-rw-r--r--scripts/docker/README.md40
1 files changed, 28 insertions, 12 deletions
diff --git a/scripts/docker/README.md b/scripts/docker/README.md
index 101db837..c4d7ac94 100644
--- a/scripts/docker/README.md
+++ b/scripts/docker/README.md
@@ -7,17 +7,18 @@ especially useful for testing purposes as you can limit/reserve a certain
amount of resources for the soledad process, and thus provide a baseline for
comparison of time and resource consumption between distinct runs.
-Check the `Dockerfile` for the rules for building the docker image.
+Check the `Dockerfile` for the steps for creating the docker image.
-Check the `Makefile` for example usage of the files in this directory.
+Check the `Makefile` for the rules for running containers.
+Check the `helper/` directory for scripts that help running tests.
-Environment variables for server script
----------------------------------------
-If you want to run the image for testing you may pass the following
-environment variables for the `files/start-server.sh` script for checking out
-a specific branch on the soledad repository:
+Environment variables for docker containers
+-------------------------------------------
+
+Different environment variables can be set for docker containers and will
+cause the scripts to behave differently:
SOLEDAD_REMOTE - a git url for a remote repository that is added at run time
to the local soledad git repository.
@@ -25,9 +26,24 @@ a specific branch on the soledad repository:
SOLEDAD_BRANCH - the name of a branch to be checked out from the configured
remote repository.
-Example:
+ SOLEDAD_PRELOAD_NUM - The number of documents to be preloaded in the
+ container database (either client or server).
+
+ SOLEDAD_PRELOAD_SIZE - The size of the payload of the documents to be
+ prelaoded in the container database (either client or
+ server).
+
+ SOLEDAD_SERVER_URL - The URL of the soledad server to be used during the
+ test.
+
+Check the Makefile for examples on how to use these and maybe even other
+variables not documented here.
+
+
+Communication between client and server containers
+--------------------------------------------------
- docker run \
- --env="SOLEDAD_REMOTE=https://0xacab.org/leap/soledad.git" \
- --env="SOLEDAD_BRANCH=develop" \
- leap/soledad:1.0 /usr/local/soledad/start-server.sh
+A CONTAINER_ID_FILE variable can be passed to the Makefile target so that the
+container id is recorded in a file for further use. This makes it possible to
+extract a container's IP and pass it to another container so they can
+communicate.