In today’s world, as more individuals embrace containerization and Kubernetes, making sure report servers are set up and managed efficiently has become important. Amazon Elastic Kubernetes Service (EKS) is a helpful service from Amazon that makes it easier to put in place and take care of these Kubernetes clusters.
The Bold Reports Report Server is a powerful and versatile reporting solution that can be deployed on a variety of platforms, including Amazon Elastic Kubernetes Service. With its easy-to-use interface and comprehensive feature set, the Report Server makes it simple to create, manage, and share reports without any coding experience. This deployment method not only enables efficient sharing of key metrics within your organization, but it also allows you to embed reporting into your applications.
In this blog, we will show you how to deploy the Bold Reports Report Server on Amazon Elastic Kubernetes Service with Ingress. This will allow you to deploy a highly scalable and secure report server that can be accessed from anywhere. Let’s get started!
To deploy the Report Server on Amazon Elastic Kubernetes Service with Ingress, you need to have the following hardware and software requirements for a smooth process.
Ensure your machine meets the following hardware requirements:
- A CPU with two or more cores
- Memory of at least 4GB of RAM
You will need the following:
- A database like Microsoft SQL Server 2012 or newer, PostgreSQL, or MySQL. Ensure the database is accessible outside the machine.
- The command-line tools: kubectl and AWS CLI.
- Web browser like Microsoft Edge, Mozilla Firefox, or Chrome.
In this section, we will walk through how to deploy the Report Server on Amazon Elastic Kubernetes Service with Ingress. Let’s get started with the deployment.
Step 1: Download the deployment files.
Get the deployment files from the Bold Reports Kubernetes GitHub repository.
Now let’s explore the configuration in the deployment files.
Deployment contains the configuration for creating and managing pods. It uses a replica set to ensure that the desired number of pods are always running.
Configuration in HPA automatically scales the number of pods in a deployment based on the workload’s CPU or memory consumption.
Ingress contains the configuration on how external traffic is routed to your applications. It can be used to expose HTTP and HTTPS routes from outside the cluster to services within the cluster making it easier for users to access your applications.
Log4net_config contains configuration settings that are used to view the application logs in your Kubernetes console or store the needed logs in a file.
Namespaces organizes your applications and resources in Kubernetes, making it easier to manage large clusters and isolate different teams or projects.
Pvclaim_eks contains the configuration requesting a persistent volume from the Kubernetes cluster. This can be helpful for storing data that needs to be persisted across pod restarts or node failures.
Ensure that you create the Kubernetes cluster and node group in Amazon EKS to deploy Bold Reports.
Step 2: Connect with EKS cluster.
- Configure the AWS by running this command:
- Enter the AWS Access key ID, the AWS Secret Access Key, and the AWS region code.
- Get the region code from the AWS website.
- Enter the default output as JSON.
- Next, update the Kubeconfig by running this command:
aws eks --region <region-name> update-kubeconfig --name <cluster-name>
Here, <region-name> stands for region in which the cluster is created and <cluster-name> stands for the cluster name.
Next, run this command to deploy the CSI Driver that will create all the necessary CSI drivers:
kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.3"
Step 3: Deploy the NGINX Ingress Controller.
To deploy the Nginx Controller, run the following command:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
Step 4: Configure file storage for pods.
To achieve this, create an EFS file system to store the shared folders for application usage, and then map the subnets and security groups to the file system.
Take notice of the file system ID to be used on the next step.
Open the pvclaim_eks.yaml file and enter the volume handle ID value with the File System ID and save it.
Step 5: Deploy the Kubernetes metric server.
Use this to enable the horizontal pod autoscaler:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
Run this command to confirm if the metric server deployment is running:
kubectl get deployment metrics-server -n kube-system
Step 6: Apply namespace.
Run this command to create a namespace for Bold Reports:
kubectl apply -f namespace.yaml
Step 7: Create log configuration.
Then, run this command to create the log configuration:
kubectl apply -f log4net_config.yaml
Step 8: SSL configuration (Optional).
By default, the application will be hosted in non-SSL mode. If you wish to configure SSL, add the domain and SSL configuration in the ingress.yaml file.
First, create the TLS secret with the SSL certificate by running this command:
kubectl create secret tls boldreports-tls -n bold-services --key <key-path> --cert <certificate-path>
For this case, boldreports-tls is the secret name. <key-path> indicates the path for the .pem file and <certificate-path> for the .crt file path. Use the domain SSL certificate.
Apply Ingress configuration
Apply Bold Reports Ingress and get the IP address of the Nginx Ingress by running the following command:
kubectl apply -f ingress.yaml
To get the ingress IP address, run the following command repeatedly until an IP address is displayed:
kubectl get ingress -n bold-services -w
Step 9: Configure IP address.
Open the deployment.yaml file, and then change the DNS or Ingress IP address within the application’s base URL.
Step 10: Optional client libraries.
If you want to use client libraries from third-party sources like MySQL, Oracle, or PostgreSQL, install them during Report Server deployment. If you want to install more than one client library, then separate their names with commas, like in the following, where we specify MySQL, Oracle, and PostgreSQL databases.
Step 11: Apply configuration in PVClaim_EKS.
Apply the configuration from pvclaim_eks to create a required persistent volume (PV) and persistent volume claim (PVC).
kubectl apply -f pvclaim_eks.yaml
Step 12: Apply configuration in deployment file.
Next, apply the configuration in the deployment file to the Kubernetes cluster by running the following command:
kubectl apply -f deployment.yaml
This command will create pods in your cluster according to the configuration in the deployment file.
Step 13: Apply Configuration in hpa_eks.
Now, apply the configuration in hpa by running this command for setting up autoscaling for the Kubernetes Horizontal Pod Autoscaler (HPA):
kubectl apply -f hpa.yaml
Step 14: Create services.
Create all the services by running this command:
kubectl apply -f service.yaml
Step 15: Check pod status.
Now that the deployment files are applied, check the pod status by running this command:
kubectl get pods -n bold-services -w
Wait until all pods are running, and then run then command again.
Step 16: Application startup
Once the report server is up and ready for startup, open a browser and navigate to the domain or ingress IP address provided in the application base URL to configure the report server.
Now, to activate your Bold Reports account, you will need to provide your online credentials or upload your offline unlock key. You can download the unlock key from your Bold Reports Accounts page.
- To use the online credentials, click on, “Log in to activate account.” Enter your Bold Reports credentials. Since we have only one portal license, the portal license selection will be skipped in this setup. If you have more than one portal license, you will be required to select one.
- Configure the Administrator user by entering the user information and password. Click the Next button.
- Configure the database to store the report server data. The data can be stored in SQL Server, PostgreSQL, or MySQL databases.
For this setup, we use PostgreSQL, and the field will be reloaded based on the selected database. Provide the necessary information in the required fields and click the Next button.
Finally, the report tenant deployment will start and run in the background.
- Now, click on Go to Reports, where you will be redirected to view all pages.
In the Report Sample pop-up, you can add the sample reports that are already available with the Report Server by clicking Explore.
The sample reports are already available and will be displayed.
- Clicking the Add Report button will upload the reports to the Report Server, and if you click on the report, it will subsequently open within the Report Server.
Step 17: Export data visualization items.
To install the PhantomJS client library, first we need to Bash the container.
Run this command to get the available container:
kubectl get pods -n bold-services -w
Next, run this command to open the shell running in the reports-web-deployment container:
kubectl exec -it <pod-name> -n <namespace> -- bash
In the above command, <pod-name> indicates the pod name where we are going to install PhantomJS, and <namespace> indicates the namespace which we have created when deploying the Report Server.
Now, we are inside our container.
- Change the current directory to /application/app_data/optional-libs by running this command.
- Install the sudo and wget
apt-get install sudo apt-get install wget
Now that the installation of sudo and wget is complete, proceed to install some packages that are essential by running this command:
sudo apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 -y
- Download PhantomJS.
Download the latest stable version of PhantomJS from the official website by running this command:
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
- Extract the downloaded archive file.
Now that the download is complete, extract the downloaded archive file to the desired system location by running this command:
sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/
It will extract the file and move it to the /usr/local/share directory.
- Create a symlink of the PhantomJS binary file to 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/
Verify whether PhantomJS is installed properly by running this command:
If it shows the version number, then PhantomJS is installed properly.
To check whether the charts are exported, reload the browser and export the report that has the charts.
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 the embedded reporting tools will change depending on the deployment platform. You can find more detailed information about these differences in our documentation.
This blog post covered the step-by-step process of deploying the Bold Reports Report Server on Amazon Elastic Kubernetes Service including adding optional client libraries and installing PhantomJS for exporting data visualization report items. We hope you found this guide helpful.
Bold Reports offers a 15-day free trial without any required credit card information. We welcome you to start a free trial and experience Bold Reports. Try it and let us know what you think!