Skip to content
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

chore: Updates fault docs for 3.0.0 #4209

Merged
merged 8 commits into from
Dec 13, 2023
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
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
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion 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
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,24 @@ 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)
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/ec2-stop-by-id/rbac.yaml yaml)
neelanjan00 marked this conversation as resolved.
Show resolved Hide resolved
```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 +110,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 +164,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 +196,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"
neelanjan00 marked this conversation as resolved.
Show resolved Hide resolved
![EC2 Stop By Tag](../../images/ec2-stop.png)
ispeakc0de marked this conversation as resolved.
Show resolved Hide resolved

## 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,24 @@ 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)
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/ec2-stop-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 +110,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 +201,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 +213,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 +233,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 +243,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
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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-instance-stop</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-instance-stop/experiment.yaml">here</a>
- Ensure that the <code>azure-instance-stop</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-instance-stop/fault.yaml">here</a>
- Ensure that you have sufficient Azure access to stop and start the an instance.
- 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
Loading
Loading