-
Notifications
You must be signed in to change notification settings - Fork 87
Add "Tutorials" sidebar and create new podtato-head tutorial #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
S-ayanide
merged 8 commits into
litmuschaos:master
from
suhyenim:tutorials/podtato-head
Jan 13, 2025
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a3f960c
feat: add podtato-head tutorial
suhyenim 7729b34
feat: update podtato-head tutorial
suhyenim ff06847
feat: add description and change tutorial to not use the template
suhyenim 925d292
fix: change sidebar label
suhyenim 049a68f
fix: change subheading
suhyenim 6737f5b
fix: change sidebar label
suhyenim fbee27e
feat: add tutorials overview
suhyenim e2b3b06
feat: update podtato-head description in overview
suhyenim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+182 KB
website/docs/assets/tutorials/podtato-head/select-target-application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
id: podtato-head | ||
title: Let's start with Podtato-head | ||
sidebar_label: Podtato-head | ||
--- | ||
|
||
--- | ||
|
||
 | ||
|
||
In this tutorial, you will inject a pod-delete fault into the `podtato-head-hat` pod of the sample microservices application, [podtato-head](https://github.com/cncf/podtato-head), and check if the pod remains available during the chaos. | ||
|
||
## What is Podtato-head? | ||
|
||
[Podtato-head](https://github.com/cncf/podtato-head) is a sample application provided by the [CNCF](https://github.com/cncf) designed for practicing Kubernetes and cloud-native environments. This application is composed of several microservices, including frontend, hat, left/right-arm, and left/right-leg. It serves as an environment for experimenting with fault recovery capabilities and testing the system resilience. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.18 or later (minimum 2 vCPUs, 8GB RAM, 10GB disk space) | ||
- A Persistent volume of 20GB | ||
- [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) | ||
|
||
## Install Podtato-head | ||
|
||
1. Install `podtato-head` in the `podtato-kubectl` namespace using the manifest file, which also creates the namespace | ||
|
||
```bash | ||
kubectl apply -f https://github.com/podtato-head/podtato-head-app/releases/download/v0.3.3/manifest.yaml | ||
``` | ||
|
||
2. Add a label to the `podtato-head-hat` deployment | ||
|
||
```bash | ||
kubectl label deployment podtato-head-hat app=podtato-head-hat -n podtato-kubectl | ||
``` | ||
|
||
## Install ChaosCenter | ||
|
||
1. Follow the [Getting-started](../getting-started/installation.md) guide to install ChaosCenter | ||
|
||
2. Access the ChaosCenter Dashboard | ||
|
||
 | ||
|
||
## Set up Environment | ||
|
||
1. Add a new environment | ||
- Environment Name: `local` | ||
- Environment Type: `Production` | ||
|
||
 | ||
|
||
## Enable Chaos Infrastructure | ||
|
||
1. Configure a new chaos infrastructure | ||
- Name: `local` | ||
- Chaos Components Installation: `Cluster-wide access` | ||
- Installation Location (Namespace): `litmus` | ||
- Service Account Name: `litmus` | ||
|
||
2. Deploy the new chaos infrastructure | ||
|
||
```bash | ||
kubectl apply -f local-litmus-chaos-enable.yml | ||
``` | ||
|
||
3. Wait until the status changes to `CONNECTED`. | ||
|
||
 | ||
|
||
## Set up Resilience Probe | ||
|
||
1. Select **CMD Probe** as the probe type | ||
|
||
2. Configure the probe properties and details | ||
- Name: `check-podtato-head-hat-pod` | ||
- Timeout: `10s` | ||
- Interval: `1s` | ||
- Attempt: `1` | ||
- Command: `kubectl get pods -n podtato-kubectl | grep podtato-head-hat | grep Running | wc -l` | ||
- Type: `Int` | ||
- Comparison Criteria: `>` | ||
- Value: `0` | ||
|
||
 | ||
|
||
## Run Chaos Experiment | ||
|
||
1. Start a new chaos experiment | ||
- Name: `podtato-head` | ||
- Chaos Infrastructure: `local` | ||
- Builder Type: `Blank Canvas` | ||
|
||
 | ||
|
||
2. Add the `pod-delete` chaos fault | ||
|
||
 | ||
|
||
3. Select the target application for the `pod-delete` chaos fault | ||
- App Kind: `deployment` | ||
- App Namespace: `podtato-kubectl` | ||
- App Label: `app=podtato-head-hat` | ||
|
||
 | ||
|
||
4. Add the probe to the `pod-delete` chaos fault | ||
- Probe Name: `check-podtato-head-hat-pod` | ||
- Mode: `EOT` | ||
|
||
 | ||
|
||
5. Save and run the chaos experiment | ||
|
||
## Check Chaos Experiment Results | ||
|
||
- Experiment Status: `COMPLETED` | ||
- Resilience Score: `100%` | ||
- Probe Result: `PASSED` | ||
|
||
 | ||
|
||
--- | ||
suhyenim marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Congratulations! 🎉 You've successfully completed the tutorial. | ||
Continue exploring more tutorials to enjoy your journey with LitmusChaos! 🚀 | ||
suhyenim marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+289 KB
.../versioned_docs/version-3.12.0/assets/tutorials/podtato-head/add-pod-delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+163 KB
website/versioned_docs/version-3.12.0/assets/tutorials/podtato-head/add-probe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+334 KB
...te/versioned_docs/version-3.12.0/assets/tutorials/podtato-head/blank-canvas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+219 KB
...ned_docs/version-3.12.0/assets/tutorials/podtato-head/chaoscenter-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91.7 KB
website/versioned_docs/version-3.12.0/assets/tutorials/podtato-head/connected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+289 KB
...rsioned_docs/version-3.12.0/assets/tutorials/podtato-head/experiment-result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+617 KB
...oned_docs/version-3.12.0/assets/tutorials/podtato-head/install-podtato-head.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+77.5 KB
...rsioned_docs/version-3.12.0/assets/tutorials/podtato-head/local-environment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+73.4 KB
...versioned_docs/version-3.12.0/assets/tutorials/podtato-head/new-environment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.7 KB
...te/versioned_docs/version-3.12.0/assets/tutorials/podtato-head/podtato-head.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+182 KB
...docs/version-3.12.0/assets/tutorials/podtato-head/select-target-application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+122 KB
...ite/versioned_docs/version-3.12.0/assets/tutorials/podtato-head/setup-probe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+137 KB
...ed_docs/version-3.12.0/assets/tutorials/podtato-head/start-chaos-experiment.png
Oops, something went wrong.
126 changes: 126 additions & 0 deletions
126
website/versioned_docs/version-3.12.0/tutorials/podtato-head.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
id: podtato-head | ||
title: Let's start with Podtato-head | ||
sidebar_label: Podtato-head | ||
--- | ||
|
||
--- | ||
|
||
 | ||
|
||
In this tutorial, you will inject a pod-delete fault into the `podtato-head-hat` pod of the sample microservices application, [podtato-head](https://github.com/cncf/podtato-head), and check if the pod remains available during the chaos. | ||
|
||
## What is Podtato-head? | ||
|
||
[Podtato-head](https://github.com/cncf/podtato-head) is a sample application provided by the [CNCF](https://github.com/cncf) designed for practicing Kubernetes and cloud-native environments. This application is composed of several microservices, including frontend, hat, left/right-arm, and left/right-leg. It serves as an environment for experimenting with fault recovery capabilities and testing the system resilience. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.18 or later (minimum 2 vCPUs, 8GB RAM, 10GB disk space) | ||
- A Persistent volume of 20GB | ||
- [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) | ||
|
||
## Install Podtato-head | ||
|
||
1. Install `podtato-head` in the `podtato-kubectl` namespace using the manifest file, which also creates the namespace | ||
|
||
```bash | ||
kubectl apply -f https://github.com/podtato-head/podtato-head-app/releases/download/v0.3.3/manifest.yaml | ||
``` | ||
|
||
2. Add a label to the `podtato-head-hat` deployment | ||
|
||
```bash | ||
kubectl label deployment podtato-head-hat app=podtato-head-hat -n podtato-kubectl | ||
``` | ||
|
||
## Install ChaosCenter | ||
|
||
1. Follow the [Getting-started](../getting-started/installation.md) guide to install ChaosCenter | ||
|
||
2. Access the ChaosCenter Dashboard | ||
|
||
 | ||
|
||
## Set up Environment | ||
|
||
1. Add a new environment | ||
- Environment Name: `local` | ||
- Environment Type: `Production` | ||
|
||
 | ||
|
||
## Enable Chaos Infrastructure | ||
|
||
1. Configure a new chaos infrastructure | ||
- Name: `local` | ||
- Chaos Components Installation: `Cluster-wide access` | ||
- Installation Location (Namespace): `litmus` | ||
- Service Account Name: `litmus` | ||
|
||
2. Deploy the new chaos infrastructure | ||
|
||
```bash | ||
kubectl apply -f local-litmus-chaos-enable.yml | ||
``` | ||
|
||
3. Wait until the status changes to `CONNECTED`. | ||
|
||
 | ||
|
||
## Set up Resilience Probe | ||
|
||
1. Select **CMD Probe** as the probe type | ||
|
||
2. Configure the probe properties and details | ||
- Name: `check-podtato-head-hat-pod` | ||
- Timeout: `10s` | ||
- Interval: `1s` | ||
- Attempt: `1` | ||
- Command: `kubectl get pods -n podtato-kubectl | grep podtato-head-hat | grep Running | wc -l` | ||
- Type: `Int` | ||
- Comparison Criteria: `>` | ||
- Value: `0` | ||
|
||
 | ||
|
||
## Run Chaos Experiment | ||
|
||
1. Start a new chaos experiment | ||
- Name: `podtato-head` | ||
- Chaos Infrastructure: `local` | ||
- Builder Type: `Blank Canvas` | ||
|
||
 | ||
|
||
2. Add the `pod-delete` chaos fault | ||
|
||
 | ||
|
||
3. Select the target application for the `pod-delete` chaos fault | ||
- App Kind: `deployment` | ||
- App Namespace: `podtato-kubectl` | ||
- App Label: `app=podtato-head-hat` | ||
|
||
 | ||
|
||
4. Add the probe to the `pod-delete` chaos fault | ||
- Probe Name: `check-podtato-head-hat-pod` | ||
- Mode: `EOT` | ||
|
||
 | ||
|
||
5. Save and run the chaos experiment | ||
|
||
## Check Chaos Experiment Results | ||
|
||
- Experiment Status: `COMPLETED` | ||
- Resilience Score: `100%` | ||
- Probe Result: `PASSED` | ||
|
||
 | ||
|
||
--- | ||
|
||
Congratulations! 🎉 You've successfully completed the tutorial. | ||
Continue exploring more tutorials to enjoy your journey with LitmusChaos! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.