diff --git a/data/app-delivery/README.org b/data/app-delivery/README.org index 96ad8a7..0ef851f 100644 --- a/data/app-delivery/README.org +++ b/data/app-delivery/README.org @@ -7,11 +7,11 @@ This repository contains a basic [[https://nextjs.org/][nextjs]] frontend design The frontend is used to serve workshop instructions for several workshops. -** Setting up a cluster for the workshop +* Setting up a cluster for the workshop The workshop expects an OpenShift 4.14 cluster with a few pre-requisites. -*** Add redhat-cop helm chart repository +** Add redhat-cop helm chart repository Required so the Gitea helm chart will be available for all users. @@ -29,7 +29,7 @@ EOF #+end_src -*** Install web terminal operator +** Install web terminal operator So our workshop participants don't need to install ~oc~ locally. @@ -50,7 +50,7 @@ EOF #+end_src -*** Create an operatorgroup for each user +** Create an operatorgroup for each user We want each user to be able to install the same operator so we can pre-create namespaces and seed them with OperatorGroups to reduce complexity. @@ -73,3 +73,34 @@ for user in $(seq 1 30); do oc adm policy add-role-to-user --namespace user"${user}" admin user"${user}" done #+end_src + + +** Install openshift gitops operator + +Each user will deploy their own argocd instance so we need to install the openshift gitops operator for all namespaces. + +#+begin_src bash +cat << EOF | oc apply --filename - +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: openshift-gitops-operator + namespace: openshift-gitops-operator +spec: + channel: latest + installPlanApproval: Automatic + name: openshift-gitops-operator + source: redhat-operators + sourceNamespace: openshift-marketplace + startingCSV: openshift-gitops-operator.v1.13.0 +EOF +#+end_src + + +** Scale cluster worker nodes + +We are going to have ~25 workshop attendees all deploying applications, let's ensure the cluster has enough capacity to handle it! + +#+begin_src bash +oc scale machineset cluster-xxz98-mk8x7-worker-ap-southeast-1b -n openshift-machine-api --replicas 10 +#+end_src diff --git a/data/workshop/exercise1.mdx b/data/workshop/exercise1.mdx index 07f223f..1aaabba 100644 --- a/data/workshop/exercise1.mdx +++ b/data/workshop/exercise1.mdx @@ -179,4 +179,4 @@ That's a quick introduction to the `oc` command line utility. Let's close our we | *Closing your web terminal* | -Well done, you've finished exercise 1! 🎉 +Well done, you're now ready to move on to Exercise 2 and deploy an application! 🎉 diff --git a/data/workshop/exercise2.mdx b/data/workshop/exercise2.mdx index c74c7db..5e998bf 100644 --- a/data/workshop/exercise2.mdx +++ b/data/workshop/exercise2.mdx @@ -120,4 +120,4 @@ How much cpu and memory is your ParksMap application currently using? | *Checking the ParksMap application resource usage* | -Well done, you've finished exercise 2! 🎉 +You've finished exercise 2, awesome! 🎉 diff --git a/data/workshop/exercise4.mdx b/data/workshop/exercise4.mdx index 1bcc64b..fca1514 100644 --- a/data/workshop/exercise4.mdx +++ b/data/workshop/exercise4.mdx @@ -130,4 +130,4 @@ Enter the `gitea` confirmation at the prompt and click **Delete**. If you now re If you have time, take a while to explore https://artifacthub.io/packages/search to see the kinds of applications available in the most popular publicly available Helm Chart repository Artifact Hub. -Well done, you've finished exercise 4! 🎉 +You've finished exercise 4, time to deploy an application with an Operator! 🎉 diff --git a/data/workshop/exercise6.mdx b/data/workshop/exercise6.mdx index 89150db..61bfdc8 100644 --- a/data/workshop/exercise6.mdx +++ b/data/workshop/exercise6.mdx @@ -91,4 +91,4 @@ To conclude, when issuing the `oc get pods` command, you will see that the build If you have time, take a while to understand how [Podman](https://developers.redhat.com/articles/2022/05/02/podman-basics-resources-beginners-and-experts) can be used to build container images on your device outside of an OpenShift cluster. -Well done, you've finished exercise 6! 🎉 +Awesome you've finished exercise 6! 🎉 diff --git a/data/workshop/exercise7.mdx b/data/workshop/exercise7.mdx new file mode 100644 index 0000000..d715c11 --- /dev/null +++ b/data/workshop/exercise7.mdx @@ -0,0 +1,29 @@ +--- +title: Optional - Deploying an application via gitops +exercise: 7 +date: '2024-07-25' +tags: ['openshift','containers','kubernetes','argocd','gitops'] +draft: false +authors: ['default'] +summary: "Keen to explore a more advanced deployment pattern?" +--- + + +Now that you've had a taste of most of the more basic deployment methods let's introduce the concept of [GitOps](https://www.redhat.com/en/topics/devops/what-is-gitops) and deploy an application using this more advanced approach. + +In simple terms GitOps uses Git repositories as a single source of truth to deliver applications or infrastructure as code. Whenever you merge or push code into a specifc Git branch in a repository, an GitOps continuous delivery tool such as [ArgoCD](https://argo-cd.readthedocs.io/en/stable) can then automatically sync that to one or more Kubernetes clusters. + + +|![argocd](/static/images/argocd-ui.gif) | +|:-------------------------------------------------------------------:| +| *ArgoCD user interface* | + + +For many organisations GitOps is a goal deployment methodology as application definitions, configurations, and environments should ideally be declarative and version controlled. Application deployment and lifecycle management should be automated, auditable, and easy to understand. + +Since 2021 OpenShift has included a fully supported [OpenShift GitOps](https://www.redhat.com/en/blog/announcing-openshift-gitops) operator, based on the upstream ArgoCD project. + +This operator has already been installed on your cluster so let's take it for a spin now! 🚀 + +## 7.1 - Log in to openshift gitops web interface + diff --git a/public/feed.xml b/public/feed.xml index 3200899..202c999 100644 --- a/public/feed.xml +++ b/public/feed.xml @@ -70,5 +70,15 @@ openshiftcontainerskubernetess2ishipwright + + https://rhdemo.win/workshop/exercise7 + Optional - Deploying an application via gitops + https://rhdemo.win/workshop/exercise7 + Keen to explore a more advanced deployment pattern? + Thu, 25 Jul 2024 00:00:00 GMT + jablair@redhat.com (Red Hat) + openshiftcontainerskubernetesargocdgitops + + diff --git a/public/static/images/argocd-ui.gif b/public/static/images/argocd-ui.gif new file mode 100644 index 0000000..374dd08 Binary files /dev/null and b/public/static/images/argocd-ui.gif differ