Deploying the Cluster

Now that everything is configured, the cluster has been created with a node group, and the images have been pushed to the ECR repository, we can finally start the cluster. This will instantiate nodes from the corresponding images according to the number of machines in the virtual private cloud.

Before proceeding, make sure you have fully configured your Helm chart (values.yaml) and other cluster configuration files, as described in Configuring a Cluster in Kubernetes.

1. If you have not already done so, install the helm command-line app to run helm commands. You can download binaries or use package managers as described in https://helm.sh/docs/intro/install/.
2. Go to the home directory of the Jaspersoft IO At-Scale distribution, by default jrio-at-scale-3.0.0/ where the k8s folder is located, and run the following command:
helm install JRIOcluster ./k8s/helm

Where JRIOcluster is the name of your AWS EKS cluster.

3. Verify that the cluster was deployed with the following command:
helm list
4. Then verify that all the nodes have started successfully:
root@/opt> kubectl get all
NAME                                 READY   STATUS    RESTARTS   AGE
pod/jrio-client-88cc9485c-cjj5v      1/1     Running   0          68s
pod/jrio-export-859b6dd55f-xnspz     1/1     Running   0          68s
pod/jrio-manager-ccb7bf45d-qwkvb     1/1     Running   0          68s
pod/jrio-reporting-66b7d7f74-7628p   1/1     Running   0          68s
pod/jrio-rest-5475ddb958-cl5vq       1/1     Running   0          68s
pod/redis-7c676c6-5qczq              1/1     Running   0          68s
 
NAME                  TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)
service/jrio-client   NodePort       10.100.235.226   <none>        8080:32629/TCP
service/jrio-rest     LoadBalancer   10.100.11.180    [see below]   8080:31946/TCP
service/kubernetes    ClusterIP      10.100.0.1       <none>        443/TCP
service/redis         ClusterIP      10.100.169.121   <none>        6379/TCP
 
NAME                             READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/jrio-client      1/1     1            1           68s
deployment.apps/jrio-export      1/1     1            1           68s
deployment.apps/jrio-manager     1/1     1            1           68s
deployment.apps/jrio-reporting   1/1     1            1           68s
deployment.apps/jrio-rest        1/1     1            1           68s
deployment.apps/redis            1/1     1            1           68s
 
NAME                                       DESIRED   CURRENT   READY   AGE
replicaset.apps/jrio-client-88cc9485c      1         1         1       68s
replicaset.apps/jrio-export-859b6dd55f     1         1         1       68s
replicaset.apps/jrio-manager-ccb7bf45d     1         1         1       68s
replicaset.apps/jrio-reporting-66b7d7f74   1         1         1       68s
replicaset.apps/jrio-rest-5475ddb958       1         1         1       68s
replicaset.apps/redis-7c676c6              1         1         1       68s

After the cluster has been deployed, the only service with an external IP hostname is the jrio-rest service of type LoadBalancer. On AWS it takes some time, you may need to wait a few minutes before the hostname appears, for example:

a073e3faaa4b341c4ac637f6529bc45a-1698884248.us-east-1.elb.amazonaws.com on port 8080

5. Finally, the load balancer security group has to be configured to allow incoming traffic from the JasperReports Server instance or from any other machine. Note that this will work properly only when a single AWS Avalability Zone is configured; for multi-AZ another load balancer type should be used in the AWS EKS config. To enable incoming traffic:
a. In your AWS console, go to EC2 > Load Balancers and find your load balancer. It will have the same name as the exposed kubernetes service.
b. Select the load balancer, and locate the source security group in its description. Write down the ID of this group.
c. In the AWS console again, go to Security Groups, and find the security group with that ID. It should also have k8s-elb in its name.
d. Edit the Inbound rules for that security group, and open the port (8080 in this example) for your server insance or any other machine.

Deploying JasperReports Server

This section describes how to connect a JasperReports Server instance with Jaspersoft IO At-Scale so that the server uses the JRIO At-Scale cluster as a scalable reporting engine. Because JRIO creates its own database connections using JDBC, this works only for reports that have a JDBC data source, not JNDI or other data sources.

1. If you have a Private setup for AWS EKS, then your JasperReports Server has to be placed into the same VPC as AWS EKS. Jaspersoft also recommends doing so in public cases too. Assuming your VPC was created by cloud formation scrips as described in Creating a Virtual Private Cloud, create a new EC2 instance in AWS EKS VPC for your JasperReports Server. Be sure to use a static IP address assigned to the JasperReports Server instance because that address must be specified in the module configuration before creating Docker images. For JasperReports Server in a clustered setup, configure a static IP address for the load balancer.
2. Make sure your JRIO At-Scale cluster does not include the jrio-client module and is configured to use the JasperReports Server instance, as described in Connecting to a JasperReports Server Repository.
3. After the server has been deployed, edit the following file:
File /tomcat9/webapps/js.config.properties
Property jrio.url
Example jrio.url=http://192.168.189.2:30030/jrio
4. If your JRIO At-Scale cluster handles high throughput, the server's event logging of every repository access may slow down your pods and become a bottleneck. In this case, disable event logging as follows:
File jasperserver-pro/WEB-INF/applicationContext-events-logging.xml
Bean ID loggingContextProvider
Property <entry key="com.jaspersoft.jasperserver.api.logging.access.domain.AccessEvent"
value="false"/>
5. For JasperReports Server in a clustered setup, repeat this procedure for each instance.

Deploying Your Database

Jaspersoft IO At-Scale creates its own connections to the database containing your reporting data. Even when using the JasperReports Server repository, JRIO At-Scale accesses only the metadata for JDBC data sources in order to create its own connections. This JDBC datasource must be accessible from inside the JRIO AtScale cluster and JRS instance.

Jaspersoft recommends putting the database into the same VPC as the JRIO At-Scale cluster, whether it is a database deployed on-premise or in the cloud, such as Amazon Relational Database Service (RDS). In the case of RDS, you should update the RDS database security group as required, so that JRIO At-Scale and JasperReports Server will be able to run queries against the database.