Validated Patterns

Verifying the MultiCloud GitOps pattern

The MultiCloud GitOps is designed to be an entrypoint into the Validated Patterns framework. The pattern includes two applications that can help you verify the installation. The hello-world application is a simple web page that prints "Hello World!" and the config-demo application is a simple web page that prints a secret that is loaded into the vault.

Verify the applications are successfully deployed by following this procedure.

Procedure
  1. Check the Red Hat OpenShift GitOps Operator is installed.

  2. Launch the Hub OpenShift ArgoCD console from nines menu in the top right of the OpenShift console and verify the applications report the status Healthy and Synched.

Verify that the hello-world application deployed successfully as follows:

  1. In the OpenShift console go to the NetworkingRoutes menu options.

  2. From the Project: drop down select the hello-world project.

  3. Click the Location URL. This should reveal the following:

    Hello World!
    
    Hub Cluster domain is 'apps.aws-hub-cluster.openshift.org'
    Pod is running on Local Cluster Domain 'apps.aws-hub-cluster.openshift.org'

Verify that the config-demo application deployed successfully as follows:

  1. In the OpenShift console go to the NetworkingRoutes menu options.

  2. From the Project: drop down select the config-demo project.

  3. Click the Location URL. This should reveal the following:

    Hub Cluster domain is 'apps.aws-hub-cluster.openshift.org'
    Pod is running on Local Cluster Domain 'apps.aws-hub-cluster.openshift.org'
    The secret is `secret`

Customize the web page

Make a small change to the hello-world application to see how the GitOps framework applies the change.

Procedure
  1. Edit charts/all/hello-world/templates/hello-world-cm.yaml adding the line This is a patched version via git` as shown below:

    </head>
      <body>
        <h1>Hello World!</h1>
    +   <h1>This is a patched version via git</h1>
        <br/>
        <h2>
        Hub Cluster domain is '{{ .Values.global.hubClusterDomain }}' <br>
  2. Add the changes to the staging area by running the following command:

    $ git add -u
  3. Commit this change by running the following command:

    $ git commit -a -m "test a change"
  4. Push the change to the remote repository by running the following command:

    $ git push origin my-branch

ArgoCD will apply the change to the hello-world application.

Verify that the update to the hello-world application is successfully applied as follows:

  1. In the OpenShift console go to the NetworkingRoutes menu options.

  2. From the Project: drop down select the hello-world project.

  3. Click the Location URL. This should reveal the following:

    Hello World!
    
    This is a patched version via git
    
    Hub Cluster domain is 'apps.aws-hub-cluster.openshift.org'
    Pod is running on Local Cluster Domain 'apps.aws-hub-cluster.openshift.org'

Summary

You did it! You have completed the deployment of the MultiCloud GitOps pattern and you made a small local change and applied it using GitOps.

Hopefully you are getting ideas of how you can take advantage of our GitOps framework to deploy and manage your applications.

For more information about Validated Patterns visit our website.