This repo holds the source code of the service Trento uses to collect telemetry data. See the architecture document for additional details.
The project offers a terraform deployment option in order to deploy the Trento Telemetry Service. The deployment project deploys the service on AWS ECS (Elastic Containers Service).
The deployment consists of:
- VPC networking layer including all the needed resources
- Amazon load balancer
- Elastic container service based on Fargate (serverless container service)
- terraform version >=0.13.x installed
- AWS access and secret keys (with ECS, Load balancer, VPC management, etc IAM rights)
- Already deployed InfluxDB database. The service url, organization id, bucket name and api token with write/right access to this bucket are needed
Follow the next steps to deploy the service:
- Access the
deployment
folder - Create a new
terraform.tfvars
file. Use the terraform.tfvars.example as example - Authorize the AWS connection setting the access key and secret:
export AWS_ACCESS_KEY_ID="your-key" export AWS_SECRET_ACCESS_KEY="your-secret"
- Create a S3 bucket to store the terraform state files with the name of
trento-telemetry-backend
- In order to use the production system, change to the
prod
workspace:Use other workspace liketerraform workspace new prod # or terraform workspace select prod
test
ormyname
to play with other environments. This creates the S3 object inenv/{workspace}/trento-telemetry
- Run:
terraform init terraform apply
- When the deployment is completed the terraform output shows the
url
which Trento should send the telemetry data
The AWS deployment with terraform/docker-compose deployment offers a Grafana instance to visualize the collected telemetry metrics.
In order to access the dashboards:
- docker-compose: Grafana is available in the port 3000
- AWS: Grafana is available in the port configured by the
grafana_port
variable (3000 by default) in the same telemetry service URL
Start the platform infrastructure by running make start
It spawns an influx
instance and a postgres
instance.
Fill .env
as needed and Leverage docker compose override features by cp docker-compose.override.yaml.dist docker-compose.override.yaml
for customization.