A comprehensive test instance setup for Red Hat Developer Hub (RHDH) on OpenShift, providing a ready-to-use developer portal with authentication, app-config, and dynamic plugin config.
This project provides automated deployment scripts and configuration files to set up a fully functional RHDH test instance on OpenShift.
- π€ GitHub PR Integration with
/testcommand for on-demand deployments - π¦ Multiple Install Types: Support for both Helm and Operator (Comming Soon) installation methods
- π Flexible Version Support: Deploy any RHDH version (latest, semantic versions like 1.7, CI builds like 1.7-98-CI)
- π Cluster Information Sharing: Automatic sharing of deployment URLs, OpenShift console access, and cluster credentials
- π Integrated Keycloak Authentication: Automatic Keycloak deployment with pre-configured realm and test users
- π₯ Pre-configured Test Users: Ready-to-use test accounts (test1, test2) with authentication setup
- π Local Deployment: Support for local development and testing environments
- β‘ Resource Management: Automatic cleanup with configurable timers and resource limits
- π― Instance Limits: Maximum of two concurrent test instances to manage resource usage
- π¬ User-friendly feedback with deployment status comments and live URLs
- π οΈ Debug & Customization Support: Shared cluster credentials for troubleshooting and custom configurations
Deploy test environments directly from Pull Requests using slash commands and test different configurations without local setup.
The bot supports flexible deployment commands directly from PR comments:
/test deploy <install-type> <version> [duration]
Parameters:
install-type:helmoroperator(operator Comming Soon)version: Version to deploy (see supported versions below)duration: Optional cleanup timer (e.g.,4h,2.5h)
Examples:
/test deploy helm 1.7 4h # Deploy RHDH 1.7 with Helm, cleanup after 4 hours
/test deploy operator 1.6 2.5 # Deploy RHDH 1.6 with Operator, cleanup after 2.5 hours
/test deploy helm 1.7 # Deploy latest CI version with Helm with defaut duration 3h
/test deploy operator 1.7-98-CI # Deploy specific CI build with Operator
- Comment on any PR on rhdh-test-instance repo:
/test deploy helm 1.7 4h
The bot provides comprehensive feedback through PR comments for eg:
π Deployed RHDH version: 1.7 using helm
π RHDH URL: https://redhat-developer-hub-rhdh.apps.rhdh-4-17-us-east-2-kz69l.rhdh-qe.devcluster.openshift.com
π₯οΈ OpenShift Console: Open Console
π Cluster Credentials: Available in vault under ocp-cluster-creds with keys:
β’ Username: CLUSTER_ADMIN_USERNAME
β’ Password: CLUSTER_ADMIN_PASSWORD
β° Cluster Availability: Next 1 hours
Users can deploy different configuration flavors by:
- Creating a PR with modified configuration files
- Using bot commands to deploy the PR's configuration:
/test deploy helm 1.7 2h
For local development and testing environments, you can deploy RHDH directly to your OpenShift cluster.
Note: Bring Your Own Cluster (BYOC)
Local deployment requires you to have access to your own OpenShift cluster.
-
Clone the repository:
git clone <repository-url> cd rhdh-test-instance
-
Deploy RHDH with Helm:
./install.sh helm 1.5-171-CI
-
Or deploy with the latest main version:
./install.sh helm 1.7
-
Access your RHDH instance: The script will output the URL where your RHDH instance is accessible.
./install.sh helm <version>Available versions:
1.7- Latest stable 1.7 version1.6- Latest stable 1.6 version1.5- Latest stable 1.5 version1.7-98-CI- Specific CI build1.6-45-CI- Specific CI build
Example:
./install.sh helm 1.7./install.sh operator <version> Example:
./install.sh operator 1.7After successful installation, access your RHDH instance at:
https://redhat-developer-hub-<namespace>.<cluster-router-base>
- Navigate to the RHDH URL
- Click "Sign In"
- Use one of the test users (test1/test1@123 or test2/test2@123)
- Explore the developer portal features
The main application configuration is stored in config/app-config-rhdh.yaml:
# Key configuration areas:
app:
baseUrl: "${RHDH_BASE_URL}"
auth:
environment: production
providers:
oidc:
production:
metadataUrl: "${KEYCLOAK_METADATA_URL}"
clientId: "${KEYCLOAK_CLIENT_ID}"
clientSecret: "${KEYCLOAK_CLIENT_SECRET}"
catalog:
locations:
- type: url
target: https://github.com/redhat-developer/rhdh/blob/main/catalog-entities/all.yamlConfigure dynamic plugins in config/dynamic-plugins.yaml:
includes:
- dynamic-plugins.default.yaml
plugins:
- package: ./dynamic-plugins/dist/backstage-community-plugin-catalog-backend-module-keycloak-dynamic
disabled: falseCustomize deployment in helm/value_file.yaml:
upstream:
backstage:
extraAppConfig:
- configMapRef: app-config-rhdh
filename: app-config-rhdh.yaml
extraEnvVarsSecrets:
- rhdh-secretsThe installation script automatically deploys Keycloak with:
- Admin user:
admin/admin123 - Predefined realm:
rhdh - Pre-configured OIDC client
- Test users for development
The following test users are created automatically:
| Username | Password | Role | |
|---|---|---|---|
| test1 | test1@123 | test1@redhat.com | User |
| test2 | test2@123 | test2@redhat.com | User |
Keycloak is configured with:
- Realm:
rhdh - Client ID:
rhdh-client
rhdh-test-instance/
βββ config/
β βββ app-config-rhdh.yaml # Main RHDH configuration
β βββ dynamic-plugins.yaml # Dynamic plugins configuration
β βββ rhdh-secrets.yaml # Kubernetes secrets template
βββ helm/
β βββ value_file.yaml # Helm chart values
βββ utils/
β βββ keycloak/
β βββ keycloak-deploy.sh # Keycloak deployment script
β βββ keycloak-values.yaml # Keycloak Helm values
β βββ rhdh-client.json # Keycloak client configuration
βββ install.sh # Main installation script
βββ OWNERS # Project maintainers
βββ README.md # This file
When using PR deployments, secrets are automatically pulled from vault at: https://vault.ci.openshift.org/ui/vault/secrets/kv/kv/list/selfservice/rhdh-test-instance/
These secrets are available as environment variables with the same name and can be used directly in Kubernetes secrets. From there, they can be referenced in app-config-rhdh.yaml or dynamic-plugins.yaml configurations.
Access Requirements:
- To add or view vault secrets, ensure you have appropriate access
- For access requests, reach out in #team-rhdh slack channel
For local development, you can add secrets in a .env file and use them in your app-config or dynamic plugins configuration.