Skip to main content
This guide provides comprehensive instructions for deploying Aletyx Enterprise Build of Kogito and Drools applications to Red Hat OpenShift® environments. It covers both development and production deployments, including the requirements, configuration options, and best practices.

Overview

Aletyx Enterprise Build of Kogito and Drools leverages the Apache KIE ecosystem to provide a powerful business automation platform. Deploying to OpenShift provides several advantages:
  • Container orchestration and scaling
  • Built-in security features
  • Automated deployments and rollbacks
  • Integration with CI/CD pipelines
  • Persistent storage management
This guide walks through the steps required to deploy your Aletyx Enterprise Build of Kogito and Drools applications to OpenShift, ensuring they run reliably in both development and production environments.

Requirements

Infrastructure Requirements

To successfully deploy Aletyx Enterprise Build of Kogito and Drools on OpenShift, ensure your environment meets these minimum requirements:
The OpenShift 4.17+ requirement is based on support of OpenShift by the Quarkus runtime, others may work, please reach out to Aletyx support if you are at a different version

Software Requirements

Your OpenShift cluster should have these components available:
  1. PostgreSQL 16
  • Required for process persistence, job scheduling, and task management
  • Earlier versions are not supported due to specific features needed for transaction management
  1. OpenID Connect (OIDC) Provider
  • Required for authentication and authorization
  • Keycloak 20+ is recommended but any OIDC-compliant provider should work. If concerned with your OIDC provider, reach out to Aletyx support!
  1. Container Registry Access
  • Access to pull container images (Red Hat Registry, Docker Hub, etc.)
  • Or ability to use OpenShift’s internal registry
  1. Additional Services
  • For production: Monitoring tools (Prometheus, Grafana)
  • For production: Log aggregation (EFK stack)

Development Deployments

For development environments, you can use a simplified deployment model that allows for rapid iteration and testing.

Setting Up PostgreSQL

PostgreSQL 16 is one of the supported databases for Aletyx Enterprise Build of Kogito and Drools. Since it is available as a community release for trying in development purposes, this example will show how to use PostgreSQL.
  1. Deploy PostgreSQL using a template or operator:
Alternatively, you can use a deployment manifest:

Deploying the Application

There are two main approaches to deploying your Aletyx Enterprise Build of Kogito and Drools application to OpenShift:

1. Using Maven and the Quarkus OpenShift Extension

The Quarkus OpenShift extension can handle the entire deployment process:
  1. Add the OpenShift extension to your pom.xml:
  1. Configure the extension in your application.properties:
  1. Deploy using Maven:

2. Using OpenShift CLI and Container Images

For more control over the deployment process, you can use container images and the OpenShift CLI:
  1. Build your application:
  1. Create a deployment:
  1. Create a route:

Setting Up Authentication

Secure your application using OpenID Connect (OIDC) authentication. Keycloak is recommended for development environments:
  1. Deploy Keycloak:
  1. Configure OIDC in your application.properties:
  1. Create realm and client in Keycloak:

Production Deployments

Production deployments require additional considerations for reliability, scalability, and security.

High Availability Setup

For production environments, configure high availability for all components:
  1. Aletyx Enterprise Build of Kogito and Drools Application:
  • Set up multiple replicas (at least 2-3)
  • Configure health probes for liveness and readiness
  • Set appropriate resource limits and requests
  1. PostgreSQL:
  • Use a production-grade PostgreSQL setup
  • Consider using a managed PostgreSQL service or the Crunchy PostgreSQL Operator
  • Configure proper backup and restore procedures
  1. Keycloak:
  • Deploy with multiple replicas
  • Use a production database backend
  • Configure proper backup procedures

Resource Allocation

Allocate appropriate resources based on expected workload: Adjust these values based on your specific workload and performance testing. These are just sample values and not meant to replace good sizing practices.

Security Considerations

For production deployments, implement these security measures:
  1. Network Policies:
  • Restrict communication between pods
  • Allow only necessary ingress/egress traffic
  1. Secret Management:
  • Store credentials in OpenShift secrets
  • Mount secrets as environment variables or files
  • Consider using a vault service for sensitive information
  1. HTTPS and TLS:
  • Configure proper TLS termination for all routes
  • Use valid certificates from trusted certificate authorities
  • Configure TLS between services when possible

Deployment Scripts

OpenShift Deployment Script

Here’s a comprehensive deployment script for OpenShift that handles the deployment of all necessary components:

CI/CD Integration

Integrate the deployment process with your CI/CD pipeline by:
  1. Adding the deployment script to your project’s repository
  2. Configuring your CI/CD tool (Jenkins, GitHub Actions, etc.) to execute the script
  3. Setting up the necessary secrets and environment variables
Example GitHub Actions workflow:

Troubleshooting

Common Issues and Solutions

  1. Image Pull Failures:
  • Issue: Pods stuck in ImagePullBackOff state
  • Solution: Verify registry credentials and image paths
  1. Database Connection Issues:
  • Issue: Application fails to connect to PostgreSQL
  • Solutions:
  • Check PostgreSQL service name and credentials
  • Verify network policies allow communication
  • Check if PostgreSQL is running correctly
  1. Route/Ingress Problems:
  • Issue: Unable to access application via URL
  • Solutions:
  • Verify route was created correctly
  • Check TLS termination settings
  • Ensure application is listening on the correct port
  1. OIDC Authentication Failures:
  • Issue: Unable to authenticate using OIDC
  • Solutions:
  • Verify Keycloak realm and client configuration
  • Check redirect URLs are correctly set up
  • Ensure OIDC environment variables are correctly configured

Accessing Logs

Use these commands to check logs for each component:

Health Checks

Verify application health by accessing the health endpoints:
These health endpoints are automatically included by Quarkus and provide valuable information about the application’s status.