In order to run the Trento Web application, the following software must be installed:
- Elixir - 1.15.7 preferred
- Erlang OTP - 26.1.2 preferred
- Node.js - 20.14.0 preferred
- Docker
- Docker Compose
Some platforms might not be able to use pre-built versions of some dependencies. Therefore, some additional dependencies might be required. This does not effect most users and can be referred to, when installation issues come up. For these dependencies, the distro packaged version is usually sufficient.
asdf allows to use specific versions of programming language tools that are known to be compatible with the project, rather than relying on the version that's installed globally on the host system.
In order to use asdf, follow the official asdf getting started guide.
Install all required asdf plugins from .tool-versions inside the web repository.
cut -d' ' -f1 .tool-versions|xargs -i asdf plugin add {}
Set up the asdf environment
asdf install
The Trento project provides a docker-compose development environment that is used to start a Postgres database and a prometheus instance for storage and monitoring. To start the development environment, navigate to the root directory of the Trento project and run the following command:
docker-compose up -d
Before starting Trento Web, some initial setup tasks, like installing dependencies and creating the database, are required. Execute following command:
mix setup
Connect Trento Web with Wanda
By default, Wanda can be accessed on port 4001.
The wanda url is provided with the configuration parameter :trento, :checks_service, :base_url
.
Guide how to set up Wanda.
Note: If the Wanda service is running on a different port, change the default 4001 port in the .env file.
Install frontend packages:
npm --prefix ./assets/ install ./assets
Start Trento web:
iex -S mix phx.server
Access the Trento Web by navigating to http://localhost:4000 in the web browser.
The default login credentials are:
Username:
admin
Password:
adminpassword
The Trento application uses several environment variables to configure its behavior. Information about these variables' environment_variables.
The Trento project includes a tool called photofinish, which is used to load different scenarios for development and debugging purposes.
photofinish run --url "http://localhost:4000/api/collect" healthy-27-node-SAP-cluster
It's possible to use Photofinish' docker image too:
docker run -v "$PWD":/data --network host ghcr.io/trento-project/photofinish run healthy-27-node-SAP-cluster -u http://localhost:4000/api/collect
Several useful scenario fixtures are available in ./test/fixtures/scenarios, the same ones used in e2e tests.
See also .photofinish.toml.