Deploy Bold BI Multi-Container on AWS ECS Fargate using EFS with Application Load Balancer
Overview
This guide explains how to deploy a Bold BI Multi-Container Architecture on AWS ECS Fargate using:
- Amazon ECS (Fargate)
- Amazon EFS (shared storage)
- Application Load Balancer (ALB)
Prerequisites
Before proceeding, ensure the following resources are available:
ECS cluster - ECS cluster creation
EFS - EFS creation document
Ensure all resources are within the same security group and VPC.
Step 1:
Once the prerequisites are complete, the cluster will be created, and the cluster home page will display a view similar to the image below.
Step 2: Create Task Definition
Create task definitions for each deployment and configure the services to deploy the respective task definitions.
To create a task definition, click the Create new task definition with JSON option, copy the task definition provided below for each service, paste it in the task definition creation window, and click Create.
Task definitions for each services:
Please get the latest release images from this link : Latest image details
IDP-Web
{
"family": "<idp-web-task-definition-name>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<idp-web-container-name>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/bold-identity:15.3.8",
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "APP_BASE_URL",
"value": "https://<application-domain>" // Replace with your application URL
},
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
"sourceVolume": "<efs-volume-name>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<cloudwatch-log-group>", // Replace with your CloudWatch log group
"awslogs-region": "<aws-region>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<ecs-task-role-arn>", // Replace with your ECS Task Role ARN
"executionRoleArn": "<ecs-task-execution-role-arn>", // Replace with your ECS Execution Role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<efs-volume-name>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<efs-file-system-id>", // Replace with your EFS File System ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
IDP-Ums
{
"family": "<TASK_DEFINITION_NAME>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<CONTAINER_NAME>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/bold-ums:15.3.8", // Replace with your container image URI
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "APP_BASE_URL",
"value": "https://<APPLICATION_DOMAIN>" // Replace with your application URL
},
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
"sourceVolume": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<CLOUDWATCH_LOG_GROUP>", // Replace with your CloudWatch log group
"awslogs-region": "<AWS_REGION>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<TASK_ROLE_ARN>", // Replace with your ECS task role ARN
"executionRoleArn": "<EXECUTION_ROLE_ARN>", // Replace with your ECS execution role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<EFS_FILE_SYSTEM_ID>", // Replace with your EFS file system ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
IDP-Api
{
"family": "<TASK_DEFINITION_NAME>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<CONTAINER_NAME>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/bold-identity-api:15.3.8", // Replace with your container image URI
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "APP_BASE_URL",
"value": "https://<APPLICATION_DOMAIN>" // Replace with your application URL
},
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
"sourceVolume": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<CLOUDWATCH_LOG_GROUP>", // Replace with your CloudWatch log group
"awslogs-region": "<AWS_REGION>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<TASK_ROLE_ARN>", // Replace with your ECS task role ARN
"executionRoleArn": "<EXECUTION_ROLE_ARN>", // Replace with your ECS execution role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<EFS_FILE_SYSTEM_ID>", // Replace with your EFS file system ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
BI-Web
{
"family": "<TASK_DEFINITION_NAME>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<CONTAINER_NAME>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/boldbi-server:15.3.8", // Replace with your container image URI
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
"sourceVolume": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<CLOUDWATCH_LOG_GROUP>", // Replace with your CloudWatch log group
"awslogs-region": "<AWS_REGION>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<TASK_ROLE_ARN>", // Replace with your ECS task role ARN
"executionRoleArn": "<EXECUTION_ROLE_ARN>", // Replace with your ECS execution role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<EFS_FILE_SYSTEM_ID>", // Replace with your EFS file system ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
BI-Jobs
{
"family": "<TASK_DEFINITION_NAME>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<CONTAINER_NAME>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/boldbi-server-jobs:15.3.8", // Replace with your container image URI
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
"sourceVolume": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<CLOUDWATCH_LOG_GROUP>", // Replace with your CloudWatch log group
"awslogs-region": "<AWS_REGION>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<TASK_ROLE_ARN>", // Replace with your ECS task role ARN
"executionRoleArn": "<EXECUTION_ROLE_ARN>", // Replace with your ECS execution role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<EFS_FILE_SYSTEM_ID>", // Replace with your EFS file system ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
BI-Api
{
"family": "<TASK_DEFINITION_NAME>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<CONTAINER_NAME>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/boldbi-server-api:15.3.8", // Replace with your container image URI
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
"sourceVolume": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<CLOUDWATCH_LOG_GROUP>", // Replace with your CloudWatch log group
"awslogs-region": "<AWS_REGION>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<TASK_ROLE_ARN>", // Replace with your ECS task role ARN
"executionRoleArn": "<EXECUTION_ROLE_ARN>", // Replace with your ECS execution role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<EFS_FILE_SYSTEM_ID>", // Replace with your EFS file system ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
BI-Designer
{
"family": "<TASK_DEFINITION_NAME>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<CONTAINER_NAME>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/boldbi-designer:15.3.8", // Replace with your container image URI
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
},
{
"name": "INSTALL_OPTIONAL_LIBS",
"value": "<OPTIONAL_DATABASE_CONNECTORS>" // Example: mongodb,mysql,influxdb,snowflake,oracle,clickhouse,google
}
],
"mountPoints": [
{
"sourceVolume": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<CLOUDWATCH_LOG_GROUP>", // Replace with your CloudWatch log group
"awslogs-region": "<AWS_REGION>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<TASK_ROLE_ARN>", // Replace with your ECS task role ARN
"executionRoleArn": "<EXECUTION_ROLE_ARN>", // Replace with your ECS execution role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<EFS_FILE_SYSTEM_ID>", // Replace with your EFS file system ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
BI-ETL
{
"family": "<TASK_DEFINITION_NAME>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<CONTAINER_NAME>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/bold-etl:12.1.25_etl", // Replace with your container image URI
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "APP_BASE_URL",
"value": "https://<APPLICATION_DOMAIN>" // Replace with your application URL
},
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
"sourceVolume": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<CLOUDWATCH_LOG_GROUP>", // Replace with your CloudWatch log group
"awslogs-region": "<AWS_REGION>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<TASK_ROLE_ARN>", // Replace with your ECS task role ARN
"executionRoleArn": "<EXECUTION_ROLE_ARN>", // Replace with your ECS execution role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<EFS_FILE_SYSTEM_ID>", // Replace with your EFS file system ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
BI-Ai
{
"family": "<TASK_DEFINITION_NAME>", // Replace with your ECS task definition name
"containerDefinitions": [
{
"name": "<CONTAINER_NAME>", // Replace with your container name
"image": "us-docker.pkg.dev/boldbi-294612/boldbi/bold-ai:15.3.8", // Replace with your container image URI
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "APP_BASE_URL",
"value": "https://<APPLICATION_DOMAIN>" // Replace with your application URL
},
{
"name": "BOLD_SERVICES_CONSOLE_LOG_ENABLED",
"value": "true"
}
],
"mountPoints": [
{
"sourceVolume": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"containerPath": "/application/app_data",
"readOnly": false
}
],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "<CLOUDWATCH_LOG_GROUP>", // Replace with your CloudWatch log group
"awslogs-create-group": "true",
"awslogs-region": "<AWS_REGION>", // Example: us-east-1
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "<TASK_ROLE_ARN>", // Replace with your ECS task role ARN
"executionRoleArn": "<EXECUTION_ROLE_ARN>", // Replace with your ECS execution role ARN
"networkMode": "awsvpc",
"volumes": [
{
"name": "<EFS_VOLUME_NAME>", // Replace with your EFS volume name
"efsVolumeConfiguration": {
"fileSystemId": "<EFS_FILE_SYSTEM_ID>", // Replace with your EFS file system ID
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024"
}
Step 3: Load balancer and Target group Creation:
Create the load balancer target group before creating the services.
Create Target group for each container as shown below:
| Service Name | Helath check |
|---|---|
| IDP Web | /health-check |
| IDP UMS | /health-check |
| IDP API | /health-check |
| BI Web | /health-check |
| BI Jobs | /health-check |
| BI Api | /health-check |
| BI Designer | /health-check |
| BI ETL | /etlservice/health-check |
| BI AI | /aiservice/health-check |
Create target group for all the containers by following the below steps:
Step 1: Choose target type as IP address and provide the container port as below for all containers
Step 2: Provide heath check end point for all the services below except BI-ETL and BI-AI.
ETL and AI health-check
Click next and click create target group
Load Balancer Creation:
Step 1: Click Create load balancer
To connect all the services, create a common load balancer and choose a listener based on your preference (80 or 443).
We attached the screenshots for 443 Listener.
Step 2: Once Load balancer creation just clicks the Listener
Step 3: Click the add rule:
Step 4: Choose the target group and add the host and path as shown below. Please repeat this step for all the target groups:
Example for IDP Web:
Please follow the patterns:
| Services | Path Pattern | Evaluation Order |
|---|---|---|
| id-web | /* | 10 |
| id-ums | /ums/* | 9 |
| id-api | /api/* | 8 |
| bi-web | /bi/web/* | 7 |
| bi-jobs | /bi/jobs/* | 6 |
| bi-api | /bi/api/* | 5 |
| bi-etl | /etlservice/* | 4 |
| bi-designer | /bi/designer/* | 3 |
| bi-ai | /aiservice/* | 2 |
Step 4: Service Creation:
To create a service, please follow the steps below for all task definitions
Go to the created cluster and click Create under the Service tab.
Choose the task definition as shown below
Select Fargate as the launch type
Choose the network settings as shown below.
Configure Load balancer:
Repeat these steps for all remaining services.
Once all the services are running please map the load balancer’s DNS to the domain to access the site
Application startup
Choose the Advance option during the db configuration in startup to choose the Amazon S3 bucket.