--- title: Demo Script weight: 60 aliases: /multicloud-gitops-sgx/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-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/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/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/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.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/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: