dd1b2060d7
[#30] sending last metrics when the dashboard connects to the backend |
||
---|---|---|
.circleci | ||
assets | ||
config | ||
doc | ||
lib | ||
pages | ||
rel | ||
test | ||
.gitignore | ||
LICENSE | ||
README.md | ||
coveralls.json | ||
mix.exs | ||
mix.lock |
README.md
POABackend
Storage and data-processing companion for the poa-netstats-agent
Documentation
- Initial Architecture
- You can find the online documentation here
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).
- Once you have a copy of this repository configure the backend for production in the file
config/prod.exs
. - An example configuration can be found in the current
config/prod.exs
. - Do a
mix deps.get
to fetch, among other dependencies, the tooling for building server executables. - 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
).