Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ForgeOps on OpenShift CRC Deployment

Production-ready scripts for deploying ForgeRock Identity Platform (ForgeOps) on Red Hat OpenShift CRC (Code Ready Containers). Solves the 3 most common deployment failures: SCC violations, internal registry issues, and disk exhaustion.

Full guide: Deploying ForgeRock ForgeOps on Red Hat OpenShift CRC: A Step-by-Step Guide

The Problem This Solves

Most ForgeOps-on-OpenShift deployments fail at the same 3 points:

ErrorRoot CauseFix
pods "ig-0" is forbidden: unable to validate against any security context constraintForgeRock runs as UID 11111; OpenShift restricts UIDs to 1000680000+Custom SCC (scc/forgerock-scc.yaml)
Failed to pull image: ImagePullBackOffInternal registry not exposed; TLS cert not trustedscripts/01-setup-registry.sh
Evicted pod: node was low on ephemeral-storageForgeRock images are 600MB–1.2GB each; CRC default disk is 31GBResize to 80GB in setup

Hardware Requirements

ResourceMinimumRecommended
CPUs8 vCPUs16 vCPUs
Memory16 GB32 GB
Disk80 GB100 GB
OSmacOS 10.14+ / RHEL / UbuntuSame

Quick Start

# Clone this repo
git clone https://github.com/IAMDevBox/forgeops-openshift-deployment.git
cd forgeops-openshift-deployment
# Make scripts executable
chmod +x scripts/*.sh
# Step 1: Setup CRC (5-10 min)
./scripts/00-setup-crc.sh
# Step 2: Expose internal registry and trust TLS certeval$(crc oc-env)
oc login -u kubeadmin https://api.crc.testing:6443
./scripts/01-setup-registry.sh
# Step 3: Create namespace and apply ForgeRock SCC
./scripts/02-apply-scc.sh
# Step 4: Clone ForgeOps and build images (requires ForgeRock license)
git clone https://github.com/ForgeRock/forgeops.git ~/forgeops
./scripts/03-build-push-images.sh
# Step 5: Deploy ForgeRock components
./scripts/04-deploy-forgeops.sh

Directory Structure

forgeops-openshift-deployment/
├── scc/
│ └── forgerock-scc.yaml # Custom SecurityContextConstraints for ForgeRock
├── scripts/
│ ├── 00-setup-crc.sh # Install and configure OpenShift CRC
│ ├── 01-setup-registry.sh # Expose internal image registry
│ ├── 02-apply-scc.sh # Create namespace and bind SCC
│ ├── 03-build-push-images.sh # Build and push ForgeRock images
│ ├── 04-deploy-forgeops.sh # Deploy ForgeRock platform
│ └── 05-troubleshoot.sh # Diagnose common failures
└── README.md

The SCC Configuration Explained

The key configuration is the custom SecurityContextConstraints:

# scc/forgerock-scc.yamlrunAsUser:
type: RunAsAny # Allows ForgeRock's UID 11111 (vs default 1000680000+)fsGroup:
type: RunAsAny # Allows ForgeRock's GIDsupplementalGroups:
type: RunAsAnyallowedCapabilities:
- NET_BIND_SERVICE # Required for IG port 443/80 binding

Without this SCC, every ForgeRock pod fails immediately with:

Error: pods "am-0" is forbidden: unable to validate against any security context constraint

See the full SCC guide for binding to specific service accounts.

Component Deployment Order

ForgeRock components have a strict startup dependency:

DS (Directory Server) → AM + IDM (can be parallel) → IG

The 04-deploy-forgeops.sh script handles this order automatically. For individual component deployment:

# Individual components (recommended for CRC with limited RAM)
DEPLOY_MODE=individual ./scripts/04-deploy-forgeops.sh
# Full stack (requires 32GB RAM)
DEPLOY_MODE=full ./scripts/04-deploy-forgeops.sh

Troubleshooting

Run the diagnostic script first:

./scripts/05-troubleshoot.sh

Common Errors and Fixes

SCC violation:

# Re-apply SCC (idempotent)
oc apply -f scc/forgerock-scc.yaml
oc adm policy add-scc-to-user forgerock-scc -z default -n forgerock

Image pull failure:

# Re-login to registry
REGISTRY=$(oc get route default-route -n openshift-image-registry -o jsonpath='{.spec.host}')
podman login -u $(oc whoami) -p $(oc whoami -t)$REGISTRY --tls-verify=false

Disk exhaustion:

# Clean failed pods
oc delete pod --field-selector=status.phase==Failed -n forgerock
oc delete pod --field-selector=status.phase==Evicted -n forgerock
oc adm prune images --confirm

Related Resources on IAMDevBox

Environment Variables

VariableDefaultDescription
NAMESPACEforgerockOpenShift project name
FQDNforgerock.apps-crc.testingBase FQDN for routes
FORGEOPS_DIR~/forgeopsPath to cloned ForgeOps repo
FORGEOPS_VERSION7.3.0ForgeOps release tag
CRC_CPUS8vCPU count for CRC
CRC_MEMORY16384Memory in MB for CRC
CRC_DISK_SIZE80Disk size in GB for CRC
PULL_SECRET~/Downloads/pull-secret.txtRed Hat pull secret path
DEPLOY_MODEindividualindividual or full

License

Scripts are MIT licensed. ForgeRock/PingOne Advanced Identity Cloud software requires a valid ForgeRock/Ping license.


Maintained by IAMDevBox.com — Identity and Access Management tutorials and tools.

About

Scripts for deploying ForgeRock ForgeOps on Red Hat OpenShift CRC. Fixes SCC violations, internal registry setup, and disk exhaustion issues.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages