Jump to content
  • This documentation is an older version of JasperReports IO 200 At Scale User Guide. View the latest documentation.

    By default, JasperReports IO At-Scale uses the redis module to deploy a single redis pod. Redis is a queue where JRIO stores report requests and report output. In applications with high demand, the Redis queue can become a bottleneck for requests. Therefore, an option for high performance needs is to deploy Redis as a separate cluster and configure JRIO to use it instead of its own redis pod.

    To implement a Redis cluster, first you need to deploy and configure the cluster itself. Then you need to configure the JasperReports IO At-Scale modules before building the Docker images. Finally, you need to configure the JRIO Helm Chart before deploying the JRIO cluster.

    Deploying a Redis Cluster

    The Redis cluster is separate from the JasperReports IO At-Scale product: you must obtain and install Redis from a third-party source. Jaspersoft has tested JasperReports IO At-Scale with the Redis cluster and Helm chart available from Bitnami, specifically the Redis 6.0.7-debian-10-r0 image, and the examples in this section are based on their product:

    https://github.com/bitnami/charts/tree/master/bitnami/redis-cluster
    https://bitnami.com/stack/redis-cluster/helm

    After downloading the Redis cluster, download the values-production.yaml file from the Bitnami github repo:

    https://github.com/bitnami/charts/blob/master/bitnami/redis-cluster/values-production.yaml

    Edit the values-production.yaml file as follows:

    Property

    Description

    cluster.nodes The number of nodes in the Redis cluster. Jaspersoft has successfully tested with the default of 6 nodes.
    cluster.replicas The number of Redis replicas, tested with the default of 1.
    usePassword Set to true.
    password Set your password for accessing Redis from JasperReports IO At-Scale, for example mypassword.

    Deploy the Bitnami Redis cluster with the additional values-production.yaml file using the following command:

    The cluster name is right after the word install in the helm command. In this example, the cluster name is redis. The cluster name is used in the redis service name in the JRIO modules configuration, in the format <cluster-name>-redis-cluster. Therefore, the service name for this cluster is redis-redis-cluster.

    If you need to delete the Redis cluster, use the following command where redis is the <cluster-name>:

    However, Helm doesn't delete redis volumes, so before you create a new Redis cluster, check the persistent volume claims (pvc) and delete them individually as shown in the following example. There is one volume for each node, so 6 in our example:

    Configuring JRIO Modules for a Redis Cluster

    Before building the Docker images, you have to configure the JasperReports IO At-Scale modules to use your Redis cluster instead of the built-in Redis module. Edit the following files:

    jrio-export-docker/jrio/redis-config.yaml
    jrio-manager-docker/jrio/redis-config.yaml
    jrio-reporting-docker/jrio/redis-config.yaml
    jrio-rest-docker/jrio/WEB-INF/redis-config.yaml

    Change the configuration as follows, using the Redis service name and password set in the previous examples:

    The Redis service name format is <cluster-name>-redis-cluster.

    Now you can build the JRIO Docker images and put them into the Docker registry, as described in Building Docker Images.

    Configuring JRIO Helm Chart for a Redis Cluster

    Before deploying your JasperReports IO At-Scale cluster, you must configure its Helm chart to use the Redis cluster. Make sure the jrio-at-scale-2.0.0/k8s/helm/values.yaml file uses the new images built after updating with the Redis cluster service.

    Delete the following files that are no longer needed:

    jrio-at-scale-2.0.0/k8s/helm/redis-deployment.yaml
    jrio-at-scale-2.0.0/k8s/helm/redis-service.yaml

    Then edit the following files:

    jrio-at-scale-2.0.0/k8s/helm/jrio-manager-deployment.yaml
    jrio-at-scale-2.0.0/k8s/helm/jrio-reporting-deployment.yaml
    jrio-at-scale-2.0.0/k8s/helm/jrio-export-deployment.yaml
    jrio-at-scale-2.0.0/k8s/helm/jrio-rest-deployment.yaml

    In each of them, replace the Redis connection and initialization script with the following:

    Now you can proceed with Configuring the Helm Chart and Deploying a Cluster in AWS EKS.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...