Prepare a Reporting Solution in Amazon Elastic Kubernetes Services with Istio: A Step-by-Step Guide
Tags: reportingsolution, designer, reportviewer, reportdesigner
Published: 2023-09-01 11:29:41

In this guide, we are going to show you how to deploy the Bold Reports Report Server in Amazon Elastic Kubernetes Services with Istio to enable you to embed reporting tools into your application.

Containerization and Kubernetes are becoming increasingly popular. Amazon Elastic Kubernetes Service (EKS) is a managed Kubernetes service that can help organizations to set up and manage report servers easily.

Bold Reports Report Server is a reliable, scalable, and powerful reporting solution. It can be used on different platforms, including the Amazon Elastic Kubernetes Services. With the Bold Report Server, managing, styling, creating, and exporting reports becomes easy because there is no requirement for coding expertise to use it.

Let’s start this integration!

**Prerequisites**
When deploying the Bold Reports Report Server in Amazon Elastic Kubernetes Services with Istio, make sure you have the following hardware and software installed.

**Hardware requirements**
The following hardware is required:

1. A CPU with a minimum of 2 cores.
3. A minimum of 4GB of RAM.

**Software requirements**
The following software is required:

1. A database such as Microsoft SQL Server, PostgreSQL, or MySQL. Ensure that the database you are using is accessible from outside the machine.
2. Command line tools: Kubectl, AWS CLI, and IStioctl.
3. Any web browser.

**Deployment**
In this part, we will take you through a step-by-step process of deploying the Bold Reports Report Server in Amazon Elastic Kubernetes Services with Istio.

**Step 1: Prepare the environment.**
a. Download the following deployment files from [GitHub](https://github.com/boldreports/bold-reports-kubernetes/?utm_source=medium&utm_medium=partner_blog&utm_campaign=nuget_reportingsolutionekswithistio_cy23).
![GitHub Repository](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1yjkw2oo3gwsipqmperr.png)

Let’s define each file:

- The deployment file contains the configuration to create and manage those pods using a replica set.
- The destination rule file contains the configuration for the destination rule, including the traffic policy for the associated Kubernetes service.
- The HPA file contains the configuration to increase or decrease the number of pods automatically in response to the workload’s CPU or memory consumption.
- Istio gateway has configuration for the Istio Gateway resource, including the port, protocols, and routing rules to use. The Istio Gateway allows incoming traffic into the cluster and can route the traffic to the appropriate Kubernetes services.
- The log4net_config file has configuration settings that are employed to view the application logs in your Kubernetes console or store the needed logs in a file.
- The namespace file contains configuration that will be helpful when different teams or projects share a Kubernetes cluster.
- The pvclaim_eks file has the configuration for where we will provide the information for the file system and file share.
- The service file lets us access pods through a single point of entry.
b. Create a Kubernetes cluster and node group to deploy Bold Reports.
![Creating Kubernetes clusters and node groups](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y24mahh4ayf1eft2vddi.png)

**Step 2: Connect with the EKS cluster.**
a. Open the PowerShell folder and navigate to the area you downloaded the deployment files.
b. Run the following command to configure the AWS.
```
aws configure
```
c. Enter the AWS access key ID.
d. Enter the AWS secret access key.
e. Enter the AWS region code. You can get the AWS region code from the AWS website.
![AWS region code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1l70g0p437pf8hzx0et0.png)
f. Enter the output format as. json
![Entering output format](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ee3od2m9ihkz2p7pblrt.png)
g. Update the Kubeconfig by running the following command.
```
aws eks --region “region-name” update-kubeconfig --name “cluster-name”
```
Region name indicates the region in which the cluster was created.
h. Run the following command to deploy the CSI driver. It creates all the CSI drivers required.

```
kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.3"
```

**Step 3: Deploy the NGNIX Ingress controller.**
For deploying the NGNIX Ingress 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 the storage pods.**
You must then configure the file storage for pods. Create the EFS file system to store the shared folder for application usage.
![Create the EFS file system](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2e581qoow7m1bvoqrbyn.png)
Make a note of the file system ID, which you will use in the next step.

**Step 5: Modify pvclaim_eks.yaml.**
Open the pvclaim_eks.yaml file, then enter the volume handle ID value with the file system ID and save.
![Open the pvclaim_eks.yaml file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l4zbvk3d9d257riuw3cd.png)

**Step 6: Get the Ingress gateway external IP address.**
Run the following command to get the Ingress gateway external IP address.
```
kubectl -n istio-system get service
```
We are going to use the IP address to deploy the Report Server.
![IP address](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2gbavu74gnsfbsqzm4gs.png)

**Step 7: Set up SSL (optional).**
To set up the Report Server with a domain name, you first need to map the domain name with the IP address of the Report Server. Once you have done that, you can add the domain name and the TLS secret name to the istio_gateway.yaml file.

The application will be hosted in non-SSL mode by default. If you want to configure SSL, you need to add the domain and SSL configuration in the istio_gateway.yaml file:

a. Before you configure SSL, you need to 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>
```
b. Remove the following lines.
![Remove the lines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0o5lqb1x8vdh0t0z01s5.png)
c. Uncomment the following lines.
![Uncomment the lines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mdk4pmek4bxaw6my2k5a.png)
d. Replace example.com with your domain name.
![Replace example.com](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ebus56zor8pqig5lf0y.png)
e. Use the IP address that you obtained earlier to deploy the application.

**Step 8: Modify deployment configuration.**
Open the deployment.yaml file and replace the domain or Ingress gateway external IP address in the application base URL

![Enter Ingress gateway external IP address](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aovxxqw9dxzmo55tysoi.png)
 
**Step 9: Configuring optional client libraries.**
If you want to use third-party data sources like MySQL, Oracle, or PostgreSQL in your report, then you need to install them while deploying the Report Server. If you want to install more than one client library, separate them with commas as shown in the following.
![Installing data sources](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93abz476hs61j8l4my2e.png)

**Step 10: Apply the deployment file.**
a. Run the following command to create a namespace for the Bold reports.
```
kubectl apply -f namespace.yaml
```
b. Create the config map by running the following command.
```
kubectl apply -f log4net_config.yaml
```
c. Run the following command to create a persistent volume (PV) and persistent volume claim (PVC) to apply the configuration from pvclaim_eks.
```
kubectl apply -f pvclaim_eks.yaml
```
d. Apply the configuration in the deployment file by running this command. It creates and manages pods with a specified number of replicas and the provided image.
```
kubectl apply -f deployment.yaml
```
e. Apply the configuration in hpa_gke by running this command. It sets up autoscaling for the Kubernetes Horizontal Pod Autoscaler (HPA).
```
kubectl apply -f hpa.yaml
```
f. To create the services, run the following command.
```
kubectl apply -f service.yaml
```
g. Apply the configuration in the istio_gateway by running the following command. It routes traffic to services running in the cluster based on their URL paths and host names.
```
kubectl apply -f istio_gateway.yaml
```
h. Run the following command to apply the configuration in destination_rule. This applies the traffic policies defined in the destination rule to the specified service.
```
kubectl apply -f destination_rule.yaml
```
i. After deploying all the deployment files, check the pod status by running this command. You should wait until all the pods are executed.
```
kubectl get pods -n bold-services -w
```
j. Run the command again until all the pods are running.
![Complete running pods](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h5tuleshnd0k6y0knnbc.png)

**Configure Report Server**
Once you have deployed the Report Server, you can then configure it by opening a web browser and navigating to the domain name or Ingress IP address provided in the application base URL.
![Application startup page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nz9fly8b5jbxqnkyv6s8.png)
To begin, activate your Bold Reports account. You will be required to provide your online credentials or upload your online unlock key. The online unlock key can be downloaded from your Bold Reports Account page.
![Activation of Bold Reports account by uploading the online unlock key.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bguya65x9892ugzm467t.png)
For this demo, we will activate the account using online credentials:
1. Click Log in to Activate Account and enter your Bold Report credentials.
2. If you have more than one portal license, you will be required to select one.
3. Configure the Administrator user by entering the user information.
4. Click Next.
![Activation of Bold Reports account using online credentials.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h7yujp5pz1xnwpnaapby.png)

**Configure the database for storing Report Server data**

1. To configure the database, you can choose from the SQL Server, PostgreSQL, or MySQL databases. For this setup, choose PostgreSQL. The fields will be updated. You should then provide the required information in the required fields.
![ To configure the database](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k0mdm0eb70rya72ayymm.png)
2. You have the option to create a new database or use an existing database. Select New Database and enter the following name: boldserviceskubernetes.
3. Enable the SSL option to make a safe connection using SSL.
4. Click Next.

The report tenant deployment action has started and will run in the background.
![Report tenant deployment action running](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6nsi3pkmy251ij044e2k.png)
Click Go to Reports, which will redirect you to the View all page.
![Report creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8dotdoinx4w56fdovd0r.png)
In the View all page, you can add sample reports that are already available in the Report Server by clicking on Explore.
![The view all page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2qlpczxvm3nplmd6abek.png)
You can add those report samples in the Report Server by simply clicking Add Report. The sample report you selected will be added under the Sample Reports category.
![Sample Reports](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yutcherybt4gew9ee7g6.png)
When you click on a report, it will open in the Report Server.
![Report Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0pfx7wwydr3kt825hij.png)
Now, if you open the shared data source data connector page, you will see third-party data sources like MySQL, Oracle, and PostgreSQL, as shown in the following.
![Shared data source data connector page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qp7qszd39x7bfd9rzos0.png)

**Add client libraries**
The Bold Reports Report Server’s visualization report items, such as charts and gauges, are not exportable. To export these items from scheduled reports, we need to install the PhantomJS client library on our Report Server:

1.First, you need to run bash on your pods. To do this, you will need to run the following command to get a list of all the pods that are currently running.
```
kubectl get pods -n bold-services -w
```
2.Run the following command, which will open a bash shell running inside the reports-web-deployment container.
```
kubectl exec -it <pod-name> -n <namespace> -- bash
```
<pod-name> indicates the name of pod and <namespace> indicates the namespace used when deploying the Bold Report Server.

3.Change the current directory to /application/app_data/optional-libs by running the following command.
```
cd /application/app_data/optional-libs
```
4.After that, install the sudo and wget tools.
```
apt-get install sudo apt-get install wget
```
5.Before you can install PhantomJS, you need to install some of the required packages by running this command
```
sudo apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 -y
```
6.After that, run the following command to download the latest stable version of PhantomJS from the official website.

```
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
```
7.Once the file has finished downloading, 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/
```
The downloaded file is extracted and moved to the /usr/local/share directory.

8.Run this command to create a symlink of the PhantomJS binary file in the system’s bin directory.
```
sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/
```
9.To ensure PhantomJS is installed properly, run this command.

```
phantomjs --version
```
If the version number is shown, then the PhantomJS has been installed properly.

After reloading the browser, you can export a report that contains charts. When you open the exported file, you will see that the charts are included in the file, as well.
![Report containing charts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfihr9drwpvoujg7lpod.png)

**Report embedding**
Bold Reports allows you to embed reporting functionalities directly within your applications. Our embeddable reporting tools can be seamlessly integrated with popular application platforms like ASP.NET Core, Blazor, Angular, and React. The way the embedded reporting tools are used varies depending on the deployment platform. You can find more detailed information about these differences in [our documentation](https://help.boldreports.com/enterprise-reporting/developer-guide/embed-in-application/view-report-through-report-viewer/?utm_source=dev&utm_dev=partner_blog&utm_campaign=dev_reportingsolutionekswithistio_cy23).
![Report Embedding ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ykqxhtpdva61tmav3zgi.jpg)

**Conclusion**
This blog post covered the step-by-step process of deploying the Bold Reports Report Server in Amazon Elastic Kubernetes Services with Istio, 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 question or need further guidance, please feel free to add a comment in the comments section below. You can also contact us through our [contact page](https://www.boldreports.com/contact/?utm_source=dev&utm_dev=partner_blog&utm_campaign=dev_reportingsolutionekswithistio_cy23). If you already have an account, you can [log in](https://login.boldid.net/accounts/login/?utm_source=medium&utm_medium=partner_blog&utm_campaign=nuget_reportingsolutionekswithistio_cy23) to ask your support questions directly.

Bold Reports offers a [15-day free trial](https://www.boldreports.com/pricing/?utm_source=dev&utm_dev=partner_blog&utm_campaign=dev_reportingsolutionekswithistio_cy23) without the need for a credit card. We welcome you to start a free trial and experience Bold Reports for yourself. Let us know what you think!

Find us on [Twitter](https://twitter.com/boldreportsoffl), [Facebook](https://www.facebook.com/boldreportsofficial/), and [LinkedIn](https://www.linkedin.com/showcase/boldreportsofficial) for news on our upcoming releases concerning Bold Reports.

Thank you for reading this blog post, and we are looking forward to providing you with more comprehensive content in the future.