Deploy Bold BI Application and Postgres Database on ECS Fargate Cluster
This section explains how to deploy the Bold BI application and Postgres database on an ECS Fargate cluster using an Application Load Balancer.
Prerequisites
- ECS cluster - https://docs.aws.amazon.com/AmazonECS/latest/userguide/create_cluster.html
- EFS - https://docs.aws.amazon.com/efs/latest/ug/gs-step-two-create-efs-resources.html
- All resources should be in the same security group and VPC.
- Create two folders named
boldbi
anddb
in the EFS storage account.
Steps to deploy Bold BI and Postgres database on an ECS Cluster
Task definition
-
Create the task definition for the Bold BI application using the following details. Follow this document to learn more about ECS task definitions.
- Requires compatibilities - FARGATE.
- Operating system family - Linux
- Task memory (GB) - 8 GB
- Task CPU (vCPU) – 4 vCPU
-
Add container – You need to add the container for Bold BI application and Postgres database.
BoldBI container:You can refer to this documentation for Bold BI docker image details:
- Image - syncfusion/boldbi
- Port mappings - 80 and tcp
Postgres database container:
You can refer to this documentation for Bold BI docker image details:- Image – postgres
- You need to set the password for Postgres database container.
Key - POSTGRES_PASSWORD
Value type – value
Value – You can set the strong password.
Example: Admin@123
-
Add the volumes in the
Volumes
section.Volume type – EFS
Volume name – you can mention the name for Bold BI and Postgres
File System ID – Mention the EFS ID.
Root directory- For Bold BI - /boldbi
- For Postgres - /db
-
Container mount point
- For Bold BI application mount point is
/application/app_data
- For Postgres database server mount point is
/var/lib/postgresql/data/
- For Bold BI application mount point is
-
Save the template.
ECS cluster:
-
Go to the Cluster and create the service by following below steps:
Navigate to = Amazon Elastic Container Service –> Clusters –> Cluster name –> Services –> CreateEnvironment:
- Launch type - Fargate with Latest version
Deployment configuration
- Application type is service and select the task definition created in Step 1.
- Desired tasks - 1
Networking
- Please use the same VPC, subnet, and security group that are used for the Cluster, Load balancer, and EFS.
Load balancing
-
Follow the document below to create the Load balancer with target group in ECS service
https://docs.aws.amazon.com/AmazonECS/latest/userguide/create-load-balancer.html
- Launch type - Fargate with Latest version
-
Now, create the service.
-
Once service is Up and running you can access the Application using Application Load Balancer DNS.
Note: If you are facing any issue like ECS health check failed follow the below document.
Next Step
-
To connect the Postgres SQL to the Bold BI application, follow the steps below.
- Server name – localhost
- Port - 5432
- username – postgres
- Password – As you mentioned in environment variable.