Deploy Bold BI on an Amazon ECS Fargate Cluster Using an Application Load Balancer and Amazon S3
Overview
This article explains how to deploy Bold BI on an Amazon ECS Fargate cluster using an Application Load Balancer (ALB) and Amazon S3 as the shared storage provider. This deployment architecture provides a scalable, highly available, and containerized environment for hosting Bold BI in AWS.
Prerequisites
Before proceeding, ensure that you have the following:
- An AWS account
- An Amazon ECS cluster configured with Fargate capacity
- An Amazon S3 bucket for Bold BI storage
- An Application Load Balancer
- A VPC with public or private subnets
- Appropriate IAM roles for ECS task execution and application access
- A registered domain name (optional)
- SSL certificate from AWS Certificate Manager (optional)
Step 1: Create an Amazon S3 Bucket
- Sign in to the AWS Management Console.
- Navigate to Amazon S3.
- Create a new bucket.
- Note the following values:
- Bucket Name
- AWS Region
- Ensure the ECS task has permissions to access the bucket.
Step 2: Create the ECS Task Definition
Create a new ECS Fargate task definition and configure it as shown below.
{
"family": "BoldBI",
"containerDefinitions": [
{
"name": "boldbi",
"image": "syncfusion/boldbi:<IMAGE_TAG>",
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "BOLD_SERVICES_AWS_ACCESS_KEY_ID",
"value": "<AWS_ACCESS_KEY_ID>"
},
{
"name": "BOLD_SERVICES_AWS_SECRET_ACCESS_KEY",
"value": "<AWS_SECRET_ACCESS_KEY>"
},
{
"name": "BOLD_SERVICES_AWS_REGION",
"value": "<AWS_REGION>"
},
{
"name": "BOLD_SERVICES_AMAZON_BUCKET_NAME",
"value": "<S3_BUCKET_NAME>"
},
{
"name": "BOLD_SERVICES_AMAZON_ROOTFOLDER_NAME",
"value": "<ROOT_FOLDER_NAME>"
},
{
"name": "BOLD_SERVICES_STORAGETYPE",
"value": "3"
},
{
"name": "BOLD_SERVICES_REVERSE_PROXY",
"value": "true"
},
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/BoldBI",
"awslogs-region": "<AWS_REGION>",
"awslogs-stream-prefix": "ecs"
}
}
}
],
"taskRoleArn": "arn:aws:iam::<ACCOUNT_ID>:role/<TASK_ROLE>",
"executionRoleArn": "arn:aws:iam::<ACCOUNT_ID>:role/<EXECUTION_ROLE>",
"networkMode": "awsvpc",
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "4096",
"memory": "8192",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
}
}
Step 3: Create an Application Load Balancer
Follow the document below to create the Load balancer with target group in ECS service
Document for create application load balancer
- Open the EC2 Console.
- Navigate to Load Balancers.
- Create an Application Load Balancer.
- Select:
- Internet-facing or Internal
- Appropriate VPC
- Multiple Availability Zones
- Create a Target Group.
Step 4: Target Group Settings
| Setting | Value |
|---|---|
| Target Type | IP |
| Protocol | HTTP |
| Port | 80 |
| Health Check Path | / |
Step 5: Create an ECS Service
- Open the ECS Console.
- Select the cluster.
- Create a new service.
Step 6: Access the application
Once service is Up and running you can access the Application using Application Load Balancer DNS.
Steps to Increase Task Replicas
If you want to set the replica count for the Bold BI task please follow the below steps.
- Open the Amazon ECS Console.
- Navigate to your ECS Cluster.
- Select the Bold BI Service.
- Choose Service auto scaling from the service menu.
- Click Update or Edit Scaling Settings.
The Set the number of tasks page appears.