Skip to content

sohidurgmail/openshift-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RHACM + GitOps Bootstrap Repository

This repository bootstraps an OpenShift cluster with the following components:

  • OpenShift GitOps (ArgoCD)
  • Red Hat Advanced Cluster Management (RHACM)
  • Governance Policies
  • Extra Operators (example: cert-manager)

The repo is structured with base, overlays, and bootstrap folders to support GitOps-based cluster configuration.


πŸ“‚ Repository Layout

.
β”œβ”€β”€ base
β”‚   β”œβ”€β”€ gitops/          # GitOps Operator, ArgoCD Instance
β”‚   β”œβ”€β”€ rhacm/           # Advanced Cluster Management Operator + Hub
β”‚   β”œβ”€β”€ policies/        # Example policies (with Placement + Binding)
β”‚   └── cert-manager/    # Example extra operator (cert-manager)
β”‚
β”œβ”€β”€ overlays
β”‚   └── dev-cluster/     # Overlay for dev cluster (includes GitOps, RHACM, Policies, Cert-Manager)
β”‚
β”œβ”€β”€ bootstrap
β”‚   β”œβ”€β”€ 00-gitops-subscription.yaml   # Bootstrap GitOps operator
β”‚   β”œβ”€β”€ 01-argocd-instance.yaml       # Deploy ArgoCD instance
β”‚   β”œβ”€β”€ 02-root-applicationset.yaml   # Root ApplicationSet for GitOps, RHACM, Policies, Extras
β”‚   β”œβ”€β”€ bootstrap.sh                  # Helper script to automate bootstrap
β”‚   └── gitops-creds.yaml             # Git credentials for ArgoCD
β”‚
└── README.md

πŸš€ Bootstrap Process

1. Deploy OpenShift GitOps Operator

oc apply -f bootstrap/00-gitops-subscription.yaml

Wait until the GitOps operator CSV is in Succeeded phase:

oc get csv -n openshift-operators | grep gitops

2. Deploy ArgoCD Instance

oc apply -f bootstrap/01-argocd-instance.yaml

Wait until the ArgoCD instance is available:

oc get pods -n openshift-gitops

3. Deploy the Root ApplicationSet

Once GitOps is ready, deploy the ApplicationSet that generates all ArgoCD Applications:

# Apply the ApplicationSet
oc apply -f bootstrap/02-root-applicationset.yaml -n openshift-gitops

# Verify ApplicationSet is created
oc get applicationsets -n openshift-gitops

# Check generated ArgoCD Applications
oc get applications.argoproj.io -n openshift-gitops

By default, the ApplicationSet will create the following apps for the dev-cluster overlay:

  • dev-cluster-gitops
  • dev-cluster-rhacm
  • dev-cluster-policies
  • dev-cluster-cert-manager

You can control which components are deployed by editing 02-root-applicationset.yaml.

4. Bootstrap with Script (Optional)

You can run everything with the helper script:

./bootstrap/bootstrap.sh --all

Supported options:

  • --gitops-only β†’ Deploy only GitOps
  • --rhacm-only β†’ Deploy only RHACM
  • --policies-only β†’ Deploy only Policies
  • --all β†’ Deploy GitOps, RHACM, Policies, and extras

πŸ› οΈ Extending with New Operators

To add a new operator (example: ServiceMesh, Logging, etc.):

  1. Create a folder in base/<operator-name>
  2. Add namespace.yaml, operatorgroup.yaml, subscription.yaml
  3. Update 02-root-applicationset.yaml to include it as a component

βœ… Verification

Check Application status in ArgoCD:

oc get applications.argoproj.io -n openshift-gitops

Check RHACM components:

oc get pods -n open-cluster-management

Check Policies:

oc get policies -A

Check Cert-Manager:

oc get pods -n cert-manager

πŸ“Œ Notes

  • Sync waves (argocd.argoproj.io/sync-wave) ensure proper install order:
    • GitOps β†’ RHACM β†’ Policies β†’ Extras
  • Policies require a ManagedClusterSetBinding and Placement to match clusters
  • You can scale this pattern to multiple clusters by adding overlays

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages