---
title: Demo Script
weight: 30
aliases: /multicloud-gitops-sgx-hello-world/demo/
---

include::modules/comm-attributes.adoc[]
:toc:
:imagesdir: /images
:_content-type: REFERENCE

[id="demo-intro"]

== Introduction
The multicloud gitops pattern is designed to be an entrypoint into the Validated Patterns framework. Demo, accessible within the pattern, contains two applications `config-demo` and `hello-world` to show the basic configuration and execution examples. For more information on Validated Patterns visit our link:/[documentation site].

[id="demo-objectives"]

== Objectives

In this demo you will complete the following:

* Prepare your local workstation
* Deploy the pattern
* Extend the pattern with a small tweak

[id="getting-started"]

== Getting Started

* Make sure you have met all the link:/learn/quickstart/#installation_prerequisites[installation prerequisites]
* Follow the link:../mcg-sgx-hello-world-getting-started[Getting Started Guide] to ensure that you have met all of the prerequisites 

[NOTE]
====
This demo begins after `./pattern.sh make install` has been executed
====

[id="demo"]

== Demo

Now that we have deployed the pattern onto our cluster, with `origin` pointing to your fork and using `my-branch` as the name of the used branch, we can begin to discover what has happened.
You should be able to click on the nine-box and see the following entries:

image:multicloud-gitops-sgx-hello-world/nine-box.png[]

If you now click on the "Hub ArgoCD" menu entry you will be taken to the ArgoCD instance with all the applications.

image:multicloud-gitops-sgx-hello-world/hub-argocd.png[]



[id="secrets"]

=== Secrets loading

By default in the MultiCloud GitOps pattern the secrets get loaded automatically via an out of band process inside the vault running in the OCP cluster. This means that running `./pattern.sh make install` will also call the `load-secrets` makefile target.
This `load-secrets` target will look for a yaml file describing the secrets to be loaded into vault and in case it cannot find one it will use the `values-secret.yaml.template` file in the git repo to try and generate random secrets.

Let's copy the template to our home folder and reload the secrets:
[source,terminal]
cp ./values-secret.yaml.template ~/values-secret-multicloud-gitops.yaml
./pattern.sh make load-secrets

At this point if the `config-demo` application was not green already it should become green in the ArgoCD user interface.

[id="verify"]

=== Verify the test web pages

If you now click on the `Routes` in the `Networking` menu entry you will see the following network routes:

image:multicloud-gitops-sgx-hello-world/network-routes.png[]

Clicking on the `hello-world` application should show a small demo app that prints "Hello World!":

image:multicloud-gitops-sgx-hello-world/hello-world.png[]

Once the secrets are loaded correctly inside the vault, clicking on the `config-demo` route should display a small application where said secret is shown:

image:multicloud-gitops-sgx-hello-world/config-demo.png[]

=== Make a small change to the test web pages

Now we can try and tweak the hello-world application and add the below line in
the `charts/all/hello-world/templates/hello-world-cm.yaml` file:
[source,patch]
diff --git a/charts/all/hello-world/templates/hello-world-cm.yaml b/charts/all/hello-world/templates/hello-world-cm.yaml
index e59561ca..bd416bc6 100644
--- a/charts/all/hello-world/templates/hello-world-cm.yaml
+++ b/charts/all/hello-world/templates/hello-world-cm.yaml
@@ -14,6 +14,7 @@ data:
     	</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>


Once we commit the above change via `git commit -a -m "test a change"` and run
`git push origin my-branch` we will be able to observe argo applying the above
change:

image:multicloud-gitops-sgx-hello-world/config-demo-patched.png[]

[id="summary"]

== Summary

You did it! You have completed the deployment of the MultiCloud GitOps pattern
and you made a small local change and applied it via 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 on Validated Patterns visit our
link:https://validatedpatterns.io/[website]
