Go to file
Felipe Ripoll 6ca87d0d63 [#30] sending last metrics when the dashboard connects to the backend 2018-07-18 19:32:22 -06:00
.circleci [#5] adding coveralls 2018-05-29 12:42:19 -06:00
assets [#24] improving Documentation 2018-07-06 12:57:28 -06:00
config [#26] building a release 2018-07-06 16:00:34 -06:00
doc [#28] migrating to message pack 2018-07-09 07:58:47 -06:00
lib [#30] sending last metrics when the dashboard connects to the backend 2018-07-18 19:32:22 -06:00
pages [#24] improving Documentation 2018-07-06 12:57:28 -06:00
rel [#26] building a release 2018-07-06 16:00:34 -06:00
test [#30] sending last metrics when the dashboard connects to the backend 2018-07-18 19:32:22 -06:00
.gitignore [#24] improving Documentation 2018-07-06 12:57:28 -06:00
LICENSE Create LICENSE 2018-05-25 17:29:12 +03:00
README.md [#26] building a release 2018-07-06 16:00:34 -06:00
coveralls.json [#14] designing receiver's mechanism 2018-06-18 13:29:23 -06:00
mix.exs [#28] migrating to message pack 2018-07-09 07:58:47 -06:00
mix.lock [#28] migrating to message pack 2018-07-09 07:58:47 -06:00

README.md

POABackend

Coverage Status codecov

Storage and data-processing companion for the poa-netstats-agent

Documentation

Or you can build the documenation locally running

mix deps.get
mix docs

That command will create a doc/ folder with the actual Documentation.

Run Tests

In order to run the tests we have to run the command

mix test

POABackend comes also with a code analysis tool Credo and a types checker tool Dialyxir. In order to run them we have to run

mix credo
mix dialyzer

Building & Deploying an Executable

To build an executable you'll need Elixir 1.6 (and Erlang/OTP 20).

  1. Once you have a copy of this repository configure the backend for production in the file config/prod.exs.
  2. An example configuration can be found in the current config/prod.exs.
  3. Do a mix deps.get to fetch, among other dependencies, the tooling for building server executables.
  4. A env MIX_ENV=prod mix release --name=poa_backend --env=prod will assemble an executable.

A resulting artifact resides at _build/prod/rel/poa_backend/releases/0.1.0/poa_backend.tar.gz which you can move to a remote host. Use tar xfz then bin/poa_agent start (bin/poa_agent stop will stop the server cleanly).

If you want to run it on the local host then the procedure is as simple as: _build/prod/rel/poa_backend/bin/poa_backend.

Note: executables must be built on the platform (OS and architecture) they are destined for under the project's current configuration. Other options are possible (see https://hexdocs.pm/distillery/getting-started.html).