Skip to main content
This guide provides a comprehensive walkthrough for creating, customizing, and deploying project accelerators for the Aletyx Playground. Accelerators allow you to quickly bootstrap projects with predefined configurations, dependencies, and structure, making it easier for developers to get started with business automation projects.

What are Accelerators?

Accelerators in Aletyx Playground serve as project templates that can enable:
  • Provide a predefined project structure
  • Include necessary dependencies
  • Configure proper Maven settings
  • Set up deployment configurations
  • Establish CI/CD pipelines
  • Add custom branding and organizational standards
Accelerators are superior to traditional archetypes because they allow for complete customization beyond just the initial project creation, including environment-specific configurations and pipeline setups.

Prerequisites

Before you begin, ensure you have:

Accelerator Structure

A typical accelerator repository has the following structure:

Step 1: Setting Up the Base Project

Start by creating a basic repository structure:

Initialize Git Repository

Create Basic .gitignore

Step 2: Create the POM.xml File

Create a pom.xml file with dependencies for Apache KIE projects. Below is a template to start with:

Step 3: Configure Application Properties

Create an application.properties file in the src/main/resources directory:

Step 4: Add a GitHub Actions Workflow

Create a workflow file for CI/CD in .github/workflows/deploy.yml if you use GitHub actions. A sample can be found at updateThis

Step 5: Add a Docker Compose File for Local Testing

Create a docker-compose.yml file for testing the accelerator locally. The below is an example that can be used as a builder that utilizes the ${artifactId} that should be whatever you would want to call it for your implementation:

Step 6: Create the Sandbox Configuration

Create a .kie-sandbox directory with a configuration file to specify how the Sandbox should handle this accelerator:
Create a .kie-sandbox/accelerator.yaml file:

Step 7: Add Sample DMN and BPMN Models

Sample DMN Model

Create a sample DMN file in src/main/resources/decisions/simple-decision.dmn to demonstrate decision modeling capabilities.

Sample BPMN Process

Create a sample BPMN file in src/main/resources/processes/simple-process.bpmn to demonstrate process modeling capabilities.

Step 8: Create a Dockerfile for Container Builds

Create a Dockerfile in src/main/docker/Dockerfile.jvm:

Step 9: Add Deployment Scripts

Create deployment scripts for Kubernetes in the .github/scripts directory:

Example of a Keycloak Configuration Script using Community

Create .github/scripts/deploy-keycloak.sh:

Components Deployment Script

Create .github/scripts/deploy-components.sh:

Step 10: Add Maven Profiles

Update the pom.xml file to include profiles for different deployment scenarios:

Step 11: Add Persistence Configuration

Update the pom.xml to include persistence-related dependencies:

Step 12: Publishing and Using Your Accelerator

After creating and testing your accelerator, publish it to GitHub and make it available for use in Aletyx Playground. To see how this can be incorporated into your

Publishing to GitHub

Using the Accelerator in Aletyx Playground

  1. Open Aletyx Playground at https://playground.aletyx.ai
  2. Create a new project
  3. Click on “Apply Accelerator”
  4. Choose “Add Custom Accelerator”
  5. Enter your GitHub repository URL
  6. Follow the wizard to configure your new project

Advanced Configuration Options

Custom Environment Variables

Add environment-specific configuration using Quarkus profiles:

Configuring Database Migrations

Add Flyway database migration support:

Handling Secrets

Add secrets management through Kubernetes:
Reference these secrets in your Kubernetes deployment:

Troubleshooting

Common Issues and Solutions

  1. Image Build Failures
  2. Issue: Docker image build fails with authentication errors
  3. Solution: Ensure Docker is logged in to your registry with docker login
  4. Kubernetes Deployment Issues
  5. Issue: “Error: ImagePullBackOff” in Kubernetes pods
  6. Solution: Check registry credentials and image path
  7. Quarkus Application Startup Problems
  8. Issue: Application fails to start due to database connection issues
  9. Solution: Verify database connection properties and ensure the database is accessible
  10. Maven Build Failures
  11. Issue: “Could not resolve dependencies” error
  12. Solution: Check network connectivity and Maven repository configuration

Accessing Logs

Access deployment logs to diagnose issues:

Best Practices

  1. Externalizing Configuration
  2. Use environment variables for configuration that varies between environments
  3. Leverage Quarkus profiles (%dev, %test, %prod) for environment-specific settings
  4. Security Practices
  5. Never commit sensitive information (passwords, tokens) to your repository
  6. Use Kubernetes secrets for sensitive data
  7. Enable and configure OIDC authentication in production
  8. Performance Tuning
  9. Configure appropriate memory settings for containerized applications
  10. Set up proper connection pooling for database connections
  11. Enable response compression for API endpoints
  12. CI/CD Pipeline Efficiency
  13. Use Maven caching in CI/CD pipelines
  14. Create optimized container images
  15. Implement multi-stage builds where appropriate