DEV Community

Cover image for Preparing a Reporting Solution in Azure Kubernetes Service using Ingress: A Step-by-step Guide
Bold Reports Team for Bold Reports

Posted on • Updated on • Originally published at boldreports.com

Preparing a Reporting Solution in Azure Kubernetes Service using Ingress: A Step-by-step Guide

In today’s world, containerization and Kubernetes are becoming increasingly popular as technologies that empower organizations to streamline application deployment, enhance scalability, and simplify management. Azure Kubernetes Service (AKS) is a managed Kubernetes service that can assist organizations in easily setting up and managing report servers.

The Bold Reports Report Server is a reliable, scalable, powerful reporting solution. It is easily used in different platforms, including the Azure Kubernetes Service. With the Bold Reports Server, it is simple to manage, style, create, and export reports since there is no requirement for coding.

In this guide, I will walk you through the steps of deploying the Bold Reports Report Server on AKS with Istio. This will not only enable you to acquire the necessary steps for deploying the report server, but you’ll also understand how to embed reporting tools into your application.

Prerequisites

Let’s first look at the prerequisites for setting up the Report Server on the Azure Kubernetes service cluster.

Hardware Requirements
To ensure a smooth installation, your hardware should meet the following requirements:

  1. CPU with two or more cores.
  2. 4 GB of RAM.

Software Requirements
On the software side, you need the following components:

  1. A database like Microsoft SQL Server 2012 +, PostgreSQL, or My SQL. Ensure your database is accessible outside the machine.
  2. Command-line tools: kubectl and Azure CLI.
  3. Web browser like Microsoft Edge, Mozilla Fire Fox, or Google Chrome

Deployment

Let’s now go through the deployment process, so you can start with Bold Reports on your Kubernetes cluster smoothly.

Step 1: Downloading the Deployment Files
You have to download the highlighted deployment files from the Bold Reports Kubernetes GitHub repository.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes Service.Deployment files

Using Visual Studio Code, open the folder containing all the deployment files.

Let’s review the usage of each file:

  • Deployment contains the configuration to create and manage the pods using a replica set.
  • Configuration in HPA is used to automatically increase or even decrease the number of pods in response to memory consumption.
  • Ingress contains the configuration which is used to configure how traffic is routed to your Kubernetes application, and it exposes HTTP and HTTPS routes from outside the cluster to service within the cluster.
  • Log4net_config has the configuration settings that are used to store the needed logs in a file.
  • Namespace contains that configuration that will assist and will be helpful when different teams or projects share a Kubernetes cluster.
  • Pvclaim_aks contains the configuration where the information for the file system will be provided. Service provides access to retrieve one or more pods.

Step 2: Connecting with the Azure cluster.
Open PowerShell and navigate to the folder where the deployment files have been downloaded.

  1. Run the following command to authenticate Azure.
az login
Enter fullscreen mode Exit fullscreen mode
  1. Open the Azure Kubernetes page, and then the cluster overview page, and click on the Connect option.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes Service

  1. Copy these commands.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceCopy the highlighted commands

  1. Run this command in PowerShell to connect with the cluster:

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceRun the command in PowerShell

Step 3: Deploying the NGNIX Ingress controller
Deploy the NGNIX Ingress controller by running this command:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml


Enter fullscreen mode Exit fullscreen mode

Step 4: Configuring the storage pods
I have already created a storage account. Open the account access key page.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceAccount access key page.

  1. Copy the storage account name, storage account key, and convert them to base64.
    This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes Service

  2. A file-share instance has been created in the storage account to store the shared folder for application usage, and a note has been made for the file-share name.
    This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceFile-share name.

  3. Open the Pvclaim_aks file and the Azure storage account name together with the account key, encoded in Base64, to the file. Also add the shared name to the file and save it.
    This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServicePvclaim_aks file

Step 5: Creating a namespace and log configuration.

  1. Then run the following command to create a namespace for Bold Reports. Bold service is our namespace:
kubectl apply -f namespace.yaml

Enter fullscreen mode Exit fullscreen mode
  1. Run this command to create the log configuration:
kubectl apply -f log4net_config.yaml
Enter fullscreen mode Exit fullscreen mode

Step 6: SSL configuration
Deploy the Report Server using the Ingress IP address; however, if you want to set up the Report Server with a domain, you can add the domain name and TLS secret name to the file under the tls and rules sections.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceIngress IP address

The application will be hosted in non-SSL mode by default. To configure SSL, you need to add the domain name and SSL configuration to the file.

Before you configure the SSL, you have to create the TLS secret with the SSL certificate by running the following command:

kubectl create secret tls boldreports-tls -n bold-services --key <key-path> --cert <certificate-path>

Enter fullscreen mode Exit fullscreen mode

For this case, the secret name is boldreports-tls. indicates the path for the .pem file and indicated the .crt file path.

Step 7: Generating Ingress IP address

  1. Run the command to apply the BoldReports Ingress and get the IP address of the NGINX Ingress:
kubectl apply -f ingress.yaml
Enter fullscreen mode Exit fullscreen mode
  1. Then run this command to get the IP address:
kubectl get ingress -n bold-services -w
Enter fullscreen mode Exit fullscreen mode

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes Service

Step 8: Mapping the IP address with DNS.
Open the deployment.yaml file and replace the DNS or Ingress IP address in the application base URL.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes Service

Step 9: Add optional client library.
To use third-party data sources like MySQL, Oracle, or PostgreSQL in your report, you need to install them as part of the Report Server deployment. Here I specify MySQL, Oracle, and PostgreSQL.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceThird-party data sources

Step 10: Apply configuration files

  1. Apply the configuration from the pvclaim_gke file by running the following command to create a persistent volume (PV) and persistent volume claim (PVC):
kubectl apply -f pvclaim_aks.yaml
Enter fullscreen mode Exit fullscreen mode
  1. Apply the configuration in the file by running the following command to create and manage pods with the specified number of replicas and the provided image. When you run the command to apply the deployment configuration, Kubernetes will create the specified number of pods and start them up. Apply the configuration from the pvclaim_gke file by running the following command to create a persistent volume (PV) and persistent volume claim (PVC):
kubectl apply -f pvclaim_aks.yaml
Enter fullscreen mode Exit fullscreen mode
  1. Apply the configuration in the hpa_gke file by running the command to set up autoscaling for the Kubernetes horizontal pod autoscaler (HPA:
kubectl apply -f hpa.yaml
Enter fullscreen mode Exit fullscreen mode
  1. Create all the services by running this command:
kubectl apply -f service.yaml
Enter fullscreen mode Exit fullscreen mode
  1. Once all the deployment files are applied, you need to verify and be sure that the pods are running and healthy. You can do this by running the following command
kubectl get pods -n bold-services -w
Enter fullscreen mode Exit fullscreen mode

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceApplication Startup Page

Being that the Report Server is ready, you can open the browser and navigate to the domain or Ingress IP address provided in the application base URL in the deployment.yaml file to configure the Report Server.

Step 11: Application startup
To activate your Bold Reports account, you can either use your online credentials or your offline unlock key. We can download the unlock key from Bold Reports accounts and upload it in the setup.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceActivation of Bold Reports account by uploading the online unlock key.

Let’s activate the account using the online credentials.

  1. Click Log in to activate account and enter the Bold Reports credentials.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceClicking Log in to Activate Account

  1. Enter your Bold Reports credentials. Since we only have one portal license, the portal license selection will be skipped. If you have more than one portal license, you will have to use only one.

Step 12: Configuring the administrator.
We configure the administrator user by entering the user information and password and then by clicking on the Next button.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceUser information and password

Step 13: Configuring the database for Report Server data storage
Here we can configure the database to store the report server data. Reports can be stored in SQL Server, PostgreSQL, and MySQL databases.

  1. We use PostgreSQL. The fields in the Report will be updated based on the database selected, and you provide the necessary information in the required fields.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceDatabase field

  1. Choose new database and provide the database name as “boldserviceskubernetes”.
  2. Then enable the SSL option to create a secure connection using the Secure Sockets Layer (SSL) protocol.
  3. Click on the Next
  4. The deployment of the report tenant will begin and will continue in the background.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceDeployment of the report tenant

  1. After that, click Go to Reports.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceGo to Reports

  1. You will be taken to the “view all” page. The sample reports that are already available in the Report Server can be added to the Report Server by simply clicking on the Explore in the Report Sample pop-up window. You will be able to see the list of samples, and when you click on the Add Report button, reports will be added under the Sample Reports category.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceReport Viewer

  1. Clicking on the Report will now open it in the Report Viewer. Now open the Share Data Source Data Connector page. You can see the third-party data sources like MySQL, Oracle, and PostgreSQL.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceData Connector page

Step 14: How to install PhantomJS in the deployed application

By default, the Bold Reports Report Server does not export visualization report items such as charts and gauges when exporting reports while scheduling. To export these items, you need to install the PhantomJS client library in the Report Server. PhantomJS is a headless Webkit browser that can be scripted in the JavaScript.

You first need to bash the container.

  1. Run this command to get the available container:
kubectl get pods -n bold-services -w
Enter fullscreen mode Exit fullscreen mode
  1. Then run this command to open the shell running in reports-web-deployment-container:
kubectl exec -it <pod-name> -n <namespace> -- bash
Enter fullscreen mode Exit fullscreen mode

In the above command, refers to the name of the pod, and refers to the namespace that was used when deploying the Report Server.

  1. Once you are inside the container, you need to change the current directory by running this command:
cd /application/app_data/optional-libs
Enter fullscreen mode Exit fullscreen mode
  1. Then install the sudo and wget tools.
apt-get install sudo

apt-get install wget
Enter fullscreen mode Exit fullscreen mode
  1. Once you have installed the sudo and wget tools, you must install some required packages by running this command:
sudo apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 -y

Enter fullscreen mode Exit fullscreen mode
  1. Then download the latest stable version of PhantomJS from the official website by running the following command:
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-       x86_64.tar.bz2
Enter fullscreen mode Exit fullscreen mode
  1. Once the download is complete, you can extract the downloaded archive file to the desired system location by running the following command:
sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/
Enter fullscreen mode Exit fullscreen mode
  1. After that, create a symlink of the PhantomJS binary file in the system’s bin directory by running this command:
sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/
Enter fullscreen mode Exit fullscreen mode
  1. To verify whether PhantomJS has been installed successfully, run the following command.
phantomjs --version
Enter fullscreen mode Exit fullscreen mode

If it shows the version number, then you can be sure that PhantomJS has been installed successfully.

After that, you need to reload the browser and export the reports that have charts. Once the report is exported, open the exported file to see that the charts are exported.

Report embedding

Bold Reports allows you to embed reporting functionalities directly within your applications. Our embeddable reporting tools can be integrated with popular applications such as ASP.Net Core, Blazor, Angular, and React. The usage of embedded reporting tools will change depending on the deployment platform. You can find more detailed information about these differences in our documentation.

This blog provides a step-by-step guide on how to deploy the Reporting Solution on Azure Kubernetes ServiceBold Reports reporting tools and popular platforms it can be integrated with

Conclusion

This blog post covered the step-by-step process of deploying the Bold Reports Report Server on Azure Kubernetes Service including adding optional client libraries and installing PhantomJS for exporting data visualization report items. We hope you found this guide helpful

To explore more about the Bold Reports Report Server on the Google Kubernetes Engine with Ingress, look through our documentation site. To experience our live features, please check on our demo, samples, and solutions.

If you have any questions or need assistance, feel free to post in the comment section below. Alternatively, you can reach us through our contact page. If you already have an account, you can log in and ask your support questions directly.

To have more experience and know more about Bold Reports firsthand, we offer a 15-day free trial with no credit card required. We invite you to start the trial and explore the potential of Bold Reports. We really value your feedback, so please don’t hesitate to let us know your thoughts.

Stay up to date with the latest announcements on upcoming releases by following our official Twitter, Facebook, and LinkedIn pages. Thank you for reading.

Top comments (0)