Articles in this section
Category / Section

Run the Bold BI application as multiple instances behind a load balancer using the same EFS volume

Published:

This section explains how to use multiple EC2 instances for the Bold BI application with the same shared EFS volume in a Docker environment.

  1. To create and connect AWS EC2 Linux Ubuntu instances, refer to: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html.

  2. 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

  3. 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.html

    The document above explains how to create a load balancer, target group, and configure it with an EC2 instance.

  4. 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: ":/"
    
  5. Register the details for EFS in the Docker Compose configuration file without including the APP_URL in the EC2 instance.

    efs-volume.png

  6. 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/
  7. 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.

  8. 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

  9. Now, all instances of Bold BI have been linked, and the Bold BI application is accessible in multiple instances with an EFS volume.

Additional Reference:
  1. Bold BI supported environment variables and their usage?
  2. Steps to access app_data folder in EFS file storage through Linux VM
  3. Bold BI multi container deployment
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SS
Written by Sivanesan Saravanan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied