OpenLegacy Hub Enterprise Helm Installer Script
This repository includes the installer-helm.sh script which automates and standardizes the deployment of OpenLegacy Hub Enterprise using Helm on Kubernetes or OpenShift clusters.
Table of Contents
- Overview
- Prerequisites
- Installation Steps
- Script Inputs & Configuration
- Artifacts Generated
- Monitoring & Advanced Options
- Error Handling
- Troubleshooting
- Support
Overview
The installer-helm.sh script interactively and securely collects all parameters required for deployment (images, registry, URLs, database info, monitoring, cluster type, namespace), validates your environment, generates configuration files, certificates, and secrets, and finally performs the Helm-based installation.
Prerequisites
- Kubernetes or OpenShift cluster access
- CLI tools:
kubectl(oroc),helm,openssl - Required privileges for creating namespaces and managing secrets
Installation Steps
- Run the Installer
sudo ./installer-helm.sh
Using installer-helm.sh: Interactive and Config File Modes
installer-helm.sh: Interactive and Config File ModesThe installer-helm.sh script supports two modes of operation:
- Interactive mode: Prompts you for input step-by-step.
- Config file mode: Uses an existing
installer-helm.conffile to prefill all settings for unattended or repeatable installations.
How Modes Work
-
Interactive mode (default):
- If no config file exists (or you want to update config), the script will prompt you for all required information.
- It saves your inputs in a new or updated
installer-helm.conffor future use.
-
Config file mode:
- If a valid
installer-helm.confis present in the script directory, the script will automatically load all variables from it. - You can review and edit this file directly for non-interactive, automated installs.
- The script validates variables from the config file before proceeding. Missing or invalid entries will trigger prompts for correction.
- If a valid
installer-helm.conf Variables Explained
installer-helm.conf Variables ExplainedBelow is each variable used in the installer-helm.conf file, with its meaning:
| Variable | Description | Example Value |
|---|---|---|
REGISTRYURL | Docker registry URL (for pulling images) | openlegacy |
REGISTRYUSERNAME | Docker registry username (if authentication is needed) | dockeruser |
REGISTRYPASSWORD | Docker registry password (if authentication is needed) | s3cret |
K8SDISTRIBUTION | Cluster type: k8s for Kubernetes, openshift for OpenShift | k8s |
k8snamespace | Namespace for deployment | hub-enterprise |
SECRETNAME | TLS secret name (for SSL certs) | ol-hub-tls |
OLDBHOST | Database host (should be accessible by cluster pods) | hub-enterprise-postgres |
OLDBNAME | Database name | postgres |
OLDBPORT | Database port | 5432 |
OLDBUSER | Database username | postgres |
OLDBPASSWORD | Database password | (hidden) |
KEYCLOAKIMAGE | Keycloak image name with tag | openlegacy/openlegacy-keycloak:26.3.1 |
HUBENTDBMIGRIMAGE | Hub Enterprise DB migration image name with tag | openlegacy/hub-enterprise-db-migration:3.0.7 |
HUBENTIMAGE | Hub Enterprise image name with tag | openlegacy/hub-enterprise:3.0.7 |
OLHUBURL | URL for OpenLegacy Hub Web UI | https://hub-enterprise |
OLKEYCLOAKURL | URL for Keycloak Web UI | https://hub-enterprise-keycloak |
MONITORING | Enable monitoring stack (true/false) | false |
LOKIIMAGE | Loki image (for monitoring, if enabled) | grafana/loki:2.7.1 |
GRAFANAIMAGE | Grafana image (for monitoring, if enabled) | grafana/grafana:9.3.1 |
PROMETHEUSIMAGE | Prometheus image (for monitoring, if enabled) | prom/prometheus:v2.40.6 |
PUSHGATEWAYIMAGE | Pushgateway image (for monitoring, if enabled) | prom/pushgateway:v1.5.1 |
LOKIURL | URL to access the Loki Web UI (monitoring) | none |
GRAFANAURL | URL to access the Grafana Web UI (monitoring) | none |
PUSHGATEWAYURL | URL to access PushGateway Web UI (monitoring) | none |
OLSCREENPORT | Port for hub emulator screen (default 1512) | 1512 |
Workflow Example
- First Run:
Script collects input interactively and writesinstaller-helm.conf. - Subsequent Run:
Script sources the conf file and proceeds non-interactively (unless validation fails).
Best Practices
- Use interactive mode for the initial setup to ensure correctness.
- Use config file mode for CI/CD pipelines or automated deployments by pre-editing
installer-helm.conf. - Always review your config file before unattended execution, especially credentials and namespace.
Script Inputs & Configuration
Required Inputs
- Registry: Optional authentication and base URL
- Images: Names and tags for Hub, Keycloak, DB Migration, monitoring stack
- URLs: Hub and Keycloak UI addresses
- Database: Host, port, name, user, password
- Namespace: Target namespace for deployment
- Cluster type: Kubernetes or OpenShift
- Monitoring stack: Enable/disable and configure images
Configuration Files Generated
installer-helm.conf: Summary of inputs and settings (chmod 600)values.yaml: Main Helm values templatekeycloak-realm.yaml: Keycloak configuration for chart- SSL certificate file (PEM)
- Encryption secrets
Artifacts Generated
- Configuration: All inputs persisted for audit and repeat runs
- Helm values: Fully templated values for atomic installation
- Key supporting files: PEM certificate, Keycloak realm configuration, secrets
Monitoring & Advanced Options
- Optional deployment of monitoring stack if enabled
- Loki, Grafana, Prometheus, Pushgateway images
- Handles OpenShift environment specifics
- Optionally includes custom TLS secret integration
Error Handling
- Colored output for log, warning, and error states
- Validates every required binary, value, and file
- Graceful exit and actionable messages on failure
Troubleshooting
- Missing tools: Install with your system package manager (e.g.,
apt install helm kubectl openssl) - Namespace missing: Create before running the script
- Incorrect image or URL values: Edit
installer-helm.confor rerun installer - Database connection issues: Check credentials and network reachability
- Permissions errors: Ensure you run the script with sufficient privileges
Support
Contact OpenLegacy technical support or refer to official documentation for further customization or advanced Helm deployment scenarios.
Updated about 3 hours ago
