DEV Community

Cover image for Preparing a Reporting Solution on Amazon EKS with Ingress: A Comprehensive Step-by-Step Guide
Bold Reports Team for Bold Reports

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

Preparing a Reporting Solution on Amazon EKS with Ingress: A Comprehensive Step-by-Step Guide

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!

Prerequisites

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.

Hardware Requirements

Ensure your machine meets the following hardware requirements:

  1. A CPU with two or more cores
  2. Memory of at least 4GB of RAM

Software Requirements

You will need the following:

  1. A database like Microsoft SQL Server 2012 or newer, PostgreSQL, or MySQL. Ensure the database is accessible outside the machine.
  2. The command-line tools: kubectl and AWS CLI.
  3. Web browser like Microsoft Edge, Mozilla Firefox, or Chrome.

Deployment

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.

Amazon EKS

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

Kubernetes cluster and node group in Amazon EKS

Step 2: Connect with EKS cluster.

  1. Configure the AWS by running this command:
    aws configure
    

  1. Enter the AWS Access key ID, the AWS Secret Access Key, and the AWS region code.

    Enter the AWS details.


  1. Get the region code from the AWS website.

    Get the region code from the AWS website.


  1. Enter the default output as JSON.

    Enter the default output as JSON.

  1. 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"
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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.

Map the subnets and security groups.

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.

Enter the volume handle ID value with the File System ID.

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
Enter fullscreen mode Exit fullscreen mode

Run this command to confirm if the metric server deployment is running:

kubectl get deployment metrics-server -n kube-system
Enter fullscreen mode Exit fullscreen mode

The metric server deployment

Step 6: Apply namespace.

Run this command to create a namespace for Bold Reports:

kubectl apply -f namespace.yaml
Enter fullscreen mode Exit fullscreen mode

Step 7: Create log configuration.

Then, run this command to create the log configuration:

kubectl apply -f log4net_config.yaml
Enter fullscreen mode Exit fullscreen mode

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.

SSL configuration.

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>
Enter fullscreen mode Exit fullscreen mode

For this case, boldreports-tls is the secret name. indicates the path for the .pem file and 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
Enter fullscreen mode Exit fullscreen mode

To get the ingress IP address, run the following command repeatedly until an IP address is displayed:

kubectl get ingress -n bold-services -w
Enter fullscreen mode Exit fullscreen mode

Apply Ingress configuration.

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.

Change the DNS or Ingress IP address.

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.

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Step 14: Create services.

Create all the services by running this command:

kubectl apply -f service.yaml
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Wait until all pods are running, and then run then command again.

All Pods are running.

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.

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

  1. Configure the Administrator user by entering the user information and password. Click the Next button.

    Configure the Administrator user.

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

    Report Tenant Deployment.

  1. Now, click on Go to Reports, where you will be redirected to view all pages.

    Go to Reports

In the Report Sample pop-up, you can add the sample reports that are already available with the Report Server by clicking Explore.

Report Sample pop-up.

The sample reports are already available and will be displayed.

Sample Reports

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

The Bold Reports Report Server does not support exporting data visualization report items by default while scheduling. To enable this feature, you need to install the PhantomJS client library. PhantomJS is a JavaScript library that can be used to render web pages without a graphical user interface.

Installing PhatomJS

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
Enter fullscreen mode Exit fullscreen mode

Next, run this command to open the shell running in the reports-web-deployment container:

kubectl exec -it <pod-name> -n <namespace> -- bash
Enter fullscreen mode Exit fullscreen mode

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.

  1. Change the current directory to /application/app_data/optional-libs by running this command.
    cd /application/app_data/optional-libs
    

  1. 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
Enter fullscreen mode Exit fullscreen mode
  1. 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
    

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

  1. 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:

    phantomjs –version
    

    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.

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 the embedded reporting tools will change depending on the deployment platform. You can find more detailed information about these differences in our documentation.

Report Embedding

Conclusion

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.

If you have any questions, please post them in the comments section. You can also contact us through our contact page, or if you already have an account, you can log in to ask your support question.

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!

Catch us on our official Twitter, Facebook, and LinkedIn pages for info about upcoming releases.

Top comments (0)