Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@ As you embark on these exercises, you're set to learn key practices in modern ap

By the end of these exercises, you'll have a solid foundation in deploying and managing Kubernetes applications using Argo CD.

> Hint to advanced topics that are beneficial to expert users. Like:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be towards the end right? Probably better if the beginning is not too cluttered right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe just as a follow up. Anyway I wanted to point out that the Kutespace is not only useful for novices but for any knowledge level. It can be used as an "Argo CD dev/staging environment".

> * Develop Argo CD App Structure & test features in isolation
> * Developing & validating [Plugins](https://argo-cd.readthedocs.io/en/stable/operator-manual/config-management-plugins/)
> * [UI Customization](https://argo-cd.readthedocs.io/en/stable/operator-manual/ui-customization/) etc. without impacting the (usually) just one live Argo CD instance.
> * Notifications
> * all other advanced features

## Getting Started

> Link to https://codespaces.new/kutespaces/argocd
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

people get a little confused when they never used a codespace. Whats your preferred way to intruct them step by step?

  1. go to profile->settings->default editor to vs code, then open link https://codespaces.new/kutespaces/argocd
  2. go to top right corner, open codespace, wait for it to load, go to top left corner, press open in codespace
  3. open https://codespaces.new/kutespaces/argocd, wait for it to set up, then go to top left corner and open in vscode

3 sounds best now that I think about it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opening the Codespace in the browser first comes with a risk. If the user forgets to open in VSCode, it almost works fine except for the ingress. I wish they added the dropdown to choose where to open it to the initial step.
I'm for (1) or (3) with no strong preference.

btw: As soon as the Codespace is created, you can specify it in the URL: https://github.com/codespaces/silver-space-fishstick-j6j7vwwjcqrwp?editor=vscode


To begin, launch a new Codespace directly from this repository's GitHub page. The `Code` button is located in the topright corner where you would usually copy the URL to clone the repository.

<img src='docs/images/start-codespace.jpg' width='50%'>
Expand Down Expand Up @@ -79,9 +88,16 @@ Here's a hands-on exercise to illustrate the power of GitOps:

1. Open the podinfo app and observe its default jade green background.
2. Dive into the `manifests/podinfo/resources/deployment.yaml`` file to see its configuration. Locate the `PODINFO_UI_COLOR` environment variable and update its value to the golden hue of `#FFD700`.

> Connecting the Git Repo Server with the Argo CD webhook would be user useful here to avoid confusion and automagically apply the updates.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webhook is actually quite hard because you need to send a certain payload with all the files that changed. I found a previous error now in adjusting the poll frequency. It works now and I adjusted the poll frequency to 5s now. That should be sufficient.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5s polling is good for now 🫡


3. add, commit, and push your changes to the git server. Remember to execute these git operations within the `./manifests` directory. This is a nested git repository.
4. Run watch `kubectl get pods -n podinfo` to witness a rolling update in action. You'll see Kubernetes orchestrating a seamless transition by spinning up a new pod before retiring the old one.

4. Run `watch kubectl get pods -n podinfo` to witness a rolling update in action. You'll see Kubernetes orchestrating a seamless transition by spinning up a new pod before retiring the old one.
5. Wait up to three minutes or refresh the podinfo application in the Argo CD dashboard.

> Telling the user to wait 3 mins is super lame… I'd just say "click refresh", or configure Argo CD to poll very often like 30s. Should be cheap inside the codespace.

6. Revel in your success as the podinfo app's background transforms to a brilliant gold. Here's a sneak peek of what to expect:


Expand All @@ -92,12 +108,17 @@ Here's a hands-on exercise to illustrate the power of GitOps:
The beauty of GitOps lies in its ability to seamlessly reflect your git repository's state onto your cluster. Should you decide that the golden glimmer of podinfo doesn't quite suit your taste, reverting is a breeze:

1. Whip open your terminal and run `git log` to retrieve the hash of the commit you wish to undo.

> Connect this with the Gitlens extension, e.g. link directly to Git history? Maybe too fancy for now.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhh I'd like to not add that complexity. especially if users didn't use gitlens before it may even be confusing and add cognitive load (it does for me). I think for this single command git log does its job well. However, I could add the git revert HEAD~n to allow the user to undo n commits. Happens sometimes that users did 2 commits e.g. they made an error first or changed color 2 times.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably overengineered


2. Swiftly revert the change with `git revert <COMMIT HASH>` followed by `git push` to update the repository.
3. Nudge the process along by refreshing the podinfo application within the Argo CD dashboard.
4. Keep an eye on the transition by running `watch kubectl get pods -n podinfo`. This command lets you observe in real-time as Kubernetes orchestrates the replacement of the pod.
5. Be greeted once more by the familiar, soothing jade green background of podinfo as the changes take hold.

### Exercise 5: Unterstand GitOps End-to-End
### Exercise 5: Understand GitOps End-to-End
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhh I definitely need to make the section more engaging.
Not sure about the order. I think this should still be located before deploying your own application so that you understand whats going on and then try it yourself when deploying your own application so that it clicks. I noticed that without this chapter users manage to do the tasks without learning anything because they can just follow instructions 1:1.

I think I should move this after game-2048 but still leave it before deploying your own application and before deploying the real world example.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure if most users are interested in the custom SSH or if they are overwhelmed by it. We must explain GitOps as a concept though. Maybe we can clear up some of the Codespace-specific explanations and leave it generic.


> Move this to the end? This is the most complex part and while it's super useful to know the components, the normal workflow is just GitHub, so most things are not directly applicable

This section explains the GitOps workflow we've used to update a Kubernetes resource YAML file, push the change to our git server, and have it automatically applied. Take your time to understand the file structure and the interaction of the components.

Expand Down