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(fault-docs): Update 'experiment' to 'fault' in fault docs #31

Open
wants to merge 80 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
2ea0d5f
Merge branch 'main' of github.com:chaosnative/developer-hub-cn
uditgaurav Nov 8, 2022
025ed39
added docs for aws ec2 stress
avaakash Nov 10, 2022
cb418a6
adding doc for vmware faults
Adarshkumar14 Nov 10, 2022
ee60156
added and updated diagrams
avaakash Nov 10, 2022
0b742f8
updated index
avaakash Nov 10, 2022
821d6bc
updated ec2-stop diagram
avaakash Nov 10, 2022
c15d8ad
docs(ec2): adding ec2 network and dns faults docs
ispeakc0de Nov 11, 2022
938316a
docs(kubelet-density): adding kubelet density experiment doc
ispeakc0de Nov 11, 2022
6246175
Merge pull request #20 from chaosnative/kubelet-density
ispeakc0de Nov 11, 2022
964858c
docs(ec2): adding ec2 process kill experiment
ispeakc0de Nov 11, 2022
b73d674
Merge pull request #18 from chaosnative/ec2-docs
ispeakc0de Nov 11, 2022
32a9da1
Merge branch 'main' of https://github.com/harness/developer-hub
neelanjan00 Nov 11, 2022
381ed70
chore(contents): add contents page links for k8s experiments
neelanjan00 Nov 11, 2022
80bdbde
resolving comments
Adarshkumar14 Nov 11, 2022
cffcf2f
chore(gcp-faults): add gcp faults docs
neelanjan00 Nov 11, 2022
0b166f7
chore(azure-faults): add azure-disk-loss fault docs
neelanjan00 Nov 11, 2022
8cab95a
chore(aws-faults): add aws fault docs
neelanjan00 Nov 11, 2022
c867747
resolving comments
Adarshkumar14 Nov 12, 2022
fa9b8d5
fixed diagram typo; changed chaos sa to litmus-admin; added info tag …
avaakash Nov 12, 2022
1cf1694
resolving comments
Adarshkumar14 Nov 12, 2022
9e2f697
Merge pull request #17 from chaosnative/ad-vmware-faults
ispeakc0de Nov 14, 2022
94e3222
Merge pull request #16 from chaosnative/aws-stress-docs
ispeakc0de Nov 14, 2022
5b9c5d2
fixed chaosServiceAccount values
neelanjan00 Nov 14, 2022
f09e330
add regions for aws docs
neelanjan00 Nov 14, 2022
6b6f87d
add examples
neelanjan00 Nov 14, 2022
f5d3394
Merge branch 'main' of https://github.com/harness/developer-hub
neelanjan00 Nov 14, 2022
a50b0c5
Merge branch 'main' of https://github.com/chaosnative/developer-hub-cn
neelanjan00 Nov 14, 2022
98c2114
merge main
neelanjan00 Nov 14, 2022
2137af1
add sa changes to manifests
neelanjan00 Nov 14, 2022
454b99d
Merge branch 'main' of github.com:chaosnative/developer-hub-cn
uditgaurav Nov 14, 2022
cc46d6b
Merge pull request #21 from chaosnative/add-gcp-azure-aws-docs
ispeakc0de Nov 14, 2022
b02afb9
added azure stress docs
avaakash Nov 14, 2022
2dd900c
merged main with azure-stress-docs
avaakash Nov 14, 2022
5726231
fix(non-k8s): fixing non k8s docs
ispeakc0de Nov 14, 2022
26f13da
fix(non-k8s): fixing non k8s docs
ispeakc0de Nov 14, 2022
fed8858
minor changes
avaakash Nov 14, 2022
a8fb3c3
Merge pull request #23 from chaosnative/fix-exp
ispeakc0de Nov 14, 2022
e9e19c0
Merge pull request #22 from chaosnative/azure-stress-docs
ispeakc0de Nov 14, 2022
311092d
add misc k8s fault doc fixes
neelanjan00 Nov 14, 2022
99f288b
Chore(experiment): Adds AWS ECS experiment docs
uditgaurav Nov 14, 2022
a69384a
Resolve Conflicts
uditgaurav Nov 14, 2022
60ce2c8
Merge branch 'main' into fix-k8s-fault-docs
neelanjan00 Nov 14, 2022
b501aff
fix network chaos comments
neelanjan00 Nov 14, 2022
db7b19d
Merge pull request #26 from chaosnative/fix-k8s-fault-docs
ispeakc0de Nov 14, 2022
9252fc7
Resolve Comments - typo fixes
uditgaurav Nov 14, 2022
2a3dcfb
Resolve Comments - typo fixes
uditgaurav Nov 14, 2022
c51f992
chore(vmware-fault): add vmware-host-reboot fault (#27)
neelanjan00 Nov 15, 2022
848b69e
Merge branch 'main' of github.com:chaosnative/developer-hub-cn
uditgaurav Nov 15, 2022
d0ffa08
Merge branch 'main' of https://github.com/harness/developer-hub
neelanjan00 Nov 15, 2022
70b63c1
Chore(azure): Adds azure web app access restrict chaos
uditgaurav Nov 15, 2022
63fd826
Chore(azure): Adds azure web app access restrict chaos
uditgaurav Nov 15, 2022
61b9adf
chore(fault): fix misc fault docs
neelanjan00 Nov 15, 2022
f51a327
updated manifest
avaakash Nov 14, 2022
c80ce38
Merge branch 'main' of github.com:chaosnative/developer-hub-cn into m…
avaakash Nov 15, 2022
dc819ab
Chore(azure): Adds azure web app access restrict chaos
uditgaurav Nov 15, 2022
0f679c2
Provide default cluster name
uditgaurav Nov 15, 2022
f5ce1d6
Provide example of ramp time
uditgaurav Nov 15, 2022
f464dd5
fixes
avaakash Nov 15, 2022
c67ce46
update manifest
uditgaurav Nov 15, 2022
bd7e4cf
update manifest
uditgaurav Nov 15, 2022
696ad2e
chore(faults): renamed 'experiment' to 'fault'
neelanjan00 Nov 15, 2022
037751d
changed ebs to EBS
neelanjan00 Nov 15, 2022
8c7e0bf
resolved pr comments
neelanjan00 Nov 15, 2022
f12ea39
Merge pull request #25 from chaosnative/ecs_exp_docs
ispeakc0de Nov 15, 2022
b58e07e
Merge branch 'main' of github.com:chaosnative/developer-hub-cn into a…
uditgaurav Nov 16, 2022
42307de
fix typo and examples
uditgaurav Nov 16, 2022
09367d3
fix typo and examples
uditgaurav Nov 16, 2022
0a7fd2c
Merge branch 'main' of github.com:chaosnative/developer-hub-cn into m…
avaakash Nov 17, 2022
f683337
Merge pull request #29 from chaosnative/manifest-fix
ispeakc0de Nov 17, 2022
096dd1d
Update docs/chaos-engineering/chaos-faults/azure/azure-web-app-access…
ispeakc0de Nov 17, 2022
afde2b4
Update docs/chaos-engineering/chaos-faults/azure/azure-web-app-access…
ispeakc0de Nov 17, 2022
d34a727
Merge pull request #30 from chaosnative/azure_web_app
ispeakc0de Nov 17, 2022
4efdd69
Merge branch 'main' of https://github.com/harness/developer-hub
neelanjan00 Nov 17, 2022
b17d3a7
merged main
neelanjan00 Nov 17, 2022
3859098
resolved merge conflicts
neelanjan00 Nov 17, 2022
deb4d37
updated azure, ecs, and gcp name changes
neelanjan00 Nov 17, 2022
d5720a4
updated ec2 name changes
neelanjan00 Nov 17, 2022
59533a3
Merge branch 'main' of https://github.com/harness/developer-hub
neelanjan00 Nov 18, 2022
94382f2
Merge branch 'main' into fix-all-faults
neelanjan00 Nov 18, 2022
4794e77
Update aws-fault-tunables
SmritiSatya Dec 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Common AWS Experiment Tunables
title: Common AWS Fault Tunables
---
AWS specific experiment tunables.
AWS specific fault tunables.

### Managed Nodegroup

Expand All @@ -20,7 +20,7 @@ metadata:
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: ec2-terminate-by-tag-sa
chaosServiceAccount: litmus-admin
experiments:
- name: ec2-terminate-by-tag
spec:
Expand All @@ -30,10 +30,10 @@ spec:
# supports enable and disable values, default value: disable
- name: MANAGED_NODEGROUP
value: 'enable'
# region for the ec2 instance
# region for the EC2 instance
- name: REGION
value: '<region for instances>'
# tag of the ec2 instance
value: 'us-east-1'
# tag of the EC2 instance
- name: INSTANCE_TAG
value: 'key:value'
- name: TOTAL_CHAOS_DURATION
Expand All @@ -56,7 +56,7 @@ metadata:
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: ec2-terminate-by-tag-sa
chaosServiceAccount: litmus-admin
experiments:
- name: ec2-terminate-by-tag
spec:
Expand All @@ -69,7 +69,7 @@ spec:
- name: TOTAL_CHAOS_DURATION
VALUE: '60'
- name: REGION
value: '<region for instances>'
value: 'us-east-1'
- name: INSTANCE_TAG
value: 'key:value'
```
140 changes: 140 additions & 0 deletions docs/chaos-engineering/chaos-faults/aws/ebs-loss-by-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
id: ebs-loss-by-id
title: EBS Loss By ID
---

## Introduction
- It causes chaos to disrupt state of ebs volume by detaching it from the node/EC2 instance for a certain chaos duration using volume id.
- In case of EBS persistent volumes, the volumes can get self-attached and fault skips the re-attachment step.
neelanjan00 marked this conversation as resolved.
Show resolved Hide resolved
Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod.

:::tip Fault execution flow chart
![EBS Loss By ID](./static/images/ebs-loss.png)
:::

## Uses

<details>
<summary>View the uses of the fault</summary>
<div>
Coming soon.
</div>
</details>

## Prerequisites

:::info
- Ensure that Kubernetes Version > 1.16.
- 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:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: cloud-secret
type: Opaque
stringData:
cloud_config.yml: |-
# Add the cloud AWS credentials respectively
[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXX
```
- If you change the secret key name (from `cloud_config.yml`) please also update the `AWS_SHARED_CREDENTIALS_FILE` ENV value on `experiment.yaml`with the same name.
:::

## Default Validations

:::info
- EBS volume is attached to the instance.
:::

## Fault tunables

<details>
<summary>Check the Fault Tunables</summary>
<h2>Mandatory Fields</h2>
<table>
<tr>
<th> Variables </th>
<th> Description </th>
<th> Notes </th>
</tr>
<tr>
<td> EBS_VOLUME_ID </td>
<td> Comma separated list of volume IDs subjected to ebs detach chaos</td>
<td> Eg. ebs-vol-1,ebs-vol-2 </td>
</tr>
<tr>
<td> REGION </td>
<td> The region name for the target volumes</td>
<td> Eg. us-east-1 </td>
</tr>
</table>
<h2>Optional Fields</h2>
<table>
<tr>
<th> Variables </th>
<th> Description </th>
<th> Notes </th>
</tr>
<tr>
<td> TOTAL_CHAOS_DURATION </td>
<td> The time duration for chaos insertion (sec) </td>
<td> Defaults to 30s </td>
</tr>
<tr>
<td> CHAOS_INTERVAL </td>
<td> The time duration between the attachment and detachment of the volumes (sec) </td>
<td> Defaults to 30s </td>
</tr>
<tr>
<td> SEQUENCE </td>
<td> It defines sequence of chaos execution for multiple volumes</td>
<td> Default value: parallel. Supported: serial, parallel </td>
</tr>
<tr>
<td> RAMP_TIME </td>
<td> Period to wait before and after injection of chaos in sec </td>
<td> Eg: 30 </td>
</tr>
</table>
</details>

## Fault Examples

### Common and AWS specific tunables

Refer the [common attributes](../common-tunables-for-all-faults) and [AWS specific tunable](./aws-fault-tunables) to tune the common tunables for all faults and aws specific tunables.

### Detach Volumes By ID

It contains comma separated list of volume IDs subjected to ebs detach chaos. It can be tuned via `EBS_VOLUME_ID` ENV.

Use the following example to tune this:

[embedmd]:# (./static/manifests/ebs-loss-by-id/ebs-volume-id.yaml yaml)
```yaml
# contains ebs volume id
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: litmus-admin
experiments:
- name: ebs-loss-by-id
spec:
components:
env:
# id of the ebs volume
- name: EBS_VOLUME_ID
value: 'ebs-vol-1'
# region for the ebs volume
- name: REGION
value: 'us-east-1'
- name: TOTAL_CHAOS_DURATION
VALUE: '60'
```
183 changes: 183 additions & 0 deletions docs/chaos-engineering/chaos-faults/aws/ebs-loss-by-tag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
---
id: ebs-loss-by-tag
title: EBS Loss By Tag
---

## Introduction
- It causes chaos to disrupt state of ebs volume by detaching it from the node/EC2 instance for a certain chaos duration using volume tags.
- In case of EBS persistent volumes, the volumes can get self-attached and fault skips the re-attachment step.
neelanjan00 marked this conversation as resolved.
Show resolved Hide resolved
Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod.

:::tip Fault execution flow chart
![EBS Loss By Tag](./static/images/ebs-loss.png)
:::

## Uses

<details>
<summary>View the uses of the fault</summary>
<div>
Coming soon.
</div>
</details>

## Prerequisites

:::info

- Ensure that Kubernetes Version > 1.16.
- 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:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: cloud-secret
type: Opaque
stringData:
cloud_config.yml: |-
# Add the cloud AWS credentials respectively
[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXX
```
- If you change the secret key name (from `cloud_config.yml`) please also update the `AWS_SHARED_CREDENTIALS_FILE` ENV value on `experiment.yaml`with the same name.
:::

## Default Validations

:::info

- EBS volume is attached to the instance.

:::

## Fault tunables

<details>
<summary>Check the Fault Tunables</summary>
<h2>Mandatory Fields</h2>
<table>
<tr>
<th> Variables </th>
<th> Description </th>
<th> Notes </th>
</tr>
<tr>
<td> EBS_VOLUME_TAG </td>
<td> Provide the common tag for target volumes. It'll be in form of <code>key:value</code> (Ex: 'team:devops')</td>
<td> </td>
</tr>
<tr>
<td> REGION </td>
<td> The region name for the target volumes</td>
<td> Eg. us-east-1 </td>
</tr>
</table>
<h2>Optional Fields</h2>
<table>
<tr>
<th> Variables </th>
<th> Description </th>
<th> Notes </th>
</tr>
<tr>
<td> VOLUME_AFFECTED_PERC </td>
<td> The Percentage of total ebs volumes to target </td>
<td> Defaults to 0 (corresponds to 1 volume), provide numeric value only </td>
</tr>
<tr>
<td> TOTAL_CHAOS_DURATION </td>
<td> The time duration for chaos insertion (sec) </td>
<td> Defaults to 30s </td>
</tr>
<tr>
<td> CHAOS_INTERVAL </td>
<td> The time duration between the attachment and detachment of the volumes (sec) </td>
<td> Defaults to 30s </td>
</tr>
<tr>
<td> SEQUENCE </td>
<td> It defines sequence of chaos execution for multiple volumes</td>
<td> Default value: parallel. Supported: serial, parallel </td>
</tr>
<tr>
<td> RAMP_TIME </td>
<td> Period to wait before and after injection of chaos in sec </td>
<td> Eg: 30 </td>
</tr>
</table>
</details>

## Fault Examples

### Common and AWS specific tunables

Refer the [common attributes](../common-tunables-for-all-faults) and [AWS specific tunable](./aws-fault-tunables) to tune the common tunables for all faults and aws specific tunables.

### Target single volume

It will detach a random single ebs volume with the given `EBS_VOLUME_TAG` tag and `REGION` region.

Use the following example to tune this:

[embedmd]:# (./static/manifests/ebs-loss-by-tag/ebs-volume-tag.yaml yaml)
```yaml
# contains the tags for the ebs volumes
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: litmus-admin
experiments:
- name: ebs-loss-by-tag
spec:
components:
env:
# tag of the ebs volume
- name: EBS_VOLUME_TAG
value: 'key:value'
# region for the ebs volume
- name: REGION
value: 'us-east-1'
- name: TOTAL_CHAOS_DURATION
VALUE: '60'
```

### Target Percent of volumes

It will detach the `VOLUME_AFFECTED_PERC` percentage of ebs volumes with the given `EBS_VOLUME_TAG` tag and `REGION` region.

Use the following example to tune this:

[embedmd]:# (./static/manifests/ebs-loss-by-tag/volume-affected-percentage.yaml yaml)
```yaml
# target percentage of the ebs volumes with the provided tag
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: litmus-admin
experiments:
- name: ebs-loss-by-tag
spec:
components:
env:
# percentage of ebs volumes filter by tag
- name: VOLUME_AFFECTED_PERC
value: '100'
# tag of the ebs volume
- name: EBS_VOLUME_TAG
value: 'key:value'
# region for the ebs volume
- name: REGION
value: 'us-east-1'
- name: TOTAL_CHAOS_DURATION
VALUE: '60'
```
Loading