This repository contains scripts and resources to bootstrap an OpenShift cluster with essential components and configurations.
The scripts folder contains a script to install ArgoCD on your OpenShift cluster. Follow these steps to use it:
-
Ensure you have a running OpenShift cluster
-
Login to your cluster with cluster-admin privileges:
oc login <cluster-url> -u <admin-username> -p <admin-password>
or
oc login --token=<token> --server=<cluster-url>
-
Run the ArgoCD installation script:
cd scripts ./install-argocd.sh -
Verify the installation:
oc get pods -n openshift-gitops
After setting up ArgoCD, the next step is to install infrastructure components like operators:
-
Create your infrastructure resources under the
infrastructurefolder, organizing them by component type (e.g., operators, configs). -
Apply the infrastructure ApplicationSet to deploy all resources:
oc apply -f infrastructure/argo-apps/infra-appset.yaml
-
This will create an Argo CD application that automatically deploys all resources defined in the infrastructure folder.
-
Verify the deployment in the ArgoCD dashboard:
oc get route openshift-gitops-server -n openshift-gitops
The infra-appset.yaml file uses GitOps principles to discover and deploy all components defined in your infrastructure directory. It:
- Automatically syncs with a Git repository
- Creates namespaces as needed
- Deploys all discovered components under the infrastructure path
- Self-heals if configurations drift
This also includes installing operators which is defined below in detail.
Installing operators is very easy with this GitOps approach:
- Navigate to the
infrastructure/operators/<operator-name>directory - Update the
values.yamlfile with the required operator configuration - Commit and push your changes to the Git repository
- ArgoCD will automatically detect and apply these changes to your cluster
For example, a typical values.yaml file for an operator might look like this:
# Example values.yaml for OpenShift Virtualization operator
subscription:
channel: "stable"
installPlanApproval: "Automatic"
name: "kubevirt-hyperconverged"
source: "redhat-operators"
sourceNamespace: "openshift-marketplace"
# Additional operator configuration
operatorGroup:
create: true
targetNamespaces:
- "openshift-cnv"Simply update this file with the details of the operator you want to install, push to your Git repository, and the operator will be automatically deployed to your cluster.
For issues or questions, please open an issue in this repository.