The repository contains the terraform code to deploy Grafana and PostgreSql on Amazon Elastic Container Service (ECS).
The following diagram shows the architecture of the deployment. It consists of
two services grafana
and postgres
running on ECS. The grafana
service
is connected to the postgres
service using the official Grafana PostgreSql
plugin. Through this connection, Grafana can visualize the data stored in the
PostgreSql database. Furthermore, the grafana
service is exposed to the
internet using an Elastic Load Balancer (ELB).
The repository contains the following files and directories:
├── LICENSE
├── README.md
├── docs
├── ops
│ ├── ecs
│ │ ├── README.md
│ │ ├── main.tf
│ │ ├── modules
│ │ │ ├── cluster
│ │ │ ├── grafana
│ │ │ ├── postgres
│ │ │ └── vpc
│ │ ├── provider.tf
│ │ └── variables.tf
│ └── repository
│ └── ecr.tf
└── src
├── docker-compose.yaml
├── grafana
│ ├── Dockerfile
│ ├── grafana.ini
│ └── provisioning
│ ├── dashboards
│ │ └── dashboards.yaml
│ └── datasources
│ └── postgres.yaml
└── postgres
├── Dockerfile
└── init.sql
src
contains the source code for thegrafana
andpostgres
services.ops/repository
contains the terraform code to create the Elastic Container Registry (ECR) repository, and required IAM roles.ops/ecs
contains the terraform code to create the ECS cluster, services,
- Follow the instructions in the ops/repository/README.md to create the Elastic Container Registry (ECR) repository and required IAM roles.
- Follow the instruction in the ops/ecs/README.md to deploy
the
grafana
andpostgres
services on Amazon Elastic Container Service (ECS).