Skip to content

Commit

Permalink
chore: Updates fault docs for 3.0.0 (#4209)
Browse files Browse the repository at this point in the history
* updates fault docs for 3.0.0

Signed-off-by: neelanjan00 <[email protected]>
  • Loading branch information
neelanjan00 authored Dec 13, 2023
1 parent 8b0fd42 commit bb44094
Show file tree
Hide file tree
Showing 56 changed files with 95 additions and 144 deletions.
2 changes: 1 addition & 1 deletion demo/sample-applications/sock-shop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Chaos experiments on sock-shop app with grafana dashboard to monitor it.
- Install the chaos experiments in admin(litmus) namespace

```
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.6.1?file=charts/generic/experiments.yaml -n litmus
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.6.1?file=faults/generic/experiments.yaml -n litmus
```

- Install the chaos experiment metrics exporter and chaos event exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
??? info "Verify the prerequisites"
- Ensure that Kubernetes Version > 1.16
- Ensure that the Litmus Chaos Operator is running by executing <code>kubectl get pods</code> in operator namespace (typically, <code>litmus</code>).If not, install from <a href="https://v1-docs.litmuschaos.io/docs/getstarted/#install-litmus">here</a>
- Ensure that the <code>aws-ssm-chaos-by-id</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=charts/aws-ssm/aws-ssm-chaos-by-id/experiment.yaml">here</a>
- Ensure that the <code>aws-ssm-chaos-by-id</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=faults/aws/aws-ssm-chaos-by-id/fault.yaml">here</a>
- Ensure that you have the required AWS access and your target EC2 instances have attached an IAM instance profile. To know more checkout [Systems Manager Docs](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-launch-managed-instance.html).
- Ensure to create a Kubernetes secret having the AWS access configuration(key) in the `CHAOS_NAMESPACE`. A sample secret file looks like:

Expand Down Expand Up @@ -50,7 +50,6 @@

??? note "View the Minimal RBAC permissions"

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/aws-ssm/aws-ssm-chaos-by-id/rbac.yaml yaml)
```yaml
---
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
??? info "Verify the prerequisites"
- Ensure that Kubernetes Version > 1.16
- Ensure that the Litmus Chaos Operator is running by executing <code>kubectl get pods</code> in operator namespace (typically, <code>litmus</code>).If not, install from <a href="https://v1-docs.litmuschaos.io/docs/getstarted/#install-litmus">here</a>
- Ensure that the <code>aws-ssm-chaos-by-tag</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=charts/aws-ssm/aws-ssm-chaos-by-tag/experiment.yaml">here</a>
- Ensure that the <code>aws-ssm-chaos-by-tag</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=faults/aws/aws-ssm-chaos-by-tag/fault.yaml">here</a>
- Ensure that you have the required AWS access and your target EC2 instances have attached an IAM instance profile. To know more checkout [Systems Manager Docs](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-launch-managed-instance.html).
- Ensure to create a Kubernetes secret having the AWS access configuration(key) in the `CHAOS_NAMESPACE`. A sample secret file looks like:

Expand Down Expand Up @@ -50,7 +50,6 @@

??? note "View the Minimal RBAC permissions"

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/aws-ssm/aws-ssm-chaos-by-tag/rbac.yaml yaml)
```yaml
---
apiVersion: v1
Expand Down
3 changes: 1 addition & 2 deletions mkdocs/docs/experiments/categories/aws/ebs-loss-by-id.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Tests deployment sanity (replica availability & uninterrupted service) and recov
??? info "Verify the prerequisites"
- Ensure that Kubernetes Version > 1.16
- Ensure that the Litmus Chaos Operator is running by executing <code>kubectl get pods</code> in operator namespace (typically, <code>litmus</code>).If not, install from <a href="https://v1-docs.litmuschaos.io/docs/getstarted/#install-litmus">here</a>
- Ensure that the <code>ebs-loss-by-id</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=charts/kube-aws/ebs-loss-by-id/experiment.yaml">here</a>
- Ensure that the <code>ebs-loss-by-id</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=faults/aws/ebs-loss-by-id/fault.yaml">here</a>
- Ensure that you have sufficient AWS access to attach or detach an ebs volume for the instance.
- Ensure to create a Kubernetes secret having the AWS access configuration(key) in the `CHAOS_NAMESPACE`. A sample secret file looks like:

Expand Down Expand Up @@ -49,7 +49,6 @@ Tests deployment sanity (replica availability & uninterrupted service) and recov

??? note "View the Minimal RBAC permissions"

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/ebs-loss-by-id/rbac.yaml yaml)
```yaml
---
apiVersion: v1
Expand Down
3 changes: 1 addition & 2 deletions mkdocs/docs/experiments/categories/aws/ebs-loss-by-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Tests deployment sanity (replica availability & uninterrupted service) and recov
??? info "Verify the prerequisites"
- Ensure that Kubernetes Version > 1.16
- Ensure that the Litmus Chaos Operator is running by executing <code>kubectl get pods</code> in operator namespace (typically, <code>litmus</code>).If not, install from <a href="https://v1-docs.litmuschaos.io/docs/getstarted/#install-litmus">here</a>
- Ensure that the <code>ebs-loss-by-tag</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=charts/kube-aws/ebs-loss-by-tag/experiment.yaml">here</a>
- Ensure that the <code>ebs-loss-by-tag</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=faults/aws/ebs-loss-by-tag/fault.yaml">here</a>
- Ensure that you have sufficient AWS access to attach or detach an ebs volume for the instance.
- Ensure to create a Kubernetes secret having the AWS access configuration(key) in the `CHAOS_NAMESPACE`. A sample secret file looks like:

Expand Down Expand Up @@ -49,7 +49,6 @@ Tests deployment sanity (replica availability & uninterrupted service) and recov

??? note "View the Minimal RBAC permissions"

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/ebs-loss-by-tag/rbac.yaml yaml)
```yaml
---
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Introduction

- It causes termination of an EC2 instance by instance ID or list of instance IDs before bringing it back to running state after the specified chaos duration.
- It causes stopping of an EC2 instance by instance ID or list of instance IDs before bringing it back to running state after the specified chaos duration.
- It helps to check the performance of the application/process running on the ec2 instance.
When the MANAGED_NODEGROUP is enable then the experiment will not try to start the instance post chaos instead it will check of the addition of the new node instance to the cluster.

!!! tip "Scenario: Terminate EC2 Instance"
![EC2 Terminate By ID](../../images/ec2-terminate.png)
!!! tip "Scenario: Stop EC2 Instance"
![EC2 Stop By ID](../../images/ec2-stop.png)

## Uses

Expand All @@ -17,7 +17,7 @@ When the MANAGED_NODEGROUP is enable then the experiment will not try to start t
??? info "Verify the prerequisites"
- Ensure that Kubernetes Version > 1.16
- Ensure that the Litmus Chaos Operator is running by executing <code>kubectl get pods</code> in operator namespace (typically, <code>litmus</code>).If not, install from <a href="https://v1-docs.litmuschaos.io/docs/getstarted/#install-litmus">here</a>
- Ensure that the <code>ec2-terminate-by-id</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=charts/kube-aws/ec2-terminate-by-id/experiment.yaml">here</a>
- Ensure that the <code>ec2-stop-by-id</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=faults/aws/ec2-stop-by-id/fault.yaml">here</a>
- Ensure that you have sufficient AWS access to stop and start an ec2 instance.
- Ensure to create a Kubernetes secret having the AWS access configuration(key) in the `CHAOS_NAMESPACE`. A sample secret file looks like:

Expand Down Expand Up @@ -54,24 +54,23 @@ When the MANAGED_NODEGROUP is enable then the experiment will not try to start t

??? note "View the Minimal RBAC permissions"

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/ec2-terminate-by-id/rbac.yaml yaml)
```yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ec2-terminate-by-id-sa
name: ec2-stop-by-id-sa
namespace: default
labels:
name: ec2-terminate-by-id-sa
name: ec2-stop-by-id-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ec2-terminate-by-id-sa
name: ec2-stop-by-id-sa
labels:
name: ec2-terminate-by-id-sa
name: ec2-stop-by-id-sa
app.kubernetes.io/part-of: litmus
rules:
# Create and monitor the experiment & helper pods
Expand Down Expand Up @@ -110,17 +109,17 @@ When the MANAGED_NODEGROUP is enable then the experiment will not try to start t
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ec2-terminate-by-id-sa
name: ec2-stop-by-id-sa
labels:
name: ec2-terminate-by-id-sa
name: ec2-stop-by-id-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ec2-terminate-by-id-sa
name: ec2-stop-by-id-sa
subjects:
- kind: ServiceAccount
name: ec2-terminate-by-id-sa
name: ec2-stop-by-id-sa
namespace: default
```
Expand Down Expand Up @@ -164,7 +163,7 @@ When the MANAGED_NODEGROUP is enable then the experiment will not try to start t
</tr>
<tr>
<td> CHAOS_INTERVAL </td>
<td> The interval (in sec) between successive instance termination.</td>
<td> The interval (in sec) between successive instance stop.</td>
<td> Defaults to 30s </td>
</tr>
<tr>
Expand Down Expand Up @@ -196,19 +195,19 @@ It contains comma separated list of instances IDs subjected to ec2 stop chaos. I

Use the following example to tune this:

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/aws/ec2-terminate-by-id/instance-id.yaml yaml)
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/aws/ec2-stop-by-id/instance-id.yaml yaml)
```yaml
# contains the instance id, to be terminated/stopped
# contains the instance id to be stopped
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: ec2-terminate-by-id-sa
chaosServiceAccount: ec2-stop-by-id-sa
experiments:
- name: ec2-terminate-by-id
- name: ec2-stop-by-id
spec:
components:
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Introduction

- It causes termination of an EC2 instance by tag before bringing it back to running state after the specified chaos duration.
- It causes stopping of an EC2 instance by tag before bringing it back to running state after the specified chaos duration.
- It helps to check the performance of the application/process running on the ec2 instance.
When the MANAGED_NODEGROUP is enable then the experiment will not try to start the instance post chaos instead it will check of the addition of the new node instance to the cluster.

!!! tip "Scenario: Terminate EC2 Instance"
![EC2 Terminate By Tag](../../images/ec2-terminate.png)
!!! tip "Scenario: Stop EC2 Instance"
![EC2 Stop By Tag](../../images/ec2-stop.png)

## Uses

Expand All @@ -17,7 +17,7 @@ When the MANAGED_NODEGROUP is enable then the experiment will not try to start t
??? info "Verify the prerequisites"
- Ensure that Kubernetes Version > 1.16
- Ensure that the Litmus Chaos Operator is running by executing <code>kubectl get pods</code> in operator namespace (typically, <code>litmus</code>).If not, install from <a href="https://v1-docs.litmuschaos.io/docs/getstarted/#install-litmus">here</a>
- Ensure that the <code>ec2-terminate-by-tag</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=charts/kube-aws/ec2-terminate-by-tag/experiment.yaml">here</a>
- Ensure that the <code>ec2-stop-by-tag</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=faults/aws/ec2-stop-by-tag/fault.yaml">here</a>
- Ensure that you have sufficient AWS access to stop and start an ec2 instance.
- Ensure to create a Kubernetes secret having the AWS access configuration(key) in the `CHAOS_NAMESPACE`. A sample secret file looks like:

Expand Down Expand Up @@ -54,24 +54,23 @@ When the MANAGED_NODEGROUP is enable then the experiment will not try to start t

??? note "View the Minimal RBAC permissions"

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/ec2-terminate-by-tag/rbac.yaml yaml)
```yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ec2-terminate-by-tag-sa
name: ec2-stop-by-tag-sa
namespace: default
labels:
name: ec2-terminate-by-tag-sa
name: ec2-stop-by-tag-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ec2-terminate-by-tag-sa
name: ec2-stop-by-tag-sa
labels:
name: ec2-terminate-by-tag-sa
name: ec2-stop-by-tag-sa
app.kubernetes.io/part-of: litmus
rules:
# Create and monitor the experiment & helper pods
Expand Down Expand Up @@ -110,17 +109,17 @@ When the MANAGED_NODEGROUP is enable then the experiment will not try to start t
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ec2-terminate-by-tag-sa
name: ec2-stop-by-tag-sa
labels:
name: ec2-terminate-by-tag-sa
name: ec2-stop-by-tag-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ec2-terminate-by-tag-sa
name: ec2-stop-by-tag-sa
subjects:
- kind: ServiceAccount
name: ec2-terminate-by-tag-sa
name: ec2-stop-by-tag-sa
namespace: default
```
Expand Down Expand Up @@ -201,7 +200,7 @@ It will stop a random single ec2 instance with the given `INSTANCE_TAG` tag and

Use the following example to tune this:

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/aws/ec2-terminate-by-tag/instance-tag.yaml yaml)
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/aws/ec2-stop-by-tag/instance-tag.yaml yaml)
```yaml
# target the ec2 instances with matching tag
apiVersion: litmuschaos.io/v1alpha1
Expand All @@ -213,7 +212,7 @@ spec:
annotationCheck: "false"
chaosServiceAccount: ec2-terminate-by-tag-sa
experiments:
- name: ec2-terminate-by-tag
- name: ec2-stop-by-tag
spec:
components:
env:
Expand All @@ -233,7 +232,7 @@ It will stop the `INSTANCE_AFFECTED_PERC` percentage of ec2 instances with the g

Use the following example to tune this:

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/aws/ec2-terminate-by-tag/instance-affected-percentage.yaml yaml)
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/aws/ec2-stop-by-tag/instance-affected-percentage.yaml yaml)
```yaml
# percentage of ec2 instances, needs to terminate with provided tags
apiVersion: litmuschaos.io/v1alpha1
Expand All @@ -243,9 +242,9 @@ metadata:
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: ec2-terminate-by-tag-sa
chaosServiceAccount: ec2-stop-by-tag-sa
experiments:
- name: ec2-terminate-by-tag
- name: ec2-stop-by-tag
spec:
components:
env:
Expand Down
3 changes: 1 addition & 2 deletions mkdocs/docs/experiments/categories/azure/azure-disk-loss.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
??? info "Verify the prerequisites"
- Ensure that Kubernetes Version > 1.16
- Ensure that the Litmus Chaos Operator is running by executing <code>kubectl get pods</code> in operator namespace (typically, <code>litmus</code>).If not, install from <a href="https://v1-docs.litmuschaos.io/docs/getstarted/#install-litmus">here</a>
- Ensure that the <code>azure-disk-loss</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=charts/azure/azure-disk-loss/experiment.yaml">here</a>
- Ensure that the <code>azure-disk-loss</code> experiment resource is available in the cluster by executing <code>kubectl get chaosexperiments</code> in the desired namespace. If not, install from <a href="https://hub.litmuschaos.io/api/chaos/master?file=faults/azure/azure-disk-loss/fault.yaml">here</a>
- Ensure that you have sufficient Azure access to detach and attach a disk.
- We will use azure [ file-based authentication ](https://docs.microsoft.com/en-us/azure/developer/go/azure-sdk-authorization#use-file-based-authentication) to connect with the instance using azure GO SDK in the experiment. For generating auth file run `az ad sp create-for-rbac --sdk-auth > azure.auth` Azure CLI command.
- Ensure to create a Kubernetes secret having the auth file created in the step in `CHAOS_NAMESPACE`. A sample secret file looks like:
Expand Down Expand Up @@ -57,7 +57,6 @@

??? note "View the Minimal RBAC permissions"

[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/azure/azure-disk-loss/rbac.yaml yaml)
```yaml
---
apiVersion: v1
Expand Down
Loading

0 comments on commit bb44094

Please sign in to comment.