Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds deploy docs #15

Merged
merged 3 commits into from Aug 11, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 27 additions & 6 deletions README.md
@@ -1,4 +1,4 @@
<img src="../web/public/images/logo.png" height="68" />
<img src="https://github.com/elixir-bench/elixir-bench.github.io/blob/master/images/logo.png" height="68" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


# ElixirBench Runner

Expand All @@ -15,13 +15,34 @@ 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. The relese requires a `RUNNER_API_URL`,
`RUNNER_API_KEY` and `RUNNER_API_USER` environment variables for communication with
the API server. Built releases are placed under `_build/prod/rel/runner`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this just duplicates the information from the table below, which seems much better imo :) (aka I'd remove the mention of the envs here)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 removed!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? They're still up there? The place were you just removed them I actually liked :D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry! bad reading 😮 I've just put it back! 👍 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed now ;)

directory. To build the release you can use the command below:

```bash
$ MIX_ENV=prod mix release --env=prod
```

The project requires the setup of the following environment variables:

| 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 |

Start the application passing the required variables

```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
Expand Down