This guide helps you get started with ArgoCD and GitOps with OpenShift.
GitOps is a set of practices that leverages Git workflows to manage infrastructure and application configurations. By using Git repositories as the source of truth, it allows the DevOps team to store the entire state of the cluster configuration in Git so that the trail of changes are visible and auditable.
GitOps simplifies the propagation of infrastructure and application configuration changes across multiple clusters by defining your infrastructure and applications definitions as “code”.
- Ensure that the clusters have similar states for configuration, monitoring, or storage.
- Recover or recreate clusters from a known state.
- Create clusters with a known state.
- Apply or revert configuration changes to multiple clusters.
- Associate templated configuration with different environments.
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
It follows the GitOps pattern of using Git repositories as the source of truth for defining the desired application state.
It automates the deployment of the desired application states in the specified target environments. Application deployments can track updates to branches, tags, or pinned to a specific version of manifests at a Git commit.
This is a simple guide that takes you through the following steps:
- Exploring the OpenShift GitOps Operator
- Accessing Argo CD via CLI and Web UI
- Deploying A Sample Application
This OpenShift cluster will self-destruct in one hour.
In this course you learned about the OpenShift GitOps Operator and used it to install and configure Argo CD. You also deployed a sample application and explored what happens when you make an environment change that is not in git.
You can continue learning more about OpenShift and how to develop applications on the platform by completing other tutorials at https://learn.openshift.com.
For developer-related resources about OpenShift, visit https://developers.redhat.com/products/openshift/getting-started.
Run OpenShift Locally with CodeReady Containers
CodeReady Containers allows you to run a minimal, pre-configured OpenShift 4 cluster on your local machine. The project supports Windows 10, macOS, and Linux. To find out more or download CodeReady Containers, visit https://developers.redhat.com/products/codeready-containers/overview
Compare Hosted, Managed, or On Premises OpenShift
Learn more about the different OpenShift platform variants here: https://www.openshift.com/products
Browse the Documentation
If you want to learn about particular OpenShift concepts in more depth, visit the documentation: https://docs.openshift.com/container-platform/latest
Getting Started with ArgoCD and OpenShift GitOps Operator
Exploring the OpenShift GitOps Operator
Welcome! In this section we will be exploring the OpenShift GitOps Operator, what it installs, and how all the components fit together.
Logging in to the Cluster via Dashboard
Click the OpenShift Web Console tab to open the OpenShift Web UI.
You will then be able to login with admin permissions with:
Exploring the GitOps Operator Installation
The OpenShift GitOps Operator was installed via the Operator Hub. You can view this installation via the UI in the Administrator Perspective:
- Click on
Operatorsdrop down on the leftside navigation.
- Click on
- In the
Projectdropdown, make sure
You should see that the OpenShift GitOps Operator is installed.
Another way to view what was installed is to run the following:
oc get operators
This should have the following output.
NAME AGE openshift-gitops-operator.openshift-operators 25m
This Operator is a "meta" Operator that installs both Argo CD and the Tekton Operator. This is why you see both the GitOps Operator and the Tekton Operator listed.
Finally, you can verify the installation by running
oc get pods -n openshift-gitops
You should something similar to the following output.
NAME READY STATUS RESTARTS AGE cluster-b5798d6f9-p9mt5 1/1 Running 0 12m kam-69866d7c48-hr92f 1/1 Running 0 12m openshift-gitops-application-controller-0 1/1 Running 0 12m openshift-gitops-applicationset-controller-6447b8dfdd-2xqw2 1/1 Running 0 12m openshift-gitops-redis-74bd8d7d96-72fmd 1/1 Running 0 12m openshift-gitops-repo-server-c999f75d5-7jfc8 1/1 Running 0 12m openshift-gitops-server-6ff4fbc8f6-fpfdp 1/1 Running 0 7m47s
Once you see the all the pods running, you can proceed!