Run the Bold BI application as multiple instances behind a load balancer using the same EFS volume
This section explains how to use multiple EC2 instances for the Bold BI application with the same shared EFS volume in a Docker environment.
-
To create and connect AWS EC2 Linux Ubuntu instances, refer to: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html.
-
Create an EFS file system to store the app_data for the Bold BI application, using the provided document, and make sure it is in the same VPC and security group.
https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html -
Create a load balancer using the below document for an EC2 instance to access an application with the load balancer DNS.
Load Balancer => https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancer-getting-started.htmlThe document above explains how to create a load balancer, target group, and configure it with an EC2 instance.
-
Create a docker-compose.yaml file with the below configuration details.
version: '3.5' services: boldbi: image: syncfusion/boldbi restart: always ports: - "80:80" # environment: # - APP_URL=<app_base_url> networks: - boldbi volumes: - my-efs:/application/app_data networks: boldbi: volumes: my-efs: driver_opts: type: "nfs" o: "addr=<DNS of EFS volume>,rw,nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport" device: ":/"
-
Register the details for EFS in the Docker Compose configuration file without including the APP_URL in the EC2 instance.
-
Deploy a Bold BI application using a docker-compose YAML file on first EC2 instance and configure it to start up using the documentation provided below, with a load balancer DNS.
- Navigate to the project directory and up the container using below command.
docker-compose up -d
- Once the Bold BI container is up and running, access the application using the load balancer DNS.
- Application startup => https://help.boldbi.com/application-startup/
- Navigate to the project directory and up the container using below command.
-
Now, you can use the same Docker Compose to deploy Bold BI on the required number of instances. This means it will utilize the same APP_URL, EFS Volume, and Port Number.
-
Next, register all Bold BI instances in the same Load Balancer Target Group according to the instructions provided in the following documentation:
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-register-targets.html#register-instances -
Now, all instances of Bold BI have been linked, and the Bold BI application is accessible in multiple instances with an EFS volume.