How to Enable Gzip Compression in Bold BI Supported Environments
This article provides a step-by-step guide to enabling Gzip compression in Bold BI across Windows, Linux, Docker, and Kubernetes environments. Gzip compression can significantly reduce the size of transmitted data, improving load times and overall performance.
Steps to Enable Gzip in Windows
Step 1: Enable Dynamic Content Compression in Windows Features
-
Open the Start menu and search for ‘Turn Windows features on or off’.
-
In the Windows Features dialog, locate and enable Dynamic Content Compression by following this path:
- Expand Internet Information Services
- Expand World Wide Web Services
- Expand Performance Features
- Check the box for Dynamic Content Compression
-
Click OK to apply the changes.
Step 2: Open IIS Manager and Configure Gzip Compression
-
Open the Start menu and search for Internet Information Services (IIS) Manager.
-
In IIS Manager, navigate to your site:
- In the left pane, expand Connections.
- Expand the Sites node.
- Select your site (e.g., BoldBIEnterpriseEdition).
-
In the middle pane, double-click Compression.
-
Enable Dynamic Content Compression by checking the respective box.
-
Click Apply in the right pane to save the changes.
By following these steps, Gzip compression will be enabled, enhancing the performance of web applications hosted on the Windows server.
Steps to Enable Gzip in Linux
Step 1: Navigate to the Nginx Configuration Directory
-
Navigate to the Nginx configuration directory by using the following command:
cd /etc/nginx/sites-available/
-
Open the
boldbi-nginx-config
file for editing. You can use thenano
text editor by entering the following command:nano boldbi-nginx-config
Step 2: Add Gzip Configuration
-
Add the following lines to the
boldbi-nginx-config
file to enable Gzip compression:gzip on; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
-
After saving the changes, check the Bold BI site to confirm that Gzip compression is now enabled.
Steps to Enable Gzip in Docker
Step 1: Open the Docker Compose File
To begin, you need to open the docker-compose.yml
file. You can do this by using the following command in your terminal:
nano docker-compose.yml
Step 2: Add Volume Configuration
Next, you will need to add the volume configuration to the docker-compose.yml
file. Insert the following lines under the appropriate volumes service section:
volumes:
- boldbi_data:/application/app_data
- boldbi_nginx:/etc/nginx/sites-available/
Additionally, ensure that the volumes section at the bottom of the file includes the following:
volumes:
boldbi_data:
db_data:
boldbi_nginx:
Step 3: Run the Docker Compose File
After saving your changes to the docker-compose.yml
file, you can run the Docker Compose setup with the following command:
docker-compose up -d; docker-compose logs -f boldbi
This command will start the services defined in your Docker Compose file and display the logs for the BoldBI service.
Step 4: Log into the Bold BI Docker Container
To begin, access the Bold BI Docker container using the following command:
sudo docker exec -it boldbi /bin/bash
Step 5: Move to the Nginx Configuration Directory
Navigate to the Nginx configuration directory with the following command:
cd /etc/nginx/sites-available/
Step 6: Open the Nginx Configuration File
Open the boldbi-nginx-config
file for editing. You can use the nano
text editor available in the container:
nano boldbi-nginx-config
Step 7: Add Gzip Configuration
Add the following lines to the boldbi-nginx-config
file to enable Gzip compression:
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
Step 8: Verify Gzip is Enabled
After saving the changes, check the Bold BI site to confirm that Gzip compression is now enabled.
Steps to Enable Gzip in Kubernetes
Step 1: Edit the Ingress Resource
To begin, you will need to edit the Ingress resource using the kubectl
command. Open your terminal and execute the following command:
kubectl edit ingress bold-ingress -n bold-services
This command will open the bold-ingress
resource in your preferred text editor.
Step 2: Add Gzip Configuration
Once you have the Ingress resource open in the editor, locate the annotations section. You will need to check if the nginx.ingress.kubernetes.io/server-snippet annotation already exists.
- If it does not exist, you will need to add it.
- If it does exist, you can simply append the Gzip configuration to the existing annotation.
Add the following lines under the annotations
section:
annotations:
nginx.ingress.kubernetes.io/server-snippet: |
gzip on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;