Difficulty: beginner
Estimated Time: 10-20 minutes

In the previous scenario we covered the basics around GitOps with OpenShift, in this scenario we are going to explore Multi-cluster GitOps with OpenShift.

In case you haven't read it yet, we encourage you to read our blog post Multi-cluster Management with GitOps where you will learn the basics around managing multi-cluster infrastructures using GitOps with OpenShift.

This course will guide you through the deployment of a simple application to multiple clusters, customize the application by cluster and perform a canary deployment, all of this using GitOps with OpenShift.

We will use ArgoCD as our GitOps tool to deploy a simple application into our clusters, first we will deploy our application from the command line using the Argo CD CLI, after that we will re-deploy our application through the WebUI.

Congratulations! You just finished learning the basics on Multi-cluster GitOps with OpenShift. Feels good doesn't it?

We also have the federation-dev repository with demos, labs and examples around GitOps.

What's next?

At this point you are probably itching to keep working with OpenShift as you have had a glimpse of the power this can bring to your own applications. We are currently working on more advanced tutorials that will be hosted here but in the meantime, you can certainly run your own version of OpenShift or use a hosted model. You are welcome to use one of the following options:

Minishift

Minishift is a complete OpenShift environment which you can run on your local machine. The project supports Windows, OS X, and the Linux operating system. To find more about minishift, visit http://www.openshift.org/vm

oc cluster up

oc cluster up is a command provided by the oc client tool. It configures and runs an openshift environment inside of the native docker system for your operating system. It supports Windows, OS X, and the Linux operating systems. For more information, visit https://docs.okd.io/latest/getting_started/administrators.html

If you decide to try out oc cluster up, and you should, I would also suggest that you take a look at a wrapper script that was created to make life a little bit easier for you called oc cluster wrapper. This wrapper provides functionality such as the ability to have different profiles, persistent volume management and other great features. You can find more information at the official git repository at https://github.com/openshift-evangelists/oc-cluster-wrapper

OpenShift Online

The OpenShift team provides a hosted environment which includes a free starter plan which you can use to develop and test applications for OpenShift. You can find details for OpenShift Online and sign up at https://www.openshift.com/pricing/index.html

OpenShift Dedicated

You can also let Red Hat host an OpenShift instance for you on a public cloud. This is an ideal scenario for larger teams that do not want to deal with the operational aspects of running a full environment. To find out more, visit https://www.openshift.com/dedicated/

Multi-cluster GitOps with OpenShift

Step 1 of 5

Step 1 - Argo CD Introduction


What is Argo CD?

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.

How it works

Argo CD follows the GitOps pattern, a Git repository will be used as the source of truth for the definition of our applications.

Our applications will be defined using Kubernetes manifests in several ways:

  • Kustomize Applications
  • Helm Charts
  • Ksonnet Applications
  • Jsonnet Files
  • Plain directory of YAML/JSON Manifests
  • Any custom config management tool configured as a config management plugin

NOTE: In this lab we are going to use plain directories and yaml files to define our application.

Argo CD Under the Hood

Argo CD is implemented as a Kubernetes Controller which compares the desired application state defined in Git against the current, live state in Kubernetes.

In case there is a deviation from the state defined in Git, Argo CD will move the live state towards the desired state in Git. The remediation will be automatically or manual depending on the application configuration.

Resources