From 02c148617992978321aa761d648ccf7a481ce048 Mon Sep 17 00:00:00 2001 From: Tallys Martins Date: Sat, 11 Aug 2018 08:11:42 -0300 Subject: [PATCH] Adds deploy docs (#15) * Adds deploy docs Signed-off-by: Tallys Martins * Apply review changes Signed-off-by: Tallys Martins * Apply review changes Signed-off-by: Tallys Martins --- README.md | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5c39110..3f450db 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + # ElixirBench Runner @@ -15,13 +15,32 @@ Benchmarks are running inside a docker container, so you need to have ## Deployment -To build the release you can use `mix release`. The relese requires a `RUNNER_API_URL`, `RUNNER_API_KEY` and `RUNNER_API_USER` -environment variables for communication with the API server. +This project uses `distillery` for deployments. Built releases are placed under `_build/prod/rel/runner` +directory. To build the release you can use the command below: + +```bash +$ MIX_ENV=prod mix release --env=prod +``` + +There are also some environment variables that can be set when running the project: + +| NAME | Description | Default | +|:----------------:|:--------------------------------:|:--------------------------------------:| +| `RUNNER_API_URL` | url for the api server | https://api.elixirbench.org/runner-api | +| `RUNNER_API_USER`| username for authentication | test-runner | +| `RUNNER_API_KEY` | password key for authentication | test | + +Set the variables and start the application with the command: + +```bash +RUNNER_API_URL=api.elixirbench.org/runner-api RUNNER_API_USER=test-runner RUNNER_API_KEY=test _build/prod/rel/runner/bin/runner foreground +``` + +The API Server needs to have proper credentials for the runner configured as well. +This can be done from the release console using: -The server needs to have proper credentials for the runner configured as well. This can be done from -the release console using: ```elixir -ElixirBench.Benchmarks.create_runner(%{api_key: some_key, name: some_name}) +ElixirBench.Benchmarks.create_runner(%{name: test-runner, api_key: test}) ``` ## License