diff --git a/docs/chaos-engineering/chaos-faults/aws/aws-experiments-tunables.md b/docs/chaos-engineering/chaos-faults/aws/aws-experiments-tunables.md index 375a7c125a0..4777928a205 100644 --- a/docs/chaos-engineering/chaos-faults/aws/aws-experiments-tunables.md +++ b/docs/chaos-engineering/chaos-faults/aws/aws-experiments-tunables.md @@ -19,8 +19,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: ec2-terminate-by-tag-sa + chaosServiceAccount: litmus-admin experiments: - name: ec2-terminate-by-tag spec: @@ -32,7 +31,7 @@ spec: value: 'enable' # region for the ec2 instance - name: REGION - value: '' + value: 'us-east-1' # tag of the ec2 instance - name: INSTANCE_TAG value: 'key:value' @@ -55,7 +54,6 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: ec2-terminate-by-tag-sa experiments: - name: ec2-terminate-by-tag @@ -69,7 +67,7 @@ spec: - name: TOTAL_CHAOS_DURATION VALUE: '60' - name: REGION - value: '' + value: 'us-east-1' - name: INSTANCE_TAG value: 'key:value' ``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ebs-loss-by-id.md b/docs/chaos-engineering/chaos-faults/aws/ebs-loss-by-id.md new file mode 100644 index 00000000000..f340d272a5b --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ebs-loss-by-id.md @@ -0,0 +1,139 @@ +--- +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 experiment skips the re-attachment step. +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 + +
+View the uses of the experiment +
+Coming soon. +
+
+ +## 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. +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
EBS_VOLUME_ID Comma separated list of volume IDs subjected to ebs detach chaos Eg. ebs-vol-1,ebs-vol-2
REGION The region name for the target volumes Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The time duration between the attachment and detachment of the volumes (sec) Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple volumes Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments 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" + 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' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ebs-loss-by-tag.md b/docs/chaos-engineering/chaos-faults/aws/ebs-loss-by-tag.md new file mode 100644 index 00000000000..1f24111e2de --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ebs-loss-by-tag.md @@ -0,0 +1,181 @@ +--- +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 experiment skips the re-attachment step. +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 + +
+View the uses of the experiment +
+Coming soon. +
+
+ +## 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. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
EBS_VOLUME_TAG Provide the common tag for target volumes. It'll be in form of key:value (Ex: 'team:devops')
REGION The region name for the target volumes Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
VOLUME_AFFECTED_PERC The Percentage of total ebs volumes to target Defaults to 0 (corresponds to 1 volume), provide numeric value only
TOTAL_CHAOS_DURATION The time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The time duration between the attachment and detachment of the volumes (sec) Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple volumes Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments 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" + 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" + 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' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-cpu-hog.md b/docs/chaos-engineering/chaos-faults/aws/ec2-cpu-hog.md new file mode 100644 index 00000000000..32f591fa3ea --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-cpu-hog.md @@ -0,0 +1,263 @@ +--- +id: ec2-cpu-hog +title: EC2 CPU Hog +--- + +## Introduction + +- EC2 CPU Hog contains chaos to disrupt the state of infra resources. The experiment can induce stress chaos on AWS EC2 Instance using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built in the experiment for the given chaos scenario. +- It causes CPU Hog chaos on EC2 Instance using an SSM doc for a certain chaos duration. + +:::tip Fault execution flow chart +![EC2 CPU Hog](./static/images/ec2-cpu-hog.png) +::: + +## Uses + +### Uses of the experiment + +:::info + +> The experiment causes cpu hog/stress on the target AWS EC2 Instance(s). The idea of this experiment is to simulate issues when there is lack of cpu for other runnning processes/applications resulting into degrading their performance. +> Injecting a rogue process into a target ec2 instance, we starve the main processes/applications (typically pid 1) of the resources allocated to it (where limits are defined) causing slowness in application traffic or in other cases unrestrained use can cause instance to exhaust resources leading to degradation in performance of processes/applications present on the instance. So this category of chaos experiment helps to build the immunity on the application undergoing any such stress scenario. + +::: + +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- Ensure that SSM agent is installed and running in the target EC2 instance. +- Ensure to create a Kubernetes secret having the AWS Access Key ID and Secret Access Key credentials 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 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + +- If you change the secret name then please also update the `experiment.yml` ENV values for deriving the respective data from the secret. Also account for the path at which this secret is mounted as a file in the manifest ENV `AWS_SHARED_CREDENTIALS_FILE`. + +::: + +## Default Validations + +:::info + +- EC2 instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the experiment tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
EC2_INSTANCE_ID ID of the target EC2 instance For example: i-044d3cb4b03b8af1f
REGION The AWS region ID where the EC2 instance has been created For example: us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos injection (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive chaos injection Defaults to 60s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
INSTALL_DEPENDENCIES Select to install dependencies used to run the cpu chaos. It can be either True or False Defaults to True
CPU_CORE Provide the number of cpu cores to consume Defaults to 0
CPU_LOAD Provide the percentage of a single cpu core to be consumed Defaults to 100
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Experiment Examples + +### Common Experiment Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### CPU CORE + +It defines the cpu core value to be utilised on the EC2 instance. It can be tuned via `CPU_CORE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-cpu-hog/cpu-core.yaml yaml) +```yaml +# cpu cores to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-cpu-hog + spec: + components: + env: + - name: CPU_CORE + VALUE: '2' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### CPU PERCENTAGE + +It defines the cpu percentage value to be utilised on the EC2 instance. It can be tuned via `CPU_LOAD` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-cpu-hog/cpu-percentage.yaml yaml) +```yaml +# cpu percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-cpu-hog + spec: + components: + env: + - name: CPU_LOAD + VALUE: '50' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### MULTIPLE EC2 INSTANCES + +Multiple EC2 instances can be targeted in one chaos run. It can be tuned via `EC2_INSTANCE_ID` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-cpu-hog/multiple-instances.yaml yaml) +```yaml +# mutilple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-cpu-hog + spec: + components: + env: + # ids of the ec2 instances + - name: EC2_INSTANCE_ID + value: 'instance-1,instance-2,instance-3' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### CPU CORE WITH PERCENTAGE CONSUMPTION + +It defines how many cpu cores to utilise with percentage of utilisation on the EC2 instance. It can be tuned via `CPU_CORE` and `CPU_LOAD` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-cpu-hog/cpu-core-with-percentage.yaml yaml) +```yaml +# cpu core with percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-cpu-hog + spec: + components: + env: + - name: CPU_CORE + VALUE: '2' + - name: CPU_LOAD + VALUE: '50' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-dns-chaos.md b/docs/chaos-engineering/chaos-faults/aws/ec2-dns-chaos.md new file mode 100644 index 00000000000..896da7ab29a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-dns-chaos.md @@ -0,0 +1,258 @@ +--- +id: ec2-dns-chaos +title: EC2 DNS Chaos +--- + +## Introduction +- It causes DNS errors in the provided ec2 instance for a specified chaos duration. +- It helps to check the performance of the application/process running on the EC2 instance(s). + +:::tip Fault execution flow chart +![EC2 DNS Chaos](./static/images/ec2-dns-chaos.png) +::: + +## Uses +
+View the uses of the experiment +
+The experiment causes DNS errors on the target ec2 instances which can result in unavailability/distorted network connectivity from the VM to the target hosts. This will also help to produce a hypothesis where some services of an application are unreachable from the ec2 instance. This will help the user to think the mitigation steps that should be taken to overcome such situation. This experiment can also be used to know how the DNS error can impact your infra and standalone tasks as well. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +**AWS EC2 Access Requirement:** + +- Ensure that SSM agent is installed and running in the target EC2 instance. +- Ensure to create a Kubernetes secret having the AWS Access Key ID and Secret Access Key credentials 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 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + +- If you change the secret name then please also update the `experiment.yml` ENV values for deriving the respective data from the secret. Also account for the path at which this secret is mounted as a file in the manifest ENV `AWS_SHARED_CREDENTIALS_FILE`. + +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- EC2 instance should be in healthy state. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
EC2_INSTANCE_ID ID of the target EC2 instance For example: i-044d3cb4b03b8af1f
REGION The AWS region ID where the EC2 instance has been created For example: us-east-1
PORT Provide the DNS Port Default value is 54
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
INSTALL_DEPENDENCY Select to install dependencies used to run the network chaos. It can be either True or False If the dependency already exists, you can turn it off. Defaults to True.
TARGET_HOSTNAMES List of the target hostnames or keywords eg. '["litmuschaos","chaosnative.com"]' If not provided, all hostnames/domains will be targeted
MATCH_SCHEME Determines whether the dns query has to match exactly with one of the targets or can have any of the targets as substring. Can be either exact or substring if not provided, it will be set as exact
UPSTREAM_SERVER Custom upstream server to which intercepted dns requests will be forwarded defaults to the server mentioned in resolv.conf
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Run DNS Chaos With Port + +It contains the DNS port to inject the DNS chaos. The value can be provided using `PORT` Env. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-dns-chaos/ec2-dns-port.yaml yaml) +```yaml +# induces dns chaos on the EC2 Instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-dns-chaos + spec: + components: + env: + # target port + - name: PORT + value: '54' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + +### Run DNS Chaos With Target HostNames + +It contains the list of the target host name to inject the DNS chaos. The value can be provided using `TARGET_HOSTNAMES` Env. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-dns-chaos/ec2-dns-target-hostnames.yaml yaml) +```yaml +# induces dns chaos on the EC2 Instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-dns-chaos + spec: + components: + env: + # list of target host names + - name: TARGET_HOSTNAMES + value: '["litmuschaos","chaosnative.com"]' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + + +### Run DNS Chaos With Match scheme + +It determines whether the dns query has to match exactly with one of the targets or can have any of the targets as substring. It can be either exact or substring. The value can be provided using `MATCH_SCHEME` Env. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-dns-chaos/ec2-dns-match-scheme.yaml yaml) +```yaml +# induces dns chaos on the EC2 Instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-dns-chaos + spec: + components: + env: + # match scheme type + - name: MATCH_SCHEME + value: 'exact' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + + +### Run DNS Chaos With Upstream server + +It contains the custom upstream server to which intercepted dns requests will be forwarded. It is defaults to the server mentioned in resolv.conf. The value can be provided using `UPSTREAM_SERVER` Env. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-dns-chaos/ec2-dns-upstream-server.yaml yaml) +```yaml +# induces dns chaos on the EC2 Instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-dns-chaos + spec: + components: + env: + # name of the upstream server + - name: UPSTREAM_SERVER + value: '8.8.8.8' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-http-latency.md b/docs/chaos-engineering/chaos-faults/aws/ec2-http-latency.md index e32de41f01d..a6814af8434 100644 --- a/docs/chaos-engineering/chaos-faults/aws/ec2-http-latency.md +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-http-latency.md @@ -18,7 +18,6 @@ title: EC2 HTTP Latency :::info - Kubernetes >= 1.17 -- EC2-http-latency experiment resource is available in the cluster. Execute kubectl get chaosexperiments in the desired namespace. **AWS EC2 Access Requirements:** diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-http-modify-body.md b/docs/chaos-engineering/chaos-faults/aws/ec2-http-modify-body.md index 522337b8ca4..5698711b10f 100644 --- a/docs/chaos-engineering/chaos-faults/aws/ec2-http-modify-body.md +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-http-modify-body.md @@ -17,7 +17,6 @@ title: EC2 HTTP Modify Body :::info - Kubernetes >= 1.17 -- EC2-http-latency experiment resource is available in the cluster. Execute kubectl get chaosexperiments in the desired namespace. **AWS EC2 Access Requirement:** diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-http-modify-header.md b/docs/chaos-engineering/chaos-faults/aws/ec2-http-modify-header.md index 5032ef5f011..ef6d5e339a2 100644 --- a/docs/chaos-engineering/chaos-faults/aws/ec2-http-modify-header.md +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-http-modify-header.md @@ -17,7 +17,6 @@ title: EC2 HTTP Modify Header :::info - Kubernetes >= 1.17 -- EC2-http-latency experiment resource is available in the cluster. Execute kubectl get chaosexperiments in the desired namespace. **AWS EC2 Access Requirement:** @@ -124,7 +123,7 @@ You can pass the VM credentials as secrets or as an chaosengine environment vari INSTALL_DEPENDENCY - Whether to install the dependancy to run the experiment + Whether to install the dependency to run the experiment If the dependency already exists, you can turn it off (defaults to True) diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-http-reset-peer.md b/docs/chaos-engineering/chaos-faults/aws/ec2-http-reset-peer.md index 2d355e866ab..77da3ca55cf 100644 --- a/docs/chaos-engineering/chaos-faults/aws/ec2-http-reset-peer.md +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-http-reset-peer.md @@ -17,7 +17,6 @@ title: EC2 HTTP Reset Peer :::info - Kubernetes >= 1.17 -- Ensure that the EC2-http-latency experiment resource is available in the cluster. Execute kubectl get chaosexperiments in the desired namespace. **AWS EC2 Access Requirement:** @@ -119,7 +118,7 @@ You can pass the VM credentials as secrets or as an chaosengine environment vari INSTALL_DEPENDENCY - Whether to install the dependancy to run the experiment + Whether to install the dependency to run the experiment If the dependency already exists, you can turn it off (defaults to True) diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-http-status-code.md b/docs/chaos-engineering/chaos-faults/aws/ec2-http-status-code.md index 0555a5dd7c5..bcf66635772 100644 --- a/docs/chaos-engineering/chaos-faults/aws/ec2-http-status-code.md +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-http-status-code.md @@ -17,7 +17,6 @@ title: EC2 HTTP Status Code :::info - Kubernetes >= 1.17 -- EC2-http-latency experiment resource is available in the cluster. Execute kubectl get chaosexperiments in the desired namespace. **AWS EC2 Access Requirement:** @@ -127,7 +126,7 @@ You can pass the VM credentials as secrets or as an chaosengine environment vari INSTALL_DEPENDENCY - Whether to install the dependancy to run the experiment + Whether to install the dependency to run the experiment If the dependency already exists, you can turn it off (defaults to True) diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-io-stress.md b/docs/chaos-engineering/chaos-faults/aws/ec2-io-stress.md new file mode 100644 index 00000000000..cfa28c57aa4 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-io-stress.md @@ -0,0 +1,309 @@ +--- +id: ec2-io-stress +title: EC2 IO Stress +--- + +## Introduction + +- EC2 IO Stress contains chaos to disrupt the state of infra resources. The experiment can induce a stress chaos on AWS EC2 Instance using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built in the experiment for the give chaos scenario. +- It causes IO Stress chaos on EC2 Instance using an SSM doc for a certain chaos duration. + +:::tip Fault execution flow chart +![EC2 IO Stress](./static/images/ec2-io-stress.png) +::: + +## Uses + +### Uses of the experiment + +:::info + +- Filesystem read and write is another very common and frequent scenario we find with processes/applications that can result in the impact on its delivery. These problems are generally referred to as "Noisy Neighbour" problems. +- Injecting a rogue process into a target ec2 instance, we starve the main processes/applications (typically pid 1) of the resources allocated to it (where limits are defined) causing slowness in application traffic or in other cases unrestrained use can cause instance to exhaust resources leading to degradation in performance of processes/applications present on the instance. So this category of chaos experiment helps to build the immunity on the application undergoing any such stress scenario. + +::: + +## Prerequisites + +:::info + +### Verify the prerequisites + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- Ensure that SSM agent is installed and running in the target EC2 instance. +- Ensure to create a Kubernetes secret having the AWS Access Key ID and Secret Access Key credentials 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 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + +- If you change the secret name then please also update the `experiment.yml` ENV values for deriving the respective data from the secret. Also account for the path at which this secret is mounted as a file in the manifest ENV `AWS_SHARED_CREDENTIALS_FILE`. + +::: + +## Default Validations + +:::info + +- EC2 instance should be in healthy state. + +::: + +## Experiment tunables + +
+Check the experiment tunables + +

Mandatory Fields

+ + + + + + + + + + + + + + + + + +
Variables Description Notes
EC2_INSTANCE_ID ID of the target EC2 instance For example: i-044d3cb4b03b8af1f
REGION The AWS region ID where the EC2 instance has been created For example: us-east-1
+ +

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos injection (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive chaos injection Defaults to 60s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
INSTALL_DEPENDENCIES Select to install dependencies used to run the io chaos. It can be either True or False Defaults to True
FILESYSTEM_UTILIZATION_PERCENTAGE Specify the size as percentage of free space on the file system Default to 0%, which will result in 1 GB Utilization
FILESYSTEM_UTILIZATION_BYTES Specify the size in GigaBytes(GB). FILESYSTEM_UTILIZATION_PERCENTAGE & FILESYSTEM_UTILIZATION_BYTES are mutually exclusive. If both are provided, FILESYSTEM_UTILIZATION_PERCENTAGE is prioritized. Default to 0GB, which will result in 1 GB Utilization
NUMBER_OF_WORKERS It is the number of IO workers involved in IO disk stress Default to 4
VOLUME_MOUNT_PATH Fill the given volume mount path Defaults to the user HOME directory
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+ +
+ +## Experiment Examples + +### Common Experiment Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### FILESYSTEM UTILIZATION IN MEGABYTES + +It defines the filesystem value to be utilised in megabytes on the EC2 instance. It can be tuned via `FILESYSTEM_UTILIZATION_BYTES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-io-stress/filesystem-bytes.yaml yaml) +```yaml +# filesystem bytes to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + - name: FILESYSTEM_UTILIZATION_BYTES + VALUE: '1024' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### FILESYSTEM UTILIZATION IN PERCENTAGE + +It defines the filesystem percentage to be utilised on the EC2 instance. It can be tuned via `FILESYSTEM_UTILIZATION_PERCENTAGE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-io-stress/filesystem-percentage.yaml yaml) +```yaml +# filesystem percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + - name: FILESYSTEM_UTILIZATION_PERCENTAGE + VALUE: '50' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### MULTIPLE WORKERS + +It defines the CPU threads to be run to spike the filesystem utilisation, this will increase the growth of filesystem consumption. It can be tuned via `NUMBER_OF_WORKERS` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-io-stress/multiple-workers.yaml yaml) +```yaml +# multiple workers to utilize resources +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + - name: NUMBER_OF_WORKERS + VALUE: '3' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### VOLUME MOUNT PATH + +It defines volume mount path to target attached to the EC2 instance. It can be tuned via `VOLUME_MOUNT_PATH` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-io-stress/volume-path.yaml yaml) +```yaml +# volume path to be used for io stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + - name: VOLUME_MOUNT_PATH + VALUE: '/tmp' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### MULTIPLE EC2 INSTANCES + +Multiple EC2 instances can be targeted in one chaos run. It can be tuned via `EC2_INSTANCE_ID` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-io-stress/multiple-instances.yaml yaml) +```yaml +# multiple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + # ids of the ec2 instances + - name: EC2_INSTANCE_ID + value: 'instance-1,instance-2' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-memory-hog.md b/docs/chaos-engineering/chaos-faults/aws/ec2-memory-hog.md new file mode 100644 index 00000000000..b96569d8b63 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-memory-hog.md @@ -0,0 +1,269 @@ +--- +id: ec2-memory-hog +title: EC2 Memory Hog +--- + +## Introduction + +- EC2 Memory Hog contains chaos to disrupt the state of infra resources. The experiment can induce stress chaos on AWS EC2 Instance using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built in the experiment for the give chaos scenario. +- It causes Memory Hog chaos on EC2 Instance using an SSM doc for a certain chaos duration. + +:::tip Fault execution flow chart +![EC2 Memory Hog](./static/images/ec2-memory-hog.png) +::: + +## Uses + +### Uses of the experiment + +:::info + +- The experiment causes memory hog/stress on the target AWS EC2 Instance(s). The idea of this experiment is to simulate issues when there is lack of memory for other runnning processes/applications resulting into degrading their performance. +- Injecting a rogue process into a target ec2 instance, we starve the main processes/applications (typically pid 1) of the resources allocated to it (where limits are defined) causing slowness in application traffic or in other cases unrestrained use can cause instance to exhaust resources leading to degradation in performance of processes/applications present on the instance. So this category of chaos experiment helps to build the immunity on the application undergoing any such stress scenario. + +::: + +## Prerequisites + +:::info + +### Verify the prerequisites + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- Ensure that SSM agent is installed and running in the target EC2 instance. +- Ensure to create a Kubernetes secret having the AWS Access Key ID and Secret Access Key credentials 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 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + +- If you change the secret name then please also update the `experiment.yml` ENV values for deriving the respective data from the secret. Also account for the path at which this secret is mounted as a file in the manifest ENV `AWS_SHARED_CREDENTIALS_FILE`. + +::: + +## Default Validations + +:::info + +- EC2 instance should be in healthy state. + +::: + +## Experiment tunables + +
+Check the experiment tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
EC2_INSTANCE_ID ID of the target EC2 instance For example: i-044d3cb4b03b8af1f
REGION The AWS region ID where the EC2 instance has been created For example: us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos injection (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive chaos injection Defaults to 60s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
INSTALL_DEPENDENCIES Select to install dependencies used to run the memory chaos. It can be either True or False Defaults to True
MEMORY_CONSUMPTION The amount of memory to be hogged in the ec2 instance in terms of mega bytes Defaults to 500MB
MEMORY_PERCENTAGE The amount of memory to be hogged in the ec2 instance in terms of percentage Defaults to 0
NUMBER_OF_WORKERS The number of workers used to run the stress process Defaults to 1
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec eg: 30
+ +
+ +## Experiment Examples + +### Common Experiment Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### MEMORY CONSUMPTION IN MEGABYTES + +It defines the memory value to be utilised in megabytes on the EC2 instance. It can be tuned via `MEMORY_CONSUMPTION` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-memory-hog/memory-bytes.yaml yaml) +```yaml +# memory in mb to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-memory-hog + spec: + components: + env: + - name: MEMORY_CONSUMPTION + VALUE: '1024' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### MEMORY CONSUMPTION BY PERCENTAGE + +It defines the memory percentage value to be utilised on the EC2 instance. It can be tuned via `MEMORY_PERCENTAGE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-memory-hog/memory-percentage.yaml yaml) +```yaml +# memory percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-memory-hog + spec: + components: + env: + - name: MEMORY_PERCENTAGE + VALUE: '50' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### MULTIPLE EC2 INSTANCES + +Multiple EC2 instances can be targeted in one chaos run by providing comma seperated instance ids. It can be tuned via `EC2_INSTANCE_ID` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-memory-hog/multiple-instances.yaml yaml) +```yaml +# multiple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-memory-hog + spec: + components: + env: + # ids of the ec2 instances + - name: EC2_INSTANCE_ID + value: 'instance-1,instance-2,instance-3' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### MULTIPLE WORKERS + +It defines the CPU threads to be run to spike the memory utilisation, this will increase the growth of memory consumption. It can be tuned via `NUMBER_OF_WORKERS` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-memory-hog/multiple-workers.yaml yaml) +```yaml +# multiple workers to utilize resources +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-memory-hog + spec: + components: + env: + - name: NUMBER_OF_WORKERS + VALUE: '3' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-network-latency.md b/docs/chaos-engineering/chaos-faults/aws/ec2-network-latency.md new file mode 100644 index 00000000000..872322a4d88 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-network-latency.md @@ -0,0 +1,278 @@ +--- +id: ec2-network-latency +title: EC2 Network Latency +--- + +## Introduction +- It causes flaky access to the application/services by injecting network packet latency to Ec2 instance(s). +- It helps to check the performance of the application/process running on the EC2 instances. + +:::tip Fault execution flow chart +![EC2 Network Latency](./static/images/ec2-network-chaos.png) +::: + +## Uses +
+View the uses of the experiment +
+The experiment causes network degradation without the ec2 instance being marked unhealthy/unworthy of traffic. The idea of this experiment is to simulate issues within your instance network OR microservice communication across services in different hosts etc. + +Mitigation (in this case keep the timeout i.e., network latency low) could be via some middleware that can switch traffic based on some SLOs/perf parameters. If such an arrangement is not available the next best thing would be to verify if such a degradation is highlighted via notification/alerts etc,. so the admin/SRE has the opportunity to investigate and fix things. Another utility of the test would be to see what the extent of impact caused to the end-user OR the last point in the app stack on account of degradation in access to a downstream/dependent microservice. Whether it is acceptable OR breaks the system to an unacceptable degree. The experiment provides DESTINATION_IPS or DESTINATION_HOSTS so that you can control the chaos against specific services within or outside the ec2 instance. + +The ec2 instance may stall or get corrupted while they wait endlessly for a packet. The experiment limits the impact (blast radius) to only the traffic you want to test by specifying IP addresses or application information. This experiment will help to improve the resilience of your services over time +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +**AWS EC2 Access Requirement:** + +- Ensure that SSM agent is installed and running in the target EC2 instance. +- Ensure to create a Kubernetes secret having the AWS Access Key ID and Secret Access Key credentials 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 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + +- If you change the secret name then please also update the `experiment.yml` ENV values for deriving the respective data from the secret. Also account for the path at which this secret is mounted as a file in the manifest ENV `AWS_SHARED_CREDENTIALS_FILE`. + +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- EC2 instance should be in healthy state. +::: + +## Experiment Tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
EC2_INSTANCE_ID ID of the target EC2 instance For example: i-044d3cb4b03b8af1f
REGION The AWS region ID where the EC2 instance has been created For example: us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
INSTALL_DEPENDENCY Select to install dependencies used to run the network chaos. It can be either True or False If the dependency already exists, you can turn it off. Defaults to True.
NETWORK_LATENCY The latency/delay in milliseconds Default 2000, provide numeric value only
JITTER The network jitter value in ms Default 0, provide numeric value only
DESTINATION_IPS IP addresses of the services or the CIDR blocks(range of IPs), the accessibility to which is impacted Comma separated IP(S) or CIDR(S) can be provided. if not provided, it will induce network chaos for all ips/destinations
DESTINATION_HOSTS DNS Names of the services, the accessibility to which, is impacted if not provided, it will induce network chaos for all ips/destinations or DESTINATION_IPS if already defined
NETWORK_INTERFACE Name of ethernet interface considered for shaping traffic Defaults to `eth0`
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Network Packet Latency + +It defines the network packet latency to be injected on the ec2 instances. It can be tuned via `NETWORK_LATENCY` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-network-latency/network-latency.yaml yaml) +```yaml +# it injects the chaos into the egress traffic +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-latency + spec: + components: + env: + # network packet latency + - name: NETWORK_LATENCY + value: '2000' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + +### Run With Jitter + +It defines the jitter (in ms), a parameter that allows introducing a network delay variation. It can be tuned via `JITTER` ENV. Its default value is 0. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-network-latency/network-latency-with-jitter.yaml yaml) +```yaml +# it injects the chaos into the egress traffic +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-latency + spec: + components: + env: + # value of the network latency jitter (in ms) + - name: JITTER + value: '200' + - name: NETWORK_LATENCY + value: '2000' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + +### Run With Destination IPs And Destination Hosts + +The network experiments interrupt traffic for all the IPs/hosts by default. The interruption of specific IPs/Hosts can be tuned via `DESTINATION_IPS` and `DESTINATION_HOSTS` ENV. + +`DESTINATION_IPS`: It contains the IP addresses of the services or the CIDR blocks(range of IPs), the accessibility to which is impacted. +`DESTINATION_HOSTS`: It contains the DNS Names of the services, the accessibility to which, is impacted + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-network-latency/destination-host-and-ip.yaml yaml) +```yaml +# it injects the chaos into the egress traffic for specific IPs/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-latency + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'google.com' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + +### Network Interface + +The defined name of the ethernet interface, which is considered for shaping traffic. It can be tuned via `NETWORK_INTERFACE` ENV. Its default value is `eth0`. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-network-latency/network-interface.yaml yaml) +```yaml +# it injects the chaos into the egress traffic for specific network interface +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-latency + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-network-loss.md b/docs/chaos-engineering/chaos-faults/aws/ec2-network-loss.md new file mode 100644 index 00000000000..667bac0b8e5 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-network-loss.md @@ -0,0 +1,241 @@ +--- +id: ec2-network-loss +title: EC2 Network Loss +--- + +## Introduction +- It causes flaky access to the application/services by injecting network packet loss to Ec2 instance(s). +- It helps to check the performance of the application/process running on the EC2 instances. + +:::tip Fault execution flow chart +![EC2 Network Loss](./static/images/ec2-network-chaos.png) +::: + +## Uses +
+View the uses of the experiment +
+The experiment causes network degradation without the ec2 instance being marked unhealthy/unworthy of traffic. The idea of this experiment is to simulate issues within your instance network OR microservice communication across services in different hosts etc. + +Mitigation (in this case keep the timeout i.e., network latency low) could be via some middleware that can switch traffic based on some SLOs/perf parameters. If such an arrangement is not available the next best thing would be to verify if such a degradation is highlighted via notification/alerts etc,. so the admin/SRE has the opportunity to investigate and fix things. Another utility of the test would be to see what the extent of impact caused to the end-user OR the last point in the app stack on account of degradation in access to a downstream/dependent microservice. Whether it is acceptable OR breaks the system to an unacceptable degree. The experiment provides DESTINATION_IPS or DESTINATION_HOSTS so that you can control the chaos against specific services within or outside the ec2 instance. + +The ec2 instance may stall or get corrupted while they wait endlessly for a packet. The experiment limits the impact (blast radius) to only the traffic you want to test by specifying IP addresses or application information. This experiment will help to improve the resilience of your services over time +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +**AWS EC2 Access Requirement:** + +- Ensure that SSM agent is installed and running in the target EC2 instance. +- Ensure to create a Kubernetes secret having the AWS Access Key ID and Secret Access Key credentials 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 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + +- If you change the secret name then please also update the `experiment.yml` ENV values for deriving the respective data from the secret. Also account for the path at which this secret is mounted as a file in the manifest ENV `AWS_SHARED_CREDENTIALS_FILE`. + +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- EC2 instance should be in healthy state. +::: + +## Experiment Tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
EC2_INSTANCE_ID ID of the target EC2 instance For example: i-044d3cb4b03b8af1f
REGION The AWS region ID where the EC2 instance has been created For example: us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
INSTALL_DEPENDENCY Select to install dependencies used to run the network chaos. It can be either True or False If the dependency already exists, you can turn it off. Defaults to True.
NETWORK_PACKET_LOSS_PERCENTAGE The packet loss in percentage Default to 100 percentage
DESTINATION_IPS IP addresses of the services or the CIDR blocks(range of IPs), the accessibility to which is impacted Comma separated IP(S) or CIDR(S) can be provided. if not provided, it will induce network chaos for all ips/destinations
DESTINATION_HOSTS DNS Names of the services, the accessibility to which, is impacted if not provided, it will induce network chaos for all ips/destinations or DESTINATION_IPS if already defined
NETWORK_INTERFACE Name of ethernet interface considered for shaping traffic Defaults to `eth0`
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Network Packet Loss + +It defines the network packet loss percentage to be injected on the ec2 instances. It can be tuned via `NETWORK_PACKET_LOSS_PERCENTAGE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-network-loss/network-packet-loss-percentage.yaml yaml) +```yaml +# it injects the chaos into the egress traffic +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-loss + spec: + components: + env: + # network packet loss percentage + - name: NETWORK_PACKET_LOSS_PERCENTAGE + value: '100' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + +### Run With Destination IPs And Destination Hosts + +The network experiments interrupt traffic for all the IPs/hosts by default. The interruption of specific IPs/Hosts can be tuned via `DESTINATION_IPS` and `DESTINATION_HOSTS` ENV. + +`DESTINATION_IPS`: It contains the IP addresses of the services or the CIDR blocks(range of IPs), the accessibility to which is impacted. +`DESTINATION_HOSTS`: It contains the DNS Names of the services, the accessibility to which, is impacted + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-network-loss/destination-host-and-ip.yaml yaml) +```yaml +# it injects the chaos into the egress traffic for specific IPs/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-loss + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'google.com' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + +### Network Interface + +The defined name of the ethernet interface, which is considered for shaping traffic. It can be tuned via `NETWORK_INTERFACE` ENV. Its default value is `eth0`. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-network-loss/network-interface.yaml yaml) +```yaml +# it injects the chaos into the egress traffic for specific network interface +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-loss + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-process-kill.md b/docs/chaos-engineering/chaos-faults/aws/ec2-process-kill.md new file mode 100644 index 00000000000..b1a5ecd9057 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-process-kill.md @@ -0,0 +1,139 @@ +--- +id: ec2-process-kill +title: EC2 Process Kill +--- + +## Introduction +- EC2 Process Kill experiment kills the target processes running on ec2 instance to determine the application/process resilience. +- It helps to check the performance of the application/process running on the ec2 instance(s). + +:::tip Fault execution flow chart +![EC2 Process Kill](./static/images/ec2-process-kill.png) +::: + +## Uses +
+View the uses of the experiment +
+Disrupt the application critical processes such as databases or message queues running in the ec2 instance by killing their underlying processes or threads. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +**AWS EC2 Access Requirement:** + +- Ensure that SSM agent is installed and running in the target EC2 instance. +- Ensure to create a Kubernetes secret having the AWS Access Key ID and Secret Access Key credentials 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 = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + +- If you change the secret name then please also update the `experiment.yml` ENV values for deriving the respective data from the secret. Also account for the path at which this secret is mounted as a file in the manifest ENV `AWS_SHARED_CREDENTIALS_FILE`. + +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- EC2 instance should be in healthy state +- The target processes should exist in the VM. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
EC2_INSTANCE_ID ID of the target EC2 instance For example: i-044d3cb4b03b8af1f
REGION The AWS region ID where the EC2 instance has been created For example: us-east-1
PROCESS_IDS Process IDs of the target processes provided as comma separated values 183,253,857
+

Optional Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### PROCESS_IDS +It contains the target process Ids running on a particular ec2 instance + + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-process-kill/ec2-process-kill-processid.yaml yaml) +```yaml +# Process kill running on ec2 instance +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-process-kill + spec: + components: + env: + # List of Process IDs + - name: PROCESS_IDS + value: '8688,4678' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' +``` + + diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-stop-by-id.md b/docs/chaos-engineering/chaos-faults/aws/ec2-stop-by-id.md index ee77831cdea..d5fc67f0468 100644 --- a/docs/chaos-engineering/chaos-faults/aws/ec2-stop-by-id.md +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-stop-by-id.md @@ -10,7 +10,7 @@ title: EC2 Stop By ID - When the `MANAGED_NODEGROUP` is enabled, the experiment doesn't start the instance after chaos. It checks the cluster for the newly added node instance. :::tip Fault execution flow chart -![EC2 Stop](./static/images/ec2-stop.png) +![EC2 Stop By ID](./static/images/ec2-stop.png) ::: ## Uses @@ -48,7 +48,7 @@ stringData: ### WARNING -If the target EC2 instance is a part of a self-managed nodegroup, drain the target node of any application running on it. Isolate the target node before running the experiment so that the experiment pods are not scheduled on it. +If the target EC2 instance is a part of a managed node group, drain the target node of any application running on it. Isolate the target node before running the experiment so that the experiment pods are not scheduled on it. ::: ## Default Validations @@ -77,7 +77,7 @@ If the target EC2 instance is a part of a self-managed nodegroup, drain the targ REGION - The region name of the target instace + The region name of the target instance @@ -111,7 +111,7 @@ If the target EC2 instance is a part of a self-managed nodegroup, drain the targ RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 @@ -137,8 +137,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: ec2-terminate-by-id-sa + chaosServiceAccount: litmus-admin experiments: - name: ec2-terminate-by-id spec: @@ -149,7 +148,5 @@ spec: value: 'instance-1' # region for the ec2 instance - name: REGION - value: '' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' + value: 'us-east-1' ``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ec2-stop-by-tag.md b/docs/chaos-engineering/chaos-faults/aws/ec2-stop-by-tag.md new file mode 100644 index 00000000000..2936b662c40 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ec2-stop-by-tag.md @@ -0,0 +1,185 @@ +--- +id: ec2-stop-by-tag +title: EC2 Stop By Tag +--- + +## Introduction +- It causes termination 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 Fault execution flow chart +![EC2 Stop By Tag](./static/images/ec2-stop.png) +::: + +## Uses + +
+View the uses of the experiment +
+Coming soon. +
+
+ +## Prerequisites + +:::info +- Ensure that Kubernetes Version > 1.16. +- 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: +```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. + +### WARNING + +If the target EC2 instance is a part of a self-managed nodegroup then make sure to drain the target node if any application is running on it and also ensure to cordon the target node before running the experiment so that the experiment pods do not schedule on it. +::: + +## Default Validations + +:::info + +- EC2 instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
INSTANCE_TAG Instance Tag to filter the target ec2 instance. The INSTANCE_TAG should be provided as key:value ex: team:devops
REGION The region name of the target instance
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
INSTANCE_AFFECTED_PERC The Percentage of total ec2 instance to target Defaults to 0 (corresponds to 1 instance), provide numeric value only
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination. Defaults to 30s
MANAGED_NODEGROUP Set to enable if the target instance is the part of self-managed nodegroups Defaults to disable
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments and aws specific tunables. + +### Target single instance + +It will stop a random single ec2 instance with the given `INSTANCE_TAG` tag and the `REGION` region. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-stop-by-tag/instance-tag.yaml yaml) +```yaml +# target the ec2 instances with matching tag +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-terminate-by-tag + spec: + components: + env: + # tag of the ec2 instance + - name: INSTANCE_TAG + value: 'key:value' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` + +### Target Percent of instances + +It will stop the `INSTANCE_AFFECTED_PERC` percentage of ec2 instances with the given `INSTANCE_TAG` tag and `REGION` region. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ec2-stop-by-tag/instance-affected-percentage.yaml yaml) +```yaml +# percentage of ec2 instances, needs to terminate with provided tags +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-terminate-by-tag + spec: + components: + env: + # percentage of ec2 instance filtered by tags + - name: INSTANCE_AFFECTED_PERC + value: '100' + # tag of the ec2 instance + - name: INSTANCE_TAG + value: 'key:value' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ecs-agent-stop.md b/docs/chaos-engineering/chaos-faults/aws/ecs-agent-stop.md new file mode 100644 index 00000000000..435853c0b7f --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ecs-agent-stop.md @@ -0,0 +1,158 @@ +--- +id: ecs-agent-stop +title: ECS Agent Stop +--- + +## Introduction + +- ECS Agent Stop contains chaos to disrupt the state of infra resources. The experiment can induce an agent stop chaos on AWS ECS using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built in the experiment for the give chaos scenario. + +- It causes agent container stop on ECS with a given `CLUSTER_NAME` using an SSM docs for a certain chaos duration. + +:::tip Fault execution flow chart +![ECS Agent Stop](./static/images/ecs-agent-stop.png) +::: + +## Uses + +
+View the uses of the experiment +
+Agent chaos stop is another very common and frequent scenario we find with ECS clusters that can break an agent that manages the task container on the ECS cluster and impacts their delivery. Such scenarios can still occur despite whatever availability aids docker provides. + +Killing the agent container will distrupt the performance of it and impact to smooth working of task containers. So this category of chaos experiment helps to build the immunity on the application undergoing any such scenarios. + +
+
+ +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- Ensure that the ECS container metadata is enabled this feature is disabled by default. To enable it please follow the aws docs to [Enabling container metadata](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-metadata.html). If you have your task running prior this activity you may need to restart it to get the metadata directory as mentioned in the docs. + +- Ensure that both you and ECS cluster instances have a Role with required AWS access to do SSM and ECS operations. Refer the below mentioned sample policy for the experiment (please note that the sample policy can be minimised further). To know more checkout [Systems Manager Docs](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-launch-managed-instance.html). Also, please refer the below mentioned policy required for the experiment. + +- 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 + +- ECS container instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target ECS cluster Single name supported eg: demo-cluster
REGION The AWS region name of the target ECS cluster Eg: us-east-2
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination. Defaults to 30s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments and aws specific tunables. + +### Agent Stop + +It derives the target agent from `CLUSTER_NAME` and stop them for a certain chaos duration. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-agent-stop/agent-stop.yaml yaml) +```yaml +# stops the agent of an ecs cluster +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-agent-stop + spec: + components: + env: + # provide the name of ecs cluster + - name: CLUSTER_NAME + value: 'demo' + - name: REGION + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ecs-container-cpu-hog.md b/docs/chaos-engineering/chaos-faults/aws/ecs-container-cpu-hog.md new file mode 100644 index 00000000000..768d8498f33 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ecs-container-cpu-hog.md @@ -0,0 +1,202 @@ +--- +id: ecs-container-cpu-hog +title: ECS Container CPU Hog +--- + +## Introduction + +- ECS Container CPU hog contains chaos to disrupt the state of infra resources. The experiment can induce stress chaos on the AWS ECS container using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built into the experiment for the give chaos experiment. + +- It causes CPU chaos on containers of ECS task with given `CLUSTER_NAME` using an SSM docs for a certain chaos duration. + +- To select the Task Under Chaos (TUC) you can make use of servie name associated with the task that is, if you provide the service name along with cluster name only all the tasks associated with the given service will be selected as chaos targets. + +- It tests the ECS task sanity (service availability) and recovery of the task containers subjected to CPU stress. + +:::tip Fault execution flow chart +![ECS Container CPU Hog](./static/images/ecs-stress-chaos.png) +::: + +## Uses + +
+View the uses of the experiment +
+CPU hogs are another very common and frequent scenario we find with containers/applications that can result in the eviction of the application (task container) and impact its delivery. Such scenarios can still occur despite whatever availability aids docker provides. These problems are generally referred to as "Noisy Neighbour" problems. + +Injecting a rogue process into a target task container, we starve the main microservice process (typically pid 1) of the resources allocated to it (where limits are defined) causing slowness in application traffic or in other cases unrestrained use can cause instance to exhaust resources leading to eviction of all task container. So this category of chaos experiment helps to build the immunity on the application undergoing any such stress scenario. +
+
+ +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- Ensure that the ECS container metadata is enabled this feature is disabled by default. To enable it please follow the aws docs to [Enabling container metadata](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-metadata.html). If you have your task running prior this activity you may need to restart it to get the metadata directory as mentioned in the docs. + +- Ensure that both you and ECS cluster instances have a Role with required AWS access to do SSM and ECS operations. Refer the below mentioned sample policy for the experiment (please note that the sample policy can be minimised further). To know more checkout [Systems Manager Docs](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-launch-managed-instance.html). Also, please refer the below mentioned policy required for the experiment. + +- 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 + +- ECS container instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target ECS cluster Eg. cluster-1
REGION The region name of the target ECS cluster Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination. Defaults to 30s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
CPU_CORE Provide the number of cpu core to consume Defaults to 0
CPU_LOAD Provide the percentage of CPU to be consumed Defaults to 100
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments and aws specific tunables. + +### CPU Cores + +It contains the cores of CPU to hog for the target container instances. It can be tuned via ` CPU_CORE` ENV. `0` core means all the available CPU resources should be consumed. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-stress-chaos/cpu-core.yaml yaml) +```yaml +# cpu cores for the stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-cpu-hog + spec: + components: + env: + # provide the cpu core to be hogged + - name: CPU_CORE + value: '0' + - name: REGION + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + +### CPU Load + +It contains the percentage of CPU to be consumed for the target container instances. It can be tuned via ` CPU_LOAD` ENV. CPU Load `100` means 100% per cpu core provided. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-stress-chaos/cpu-load.yaml yaml) +```yaml +# cpu load for the stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-cpu-hog + spec: + components: + env: + # provide the cpu load percentage + - name: CPU_LOAD + value: '100' + - name: CPU_CORE + value: '0' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ecs-container-io-stress.md b/docs/chaos-engineering/chaos-faults/aws/ecs-container-io-stress.md new file mode 100644 index 00000000000..046a51e95c8 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ecs-container-io-stress.md @@ -0,0 +1,267 @@ +--- +id: ecs-container-io-stress +title: ECS Container IO Hog +--- + +## Introduction + +- ECS Container IO hog contains chaos to disrupt the state of infra resources. The experiment can induce a stress chaos on AWS ECS container using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built in the experiment for the give chaos experiment. + +- It causes IO chaos on containers of ECS task with given `CLUSTER_NAME` using an SSM docs for a certain chaos duration. + +- To select the Task Under Chaos (TUC) you can make use of servie name associated with the task that is, if you provide the service name along with cluster name only all the tasks associated with the given service will be selected as chaos targets. + +- It tests the ECS task sanity (service availability) and recovery of the task containers subjected to IO stress. + +:::tip Fault execution flow chart +![ECS Container IO Stress](./static/images/ecs-stress-chaos.png) +::: + +## Uses + +
+View the uses of the experiment +
+Filesystem read and write is another very common and frequent scenario we find with conrainers/applications that can result in the eviction of the application (task container) and impact its delivery. Such scenarios that can still occur despite whatever availability aids docker provides. These problems are generally referred to as "Noisy Neighbour" problems. + +Injecting a rogue process into a target task container, we starve the main microservice process (typically pid 1) of the resources allocated to it (where limits are defined) causing slowness in application traffic or in other cases unrestrained use can cause instance to exhaust resources leading to eviction of all task containers. So this category of chaos experiment helps to build the immunity on the application undergoing any such stress scenario. +
+
+ +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- Ensure that the ECS container metadata is enabled this feature is disabled by default. To enable it please follow the aws docs to [Enabling container metadata](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-metadata.html). If you have your task running prior this activity you may need to restart it to get the metadata directory as mentioned in the docs. + +- Ensure that both you and ECS cluster instances have a Role with required AWS access to do SSM and ECS operations. Refer the below mentioned sample policy for the experiment (please note that the sample policy can be minimised further). To know more checkout [Systems Manager Docs](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-launch-managed-instance.html). Also, please refer the below mentioned policy required for the experiment. + +- 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 + +- ECS container instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target ECS cluster Eg. cluster-1
REGION The region name of the target ECS cluster Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos injection (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive chaos injection Defaults to 60s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
FILESYSTEM_UTILIZATION_BYTES Provide the memory for IO stress (in GB) Defaults to 1
VOLUME_MOUNT_PATH Provide the mount path for IO stress Defaults to /tmp
NUMBER_OF_WORKERS Provide the number of workers for memory stress chaos Defaults to 1
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments and aws specific tunables. + +### Filesystem Utilization Percentage + +It stresses the `FILESYSTEM_UTILIZATION_PERCENTAGE` percentage of total free space available in the ecs container. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-stress-chaos/filesystem-utilization-percentage.yaml yaml) +```yaml +# stress the i/o of the targeted pod with FILESYSTEM_UTILIZATION_PERCENTAGE of total free space +# it is mutually exclusive with the FILESYSTEM_UTILIZATION_BYTES. +# if both are provided then it will use FILESYSTEM_UTILIZATION_PERCENTAGE for stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # percentage of free space of file system, need to be stressed + - name: FILESYSTEM_UTILIZATION_PERCENTAGE + value: '10' #in GB + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + +### Filesystem Utilization Bytes + +It stresses the `FILESYSTEM_UTILIZATION_BYTES` GB of the i/o of the targeted ecs container. It is mutually exclusive with the `FILESYSTEM_UTILIZATION_PERCENTAGE` ENV. + +If `FILESYSTEM_UTILIZATION_PERCENTAGE` ENV is set then it will use the percentage for the stress otherwise, it will stress the i/o based on `FILESYSTEM_UTILIZATION_BYTES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-container-io-stress/filesystem-utilization-bytes.yaml yaml) +```yaml +# stress the i/o of the targeted pod with FILESYSTEM_UTILIZATION_PERCENTAGE of total free space +# it is mutually exclusive with the FILESYSTEM_UTILIZATION_BYTES. +# if both are provided then it will use FILESYSTEM_UTILIZATION_PERCENTAGE for stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # size of io to be stressed + - name: FILESYSTEM_UTILIZATION_BYTES + value: '1' #in GB + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + +### Mount Path + +The volume mount path, which needs to be filled. It can be tuned with `VOLUME_MOUNT_PATH ENV`. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-container-io-stress/mount-path.yaml yaml) +```yaml +# provide the volume mount path, which needs to be filled +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # path need to be stressed/filled + - name: VOLUME_MOUNT_PATH + value: '/some-dir-in-container' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + +### Workers For Stress + +The worker's count for the stress can be tuned with `NUMBER_OF_WORKERS` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-container-io-stress/io-number-of-workers.yaml yaml) +```yaml +# number of workers for the stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # number of io workers + - name: NUMBER_OF_WORKERS + value: '4' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ecs-container-memory-hog.md b/docs/chaos-engineering/chaos-faults/aws/ecs-container-memory-hog.md new file mode 100644 index 00000000000..d32d077107f --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ecs-container-memory-hog.md @@ -0,0 +1,227 @@ +--- +id: ecs-container-memory-hog +title: ECS Container Memory Hog +--- + +## Introduction + +- ECS Container Memory hog contains chaos to disrupt the state of infra resources. The experiment can induce a stress chaos on AWS ECS container using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built in the experiment for the give chaos scenario. + +- It causes memory chaos on containers of ECS task with given cluster name using an SSM docs for a certain chaos duration. + +- To select the Task Under Chaos (TUC) you can make use of servie name associated with the task that is, if you provide the service name along with cluster name only all the tasks associated with the given service will be selected as chaos targets. + +- It tests the ECS task sanity (service availability) and recovery of the task containers subjected to memory stress. + +:::tip Fault execution flow chart +![ECS Container Memory Hog](./static/images/ecs-stress-chaos.png) +::: + +## Uses + +
+View the uses of the experiment +
+Memory usage within containers is subject to various constraints. If the limits are specified in their spec, exceeding them can cause termination of the container (due to OOMKill of the primary process, often pid 1) - the restart of the container by docker, subject to the policy specified. For containers with no limits placed, the memory usage is uninhibited until such time as the VM level OOM Behaviour takes over. In this case, containers on the Instance can be killed based on their oom_score. This eval is extended to all task containers running on the instance - thereby causing a bigger blast radius. + +This experiment launches a stress process within the target container - which can cause either the primary process in the container to be resource constrained in cases where the limits are enforced OR eat up available system memory on the instance in cases where the limits are not specified. +
+
+ +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- Ensure that the ECS container metadata is enabled this feature is disabled by default. To enable it please follow the aws docs to [Enabling container metadata](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-metadata.html). If you have your task running prior this activity you may need to restart it to get the metadata directory as mentioned in the docs. + +- Ensure that both you and ECS cluster instances have a Role with required AWS access to do SSM and ECS operations. Refer the below mentioned sample policy for the experiment (please note that the sample policy can be minimised further). To know more checkout [Systems Manager Docs](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-launch-managed-instance.html). Also, please refer the below mentioned policy required for the experiment. + +- 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 + +- ECS container instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target ECS cluster Eg. cluster-1
REGION The region name of the target ECS cluster Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination. Defaults to 30s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
MEMORY_CONSUMPTION Provide the value of memory consumption in Mebibytes Defaults to 100
MEMORY_PERCENTAGE Provide the value of memory consumption in Percentage Defaults to 0
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments and aws specific tunables. + +### Memory Percentage + +It stresses the `MEMORY_PERCENTAGE` percent of memory from the targeted container for the `TOTAL_CHAOS_DURATION` duration. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-stress-chaos/memory-percentage.yaml yaml) +```yaml +# define the memory percentage in MB +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-memory-hog + spec: + components: + env: + # memory percentage value + - name: MEMORY_PERCENTAGE + value: '100' #in MB + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + +### Memory Consumption + +It stresses the `MEMORY_CONSUMPTION` MB memory of the targeted container for the `TOTAL_CHAOS_DURATION` duration. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-stress-chaos/memory-consumption.yaml yaml) +```yaml +# define the memory consumption in MB +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-memory-hog + spec: + components: + env: + # memory consumption value + - name: MEMORY_CONSUMPTION + value: '500' #in MB + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + +### Workers For Stress + +The worker's count for the stress can be tuned with `NUMBER_OF_WORKERS` ENV + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-stress-chaos/memory-number-of-worker.yaml yaml) +```yaml +# number of workers used for the stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-memory-hog + spec: + components: + env: + # number of workers for stress + - name: NUMBER_OF_WORKERS + value: '1' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ecs-container-network-latency.md b/docs/chaos-engineering/chaos-faults/aws/ecs-container-network-latency.md new file mode 100644 index 00000000000..cac3c2b7e1f --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ecs-container-network-latency.md @@ -0,0 +1,274 @@ +--- +id: ecs-container-network-latency +title: ECS Container Network Latency +--- + +## Introduction + +- ECS Container Network Latency contains chaos to disrupt the state of infra resources. The experiment can induce chaos on AWS ECS container using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built in the experiment for the give chaos scenario. + +- It causes network chaos on containers of ECS task with given cluster name using an SSM docs for a certain chaos duration. + +- To select the Task Under Chaos (TUC) you can make use of servie name associated with the task that is, if you provide the service name along with cluster name only all the tasks associated with the given service will be selected as chaos targets. + +- It tests the ECS task sanity (service availability) and recovery of the task containers subjected to network chaos. + +:::tip Fault execution flow chart +![ECS Container Network Latency](./static/images/ecs-network-chaos.png) +::: + +## Uses + +
+View the uses of the experiment +
+The experiment causes network degradation of the task container without the container being marked unhealthy/unworthy of traffic from outside. The idea of this experiment is to simulate issues within your ECS task network OR communication across services in different availability zones/regions etc. + +Mitigation (in this case keep the timeout i.e., network latency value low) could be via some middleware that can switch traffic based on some SLOs/perf parameters. If such an arrangement is not available the next best thing would be to verify if such a degradation is highlighted via notification/alerts etc,. so the admin/SRE has the opportunity to investigate and fix things. Another utility of the test would be to see what the extent of impact caused to the end-user OR the last point in the app stack on account of degradation in access to a downstream/dependent microservice. Whether it is acceptable OR breaks the system to an unacceptable degree. The experiment provides NETWORK_LATENCY so that you can control the chaos against specific services within or outside the cluster. + +The task may stall or get corrupted while they wait endlessly for a packet. The experiment limits the impact (blast radius) to only the traffic you want to test by specifying service to find TUC (Task Under Chaos). This experiment will help to improve the resilience of your services over time. +
+
+ +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- 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: + +```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 + +- EC2 instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target ECS cluster Eg. cluster-1
REGION The region name of the target ECS cluster Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination. Defaults to 30s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
NETWORK_LATENCY Provide the value of latency in ms Defaults to 2000
DESTINATION_IPS IP addresses of the services or the CIDR blocks(range of IPs), the accessibility to which is impacted Comma separated IP(S) or CIDR(S) can be provided. if not provided, it will induce network chaos for all ips/destinations
DESTINATION_HOSTS DNS Names of the services, the accessibility to which, is impacted if not provided, it will induce network chaos for all ips/destinations or DESTINATION_IPS if already defined
NETWORK_INTERFACE Name of ethernet interface considered for shaping traffic Defaults to eth0
JITTER Provide the value of Iitter Defaults to 0
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments and aws specific tunables. + +### Network Latency + +It defines the network latency(in ms) to be injected in the targeted container. It can be tuned via `NETWORK_LATENCY` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-network-chaos/network-latency.yaml yaml) +```yaml +# injects network latency for a certain chaos duration +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-latency + spec: + components: + env: + # network latency to be injected + - name: NETWORK_LATENCY + value: '2000' #in ms + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + +### Network Interface + +The defined name of the ethernet interface, which is considered for shaping traffic. It can be tuned via `NETWORK_INTERFACE` ENV. Its default value is `eth0`. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-network-chaos/latency-network-interface.yaml yaml) +```yaml +# provide the network interface +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-latency + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + +### Jitter + +It defines the jitter (in ms), a parameter that allows introducing a network delay variation. It can be tuned via `JITTER` ENV. Its default value is `0`. +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-network-chaos/jitter.yaml yaml) +```yaml +# provide the network latency jitter +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-latency + spec: + components: + env: + # value of the network latency jitter (in ms) + - name: JITTER + value: '200' +``` + +### Destination IPs And Destination Hosts + +The network experiments interrupt traffic for all the IPs/hosts by default. The interruption of specific IPs/Hosts can be tuned via `DESTINATION_IPS` and `DESTINATION_HOSTS` ENV. + +- `DESTINATION_IPS`: It contains the IP addresses of the services or pods or the CIDR blocks(range of IPs), the accessibility to which is impacted. +- `DESTINATION_HOSTS`: It contains the DNS Names/FQDN names of the services, the accessibility to which, is impacted. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-network-chaos/latency-destination-ip-and-hosts.yaml yaml) +```yaml +# it inject the chaos for the egress traffic for specific ips/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-latency + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'nginx.default.svc.cluster.local,google.com' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + diff --git a/docs/chaos-engineering/chaos-faults/aws/ecs-container-network-loss.md b/docs/chaos-engineering/chaos-faults/aws/ecs-container-network-loss.md new file mode 100644 index 00000000000..192e048b224 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ecs-container-network-loss.md @@ -0,0 +1,242 @@ +--- +id: ecs-container-network-loss +title: ECS Container Network Loss +--- + +## Introduction + +- ECS Container Network Loss contains chaos to disrupt the state of infra resources. The experiment can induce chaos on AWS ECS container using Amazon SSM Run Command, this is carried out by using SSM Docs which is in-built in the experiment for the give chaos scenario. + +- It causes network chaos on containers of ECS task with given cluster name using an SSM docs for a certain chaos duration. + +- To select the Task Under Chaos (TUC) you can make use of servie name associated with the task that is, if you provide the service name along with cluster name only all the tasks associated with the given service will be selected as chaos targets. + +- It tests the ECS task sanity (service availability) and recovery of the task containers subjected to network chaos. + +:::tip Fault execution flow chart +![ECS Container Network Loss](./static/images/ecs-network-chaos.png) +::: + +## Uses + +
+View the uses of the experiment +
+The experiment causes network degradation of the task container without the container being marked unhealthy/unworthy of traffic from outside. The idea of this experiment is to simulate issues within your ECS task network OR communication across services in different availability zones/regions etc. + +Mitigation (in this case keep the timeout i.e., network loss value low) could be via some middleware that can switch traffic based on some SLOs/perf parameters. If such an arrangement is not available the next best thing would be to verify if such a degradation is highlighted via notification/alerts etc,. so the admin/SRE has the opportunity to investigate and fix things. Another utility of the test would be to see what the extent of impact caused to the end-user OR the last point in the app stack on account of degradation in access to a downstream/dependent microservice. Whether it is acceptable OR breaks the system to an unacceptable degree. The experiment provides NETWORK_PACKET_LOSS_PERCENTAGE so that you can control the chaos against specific services within or outside the cluster. + +The task may stall or get corrupted while they wait endlessly for a packet. The experiment limits the impact (blast radius) to only the traffic you want to test by specifying service to find TUC (Task Under Chaos). This experiment will help to improve the resilience of your services over time. +
+
+ +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- 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: + +```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 + +- EC2 instance should be in healthy state. +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target ECS cluster Eg. cluster-1
REGION The region name of the target ECS cluster Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination. Defaults to 30s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
NETWORK_PACKET_LOSS_PERCENTAGE Provide the value of loss in percentage Defaults to 100
DESTINATION_IPS IP addresses of the services or the CIDR blocks(range of IPs), the accessibility to which is impacted Comma separated IP(S) or CIDR(S) can be provided. if not provided, it will induce network chaos for all ips/destinations
DESTINATION_HOSTS DNS Names of the services, the accessibility to which, is impacted if not provided, it will induce network chaos for all ips/destinations or DESTINATION_IPS if already defined
NETWORK_INTERFACE Name of ethernet interface considered for shaping traffic Defaults to eth0
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments and aws specific tunables. + +### Network loss + +It defines the network loss(in ms) to be injected in the targeted container. It can be tuned via `NETWORK_PACKET_LOSS_PERCENTAGE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-network-chaos/network-loss.yaml yaml) +```yaml +# injects network loss for a certain chaos duration +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-loss + spec: + components: + env: + # network loss to be injected + - name: NETWORK_PACKET_LOSS_PERCENTAGE + value: '100' #in ms + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + +### Network Interface + +The defined name of the ethernet interface, which is considered for shaping traffic. It can be tuned via `NETWORK_INTERFACE` ENV. Its default value is `eth0`. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-network-chaos/loss-network-interface.yaml yaml) +```yaml +# provide the network interface +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-loss + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + + +### Destination IPs And Destination Hosts + +The network experiments interrupt traffic for all the IPs/hosts by default. The interruption of specific IPs/Hosts can be tuned via `DESTINATION_IPS` and `DESTINATION_HOSTS` ENV. + +- `DESTINATION_IPS`: It contains the IP addresses of the services or pods or the CIDR blocks(range of IPs), the accessibility to which is impacted. +- `DESTINATION_HOSTS`: It contains the DNS Names/FQDN names of the services, the accessibility to which, is impacted. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-network-chaos/loss-destination-ip-and-hosts.yaml yaml) +```yaml +# it inject the chaos for the egress traffic for specific ips/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-loss + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'nginx.default.svc.cluster.local,google.com' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/ecs-instance-stop.md b/docs/chaos-engineering/chaos-faults/aws/ecs-instance-stop.md new file mode 100644 index 00000000000..65c4888b47a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/ecs-instance-stop.md @@ -0,0 +1,160 @@ +--- +id: ecs-instance-stop +title: ECS Instance Stop +--- + +## Introduction + +- ECS Instance Stop can induce an ec2 instance stop chaos on AWS ECS cluster. It derives the instance under chaos from ECS cluster. + +- It causes ec2 instance to stopped and further gets deleted on ECS cluster for a certain chaos duration. + +:::tip Fault execution flow chart +![ECS Instance Stop](./static/images/ecs-instance-stop.png) +::: + +## Uses + +
+View the uses of the experiment +
+EC2 instance chaos stop is another very common and frequent scenario we find with ECS clusters that can result in breaking of agent that manages task container on ECS cluster and impact its delivery. Such scenarios that can still occur despite whatever availability aids docker provides. + +Killing the EC2 instance container will distrupt the performance of it and impact to smooth working of task containers. So this category of chaos experiment helps to build the immunity on the application undergoing any such scenarios. +
+
+ +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS EC2 Access Requirement:** + +- 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: + +```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 + +- ECS container instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target ECS cluster Eg. cluster-1
REGION The region name of the target ECS cluster Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination. Defaults to 30s
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
EC2_INSTANCE_ID Provide the target instance id from ECS cluster If not provided will select randomly
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common and AWS specific tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) and [AWS specific tunable](./aws-experiments-tunables) to tune the common tunables for all experiments and aws specific tunables. + +### ECS Instance Stop + +It stops the instance of an ECS cluster for a certain chaos duration. We can provide the EC2 instance ID using `EC2_INSTANCE_ID` ENVs as well. If not provided it will select randomly. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/ecs-instance-stop/instance-stop.yaml yaml) +```yaml +# stops the agent of an ecs cluster +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-instance-stop + spec: + components: + env: + # provide the name of ecs cluster + - name: CLUSTER_NAME + value: 'demo' + - name: EC2_INSTANCE_ID + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/aws-http.drawio.png b/docs/chaos-engineering/chaos-faults/aws/static/images/aws-http.drawio.png deleted file mode 100644 index ebeea6b933c..00000000000 Binary files a/docs/chaos-engineering/chaos-faults/aws/static/images/aws-http.drawio.png and /dev/null differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ebs-loss.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ebs-loss.png new file mode 100644 index 00000000000..629d26db2d0 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ebs-loss.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-cpu-hog.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-cpu-hog.png new file mode 100644 index 00000000000..f27d95b3334 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-cpu-hog.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-dns-chaos.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-dns-chaos.png new file mode 100644 index 00000000000..3c1967955b1 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-dns-chaos.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-latency.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-latency.png index 8de28a8a81b..d7a26bc28e2 100644 Binary files a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-latency.png and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-latency.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-modify-body.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-modify-body.png index b2cee9e7ad1..ec63227e393 100644 Binary files a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-modify-body.png and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-modify-body.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-modify-header.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-modify-header.png index 5ea8fa365fe..bb76363a046 100644 Binary files a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-modify-header.png and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-modify-header.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-reset-peer.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-reset-peer.png index e450e90a93d..b51e531edc9 100644 Binary files a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-reset-peer.png and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-reset-peer.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-status-code.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-status-code.png index 969ad355449..e8658022d09 100644 Binary files a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-status-code.png and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-http-status-code.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-io-stress.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-io-stress.png new file mode 100644 index 00000000000..ab1ffef4b01 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-io-stress.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-memory-hog.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-memory-hog.png new file mode 100644 index 00000000000..c2e3b2f2750 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-memory-hog.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-network-chaos.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-network-chaos.png new file mode 100644 index 00000000000..5b924e84689 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-network-chaos.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-process-kill.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-process-kill.png new file mode 100644 index 00000000000..68d919721a6 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-process-kill.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-stop.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-stop.png index eeada131d6f..61e99dfa55c 100644 Binary files a/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-stop.png and b/docs/chaos-engineering/chaos-faults/aws/static/images/ec2-stop.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-agent-stop.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-agent-stop.png new file mode 100644 index 00000000000..776c613df2f Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-agent-stop.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-instance-stop.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-instance-stop.png new file mode 100644 index 00000000000..106884f0c39 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-instance-stop.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-network-chaos.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-network-chaos.png new file mode 100644 index 00000000000..ba17092f921 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-network-chaos.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-stress-chaos.png b/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-stress-chaos.png new file mode 100644 index 00000000000..0d6efa6fb16 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/ecs-stress-chaos.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/common/chaos-interval.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/common/chaos-interval.yaml deleted file mode 100644 index e71dcb3fa2f..00000000000 --- a/docs/chaos-engineering/chaos-faults/aws/static/manifests/common/chaos-interval.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# defines delay between each successive iteration of the chaos -apiVersion: litmuschaos.io/v1alpha1 -kind: ChaosEngine -metadata: - name: engine-nginx -spec: - engineState: "active" - annotationCheck: "false" - chaosServiceAccount: ec2-terminate-by-tag-sa - experiments: - - name: ec2-terminate-by-tag - spec: - components: - env: - # delay between each iteration of chaos - - name: CHAOS_INTERVAL - value: '15' - # time duration for the chaos execution - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: REGION - value: '' - - name: INSTANCE_TAG - value: 'key:value' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/common/managed-nodegroup.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/common/managed-nodegroup.yaml index 3aaf3e6faa7..2f547dae53c 100644 --- a/docs/chaos-engineering/chaos-faults/aws/static/manifests/common/managed-nodegroup.yaml +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/common/managed-nodegroup.yaml @@ -6,8 +6,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: ec2-terminate-by-tag-sa + chaosServiceAccount: litmus-admin experiments: - name: ec2-terminate-by-tag spec: @@ -19,7 +18,7 @@ spec: value: 'enable' # region for the ec2 instance - name: REGION - value: '' + value: 'us-east-1' # tag of the ec2 instance - name: INSTANCE_TAG value: 'key:value' diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-id/ebs-volume-id.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-id/ebs-volume-id.yaml new file mode 100644 index 00000000000..9634f853e1b --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-id/ebs-volume-id.yaml @@ -0,0 +1,21 @@ +# contains ebs volume id +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + 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' diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-tag/ebs-volume-tag.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-tag/ebs-volume-tag.yaml new file mode 100644 index 00000000000..b7454b3b923 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-tag/ebs-volume-tag.yaml @@ -0,0 +1,21 @@ +# contains the tags for the ebs volumes +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + 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' diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-tag/volume-affected-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-tag/volume-affected-percentage.yaml new file mode 100644 index 00000000000..da3774abb6a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ebs-loss-by-tag/volume-affected-percentage.yaml @@ -0,0 +1,24 @@ +# target percentage of the ebs volumes with the provided tag +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + 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' diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-core-with-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-core-with-percentage.yaml new file mode 100644 index 00000000000..c09c461f839 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-core-with-percentage.yaml @@ -0,0 +1,23 @@ +# cpu core with percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-cpu-hog + spec: + components: + env: + - name: CPU_CORE + VALUE: '2' + - name: CPU_LOAD + VALUE: '50' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-core.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-core.yaml new file mode 100644 index 00000000000..2e16b389d32 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-core.yaml @@ -0,0 +1,21 @@ +# cpu cores to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-cpu-hog + spec: + components: + env: + - name: CPU_CORE + VALUE: '2' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-percentage.yaml new file mode 100644 index 00000000000..5f0e6b8ccd0 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/cpu-percentage.yaml @@ -0,0 +1,21 @@ +# cpu percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-cpu-hog + spec: + components: + env: + - name: CPU_LOAD + VALUE: '50' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/multiple-instances.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/multiple-instances.yaml new file mode 100644 index 00000000000..23d952310cd --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-cpu-hog/multiple-instances.yaml @@ -0,0 +1,19 @@ +# mutilple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-cpu-hog + spec: + components: + env: + # ids of the ec2 instances + - name: EC2_INSTANCE_ID + value: 'instance-1,instance-2,instance-3' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-match-scheme.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-match-scheme.yaml new file mode 100644 index 00000000000..a84903aaa7f --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-match-scheme.yaml @@ -0,0 +1,20 @@ +# induces dns chaos on the EC2 Instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-dns-chaos + spec: + components: + env: + # match scheme type + - name: MATCH_SCHEME + value: 'exact' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-port.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-port.yaml new file mode 100644 index 00000000000..9512c7219e8 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-port.yaml @@ -0,0 +1,20 @@ +# induces dns chaos on the EC2 Instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-dns-chaos + spec: + components: + env: + # target port + - name: PORT + value: '54' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-target-hostnames.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-target-hostnames.yaml new file mode 100644 index 00000000000..ed333e68d45 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-target-hostnames.yaml @@ -0,0 +1,20 @@ +# induces dns chaos on the EC2 Instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-dns-chaos + spec: + components: + env: + # list of target host names + - name: TARGET_HOSTNAMES + value: '["litmuschaos","chaosnative.com"]' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-upstream-server.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-upstream-server.yaml new file mode 100644 index 00000000000..f9cc7df64a4 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-dns-chaos/ec2-dns-upstream-server.yaml @@ -0,0 +1,20 @@ +# induces dns chaos on the EC2 Instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-dns-chaos + spec: + components: + env: + # name of the upstream server + - name: UPSTREAM_SERVER + value: '8.8.8.8' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/filesystem-bytes.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/filesystem-bytes.yaml new file mode 100644 index 00000000000..1232dc6962f --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/filesystem-bytes.yaml @@ -0,0 +1,21 @@ +# filesystem bytes to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + - name: FILESYSTEM_UTILIZATION_BYTES + VALUE: '1024' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/filesystem-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/filesystem-percentage.yaml new file mode 100644 index 00000000000..ee516776d0a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/filesystem-percentage.yaml @@ -0,0 +1,21 @@ +# filesystem percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + - name: FILESYSTEM_UTILIZATION_PERCENTAGE + VALUE: '50' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/multiple-instances.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/multiple-instances.yaml new file mode 100644 index 00000000000..d90d2aba26c --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/multiple-instances.yaml @@ -0,0 +1,19 @@ +# multiple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + # ids of the ec2 instances + - name: EC2_INSTANCE_ID + value: 'instance-1,instance-2' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/multiple-workers.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/multiple-workers.yaml new file mode 100644 index 00000000000..e104a9ec8ef --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/multiple-workers.yaml @@ -0,0 +1,21 @@ +# multiple workers to utilize resources +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + - name: NUMBER_OF_WORKERS + VALUE: '3' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/volume-path.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/volume-path.yaml new file mode 100644 index 00000000000..c0945cac995 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-io-stress/volume-path.yaml @@ -0,0 +1,21 @@ +# volume path to be used for io stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-io-stress + spec: + components: + env: + - name: VOLUME_MOUNT_PATH + VALUE: '/tmp' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/memory-bytes.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/memory-bytes.yaml new file mode 100644 index 00000000000..881ab20286d --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/memory-bytes.yaml @@ -0,0 +1,21 @@ +# memory in mb to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-memory-hog + spec: + components: + env: + - name: MEMORY_CONSUMPTION + VALUE: '1024' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/memory-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/memory-percentage.yaml new file mode 100644 index 00000000000..50825ab8874 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/memory-percentage.yaml @@ -0,0 +1,21 @@ +# memory percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-memory-hog + spec: + components: + env: + - name: MEMORY_PERCENTAGE + VALUE: '50' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/multiple-instances.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/multiple-instances.yaml new file mode 100644 index 00000000000..676c8abd27f --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/multiple-instances.yaml @@ -0,0 +1,19 @@ +# multiple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-memory-hog + spec: + components: + env: + # ids of the ec2 instances + - name: EC2_INSTANCE_ID + value: 'instance-1,instance-2,instance-3' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/multiple-workers.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/multiple-workers.yaml new file mode 100644 index 00000000000..5928a1ec676 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-memory-hog/multiple-workers.yaml @@ -0,0 +1,21 @@ +# multiple workers to utilize resources +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-memory-hog + spec: + components: + env: + - name: NUMBER_OF_WORKERS + VALUE: '3' + # id of the ec2 instance + - name: EC2_INSTANCE_ID + value: 'instance-1' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/destination-host-and-ip.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/destination-host-and-ip.yaml new file mode 100644 index 00000000000..c7741a48867 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/destination-host-and-ip.yaml @@ -0,0 +1,23 @@ +# it injects the chaos into the egress traffic for specific IPs/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-latency + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'google.com' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-interface.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-interface.yaml new file mode 100644 index 00000000000..8c4d013bd98 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-interface.yaml @@ -0,0 +1,20 @@ +# it injects the chaos into the egress traffic for specific network interface +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-latency + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-latency-with-jitter.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-latency-with-jitter.yaml new file mode 100644 index 00000000000..e93d65d6273 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-latency-with-jitter.yaml @@ -0,0 +1,22 @@ +# it injects the chaos into the egress traffic +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-latency + spec: + components: + env: + # value of the network latency jitter (in ms) + - name: JITTER + value: '200' + - name: NETWORK_LATENCY + value: '2000' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-latency.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-latency.yaml new file mode 100644 index 00000000000..eb422d88a79 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-latency/network-latency.yaml @@ -0,0 +1,20 @@ +# it injects the chaos into the egress traffic +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-latency + spec: + components: + env: + # network packet latency + - name: NETWORK_LATENCY + value: '2000' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/destination-host-and-ip.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/destination-host-and-ip.yaml new file mode 100644 index 00000000000..8b292349811 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/destination-host-and-ip.yaml @@ -0,0 +1,23 @@ +# it injects the chaos into the egress traffic for specific IPs/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-loss + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'google.com' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/network-interface.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/network-interface.yaml new file mode 100644 index 00000000000..b6b8cb48a3a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/network-interface.yaml @@ -0,0 +1,20 @@ +# it injects the chaos into the egress traffic for specific network interface +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-loss + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/network-packet-loss-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/network-packet-loss-percentage.yaml new file mode 100644 index 00000000000..438dcaec5de --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-network-loss/network-packet-loss-percentage.yaml @@ -0,0 +1,20 @@ +# it injects the chaos into the egress traffic +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-network-loss + spec: + components: + env: + # network packet loss percentage + - name: NETWORK_PACKET_LOSS_PERCENTAGE + value: '100' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-process-kill/ec2-process-kill-processid.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-process-kill/ec2-process-kill-processid.yaml new file mode 100644 index 00000000000..b7a5c75fcb9 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-process-kill/ec2-process-kill-processid.yaml @@ -0,0 +1,20 @@ +# Process kill running on ec2 instance +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-process-kill + spec: + components: + env: + # List of Process IDs + - name: PROCESS_IDS + value: '8688,4678' + - name: EC2_INSTANCE_ID + value: 'instance-1' + - name: REGION + value: 'us-west-2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-id/instance-id.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-id/instance-id.yaml index fafa5352ccb..7d08d3f3bc3 100644 --- a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-id/instance-id.yaml +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-id/instance-id.yaml @@ -5,8 +5,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: ec2-terminate-by-id-sa + chaosServiceAccount: litmus-admin experiments: - name: ec2-terminate-by-id spec: @@ -17,6 +16,4 @@ spec: value: 'instance-1' # region for the ec2 instance - name: REGION - value: '' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' \ No newline at end of file + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-tag/instance-affected-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-tag/instance-affected-percentage.yaml new file mode 100644 index 00000000000..542e5d34957 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-tag/instance-affected-percentage.yaml @@ -0,0 +1,22 @@ +# percentage of ec2 instances, needs to terminate with provided tags +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-terminate-by-tag + spec: + components: + env: + # percentage of ec2 instance filtered by tags + - name: INSTANCE_AFFECTED_PERC + value: '100' + # tag of the ec2 instance + - name: INSTANCE_TAG + value: 'key:value' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-tag/instance-tag.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-tag/instance-tag.yaml new file mode 100644 index 00000000000..2ccfea78486 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ec2-stop-by-tag/instance-tag.yaml @@ -0,0 +1,19 @@ +# target the ec2 instances with matching tag +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: ec2-terminate-by-tag + spec: + components: + env: + # tag of the ec2 instance + - name: INSTANCE_TAG + value: 'key:value' + # region for the ec2 instance + - name: REGION + value: 'us-east-1' diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-agent-stop/agent-stop.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-agent-stop/agent-stop.yaml new file mode 100644 index 00000000000..b24d73c0b2a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-agent-stop/agent-stop.yaml @@ -0,0 +1,21 @@ +# stops the agent of an ecs cluster +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-agent-stop + spec: + components: + env: + # provide the name of ecs cluster + - name: CLUSTER_NAME + value: 'demo' + - name: REGION + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-instance-stop/instance-stop.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-instance-stop/instance-stop.yaml new file mode 100644 index 00000000000..775f6fcac23 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-instance-stop/instance-stop.yaml @@ -0,0 +1,21 @@ +# stops the agent of an ecs cluster +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-instance-stop + spec: + components: + env: + # provide the name of ecs cluster + - name: CLUSTER_NAME + value: 'demo' + - name: EC2_INSTANCE_ID + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/jitter.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/jitter.yaml new file mode 100644 index 00000000000..90c145f9650 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/jitter.yaml @@ -0,0 +1,17 @@ +# provide the network latency jitter +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-latency + spec: + components: + env: + # value of the network latency jitter (in ms) + - name: JITTER + value: '200' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/latency-destination-ip-and-hosts.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/latency-destination-ip-and-hosts.yaml new file mode 100644 index 00000000000..bca21372423 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/latency-destination-ip-and-hosts.yaml @@ -0,0 +1,22 @@ +# it inject the chaos for the egress traffic for specific ips/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-latency + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'nginx.default.svc.cluster.local,google.com' + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/latency-network-interface.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/latency-network-interface.yaml new file mode 100644 index 00000000000..fdc9e494e6c --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/latency-network-interface.yaml @@ -0,0 +1,19 @@ +# provide the network interface +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-latency + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/loss-destination-ip-and-hosts.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/loss-destination-ip-and-hosts.yaml new file mode 100644 index 00000000000..2d6d9f2b6cd --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/loss-destination-ip-and-hosts.yaml @@ -0,0 +1,22 @@ +# it inject the chaos for the egress traffic for specific ips/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-loss + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'nginx.default.svc.cluster.local,google.com' + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/loss-network-interface.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/loss-network-interface.yaml new file mode 100644 index 00000000000..2c31dff7f00 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/loss-network-interface.yaml @@ -0,0 +1,19 @@ +# provide the network interface +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-loss + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/network-latency.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/network-latency.yaml new file mode 100644 index 00000000000..84866cf838a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/network-latency.yaml @@ -0,0 +1,19 @@ +# injects network latency for a certain chaos duration +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-latency + spec: + components: + env: + # network latency to be injected + - name: NETWORK_LATENCY + value: '2000' #in ms + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/network-loss.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/network-loss.yaml new file mode 100644 index 00000000000..407a41a39cf --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-network-chaos/network-loss.yaml @@ -0,0 +1,19 @@ +# injects network loss for a certain chaos duration +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-network-loss + spec: + components: + env: + # network loss to be injected + - name: NETWORK_PACKET_LOSS_PERCENTAGE + value: '100' #in ms + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/cpu-core.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/cpu-core.yaml new file mode 100644 index 00000000000..284f96cb3c8 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/cpu-core.yaml @@ -0,0 +1,21 @@ +# cpu cores for the stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-cpu-hog + spec: + components: + env: + # provide the cpu core to be hogged + - name: CPU_CORE + value: '0' + - name: REGION + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/cpu-load.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/cpu-load.yaml new file mode 100644 index 00000000000..5004367f731 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/cpu-load.yaml @@ -0,0 +1,21 @@ +# cpu load for the stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-cpu-hog + spec: + components: + env: + # provide the cpu load percentage + - name: CPU_LOAD + value: '100' + - name: CPU_CORE + value: '0' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/filesystem-utilization-bytes.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/filesystem-utilization-bytes.yaml new file mode 100644 index 00000000000..b5ae84921bc --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/filesystem-utilization-bytes.yaml @@ -0,0 +1,21 @@ +# stress the i/o of the targeted pod with FILESYSTEM_UTILIZATION_PERCENTAGE of total free space +# it is mutually exclusive with the FILESYSTEM_UTILIZATION_BYTES. +# if both are provided then it will use FILESYSTEM_UTILIZATION_PERCENTAGE for stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # size of io to be stressed + - name: FILESYSTEM_UTILIZATION_BYTES + value: '1' #in GB + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/filesystem-utilization-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/filesystem-utilization-percentage.yaml new file mode 100644 index 00000000000..cef4f0c78d3 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/filesystem-utilization-percentage.yaml @@ -0,0 +1,21 @@ +# stress the i/o of the targeted pod with FILESYSTEM_UTILIZATION_PERCENTAGE of total free space +# it is mutually exclusive with the FILESYSTEM_UTILIZATION_BYTES. +# if both are provided then it will use FILESYSTEM_UTILIZATION_PERCENTAGE for stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # percentage of free space of file system, need to be stressed + - name: FILESYSTEM_UTILIZATION_PERCENTAGE + value: '10' #in GB + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/io-number-of-workers.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/io-number-of-workers.yaml new file mode 100644 index 00000000000..09c49f64187 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/io-number-of-workers.yaml @@ -0,0 +1,19 @@ +# number of workers for the stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # number of io workers + - name: NUMBER_OF_WORKERS + value: '4' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-consumption.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-consumption.yaml new file mode 100644 index 00000000000..27ffc6adce5 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-consumption.yaml @@ -0,0 +1,19 @@ +# define the memory consumption in MB +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-memory-hog + spec: + components: + env: + # memory consumption value + - name: MEMORY_CONSUMPTION + value: '500' #in MB + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-number-of-workers.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-number-of-workers.yaml new file mode 100644 index 00000000000..d41d1a9523e --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-number-of-workers.yaml @@ -0,0 +1,19 @@ +# number of workers for the stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # number of io workers + - name: NUMBER_OF_WORKERS + value: '1' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-percentage.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-percentage.yaml new file mode 100644 index 00000000000..289f1d493cc --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/memory-percentage.yaml @@ -0,0 +1,19 @@ +# define the memory percentage in MB +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-memory-hog + spec: + components: + env: + # memory percentage value + - name: MEMORY_PERCENTAGE + value: '100' #in MB + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/mount-path.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/mount-path.yaml new file mode 100644 index 00000000000..bd16b654ba5 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/ecs-stress-chaos/mount-path.yaml @@ -0,0 +1,19 @@ +# provide the volume mount path, which needs to be filled +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: ecs-container-io-stress + spec: + components: + env: + # path need to be stressed/filled + - name: VOLUME_MOUNT_PATH + value: '/some-dir-in-container' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/azure-disk-loss.md b/docs/chaos-engineering/chaos-faults/azure/azure-disk-loss.md new file mode 100644 index 00000000000..33b444874ad --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/azure-disk-loss.md @@ -0,0 +1,178 @@ +--- +id: azure-disk-loss +title: Azure Disk Loss +--- + +## Introduction +- It causes detachment of virtual disk from an Azure instance before re-attaching it back to the instance after the specified chaos duration. +- It helps to check the performance of the application/process running on the instance. + +:::tip Fault execution flow chart +![Azure Disk Loss](./static/images/azure-disk-loss.png) +::: + +## Uses +
+View the uses of the experiment +
+Coming soon. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16. +- 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: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + azure.auth: |- + { + "clientId": "XXXXXXXXX", + "clientSecret": "XXXXXXXXX", + "subscriptionId": "XXXXXXXXX", + "tenantId": "XXXXXXXXX", + "activeDirectoryEndpointUrl": "XXXXXXXXX", + "resourceManagerEndpointUrl": "XXXXXXXXX", + "activeDirectoryGraphResourceId": "XXXXXXXXX", + "sqlManagementEndpointUrl": "XXXXXXXXX", + "galleryEndpointUrl": "XXXXXXXXX", + "managementEndpointUrl": "XXXXXXXXX" + } +``` +- If you change the secret key name (from `azure.auth`) please also update the `AZURE_AUTH_LOCATION` ENV value on `experiment.yaml`with the same name. +::: + +## Default Validations +:::info +- Azure Disk should be connected to an instance. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
VIRTUAL_DISK_NAMES Name of virtual disks to target. Provide comma separated names for multiple disks
RESOURCE_GROUP The resource group of the target disk(s)
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
SCALE_SET Whether disk is connected to Scale set instance Accepts "enable"/"disable". Default is "disable"
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance poweroff. Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Experiment Examples + +### Common Experiment Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Detach Virtual Disks By Name + +It contains comma separated list of disk names subjected to disk loss chaos. It can be tuned via `VIRTUAL_DISK_NAMES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-disk-loss/azure-disks.yaml yaml) +```yaml +# detach multiple azure disks by their names +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-disk-loss + spec: + components: + env: + # comma separated names of the azure disks attached to VMs + - name: VIRTUAL_DISK_NAMES + value: 'disk-01,disk-02' + # name of the resource group + - name: RESOURCE_GROUP + value: 'rg-azure-disks' +``` + +### Detach Virtual Disks Attached to Scale Set Instances By Name + +It contains comma separated list of disk names attached to scale set instances subjected to disk loss chaos. It can be tuned via `VIRTUAL_DISK_NAMES` and `SCALE_SET` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-disk-loss/azure-scale-set-disk.yaml yaml) +```yaml +# detach multiple azure disks attached to scale set VMs by their names +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-disk-loss + spec: + components: + env: + # comma separated names of the azure disks attached to scaleset VMs + - name: VIRTUAL_DISK_NAMES + value: 'disk-01,disk-02' + # name of the resource group + - name: RESOURCE_GROUP + value: 'rg-azure-disks' + # VM belongs to scaleset or not + - name: SCALE_SET + value: 'enable' +``` diff --git a/docs/chaos-engineering/chaos-faults/azure/azure-instance-cpu-hog.md b/docs/chaos-engineering/chaos-faults/azure/azure-instance-cpu-hog.md new file mode 100644 index 00000000000..7e0d888d50b --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/azure-instance-cpu-hog.md @@ -0,0 +1,277 @@ +--- +id: azure-instance-cpu-hog +title: Azure Instance CPU Hog +--- + +## Introduction + +- Azure Instance CPU Hog contains chaos to disrupt the state of infra resources. The experiment can induce stress chaos on Azure Azure Instance using Azure Run Command, this is carried out by using bash scripts which are in-built in the experiment for the given chaos scenario. +- It causes CPU Hog chaos on Azure Instance using an bash script for a certain chaos duration. + +:::tip Fault execution flow chart +![Azure Instance CPU Hog](./static/images/azure-instance-cpu-hog.png) +::: + +## Uses + +### Uses of the experiment + +:::info + +- The experiment causes cpu hog/stress on the target Azure Instance(s). The idea of this experiment is to simulate issues when there is lack of cpu for other runnning processes/applications resulting into degrading their performance. +- Injecting a rogue process into a target azure instance, we starve the main processes/applications (typically pid 1) of the resources allocated to it (where limits are defined) causing slowness in application traffic or in other cases unrestrained use can cause instance to exhaust resources leading to degradation in performance of processes/applications present on the instance. So this category of chaos experiment helps to build the immunity on the application undergoing any such stress scenario. + +::: + +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**Azure Access Requirement:** + +- Ensure that Azure Run Command agent is installed and running in the target Azure 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: + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + azure.auth: |- + { + "clientId": "XXXXXXXXX", + "clientSecret": "XXXXXXXXX", + "subscriptionId": "XXXXXXXXX", + "tenantId": "XXXXXXXXX", + "activeDirectoryEndpointUrl": "XXXXXXXXX", + "resourceManagerEndpointUrl": "XXXXXXXXX", + "activeDirectoryGraphResourceId": "XXXXXXXXX", + "sqlManagementEndpointUrl": "XXXXXXXXX", + "galleryEndpointUrl": "XXXXXXXXX", + "managementEndpointUrl": "XXXXXXXXX" + } +``` + +- If you change the secret key name (from `azure.auth`) please also update the `AZURE_AUTH_LOCATION` ENV value on `experiment.yaml` with the same name. + +::: + +## Default Validations + +:::info + +- Azure instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the experiment tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
AZURE_INSTANCE_NAMES Names of the target Azure instances Multiple values can be provided as comma-separated string. Eg: instance-1,instance-2
RESOURCE_GROUP The Azure Resource Group name where the instances has been created All the instances must be from the same resource group
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos injection (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive chaos injection Defaults to 60s
AZURE_AUTH_LOCATION Provide the name of the azure secret credentials files Defaults to azure.auth
SCALE_SET Whether the Instance are part of ScaleSet or not. It can be either disable or enable Defaults to disable
INSTALL_DEPENDENCIES Select to install dependencies used to run the cpu chaos. It can be either True or False Defaults to True
CPU_CORE Provide the number of cpu cores to consume Defaults to 0
CPU_LOAD Provide the percentage of a single cpu core to be consumed Defaults to 100
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Experiment Examples + +### Common Experiment Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### CPU CORE + +It defines the cpu core value to be utilised on the Azure instance. It can be tuned via `CPU_CORE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-cpu-hog/cpu-core.yaml yaml) +```yaml +# cpu cores to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-cpu-hog + spec: + components: + env: + - name: CPU_CORE + VALUE: '2' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### CPU PERCENTAGE + +It defines the cpu percentage value to be utilised on the Azure instance. It can be tuned via `CPU_LOAD` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-cpu-hog/cpu-percentage.yaml yaml) +```yaml +# cpu percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-cpu-hog + spec: + components: + env: + - name: CPU_LOAD + VALUE: '50' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### MULTIPLE Azure INSTANCES + +Multiple Azure instances can be targeted in one chaos run. It can be tuned via `AZURE_INSTANCE_NAMES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-cpu-hog/multiple-instances.yaml yaml) +```yaml +# mutilple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-cpu-hog + spec: + components: + env: + # names of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1,instance-2' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### CPU CORE WITH PERCENTAGE CONSUMPTION + +It defines how many cpu cores to utilise with percentage of utilisation on the Azure instance. It can be tuned via `CPU_CORE` and `CPU_LOAD` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-cpu-hog/cpu-core-with-percentage.yaml yaml) +```yaml +# cpu core with percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-cpu-hog + spec: + components: + env: + - name: CPU_CORE + VALUE: '2' + - name: CPU_LOAD + VALUE: '50' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` diff --git a/docs/chaos-engineering/chaos-faults/azure/azure-instance-io-stress.md b/docs/chaos-engineering/chaos-faults/azure/azure-instance-io-stress.md new file mode 100644 index 00000000000..e341fe2dc5a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/azure-instance-io-stress.md @@ -0,0 +1,325 @@ +--- +id: azure-instance-io-stress +title: Azure Instance IO Stress +--- + +## Introduction + +- Azure Instance IO Stress contains chaos to disrupt the state of infra resources. The experiment can induce stress chaos on Azure Instance using Azure Run Command, this is carried out by using bash scripts which are in-built in the experiment for the given chaos scenario. +- It causes IO Stress chaos on Azure Instance using an bash script for a certain chaos duration. + +:::tip Fault execution flow chart +![Azure Instances IO Stress](./static/images/azure-instance-io-stress.png) +::: + +## Uses + +### Uses of the experiment + +:::info + +- Filesystem read and write is another very common and frequent scenario we find with processes/applications that can result in the impact on its delivery. These problems are generally referred to as "Noisy Neighbour" problems. +- Injecting a rogue process into a target azure instance, we starve the main processes/applications (typically pid 1) of the resources allocated to it (where limits are defined) causing slowness in application traffic or in other cases unrestrained use can cause instance to exhaust resources leading to degradation in performance of processes/applications present on the instance. So this category of chaos experiment helps to build the immunity on the application undergoing any such stress scenario. + +::: + +## Prerequisites + +:::info + +### Verify the prerequisites + +- Ensure that Kubernetes Version >= 1.17 + +**Azure Access Requirement:** + +- Ensure that Azure Run Command agent is installed and running in the target Azure 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: + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + azure.auth: |- + { + "clientId": "XXXXXXXXX", + "clientSecret": "XXXXXXXXX", + "subscriptionId": "XXXXXXXXX", + "tenantId": "XXXXXXXXX", + "activeDirectoryEndpointUrl": "XXXXXXXXX", + "resourceManagerEndpointUrl": "XXXXXXXXX", + "activeDirectoryGraphResourceId": "XXXXXXXXX", + "sqlManagementEndpointUrl": "XXXXXXXXX", + "galleryEndpointUrl": "XXXXXXXXX", + "managementEndpointUrl": "XXXXXXXXX" + } +``` + +- If you change the secret key name (from `azure.auth`) please also update the `AZURE_AUTH_LOCATION` ENV value on `experiment.yaml` with the same name. + +::: + +## Default Validations + +:::info + +- Azure instance should be in healthy state. + +::: + +## Experiment tunables + +
+Check the experiment tunables + +

Mandatory Fields

+ + + + + + + + + + + + + + + + + +
Variables Description Notes
AZURE_INSTANCE_NAMES Names of the target Azure instances Multiple values can be provided as comma-separated string. Eg: instance-1,instance-2
RESOURCE_GROUP The Azure Resource Group name where the instances has been created All the instances must be from the same resource group
+ +

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos injection (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive chaos injection Defaults to 60s
AZURE_AUTH_LOCATION Provide the name of the azure secret credentials files Defaults to azure.auth
SCALE_SET Whether the Instance are part of ScaleSet or not. It can be either disable or enable Defaults to disable
INSTALL_DEPENDENCIES Select to install dependencies used to run the io chaos. It can be either True or False Defaults to True
FILESYSTEM_UTILIZATION_PERCENTAGE Specify the size as percentage of free space on the file system Default to 0%, which will result in 1 GB Utilization
FILESYSTEM_UTILIZATION_BYTES Specify the size in GigaBytes(GB). FILESYSTEM_UTILIZATION_PERCENTAGE & FILESYSTEM_UTILIZATION_BYTES are mutually exclusive. If both are provided, FILESYSTEM_UTILIZATION_PERCENTAGE is prioritized. Default to 0GB, which will result in 1 GB Utilization
NUMBER_OF_WORKERS It is the number of IO workers involved in IO disk stress Default to 4
VOLUME_MOUNT_PATH Fill the given volume mount path Defaults to the user HOME directory
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+ +
+ +## Experiment Examples + +### Common Experiment Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### FILESYSTEM UTILIZATION IN MEGABYTES + +It defines the filesytem value to be utilised in megabytes on the Azure instance. It can be tuned via `FILESYSTEM_UTILIZATION_BYTES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-io-stress/filesystem-bytes.yaml yaml) +```yaml +# filesystem bytes to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: FILESYSTEM_UTILIZATION_BYTES + VALUE: '1024' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### FILESYSTEM UTILIZATION IN PERCENTAGE + +It defines the filesytem percentage to be utilised on the Azure instance. It can be tuned via `FILESYSTEM_UTILIZATION_PERCENTAGE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-io-stress/filesystem-percentage.yaml yaml) +```yaml +# filesystem percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: FILESYSTEM_UTILIZATION_PERCENTAGE + VALUE: '50' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### MULTIPLE WORKERS + +It defines the CPU threads to be run to spike the filesystem utilisation, this will increase the growth of filesystem consumption. It can be tuned via `NUMBER_OF_WORKERS` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-io-stress/multiple-workers.yaml yaml) +```yaml +# multiple workers to utilize resources +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: NUMBER_OF_WORKERS + VALUE: '3' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### VOLUME MOUNT PATH + +It defines volume mount path to target attached to the Azure instance. It can be tuned via `VOLUME_MOUNT_PATH` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-io-stress/volume-path.yaml yaml) +```yaml +# volume path to be used for io stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: VOLUME_MOUNT_PATH + VALUE: '/tmp' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### MULTIPLE Azure INSTANCES + +Multiple Azure instances can be targeted in one chaos run. It can be tuned via `AZURE_INSTANCE_NAMES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-io-stress/multiple-instances.yaml yaml) +```yaml +# mutilple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: MEMORY_CONSUMPTION + VALUE: '1024' + # names of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1,instance-2' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` diff --git a/docs/chaos-engineering/chaos-faults/azure/azure-instance-memory-hog.md b/docs/chaos-engineering/chaos-faults/azure/azure-instance-memory-hog.md new file mode 100644 index 00000000000..e810acf10ae --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/azure-instance-memory-hog.md @@ -0,0 +1,278 @@ +--- +id: azure-instance-memory-hog +title: Azure Instance Memory Hog +--- + +## Introduction + +- Azure Instance Memory Hog contains chaos to disrupt the state of infra resources. The experiment can induce stress chaos on Azure Instance using Azure Run Command, this is carried out by using bash scripts which are in-built in the experiment for the given chaos scenario. +- It causes Memory Hog chaos on Azure Instance using an bash script for a certain chaos duration. + +:::tip Fault execution flow chart +![Azure Instance Memory Hog](./static/images/azure-instance-memory-hog.png) +::: + +## Uses + +### Uses of the experiment + +:::info + +- The experiment causes memory hog/stress on the target Azure Instance(s). The idea of this experiment is to simulate issues when there is lack of memory for other runnning processes/applications resulting into degrading their performance. +- Injecting a rogue process into a target azure instance, we starve the main processes/applications (typically pid 1) of the resources allocated to it (where limits are defined) causing slowness in application traffic or in other cases unrestrained use can cause instance to exhaust resources leading to degradation in performance of processes/applications present on the instance. So this category of chaos experiment helps to build the immunity on the application undergoing any such stress scenario. + +::: + +## Prerequisites + +:::info + +### Verify the prerequisites + +- Ensure that Kubernetes Version >= 1.17 + +**Azure Access Requirement:** + +- Ensure that Azure Run Command agent is installed and running in the target Azure 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: + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + azure.auth: |- + { + "clientId": "XXXXXXXXX", + "clientSecret": "XXXXXXXXX", + "subscriptionId": "XXXXXXXXX", + "tenantId": "XXXXXXXXX", + "activeDirectoryEndpointUrl": "XXXXXXXXX", + "resourceManagerEndpointUrl": "XXXXXXXXX", + "activeDirectoryGraphResourceId": "XXXXXXXXX", + "sqlManagementEndpointUrl": "XXXXXXXXX", + "galleryEndpointUrl": "XXXXXXXXX", + "managementEndpointUrl": "XXXXXXXXX" + } +``` + +- If you change the secret key name (from `azure.auth`) please also update the `AZURE_AUTH_LOCATION` ENV value on `experiment.yaml` with the same name. + +::: + +## Default Validations + +:::info + +- Azure instance should be in healthy state. + +::: + +## Experiment tunables + +
+Check the experiment tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
AZURE_INSTANCE_NAMES Names of the target Azure instances Multiple values can be provided as comma-separated string. Eg: instance-1,instance-2
RESOURCE_GROUP The Azure Resource Group name where the instances has been created All the instances must be from the same resource group
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos injection (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive chaos injection Defaults to 60s
AZURE_AUTH_LOCATION Provide the name of the azure secret credentials files Defaults to azure.auth
SCALE_SET Whether the Instance are part of ScaleSet or not. It can be either disable or enable Defaults to disable
MEMORY_CONSUMPTION The amount of memory to be hogged in the azure instance in terms of mega bytes Defaults to 500MB
MEMORY_PERCENTAGE The amount of memory to be hogged in the azure instance in terms of percentage Defaults to 0
NUMBER_OF_WORKERS The number of workers used to run the stress process Defaults to 1
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec eg: 30
+ +
+ +## Experiment Examples + +### Common Experiment Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### MEMORY CONSUMPTION IN MEGABYTES + +It defines the memory value to be utilised in megabytes on the Azure instance. It can be tuned via `MEMORY_CONSUMPTION` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-memory-hog/memory-bytes.yaml yaml) +```yaml +# memory in mb to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-memory-hog + spec: + components: + env: + - name: MEMORY_CONSUMPTION + VALUE: '1024' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### MEMORY CONSUMPTION BY PERCENTAGE + +It defines the memory percentage value to be utilised on the Azure instance. It can be tuned via `MEMORY_PERCENTAGE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-memory-hog/memory-percentage.yaml yaml) +```yaml +# memory percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-memory-hog + spec: + components: + env: + - name: MEMORY_PERCENTAGE + VALUE: '50' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### MULTIPLE Azure INSTANCES + +Multiple Azure instances can be targeted in one chaos run. It can be tuned via `AZURE_INSTANCE_NAMES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-memory-hog/multiple-instances.yaml yaml) +```yaml +# mutilple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-memory-hog + spec: + components: + env: + # names of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1,instance-2' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` + +### MULTIPLE WORKERS + +It defines the CPU threads to be run to spike the memory utilisation, this will increase the growth of memory consumption. It can be tuned via `NUMBER_OF_WORKERS` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-instance-memory-hog/multiple-workers.yaml yaml) +```yaml +# multiple workers to utilize resources +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-memory-hog + spec: + components: + env: + - name: NUMBER_OF_WORKERS + VALUE: '3' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' +``` diff --git a/docs/chaos-engineering/chaos-faults/azure/azure-instance-stop.md b/docs/chaos-engineering/chaos-faults/azure/azure-instance-stop.md index 61d57581489..523986a7f56 100644 --- a/docs/chaos-engineering/chaos-faults/azure/azure-instance-stop.md +++ b/docs/chaos-engineering/chaos-faults/azure/azure-instance-stop.md @@ -12,6 +12,7 @@ title: Azure Instance Stop ::: ## Uses +
View the uses of the experiment
@@ -20,6 +21,7 @@ Coming soon.
## Prerequisites + :::info - Kubernetes > 1.16. - Azure access to stop and start the an instance. @@ -51,6 +53,7 @@ stringData: ::: ## Default Validations + :::info - The Azure instance should be in healthy state. ::: @@ -65,7 +68,7 @@ stringData: Description Notes - + AZURE_INSTANCE_NAME Instance name of the target azure instance For AKS nodes, the instance name is from the scale set section in Azure and not the node name from AKS node pool @@ -74,7 +77,7 @@ stringData: RESOURCE_GROUP The resource group of the target instance - +

Optional Fields

@@ -87,13 +90,13 @@ stringData: - - + + - + @@ -106,7 +109,7 @@ stringData: - +
SCALE_SET Whether instance is part of Scale set Accepts "enable"/"disable". Default is "disable"
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance power off. Defaults to 30s
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
@@ -132,21 +135,18 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: azure-instance-stop-sa + chaosServiceAccount: litmus-admin experiments: - name: azure-instance-stop spec: components: env: - # comma separated list of azure instance names - - name: AZURE_INSTANCE_NAME + # comma separated list of Azure instance names + - name: AZURE_INSTANCE_NAMES value: 'instance-01,instance-02' # name of the resource group - name: RESOURCE_GROUP - value: '' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' + value: 'rg-azure' ``` ### Stop Scale Set Instances @@ -164,19 +164,18 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: azure-instance-stop-sa + chaosServiceAccount: litmus-admin experiments: - name: azure-instance-stop spec: components: env: - # comma separated list of Azure instance names - - name: AZURE_INSTANCE_NAME + # comma separated list of azure instance names + - name: AZURE_INSTANCE_NAMES value: 'instance-01,instance-02' # name of the resource group - name: RESOURCE_GROUP - value: '' + value: 'rg-azure' # accepts enable/disable value. default is disable - name: SCALE_SET value: 'enable' @@ -199,7 +198,6 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: azure-instance-stop-sa experiments: - name: azure-instance-stop @@ -215,5 +213,5 @@ spec: - name: AZURE_INSTANCE_NAME value: 'instance-01,instance-02' - name: RESOURCE_GROUP - value: '' + value: 'rg-azure' ``` diff --git a/docs/chaos-engineering/chaos-faults/azure/azure-web-app-access-restrict.md b/docs/chaos-engineering/chaos-faults/azure/azure-web-app-access-restrict.md new file mode 100644 index 00000000000..1bbd958c9df --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/azure-web-app-access-restrict.md @@ -0,0 +1,284 @@ +--- +id: azure-web-app-access-restrict +title: Azure Web App Access Restrict +--- + +## Introduction +- Cause a split brain condition by restricting access to app-service instance and verify if requests are serviced and recovery is automated upon lifting restrictions +- It helps to check the performance of the application/process running on the instance. + +:::tip Fault execution flow chart +![Azure Web App Access Restrict](./static/images/azure-web-app-access-restrict.png) +::: + +## Uses +
+View the uses of the fault +
+Coming soon. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 +- Ensure that you have sufficient Azure access to web apps +- 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: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + azure.auth: |- + { + "clientId": "XXXXXXXXX", + "clientSecret": "XXXXXXXXX", + "subscriptionId": "XXXXXXXXX", + "tenantId": "XXXXXXXXX", + "activeDirectoryEndpointUrl": "XXXXXXXXX", + "resourceManagerEndpointUrl": "XXXXXXXXX", + "activeDirectoryGraphResourceId": "XXXXXXXXX", + "sqlManagementEndpointUrl": "XXXXXXXXX", + "galleryEndpointUrl": "XXXXXXXXX", + "managementEndpointUrl": "XXXXXXXXX" + } +``` +- If you change the secret key name (from `azure.auth`) please also update the `AZURE_AUTH_LOCATION` ENV value on `experiment.yaml`with the same name. +::: + +## Default Validations +:::info +- Azure target web app should be in running state. +::: + +## Fault tunables +
+ Check the Fault tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
AZURE_WEB_APP_NAMES Name of azure web app services to target. Provide comma-separated names of the web apps
RESOURCE_GROUP The resource group of the target web app
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
RULE_NAME Provide the rule name that should be added as part of chaos injection If not provided it will use a default name litmus-experiment-rule
IP_ADDRESS_BLOCK Provide the IP address/CIDR Range for the rule Default is 0.0.0.0/0
ACTION Provide the action you want to perfrom with the rule Accepts "allow"/"deny". Default is "deny"
PRIORITY Provide the priority of the rule. Lower the number higher the priority and vice versa Default is "300". For more info refer
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance poweroff. Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Fault Examples + +### Common Fault Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Web App Access Restrict By Name + +It contains comma separated list of web app names subjected to chaos. It can be tuned via `AZURE_WEB_APP_NAMES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-web-access-restrict/azure-web-app-name.yaml yaml) +```yaml +# access restrict on target web app by their names +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # comma separated names of the target web apps + - name: AZURE_WEB_APP_NAMES + value: 'webApp-01,webApp-02' + # name of the resource group + - name: RESOURCE_GROUP + value: 'chaos-rg' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + + +### Access Restrict For A Certain CIDR Range + +It contains a CIDR range to be used in rule. It can be tuned via `IP_ADDRESS_BLOCK`. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-web-access-restrict/ip-address-block.yaml yaml) +```yaml +# restrict the web app for a certain +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # provide the value of ip address/CIDR Range + - name: IP_ADDRESS_BLOCK + value: '0.0.0.0/0' + # name of the resource group + - name: RESOURCE_GROUP + value: 'chaos-rg' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + +### Access Restrict With Action + +You can tune if you want to allow or deny traffic for the provided rule using `ACTION` ENV. By default it is set to deny. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-web-access-restrict/action.yaml yaml) +```yaml +# defines the action for the given network rule +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # Provide the action for a rule + - name: ACTION + value: 'deny' + # time duration for the chaos execution + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + +### Access Restrict With Priority + +You can define the priority of the network rule created by fault using `PRIORITY` ENV. By default it is set to `300`. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-web-access-restrict/priority.yaml yaml) +```yaml +# defines the priority for the network rule +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # Provide the priority for a rule + - name: PRIORITY + value: '300' + # time duration for the chaos execution + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + +### Access Restrict With Custom Rule Name + +You can define a custom rule name for this chaos using `RULE_NAME` ENV. This rule will be added for a period of chaos duration. If not provided it will by default use `litmus-experiment-rule`. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-web-access-restrict/rule-name.yaml yaml) +```yaml +# defines the rule name for the network rule created +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # Provide the name of the rule + - name: RULE_NAME + value: 'chaos-rule' +``` diff --git a/docs/chaos-engineering/chaos-faults/azure/azure-web-app-stop.md b/docs/chaos-engineering/chaos-faults/azure/azure-web-app-stop.md new file mode 100644 index 00000000000..1d6b8d37473 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/azure-web-app-stop.md @@ -0,0 +1,146 @@ +--- +id: azure-web-app-stop +title: Azure Web App Stop +--- + +## Introduction +- It shutdowns the app and verify if the requests are re-routed to another instance on app service. +- It helps to check the performance of the web application when subjected to such chaos scenario. + +:::tip Fault execution flow chart +![Azure Web App Stop](./static/images/azure-web-app-stop.png) +::: + +## Uses +
+View the uses of the fault +
+Web App stop is another very frequent scenario we find with Azure web app service which stops a running web app and impacts its delivery. Such scenarios can still occur despite whatever availability aids web app service provides. + +Stopping the web app will disrupt its performance and impact the smooth working of the application. So this category of chaos experiment helps to build immunity to the application undergoing any such scenarios. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16. +- Ensure that you have sufficient Azure access to stop and start web apps. +- 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: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + azure.auth: |- + { + "clientId": "XXXXXXXXX", + "clientSecret": "XXXXXXXXX", + "subscriptionId": "XXXXXXXXX", + "tenantId": "XXXXXXXXX", + "activeDirectoryEndpointUrl": "XXXXXXXXX", + "resourceManagerEndpointUrl": "XXXXXXXXX", + "activeDirectoryGraphResourceId": "XXXXXXXXX", + "sqlManagementEndpointUrl": "XXXXXXXXX", + "galleryEndpointUrl": "XXXXXXXXX", + "managementEndpointUrl": "XXXXXXXXX" + } +``` +- If you change the secret key name (from `azure.auth`) please also update the `AZURE_AUTH_LOCATION` ENV value on `experiment.yaml`with the same name. +::: + +## Default Validations +:::info +- Azure target web app should be in running state. +::: + +## Fault tunables +
+ Check the Fault tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
AZURE_WEB_APP_NAMES Name of azure web app services to target. Provide comma-separated names of the web apps
RESOURCE_GROUP The resource group of the target web apps All the web apps must belong to the same resource group
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance poweroff. Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg: 30
+
+ +## Fault Examples + +### Common Fault Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Stop Web App By Name + +It contains comma separated list of web app names subjected to web app stop chaos. It can be tuned via `AZURE_WEB_APP_NAMES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/azure-web-app-stop/web-app-stop.yaml yaml) +```yaml +# stop web app for a certain chaos duration +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-app-stop + spec: + components: + env: + # comma separated names of the azure web app + - name: AZURE_WEB_APP_NAMES + value: 'webApp-01,webApp-02' + # name of the resource group + - name: RESOURCE_GROUP + value: 'chaos-rg' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/azure/static/images/azure-disk-loss.png b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-disk-loss.png new file mode 100644 index 00000000000..e02a9bb81be Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-disk-loss.png differ diff --git a/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-cpu-hog.png b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-cpu-hog.png new file mode 100644 index 00000000000..6d2f0825eed Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-cpu-hog.png differ diff --git a/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-io-stress.png b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-io-stress.png new file mode 100644 index 00000000000..57b7ceae60d Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-io-stress.png differ diff --git a/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-memory-hog.png b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-memory-hog.png new file mode 100644 index 00000000000..74ac7b52ef9 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-instance-memory-hog.png differ diff --git a/docs/chaos-engineering/chaos-faults/azure/static/images/azure-web-app-access-restrict.png b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-web-app-access-restrict.png new file mode 100644 index 00000000000..63f19e8f488 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-web-app-access-restrict.png differ diff --git a/docs/chaos-engineering/chaos-faults/azure/static/images/azure-web-app-stop.png b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-web-app-stop.png new file mode 100644 index 00000000000..092262ad861 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/azure/static/images/azure-web-app-stop.png differ diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-disk-loss/azure-disks.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-disk-loss/azure-disks.yaml new file mode 100644 index 00000000000..c32d49bad9d --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-disk-loss/azure-disks.yaml @@ -0,0 +1,19 @@ +# detach multiple azure disks by their names +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-disk-loss + spec: + components: + env: + # comma separated names of the azure disks attached to VMs + - name: VIRTUAL_DISK_NAMES + value: 'disk-01,disk-02' + # name of the resource group + - name: RESOURCE_GROUP + value: 'rg-azure-disks' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-disk-loss/azure-scale-set-disk.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-disk-loss/azure-scale-set-disk.yaml new file mode 100644 index 00000000000..064379ed167 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-disk-loss/azure-scale-set-disk.yaml @@ -0,0 +1,22 @@ +# detach multiple azure disks attached to scale set VMs by their names +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-disk-loss + spec: + components: + env: + # comma separated names of the azure disks attached to scaleset VMs + - name: VIRTUAL_DISK_NAMES + value: 'disk-01,disk-02' + # name of the resource group + - name: RESOURCE_GROUP + value: 'rg-azure-disks' + # VM belongs to scaleset or not + - name: SCALE_SET + value: 'enable' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-core-with-percentage.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-core-with-percentage.yaml new file mode 100644 index 00000000000..7b7787647b7 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-core-with-percentage.yaml @@ -0,0 +1,23 @@ +# cpu core with percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-cpu-hog + spec: + components: + env: + - name: CPU_CORE + VALUE: '2' + - name: CPU_LOAD + VALUE: '50' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-core.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-core.yaml new file mode 100644 index 00000000000..9039f9d800e --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-core.yaml @@ -0,0 +1,21 @@ +# cpu cores to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-cpu-hog + spec: + components: + env: + - name: CPU_CORE + VALUE: '2' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-percentage.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-percentage.yaml new file mode 100644 index 00000000000..ec6a38bc47a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/cpu-percentage.yaml @@ -0,0 +1,21 @@ +# cpu percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-cpu-hog + spec: + components: + env: + - name: CPU_LOAD + VALUE: '50' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/multiple-instances.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/multiple-instances.yaml new file mode 100644 index 00000000000..763770f59b1 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-cpu-hog/multiple-instances.yaml @@ -0,0 +1,19 @@ +# mutilple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-cpu-hog + spec: + components: + env: + # names of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1,instance-2' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/filesystem-bytes.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/filesystem-bytes.yaml new file mode 100644 index 00000000000..16aeb72d096 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/filesystem-bytes.yaml @@ -0,0 +1,21 @@ +# filesystem bytes to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: FILESYSTEM_UTILIZATION_BYTES + VALUE: '1024' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/filesystem-percentage.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/filesystem-percentage.yaml new file mode 100644 index 00000000000..749f6d7b1f5 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/filesystem-percentage.yaml @@ -0,0 +1,21 @@ +# filesystem percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: FILESYSTEM_UTILIZATION_PERCENTAGE + VALUE: '50' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/multiple-instances.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/multiple-instances.yaml new file mode 100644 index 00000000000..6a0de16f017 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/multiple-instances.yaml @@ -0,0 +1,21 @@ +# mutilple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: MEMORY_CONSUMPTION + VALUE: '1024' + # names of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1,instance-2' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/multiple-workers.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/multiple-workers.yaml new file mode 100644 index 00000000000..3f62001a291 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/multiple-workers.yaml @@ -0,0 +1,21 @@ +# multiple workers to utilize resources +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: NUMBER_OF_WORKERS + VALUE: '3' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/volume-path.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/volume-path.yaml new file mode 100644 index 00000000000..1045ee314cc --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-io-stress/volume-path.yaml @@ -0,0 +1,21 @@ +# volume path to be used for io stress +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-io-stress + spec: + components: + env: + - name: VOLUME_MOUNT_PATH + VALUE: '/tmp' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/memory-bytes.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/memory-bytes.yaml new file mode 100644 index 00000000000..d3bc6343850 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/memory-bytes.yaml @@ -0,0 +1,21 @@ +# memory in mb to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-memory-hog + spec: + components: + env: + - name: MEMORY_CONSUMPTION + VALUE: '1024' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/memory-percentage.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/memory-percentage.yaml new file mode 100644 index 00000000000..f8687699f36 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/memory-percentage.yaml @@ -0,0 +1,21 @@ +# memory percentage to utilize +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-memory-hog + spec: + components: + env: + - name: MEMORY_PERCENTAGE + VALUE: '50' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/multiple-instances.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/multiple-instances.yaml new file mode 100644 index 00000000000..027ed0b0fdc --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/multiple-instances.yaml @@ -0,0 +1,19 @@ +# mutilple instance targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-memory-hog + spec: + components: + env: + # names of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1,instance-2' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/multiple-workers.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/multiple-workers.yaml new file mode 100644 index 00000000000..892e1553d59 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-memory-hog/multiple-workers.yaml @@ -0,0 +1,21 @@ +# multiple workers to utilize resources +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-instance-memory-hog + spec: + components: + env: + - name: NUMBER_OF_WORKERS + VALUE: '3' + # name of the azure instance + - name: AZURE_INSTANCE_NAMES + value: 'instance-1' + # resource group for the azure instance + - name: RESOURCE_GROUP + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/azure-instance.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/azure-instance.yaml index 7b58e4a296c..dd33164772c 100644 --- a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/azure-instance.yaml +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/azure-instance.yaml @@ -5,8 +5,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: azure-instance-stop-sa + chaosServiceAccount: litmus-admin experiments: - name: azure-instance-stop spec: @@ -17,6 +16,4 @@ spec: value: 'instance-01,instance-02' # name of the resource group - name: RESOURCE_GROUP - value: '' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' + value: 'rg-azure' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/azure-scale-set-instance.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/azure-scale-set-instance.yaml index 0a1b44b3bea..a0a3be6597f 100644 --- a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/azure-scale-set-instance.yaml +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/azure-scale-set-instance.yaml @@ -5,8 +5,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: azure-instance-stop-sa + chaosServiceAccount: litmus-admin experiments: - name: azure-instance-stop spec: @@ -17,9 +16,7 @@ spec: value: 'instance-01,instance-02' # name of the resource group - name: RESOURCE_GROUP - value: '' + value: 'rg-azure' # accepts enable/disable value. default is disable - name: SCALE_SET - value: 'enable' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' + value: 'enable' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/chaos-interval.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/chaos-interval.yaml deleted file mode 100644 index d246a460a83..00000000000 --- a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-instance-stop/chaos-interval.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# defines delay between each successive iteration of the chaos -apiVersion: litmuschaos.io/v1alpha1 -kind: ChaosEngine -metadata: - name: engine-nginx -spec: - engineState: "active" - annotationCheck: "false" - chaosServiceAccount: azure-instance-stop-sa - experiments: - - name: azure-instance-stop - spec: - components: - env: - # delay between each iteration of chaos - - name: CHAOS_INTERVAL - value: '10' - # time duration for the chaos execution - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: AZURE_INSTANCE_NAMES - value: 'instance-01,instance-02' - - name: RESOURCE_GROUP - value: '' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/action.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/action.yaml new file mode 100644 index 00000000000..90b312055be --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/action.yaml @@ -0,0 +1,20 @@ +# defines the action for the given network rule +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # Provide the action for a rule + - name: ACTION + value: 'deny' + # time duration for the chaos execution + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/azure-web-app-name.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/azure-web-app-name.yaml new file mode 100644 index 00000000000..df8d6478298 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/azure-web-app-name.yaml @@ -0,0 +1,22 @@ +# access restrict on target web app by their names +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # comma separated names of the target web apps + - name: AZURE_WEB_APP_NAMES + value: 'webApp-01,webApp-02' + # name of the resource group + - name: RESOURCE_GROUP + value: 'chaos-rg' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/ip-address-block.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/ip-address-block.yaml new file mode 100644 index 00000000000..9bf9211b085 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/ip-address-block.yaml @@ -0,0 +1,22 @@ +# restrict the web app for a certain +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # provide the value of ip address/CIRD range + - name: IP_ADDRESS_BLOCK + value: '0.0.0.0/0' + # name of the resource group + - name: RESOURCE_GROUP + value: 'chaos-rg' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/priority.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/priority.yaml new file mode 100644 index 00000000000..cec21041204 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/priority.yaml @@ -0,0 +1,20 @@ +# defines the priority for the network rule +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # Provide the priority for a rule + - name: PRIORITY + value: '300' + # time duration for the chaos execution + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/rule-name.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/rule-name.yaml new file mode 100644 index 00000000000..89657ee5b7c --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-access-restrict/rule-name.yaml @@ -0,0 +1,17 @@ +# defines the rule name for the network rule created +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-access-restrict + spec: + components: + env: + # Provide the name of the rule + - name: RULE_NAME + value: 'chaos-rule' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-stop/web-app-stop.yaml b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-stop/web-app-stop.yaml new file mode 100644 index 00000000000..872dd15b7e6 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/azure/static/manifests/azure-web-app-stop/web-app-stop.yaml @@ -0,0 +1,22 @@ +# stops web app for a certain chaos duration +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: azure-web-app-stop + spec: + components: + env: + # comma separated names of the azure web app + - name: AZURE_WEB_APP_NAMES + value: 'webApp-01,webApp-02' + # name of the resource group + - name: RESOURCE_GROUP + value: 'chaos-rg' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/chaos-faults.md b/docs/chaos-engineering/chaos-faults/chaos-faults.md index dd1d7d86898..80a03482300 100644 --- a/docs/chaos-engineering/chaos-faults/chaos-faults.md +++ b/docs/chaos-engineering/chaos-faults/chaos-faults.md @@ -2,7 +2,6 @@ id: chaos-faults title: Chaos Faults --- -# Chaos Faults The fault execution is triggered upon creation of the ChaosEngine resource (various examples of which are provided under the respective faults). Typically, these chaosengines are embedded within the 'steps' of a Chaos fault. However, one may also create the ChaosEngines manually, and the chaos-operator reconciles this resource and triggers the fault execution. @@ -10,14 +9,9 @@ Provided below are tables with links to the individual fault docs for easy navig ## Kubernetes Faults -Kubernetes faults disrupt the resources running on a Kubernetes cluster. - +Kubernetes faults disrupt the resources running on a Kubernetes cluster. They can be categorized into Pod-level faults and Node-level faults. -### Generic - -Faults that apply to generic Kubernetes resources are classified into this category. Following chaos faults are supported under Generic chaos: - -#### Pod Chaos +### Pod Chaos @@ -25,14 +19,109 @@ Faults that apply to generic Kubernetes resources are classified into this categ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Description User Guide
Container KillKills the container in the application podcontainer-kill
Disk FillFill up Ephemeral Storage of a Resourceddisk-fill
Pod AutoscalerScales the application replicas and test the node autoscaling on clusterpod-autoscaler
Pod CPU Hog ExecConsumes CPU resources on the application container by invoking a utility within the app container base imagepod-cpu-hog-exec
Pod CPU HogConsumes CPU resources on the application containerpod-cpu-hog
Pod Delete Deletes the application pods pod-delete
Pod DNS ErrorDisrupt dns resolution in kubernetes popod-dns-error
Pod DNS SpoofSpoof dns resolution in kubernetes podpod-dns-spoof
Pod IO StressInjects IO stress resources on the application containerpod-io-stress
Pod Memory Hog ExecConsumes Memory resources on the application container by invoking a utility within the app container base imagepod-memory-hog-exec
Pod Memory HogConsumes Memory resources on the application containerpod-memory-hog
Pod Network CorruptionInjects Network Packet Corruption into Application Podpod-network-corruption
Pod Network DuplicationInjects Network Packet Duplication into Application Podpod-network-duplication
Pod Network LatencyInjects Network latency into Application Podpod-network-latency
Pod Network LossInjects Network loss into Application Podpod-network-loss
Pod HTTP LatencyInjects HTTP latency into Application Podpod-http-latency
Pod HTTP Reset PeerInjects HTTP reset peer into Application Podpod-http-reset-peer
Pod HTTP Status CodeInjects HTTP status code chaos into Application Podpod-http-status-code
Pod HTTP Modify BodyInjects HTTP modify body into Application Podpod-http-modify-body
Pod HTTP Modify HeaderInjects HTTP Modify Header into Application Podpod-http-modify-header
-#### Node Chaos +### Node Chaos @@ -40,11 +129,46 @@ Faults that apply to generic Kubernetes resources are classified into this categ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Description User Guide
Docker Service KillKills the docker service on the application nodedocker-service-kill
Kubelet Service KillKills the kubelet service on the application nodekubelet-service-kill
Node CPU Hog Exhaust CPU resources on the Kubernetes Node node-cpu-hog
Node DrainDrains the target nodenode-drain
Node IO StressInjects IO stress resources on the application nodenode-io-stress
Node Memory HogExhaust Memory resources on the Kubernetes Nodenode-memory-hog
Node Restart Restarts the target nodenode-restart
Node TaintTaints the target nodenode-taint
## Cloud Infrastructure @@ -66,6 +190,36 @@ Following Platform Chaos faults are available: Stop EC2 instances using the instance IDs ec2-stop-by-id + + EC2 Stop By Tag + Stop the ec2 instance using the instance tag + ec2-stop-by-tag + + + EBS Loss By ID + Detach the EBS volume using the volume id + ebs-loss-by-id + + + EBS Loss By Tag + Detach the EBS volume using the volume tag + ebs-loss-by-tag + + + EC2 CPU Hog + Inject CPU stress chaos on EC2 instance + ec2-cpu-hog + + + EC2 Memory Hog + Inject Memory stress chaos on EC2 instance + ec2-memory-hog + + + EC2 IO Stress + Inject IO stress chaos on EC2 instance + ec2-io-stress + EC2 HTTP Latency Inject HTTP latency for services running on EC2 instances @@ -91,6 +245,56 @@ Following Platform Chaos faults are available: Modifies HTTP request or response headers for services running on EC2 instances ec2-http-modify-header + + EC2 Network Loss + Injects network loss on the target ec2 instance(s) + ec2-network-loss + + + EC2 Network Latency + Injects network latency on the target ec2 instance(s) + ec2-network-latency + + + EC2 Dns Chaos + Injects dns faults on the target ec2 instance(s) + ec2-dns-chaos + + + ECS Container CPU Hog + Injects container cpu hog chaos on ECS task containers + ecs-container-cpu-hog + + + ECS Container IO Stress + Injects container IO stress chaos on ECS task containers + ecs-container-io-stress + + + ECS Container Memory Hog + Injects container memory hog chaos on ECS task containers + ecs-container-memory-hog + + + EC2 Container Network Latency + Injects container network latency chaos on ECS task containers + ecs-container-network-latency + + + EC2 Container Network Loss + Injects container network latency chaos on ECS task containers + ecs-container-network-loss + + + EC2 Agent Stop + Injects ECS agent stop chaos on target ECS cluster + ecs-agent-stop + + + EC2 Instance Stop + Injects ECS instance stop chaos on target ECS cluster + ecs-instance-stop + ### GCP @@ -106,6 +310,21 @@ Following Platform Chaos faults are available: Stop GCP VM instances using the VM names gcp-vm-instance-stop + + GCP VM Disk Loss + Detach the GCP disk + gcp-vm-disk-loss + + + GCP VM Instance Stop By Label + Stop GCP VM instances using label selectors + gcp-vm-instance-stop-by-label + + + GCP VM Disk Loss By Label + Detach the GCP disk using label selectors + gcp-vm-disk-loss-by-label + ### Azure @@ -121,6 +340,36 @@ Following Platform Chaos faults are available: Stop Azure VM instances azure-instance-stop + + Azure Instance CPU Hog + Inject CPU stress chaos on Azure instance + azure-instance-cpu-hog + + + Azure Instance Memory Hog + Inject Memory stress chaos on Azure instance + azure-instance-memory-hog + + + Azure Instance IO Stress + Inject IO stress chaos on Azure instance + azure-instance-io-stress + + + Azure Disk Loss + Detach azure disk from instance + azure-disk-loss + + + Azure Web App Stop + Stops an Azure web app service + azure-web-app-stop + + + Azure Web App Access Restrict + Add access restriction for the target web app service + azure-web-app-access-restrict + ### VMWare @@ -132,7 +381,7 @@ Following Platform Chaos faults are available: User Guide - VM Poweroff + VMware VM Poweroff Poweroff VMware VMs using the MOIDs vmware-vmpoweroff @@ -149,7 +398,7 @@ Following Platform Chaos faults are available: VMWare Network Latency Injects network latency on the target VM(s) - vmware-vmpoweroff + vmware-network-latency VMware HTTP Latency @@ -166,4 +415,54 @@ Following Platform Chaos faults are available: Modify HTTP Response on services running on the VMs vmware-http-modify-response + + VMware VM Process kill + Kill the processes running in the VMware VMs using the PROCESS_IDS + vmware-process-kill + + + VMware VM Cpu Hog + VMware cpu hog experiment consumes the CPU resources on Linux OS based VMware VM + vmware-cpu-hog + + + VMware VM Memory Hog + VMware memory hog experiment consumes the Memory resources on Linux OS based VMware VM + vmware-memory-hog + + + VMware VM IO Stress + This experiment causes disk stress on the target VMware VMs. + vmware-io-stress + + + VMware VM Service Stop + VMware Service Stop experiment stops the target systemd services running on Linux OS based VMware VM + vmware-service-stop + + + VMware VM Disk Loss + VMware Disk Loss experiment will detach the disks attached to a Linux OS based VMware VM. + vmware-disk-loss + + + VMware Host Reboot + VMware Host Reboot fault reboots a VMware host attached to the Vcenter + vmware-host-reboot + + +### Kube Resilience + + + + + + + + + + + + +
Experiment NameDescriptionUser Guide
Kubelet DensityCheck kubelet resilience for a specific nodekubelet-density
diff --git a/docs/chaos-engineering/chaos-faults/common-tunables-for-all-experiments.md b/docs/chaos-engineering/chaos-faults/common-tunables-for-all-experiments.md index ada5c666c72..2f14a93d638 100644 --- a/docs/chaos-engineering/chaos-faults/common-tunables-for-all-experiments.md +++ b/docs/chaos-engineering/chaos-faults/common-tunables-for-all-experiments.md @@ -9,9 +9,9 @@ It defines the total time duration of the chaos injection. You can tune it using Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/common/chaos-duration.yaml yaml) +[embedmd]:# (./static/manifest/common/chaos-duration.yaml yaml) ```yaml -# define the total chaos duration +# defines total time duration of the chaos apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -23,7 +23,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -34,15 +34,49 @@ spec: VALUE: '60' ``` +### Multiple Iterations Of Chaos + +The multiple iterations of chaos can be tuned via setting `CHAOS_INTERVAL` ENV. Which defines the delay between each iteration of chaos. + +Use the following example to tune this: + +[embedmd]:# (./static/manifest/common/chaos-interval.yaml yaml) +```yaml +# defines delay between each successive iteration of the chaos +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + # delay between each iteration of chaos + - name: CHAOS_INTERVAL + value: '15' + # time duration for the chaos execution + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + ### Ramp Time It defines the period to wait before and after the injection of chaos. You can tune it using the `RAMP_TIME` environment variable. It is in unit of seconds. Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/common/ramp-time.yaml yaml) +[embedmd]:# (./static/manifest/common/ramp-time.yaml yaml) ```yaml -# waits for the ramp time before and after injection of chaos +# waits for the ramp time before and after injection of chaos apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -54,7 +88,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -63,8 +97,6 @@ spec: # waits for the time interval before and after injection of chaos - name: RAMP_TIME value: '10' # in seconds - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Sequence of chaos execution @@ -77,7 +109,7 @@ The default value of `SEQUENCE` is `parallel`. Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/common/sequence.yaml yaml) +[embedmd]:# (./static/manifest/common/sequence.yaml yaml) ```yaml # define the order of execution of chaos in case of multiple targets apiVersion: litmuschaos.io/v1alpha1 @@ -91,7 +123,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -101,8 +133,6 @@ spec: # supports: serial, parallel. default: parallel - name: SEQUENCE value: 'parallel' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Name of chaos library @@ -111,7 +141,7 @@ It defines the name of the chaos library used for the chaos injection. You can t Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/common/lib.yaml yaml) +[embedmd]:# (./static/manifest/common/lib.yaml yaml) ```yaml # lib for the chaos injection apiVersion: litmuschaos.io/v1alpha1 @@ -125,7 +155,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -134,8 +164,6 @@ spec: # defines the name of the chaoslib used for the experiment - name: LIB value: 'litmus' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Instance ID @@ -144,7 +172,7 @@ It defines a user-defined string that holds metadata/info about the current run/ Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/common/instance-id.yaml yaml) +[embedmd]:# (./static/manifest/common/instance-id.yaml yaml) ```yaml # provide to append user-defined suffix in the end of chaosresult name apiVersion: litmuschaos.io/v1alpha1 @@ -158,7 +186,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -167,8 +195,6 @@ spec: # user-defined string appended as suffix in the chaosresult name - name: INSTANCE_ID value: '123' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Image used by the helper pod @@ -178,7 +204,7 @@ It is supported by [container-kill, network-experiments, stress-experiments, dns Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/common/lib-image.yaml yaml) +[embedmd]:# (./static/manifest/common/lib-image.yaml yaml) ```yaml # it contains the lib image used for the helper pod # it support [container-kill, network-experiments, stress-experiments, dns-experiments, disk-fill, @@ -194,7 +220,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: @@ -203,6 +229,4 @@ spec: # nane of the lib image - name: LIB_IMAGE value: 'litmuschaos/go-runner:latest' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` diff --git a/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-disk-loss-by-label.md b/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-disk-loss-by-label.md new file mode 100644 index 00000000000..a5ab4213522 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-disk-loss-by-label.md @@ -0,0 +1,148 @@ +--- +id: gcp-vm-disk-loss-by-label +title: GCP VM Disk Loss By Label +--- + +## Introduction +- It causes chaos to disrupt the state of GCP persistent disk volume filtered using a label by detaching it from its VM instance for a certain chaos duration. + +:::tip Fault execution flow chart +![GCP VM Disk Loss By Label](./static/images/gcp-vm-disk-loss.png) +::: + +## Uses +
+View the uses of the experiment +
+Coming soon. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16. +- Ensure that your service account has an editor access or owner access for the GCP project. +- Ensure that the target disk volume is not a boot disk of any VM instance. +- Ensure to create a Kubernetes secret having the GCP service account credentials in the default namespace. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + type: + project_id: + private_key_id: + private_key: + client_email: + client_id: + auth_uri: + token_uri: + auth_provider_x509_cert_url: + client_x509_cert_url: +``` +::: + +## Default Validations +:::info +- All the disk volumes having the target label are attached to their respective instances. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
GCP_PROJECT_ID The ID of the GCP Project of which the disk volumes are a part of All the target disk volumes should belong to a single GCP Project
DISK_VOLUME_LABEL Label of the targeted non-boot persistent disk volume The DISK_VOLUME_LABEL should be provided as key:value or key if the corresponding value is empty ex: disk:target-disk
ZONES The zone of target disk volumes Only one zone can be provided i.e. all target disks should lie in the same zone
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between the successive chaos iterations (sec) Defaults to 30s
DISK_AFFECTED_PERC The percentage of total disks filtered using the label to target Defaults to 0 (corresponds to 1 disk), provide numeric value only
SEQUENCE It defines sequence of chaos execution for multiple disks Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Detach Volumes By Label + +It contains the label of disk volumes to be subjected to disk loss chaos. It will detach all the disks with the label `DISK_VOLUME_LABEL` in zone `ZONES` within the `GCP_PROJECT_ID` project. It re-attaches the disk volume after waiting for the specified `TOTAL_CHAOS_DURATION` duration. + +`NOTE:` The `DISK_VOLUME_LABEL` accepts only one label and `ZONES` also accepts only one zone name. Therefore, all the disks must lie in the same zone. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/gcp-vm-disk-loss-by-label/gcp-disk-loss.yaml yaml) +```yaml +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: gcp-vm-disk-loss-by-label + spec: + components: + env: + - name: DISK_VOLUME_LABEL + value: 'disk:target-disk' + - name: ZONES + value: 'us-east1-b' + - name: GCP_PROJECT_ID + value: 'my-project-4513' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-disk-loss.md b/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-disk-loss.md new file mode 100644 index 00000000000..81a9db6e434 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-disk-loss.md @@ -0,0 +1,157 @@ +--- +id: gcp-vm-disk-loss +title: GCP VM Disk Loss +--- + +## Introduction +- It causes chaos to disrupt state of GCP persistent disk volume by detaching it from its VM instance for a certain chaos duration using the disk name. + +:::tip Fault execution flow chart +![GCP VM Disk Loss](./static/images/gcp-vm-disk-loss.png) +::: + +## Uses +
+View the uses of the experiment +
+Coming soon. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16. +- Ensure that your service account has an editor access or owner access for the GCP project. +- Ensure that the target disk volume is not a boot disk of any VM instance. +- Ensure to create a Kubernetes secret having the GCP service account credentials in the default namespace. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + type: + project_id: + private_key_id: + private_key: + client_email: + client_id: + auth_uri: + token_uri: + auth_provider_x509_cert_url: + client_x509_cert_url: +``` +::: + +## Default Validations +:::info +- Disk volumes are attached to their respective instances. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
GCP_PROJECT_ID The ID of the GCP Project of which the disk volumes are a part of All the target disk volumes should belong to a single GCP Project
DISK_VOLUME_NAMES Target non-boot persistent disk volume names Multiple disk volume names can be provided as disk1,disk2,...
ZONES The zones of respective target disk volumes Provide the zone for every target disk name as zone1,zone2... in the respective order of DISK_VOLUME_NAMES
DEVICE_NAMES The device names of respective target disk volumes Provide the device name for every target disk name as deviceName1,deviceName2... in the respective order of DISK_VOLUME_NAMES
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between the successive chaos iterations (sec) Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple disks Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Detach Volumes By Names + +It contains comma separated list of volume names subjected to disk loss chaos. It will detach all the disks with the given `DISK_VOLUME_NAMES` disk names and corresponding `ZONES` zone names and the `DEVICE_NAMES` device names in `GCP_PROJECT_ID` project. It reattached the volume after waiting for the specified `TOTAL_CHAOS_DURATION` duration. + +`NOTE:` The `DISK_VOLUME_NAMES` contains multiple comma-separated disk names. The comma-separated zone names should be provided in the same order as disk names. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/gcp-vm-disk-loss/gcp-disk-loss.yaml yaml) +```yaml +## details of the gcp disk +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: gcp-vm-disk-loss + spec: + components: + env: + # comma separated list of disk volume names + - name: DISK_VOLUME_NAMES + value: 'disk-01,disk-02' + # comma separated list of zone names corresponds to the DISK_VOLUME_NAMES + # it should be provided in same order of DISK_VOLUME_NAMES + - name: ZONES + value: 'zone-01,zone-02' + # comma separated list of device names corresponds to the DISK_VOLUME_NAMES + # it should be provided in same order of DISK_VOLUME_NAMES + - name: DEVICE_NAMES + value: 'device-01,device-02' + # gcp project id to which disk volume belongs + - name: GCP_PROJECT_ID + value: 'project-id' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-instance-stop-by-label.md b/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-instance-stop-by-label.md new file mode 100644 index 00000000000..e0122542abd --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-instance-stop-by-label.md @@ -0,0 +1,186 @@ +--- +id: gcp-vm-instance-stop-by-label +title: GCP VM Instance Stop By Label +--- + +## Introduction +- It causes power-off of GCP VM instances filtered by a label before bringing it back to the running state after the specified chaos duration. +- It helps to check the performance of the application/process running on the VM instance. +- When the `MANAGED_INSTANCE_GROUP` is `enable` then the experiment will not try to start the instances post chaos, instead it will check the addition of new instances to the instance group. + +:::tip Fault execution flow chart +![GCP VM Instance Stop By Label](./static/images/gcp-vm-instance-stop.png) +::: + +## Uses +
+View the uses of the experiment +
+Coming soon. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16. +- Ensure that you have sufficient GCP permissions to stop and start the GCP VM instances. +- Ensure to create a Kubernetes secret having the GCP service account credentials in the default namespace. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: cloud-secret +type: Opaque +stringData: + type: + project_id: + private_key_id: + private_key: + client_email: + client_id: + auth_uri: + token_uri: + auth_provider_x509_cert_url: + client_x509_cert_url: +``` +::: + +## Default Validations +:::info +- All the VM instances having the target label are in a healthy state. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
GCP_PROJECT_ID GCP project ID to which the VM instances belong All the VM instances must belong to a single GCP project
INSTANCE_LABEL Name of target VM instances The INSTANCE_LABEL should be provided as key:value or key if the corresponding value is empty ex: vm:target-vm
ZONES The zone of the target VM instances Only one zone can be provided i.e. all target instances should lie in the same zone
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
MANAGED_INSTANCE_GROUP Set to enable if the target instance is the part of a managed instance group Defaults to disable
INSTANCE_AFFECTED_PERC The percentage of total VMs filtered using the label to target Defaults to 0 (corresponds to 1 instance), provide numeric value only
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Target GCP Instances + +It will stop all the instances with filtered by the label `INSTANCE_LABEL` and corresponding `ZONES` zone in `GCP_PROJECT_ID` project. + +`NOTE:` The `INSTANCE_LABEL` accepts only one label and `ZONES` also accepts only one zone name. Therefore, all the instances must lie in the same zone. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/gcp-vm-instance-stop-by-label/gcp-instance.yaml yaml) +```yaml +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: gcp-vm-instance-stop-by-label + spec: + components: + env: + - name: INSTANCE_LABEL + value: 'vm:target-vm' + - name: ZONES + value: 'us-east1-b' + - name: GCP_PROJECT_ID + value: 'my-project-4513' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` + +### Manged Instance Group + +If vm instances belong to a managed instance group then provide the `MANAGED_INSTANCE_GROUP` as `enable` else provided it as `disable`, which is the default value. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/gcp-vm-instance-stop-by-label/managed-instance-group.yaml yaml) +```yaml +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: gcp-vm-instance-stop-by-label + spec: + components: + env: + - name: MANAGED_INSTANCE_GROUP + value: 'enable' + - name: INSTANCE_LABEL + value: 'vm:target-vm' + - name: ZONES + value: 'us-east1-b' + - name: GCP_PROJECT_ID + value: 'my-project-4513' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-instance-stop.md b/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-instance-stop.md index 883a97340f0..b7fbefdee14 100644 --- a/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-instance-stop.md +++ b/docs/chaos-engineering/chaos-faults/gcp/gcp-vm-instance-stop.md @@ -32,16 +32,16 @@ metadata: name: cloud-secret type: Opaque stringData: - type: - project_id: - private_key_id: - private_key: - client_email: - client_id: - auth_uri: - token_uri: - auth_provider_x509_cert_url: - client_x509_cert_url: + type: + project_id: + private_key_id: + private_key: + client_email: + client_id: + auth_uri: + token_uri: + auth_provider_x509_cert_url: + client_x509_cert_url: ``` ::: @@ -60,12 +60,12 @@ stringData: Description Notes - + GCP_PROJECT_ID GCP project ID to which the VM instances belong All the VM instances must belong to a single GCP project - + VM_INSTANCE_NAMES Name of target VM instances Multiple instance names can be provided as instance1,instance2,... @@ -83,30 +83,30 @@ stringData: Description Notes - + TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s - + CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s - - + + MANAGED_INSTANCE_GROUP Set to enable if the target instance is the part of a managed instance group Defaults to disable - + SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel - + RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 @@ -132,8 +132,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: gcp-vm-instance-stop-sa + chaosServiceAccount: litmus-admin experiments: - name: gcp-vm-instance-stop spec: @@ -149,8 +148,6 @@ spec: # gcp project id to which vm instance belongs - name: GCP_PROJECT_ID value: 'project-id' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Managed Instance Group @@ -168,8 +165,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: gcp-vm-instance-stop-sa + chaosServiceAccount: litmus-admin experiments: - name: gcp-vm-instance-stop spec: diff --git a/docs/chaos-engineering/chaos-faults/gcp/static/images/gcp-vm-disk-loss.png b/docs/chaos-engineering/chaos-faults/gcp/static/images/gcp-vm-disk-loss.png new file mode 100644 index 00000000000..3eabf02b38e Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/gcp/static/images/gcp-vm-disk-loss.png differ diff --git a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-disk-loss-by-label/gcp-disk-loss.yaml b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-disk-loss-by-label/gcp-disk-loss.yaml new file mode 100644 index 00000000000..8c5cb32decf --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-disk-loss-by-label/gcp-disk-loss.yaml @@ -0,0 +1,20 @@ +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: gcp-vm-disk-loss-by-label + spec: + components: + env: + - name: DISK_VOLUME_LABEL + value: 'disk:target-disk' + - name: ZONES + value: 'us-east1-b' + - name: GCP_PROJECT_ID + value: 'my-project-4513' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-disk-loss/gcp-disk-loss.yaml b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-disk-loss/gcp-disk-loss.yaml new file mode 100644 index 00000000000..e213eb68c7d --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-disk-loss/gcp-disk-loss.yaml @@ -0,0 +1,29 @@ +## details of the gcp disk +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: gcp-vm-disk-loss + spec: + components: + env: + # comma separated list of disk volume names + - name: DISK_VOLUME_NAMES + value: 'disk-01,disk-02' + # comma separated list of zone names corresponds to the DISK_VOLUME_NAMES + # it should be provided in same order of DISK_VOLUME_NAMES + - name: ZONES + value: 'zone-01,zone-02' + # comma separated list of device names corresponds to the DISK_VOLUME_NAMES + # it should be provided in same order of DISK_VOLUME_NAMES + - name: DEVICE_NAMES + value: 'device-01,device-02' + # gcp project id to which disk volume belongs + - name: GCP_PROJECT_ID + value: 'project-id' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop-by-label/gcp-instance.yaml b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop-by-label/gcp-instance.yaml new file mode 100644 index 00000000000..ed0283ca674 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop-by-label/gcp-instance.yaml @@ -0,0 +1,20 @@ +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: gcp-vm-instance-stop-by-label + spec: + components: + env: + - name: INSTANCE_LABEL + value: 'vm:target-vm' + - name: ZONES + value: 'us-east1-b' + - name: GCP_PROJECT_ID + value: 'my-project-4513' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop-by-label/managed-instance-group.yaml b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop-by-label/managed-instance-group.yaml new file mode 100644 index 00000000000..1708a7e24d2 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop-by-label/managed-instance-group.yaml @@ -0,0 +1,22 @@ +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: gcp-vm-instance-stop-by-label + spec: + components: + env: + - name: MANAGED_INSTANCE_GROUP + value: 'enable' + - name: INSTANCE_LABEL + value: 'vm:target-vm' + - name: ZONES + value: 'us-east1-b' + - name: GCP_PROJECT_ID + value: 'my-project-4513' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/chaos-interval.yaml b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/chaos-interval.yaml deleted file mode 100644 index 34bc3cfc767..00000000000 --- a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/chaos-interval.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# defines delay between each successive iteration of the chaos -apiVersion: litmuschaos.io/v1alpha1 -kind: ChaosEngine -metadata: - name: engine-nginx -spec: - engineState: "active" - annotationCheck: "false" - chaosServiceAccount: gcp-vm-instance-stop-sa - experiments: - - name: gcp-vm-instance-stop - spec: - components: - env: - # delay between each iteration of chaos - - name: CHAOS_INTERVAL - value: '15' - # time duration for the chaos execution - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_INSTANCE_NAMES - value: 'instance-01,instance-02' - - name: ZONES - value: 'zone-01,zone-02' - - name: GCP_PROJECT_ID - value: 'project-id' - \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/gcp-instance.yaml b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/gcp-instance.yaml index 4609db83723..95a9a7938d5 100644 --- a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/gcp-instance.yaml +++ b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/gcp-instance.yaml @@ -5,8 +5,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: gcp-vm-instance-stop-sa + chaosServiceAccount: litmus-admin experiments: - name: gcp-vm-instance-stop spec: @@ -21,6 +20,4 @@ spec: value: 'zone-01,zone-02' # gcp project id to which vm instance belongs - name: GCP_PROJECT_ID - value: 'project-id' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' + value: 'project-id' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/managed-instance-group.yaml b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/managed-instance-group.yaml index f0abf214d0f..b13927c422e 100644 --- a/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/managed-instance-group.yaml +++ b/docs/chaos-engineering/chaos-faults/gcp/static/manifests/gcp-vm-instance-stop/managed-instance-group.yaml @@ -5,8 +5,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: gcp-vm-instance-stop-sa + chaosServiceAccount: litmus-admin experiments: - name: gcp-vm-instance-stop spec: @@ -25,6 +24,4 @@ spec: value: 'zone-01,zone-02' # gcp project id to which vm instance belongs - name: GCP_PROJECT_ID - value: 'project-id' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' \ No newline at end of file + value: 'project-id' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kube-resilience/_category_.json b/docs/chaos-engineering/chaos-faults/kube-resilience/_category_.json new file mode 100644 index 00000000000..df889647aa3 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kube-resilience/_category_.json @@ -0,0 +1,9 @@ +{ + "position": 6, + "label": "Kube Resilience", + "collapsible": true, + "collapsed": true, + "customProps": { + "description": "Kube resilience faults documentation" + } +} \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kube-resilience/kubelet-density.md b/docs/chaos-engineering/chaos-faults/kube-resilience/kubelet-density.md new file mode 100644 index 00000000000..1314c2067bb --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kube-resilience/kubelet-density.md @@ -0,0 +1,234 @@ +cd--- +id: kubelet-density +title: Kubelet Density +--- + +## Introduction + +- It checks the resilience of the kubelet by creating pods on the specified node. +- It helps to check the performance of the kubelet for the specified node + +:::tip Fault execution flow chart +![Kubelet Density](./static/images/kubelet-density.png) +::: + +## Uses + +
+View the uses of the experiment +
+Coming soon. +
+
+ +## Prerequisites + +:::info + +- Ensure that Kubernetes Version > 1.16. + +::: + +## Default Validations + +:::info + +- The target nodes should be in healthy state before and after chaos injection. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + +
Variables Description Notes
TARGET_NODE name of the target node it selects a random target node, if this env is not set
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 90s
POD_COUNT total number of pods, which needs to be created during chaos Defaults to 50
TARGET_NAMESPACE namespace where pods needs to be created Defaults to same as CHAOS_NAMESPACE
POD_TEMPLATE_CM name of the config map, which contains pod template
POD_TEMPLATE_PATH path where pod-template configMap is mounted Default to /templates/pod.yml
POD_SELECTOR label selectors of the pods Defaults to {name: kubelet-density-app}
POD_IMAGE image of the pod Defaults to gcr.io/google_containers/pause-amd64:3.0
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables + +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Pod Template provided as CM + +Experiment creates pods on the target node during chaos. Template of the pod can be provided by mounting pod-template via configmap and +pass its name and mountPath via `POD_TEMPLATE_CM` and `POD_TEMPLATE_PATH` ENV respectively. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/kubelet-density/pod-template.yaml yaml) +```yaml +# defines pod template cm and its mount path +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: kubelet-density + spec: + components: + env: + # name of the pod template cm + - name: POD_TEMPLATE_CM + value: 'pod-template-cm' + # mount path of the cm + - name: POD_TEMPLATE_PATH + VALUE: '/templates/pod.yml' + - name: TARGET_NODE + value: 'node1' +``` + +### Pod Count + +It contains the number of the pods, which should be created on the target node. It can be tuned via `POD_COUNT` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/kubelet-density/pod-count.yaml yaml) +```yaml +# defines count of the pod +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: kubelet-density + spec: + components: + env: + # number of pods, which needs to be created + - name: POD_COUNT + value: '50' + - name: TARGET_NODE + value: 'node1' +``` + +### Target Namespace + +It contains the namespace where pods need to be created. It can be tuned via `TARGET_NAMESPACE` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/kubelet-density/target-namespace.yaml yaml) +```yaml +# defines pod namespace +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: kubelet-density + spec: + components: + env: + # namespace where pods need to be created + - name: TARGET_NAMESPACE + value: 'litmus' + - name: TARGET_NODE + value: 'node1' +``` + +### Pod Image and Pod Selectors + +Pod image and label selectors can be tuned via `POD_IMAGE` and `POD_SELECTOR` ENV respectively. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/kubelet-density/pod-image-and-selectors.yaml yaml) +```yaml +# defines pod image and label selectors +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: kubelet-density + spec: + components: + env: + # image of the pod + - name: POD_IMAGE + value: 'nginx' + # pod label selectors + - name: POD_SELECTOR + value: '{name: kubelet-density-app}' + - name: TARGET_NODE + value: 'node1' +``` diff --git a/docs/chaos-engineering/chaos-faults/kube-resilience/static/images/kubelet-density.png b/docs/chaos-engineering/chaos-faults/kube-resilience/static/images/kubelet-density.png new file mode 100644 index 00000000000..a825797902e Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/kube-resilience/static/images/kubelet-density.png differ diff --git a/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-count.yaml b/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-count.yaml new file mode 100644 index 00000000000..637e4239bf0 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-count.yaml @@ -0,0 +1,19 @@ +# defines count of the pod +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: kubelet-density + spec: + components: + env: + # number of pods, which needs to be created + - name: POD_COUNT + value: '50' + - name: TARGET_NODE + value: 'node1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-image-and-selectors.yaml b/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-image-and-selectors.yaml new file mode 100644 index 00000000000..79caed57391 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-image-and-selectors.yaml @@ -0,0 +1,22 @@ +# defines pod image and label selectors +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: kubelet-density + spec: + components: + env: + # image of the pod + - name: POD_IMAGE + value: 'nginx' + # pod label selectors + - name: POD_SELECTOR + value: '{name: kubelet-density-app}' + - name: TARGET_NODE + value: 'node1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-template.yaml b/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-template.yaml new file mode 100644 index 00000000000..44a34268d97 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/pod-template.yaml @@ -0,0 +1,22 @@ +# defines pod template cm and its mount path +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: kubelet-density + spec: + components: + env: + # name of the pod template cm + - name: POD_TEMPLATE_CM + value: 'pod-template-cm' + # mount path of the cm + - name: POD_TEMPLATE_PATH + VALUE: '/templates/pod.yml' + - name: TARGET_NODE + value: 'node1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/target-namespace.yaml b/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/target-namespace.yaml new file mode 100644 index 00000000000..e0053634e26 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kube-resilience/static/manifests/kubelet-density/target-namespace.yaml @@ -0,0 +1,19 @@ +# defines pod namespace +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: kubelet-density + spec: + components: + env: + # namespace where pods need to be created + - name: TARGET_NAMESPACE + value: 'litmus' + - name: TARGET_NODE + value: 'node1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/common-tunables-for-node-experiments.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/common-tunables-for-node-experiments.md index 3620d692fe7..c08e13489c8 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/common-tunables-for-node-experiments.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/common-tunables-for-node-experiments.md @@ -6,11 +6,11 @@ Experiment tunables which are common for all the node experiments. These tunable ### Target Single Node It defines the name of the target node subjected to chaos. The target node can be tuned via `TARGET_NODE` ENV. It contains only a single node name. -`NOTE`: It is supported by [node-drain, node-taint, node-restart, kubelet-service-kill, docker-service-kill] experiments. +`NOTE`: It is supported by [node-drain, node-taint, node-restart, kubelet-service-kill, docker-service-kill] experiments. Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/nodes/common/target-node.yaml yaml) +[embedmd]:# (./static/manifests/common/target-node.yaml yaml) ```yaml ## provide the target node name ## it is applicable for the [node-drain, node-taint, node-restart, kubelet-service-kill, docker-service-kill] @@ -21,7 +21,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-drain-sa + chaosServiceAccount: litmus-admin experiments: - name: node-drain spec: @@ -30,8 +30,6 @@ spec: # name of the target node - name: TARGET_NODE value: 'node01' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Target Multiple Nodes @@ -41,7 +39,7 @@ It defines the comma-separated name of the target nodes subjected to chaos. The Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/nodes/common/target-nodes.yaml yaml) +[embedmd]:# (./static/manifests/common/target-nodes.yaml yaml) ```yaml ## provide the comma separated target node names ## it is applicable for the [node-cpu-hog, node-memory-hog, node-io-stress] @@ -52,7 +50,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-cpu-hog spec: @@ -61,18 +59,16 @@ spec: # comma separated target node names - name: TARGET_NODES value: 'node01,node02' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Target Nodes With Labels -It defines the labels of the targeted node(s) subjected to chaos. The node labels can be tuned via `NODE_LABEL` ENV. +It defines the labels of the targeted node(s) subjected to chaos. The node labels can be tuned via `NODE_LABEL` ENV. It is mutually exclusive with the `TARGET_NODE(S)` ENV. If `TARGET_NODE(S)` ENV is set then it will use the nodes provided inside it otherwise, it will derive the node name(s) with matching node labels. Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/nodes/common/target-label.yaml yaml) +[embedmd]:# (./static/manifests/common/target-label.yaml yaml) ```yaml ## provide the labels of the targeted nodes apiVersion: litmuschaos.io/v1alpha1 @@ -82,7 +78,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-cpu-hog spec: @@ -92,8 +88,6 @@ spec: # it will derive the target nodes if TARGET_NODE(S) ENV is not set - name: NODE_LABEL value: 'key=value' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Node Affected Percentage @@ -103,7 +97,7 @@ It is supported by [node-cpu-hog, node-memory-hog, node-io-stress] experiments. Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/nodes/common/node-affected-percentage.yaml yaml) +[embedmd]:# (./static/manifests/common/node-affected-percentage.yaml yaml) ```yaml ## provide the percentage of nodes to be targeted with matching labels ## it is applicable for the [node-cpu-hog, node-memory-hog, node-io-stress] @@ -114,7 +108,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-cpu-hog spec: @@ -127,6 +121,4 @@ spec: # it will derive the target nodes if TARGET_NODE(S) ENV is not set - name: NODE_LABEL value: 'key=value' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/docker-service-kill.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/docker-service-kill.md index 2a677ca7107..25857ddbc0d 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/docker-service-kill.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/docker-service-kill.md @@ -5,7 +5,7 @@ title: Docker Service Kill ## Introduction - This experiment Causes the application to become unreachable on account of node turning unschedulable (NotReady) due to docker service kill -- The docker service has been stopped/killed on a node to make it unschedulable for a certain duration i.e TOTAL_CHAOS_DURATION. The application node should be healthy after the chaos injection and the services should be reaccessable. +- The docker service has been stopped/killed on a node to make it unschedulable for a certain duration i.e `TOTAL_CHAOS_DURATION`. The application node should be healthy after the chaos injection and the services should be re-accessible. - The application implies services. Can be reframed as: Test application resiliency upon replica getting unreachable caused due to docker service down. :::tip Fault execution flow chart @@ -23,7 +23,7 @@ Coming soon. ## Prerequisites :::info - Ensure that Kubernetes Version > 1.16 -- Ensure that the node specified in the experiment ENV variable TARGET_NODE (the node for which docker service need to be killed) should be cordoned before execution of the chaos experiment (before applying the chaosengine manifest) to ensure that the litmus experiment runner pods are not scheduled on it / subjected to eviction. This can be achieved with the following steps: +- Ensure that the node specified in the experiment ENV variable TARGET_NODE (the node for which docker service need to be killed) should be cordoned before execution of the chaos experiment to ensure that the experiment resources are not scheduled on it or subjected to eviction. This can be achieved with the following steps: - Get node names against the applications pods: kubectl get pods -o wide - Cordon the node kubectl cordon <nodename> ::: @@ -46,12 +46,12 @@ The target nodes should be in ready state before and after chaos injection. TARGET_NODE Name of the target node - + Eg. node-1 NODE_LABEL It contains node label, which will be used to filter the target node if TARGET_NODE ENV is not set - It is mutually exclusive with the TARGET_NODE ENV. If both are provided then it will use the TARGET_NODE + It is mutually exclusive with the TARGET_NODE ENV. If both are provided then it will use the TARGET_NODE

Optional Fields

@@ -67,14 +67,14 @@ The target nodes should be in ready state before and after chaos injection. Defaults to 60s - LIB + LIB The chaos lib used to inject the chaos Defaults to litmus RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 @@ -100,7 +100,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: docker-service-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: docker-service-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/kubelet-service-kill.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/kubelet-service-kill.md index e73cacc45f7..df85d2fea7d 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/kubelet-service-kill.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/kubelet-service-kill.md @@ -5,7 +5,7 @@ title: Kubelet Service Kill ## Introduction - This experiment Causes the application to become unreachable on account of node turning unschedulable (NotReady) due to kubelet service kill. -- The kubelet service has been stopped/killed on a node to make it unschedulable for a certain duration i.e TOTAL_CHAOS_DURATION. The application node should be healthy after the chaos injection and the services should be reaccessable. +- The kubelet service has been stopped/killed on a node to make it unschedulable for a certain duration i.e `TOTAL_CHAOS_DURATION`. The application node should be healthy after the chaos injection and the services should be re-accessible. - The application implies services. Can be reframed as: Test application resiliency upon replica getting unreachable caused due to kubelet service down. :::tip Fault execution flow chart @@ -23,7 +23,7 @@ Coming soon. ## Prerequisites :::info - Ensure that Kubernetes Version > 1.16. -- Ensure that the node specified in the experiment ENV variable TARGET_NODE (the node for which docker service need to be killed) should be cordoned before execution of the chaos experiment (before applying the chaosengine manifest) to ensure that the litmus experiment runner pods are not scheduled on it / subjected to eviction. This can be achieved with the following steps: +- Ensure that the node specified in the experiment ENV variable TARGET_NODE (the node for which docker service need to be killed) should be cordoned before execution of the chaos experiment to ensure that the experiment resources are not scheduled on it or subjected to eviction. This can be achieved with the following steps: - Get node names against the applications pods: kubectl get pods -o wide - Cordon the node kubectl cordon <nodename> ::: @@ -50,8 +50,8 @@ The target nodes should be in ready state before and after chaos injection. NODE_LABEL - It contains node label, which will be used to filter the target node if TARGET_NODE ENV is not set - It is mutually exclusive with the TARGET_NODE ENV. If both are provided then it will use the TARGET_NODE + It contains node label, which will be used to filter the target node if TARGET_NODE ENV is not set + It is mutually exclusive with the TARGET_NODE ENV. If both are provided then it will use the TARGET_NODE

Optional Fields

@@ -67,19 +67,19 @@ The target nodes should be in ready state before and after chaos injection. Defaults to 60s - LIB + LIB The chaos lib used to inject the chaos Defaults to litmus - LIB_IMAGE + LIB_IMAGE The lib image used to inject kubelet kill chaos the image should have systemd installed in it. Defaults to ubuntu:16.04 RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 @@ -105,7 +105,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: kubelet-service-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: kubelet-service-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-cpu-hog.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-cpu-hog.md index bfed8434a5d..d7b4616897d 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-cpu-hog.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-cpu-hog.md @@ -64,26 +64,25 @@ The target nodes should be in ready state before and after chaos injection. Defaults to 60 - LIB + LIB The chaos lib used to inject the chaos Defaults to litmus - LIB_IMAGE + LIB_IMAGE Image used to run the stress command Defaults to litmuschaos/go-runner:latest RAMP_TIME Period to wait before & after injection of chaos in sec - Optional + Eg. 30 NODE_CPU_CORE Number of cores of node CPU to be consumed Defaults to 2 - NODES_AFFECTED_PERC @@ -118,7 +117,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-cpu-hog spec: @@ -147,7 +146,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-cpu-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-drain.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-drain.md index af198e6f2d3..96a21ce86ac 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-drain.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-drain.md @@ -21,7 +21,7 @@ Coming soon. ## Prerequisites :::info - Ensure that Kubernetes Version > 1.16. -- Ensure that the node specified in the experiment ENV variable TARGET_NODE (the node for which docker service need to be killed) should be cordoned before execution of the chaos experiment (before applying the chaosengine manifest) to ensure that the litmus experiment runner pods are not scheduled on it / subjected to eviction. This can be achieved with the following steps: +- Ensure that the node specified in the experiment ENV variable TARGET_NODE (the node for which docker service need to be killed) should be cordoned before execution of the chaos experiment to ensure that the experiment resources are not scheduled on it or subjected to eviction. This can be achieved with the following steps: - Get node names against the applications pods: kubectl get pods -o wide - Cordon the node kubectl cordon <nodename> ::: @@ -48,8 +48,8 @@ The target nodes should be in ready state before and after chaos injection. NODE_LABEL - It contains node label, which will be used to filter the target node if TARGET_NODE ENV is not set - It is mutually exclusive with the TARGET_NODE ENV. If both are provided then it will use the TARGET_NODE + It contains node label, which will be used to filter the target node if TARGET_NODE ENV is not set + It is mutually exclusive with the TARGET_NODE ENV. If both are provided then it will use the TARGET_NODE

Optional Fields

@@ -65,14 +65,14 @@ The target nodes should be in ready state before and after chaos injection. Defaults to 60s - LIB + LIB The chaos lib used to inject the chaos Defaults to `litmus` RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 @@ -97,7 +97,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-drain-sa + chaosServiceAccount: litmus-admin experiments: - name: node-drain spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-io-stress.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-io-stress.md index edd398b07eb..bcb3a386523 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-io-stress.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-io-stress.md @@ -22,7 +22,7 @@ Coming soon. ## Prerequisites :::info -- Ensure that Kubernetes Version > 1.16 +- Ensure that Kubernetes Version > 1.16. ::: ## Default Validations @@ -43,12 +43,12 @@ The target nodes should be in ready state before and after chaos injection. TARGET_NODES Comma separated list of nodes, subjected to node io stress chaos - + Eg. node-1,node-2 NODE_LABEL - It contains node label, which will be used to filter the target nodes if TARGET_NODES ENV is not set - It is mutually exclusive with the TARGET_NODES ENV. If both are provided then it will use the TARGET_NODES + It contains node label, which will be used to filter the target nodes if TARGET_NODES ENV is not set + It is mutually exclusive with the TARGET_NODES ENV. If both are provided then it will use the TARGET_NODES

Optional Fields

@@ -70,38 +70,38 @@ The target nodes should be in ready state before and after chaos injection. FILESYSTEM_UTILIZATION_BYTES - Specify the size in GigaBytes(GB). FILESYSTEM_UTILIZATION_PERCENTAGE & FILESYSTEM_UTILIZATION_BYTES are mutually exclusive. If both are provided, FILESYSTEM_UTILIZATION_PERCENTAGE is prioritized. + Specify the size in GigaBytes(GB). FILESYSTEM_UTILIZATION_PERCENTAGE & FILESYSTEM_UTILIZATION_BYTES are mutually exclusive. If both are provided, FILESYSTEM_UTILIZATION_PERCENTAGE is prioritized. CPU Number of core of CPU to be used - Default to 1 + Defaults to 1 NUMBER_OF_WORKERS It is the number of IO workers involved in IO disk stress - Default to 4 + Defaults to 4 VM_WORKERS It is the number vm workers involved in IO disk stress - Default to 1 + Defaults to 1 - LIB + LIB The chaos lib used to inject the chaos - Default to litmus + Defaults to litmus - LIB_IMAGE + LIB_IMAGE Image used to run the stress command - Default to litmuschaos/go-runner:latest + Defaults to litmuschaos/go-runner:latest RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 NODES_AFFECTED_PERC @@ -139,7 +139,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: node-io-stress spec: @@ -171,7 +171,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: node-io-stress spec: @@ -200,7 +200,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: node-io-stress spec: @@ -229,7 +229,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: node-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-memory-hog.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-memory-hog.md index accc643dc28..31719ea33b5 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-memory-hog.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-memory-hog.md @@ -6,8 +6,8 @@ title: Node Memory Hog ## Introduction - This experiment causes Memory resource exhaustion on the Kubernetes node. The experiment aims to verify resiliency of applications whose replicas may be evicted on account on nodes turning unschedulable (Not Ready) due to lack of Memory resources. -- The Memory chaos is injected using a helper pod running the linux stress-ng tool (a workload generator)- The chaos is effected for a period equalling the TOTAL_CHAOS_DURATION and upto MEMORY_CONSUMPTION_PERCENTAGE(out of 100) or MEMORY_CONSUMPTION_MEBIBYTES(in Mebibytes out of total available memory). -- Application implies services. Can be reframed as: Tests application resiliency upon replica evictions caused due to lack of Memory resources +- The Memory chaos is injected using a helper pod running the linux stress-ng tool (a workload generator)- The chaos is effected for a period equalling the TOTAL_CHAOS_DURATION and up to MEMORY_CONSUMPTION_PERCENTAGE (out of 100) or MEMORY_CONSUMPTION_MEBIBYTES (in Mebibytes out of total available memory). +- Application implies services. Can be reframed as: Tests application resiliency upon replica evictions caused due to lack of Memory resources. :::tip Fault execution flow chart ![Node Memory Hog](./static/images/node-stress.png) @@ -39,12 +39,12 @@ The target nodes should be in ready state before and after chaos injection. TARGET_NODES Comma separated list of nodes, subjected to node memory hog chaos - + Eg. node-1,node-2 NODE_LABEL - It contains node label, which will be used to filter the target nodes if TARGET_NODES ENV is not set - It is mutually exclusive with the TARGET_NODES ENV. If both are provided then it will use the TARGET_NODES + It contains node label, which will be used to filter the target nodes if TARGET_NODES ENV is not set + It is mutually exclusive with the TARGET_NODES ENV. If both are provided then it will use the TARGET_NODES

Optional Fields

@@ -57,49 +57,41 @@ The target nodes should be in ready state before and after chaos injection. TOTAL_CHAOS_DURATION The time duration for chaos insertion (in seconds) - Optional Defaults to 120 - LIB + LIB The chaos lib used to inject the chaos - Optional Defaults to `litmus` - LIB_IMAGE + LIB_IMAGE Image used to run the stress command - Optional Defaults to litmuschaos/go-runner:latest MEMORY_CONSUMPTION_PERCENTAGE Percent of the total node memory capacity - Optional Defaults to 30 MEMORY_CONSUMPTION_MEBIBYTES - The size in Mebibytes of total available memory. When using this we need to keep MEMORY_CONSUMPTION_PERCENTAGE empty as the percentage have more precedence - Optional - + The size in Mebibytes of total available memory. When using this we need to keep MEMORY_CONSUMPTION_PERCENTAGE empty as the percentage have more precedence + Eg. 256 NUMBER_OF_WORKERS It is the number of VM workers involved in IO disk stress - Optional Default to 1 RAMP_TIME Period to wait before and after injection of chaos in sec - Optional - + Eg. 30 NODES_AFFECTED_PERC - The Percentage of total nodes to target - Optional + The Percentage of total nodes to target Defaults to 0 (corresponds to 1 node), provide numeric value only @@ -132,7 +124,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-memory-hog spec: @@ -148,7 +140,7 @@ spec: ### Memory Consumption Mebibytes It stresses the `MEMORY_CONSUMPTION_MEBIBYTES` MiBi of the memory of the targeted node. -It is mutually exclusive with the `MEMORY_CONSUMPTION_PERCENTAGE` ENV. If `MEMORY_CONSUMPTION_PERCENTAGE` ENV is set then it will use the percentage for the stress otherwise, it will stress the i/o based on `MEMORY_CONSUMPTION_MEBIBYTES` ENV. +It is mutually exclusive with the `MEMORY_CONSUMPTION_PERCENTAGE` ENV. If `MEMORY_CONSUMPTION_PERCENTAGE` ENV is set then it will use the percentage for the stress otherwise, it will stress the IO based on `MEMORY_CONSUMPTION_MEBIBYTES` ENV. Use the following example to tune this: @@ -164,7 +156,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-memory-hog spec: @@ -193,7 +185,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-memory-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-restart.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-restart.md index 7957438d515..8dc9c464fe6 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-restart.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-restart.md @@ -6,7 +6,7 @@ title: Node Restart ## Introduction - It causes chaos to disrupt state of node by restarting it. -- It tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod +- It tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod. :::tip Fault execution flow chart ![Node Restart](./static/images/node-restart.png) @@ -84,7 +84,7 @@ The target nodes should be in ready state before and after chaos injection. Notes - LIB_IMAGE + LIB_IMAGE The image used to restart the node Defaults to litmuschaos/go-runner:latest @@ -111,10 +111,10 @@ The target nodes should be in ready state before and after chaos injection. RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 - LIB + LIB The chaos lib used to inject the chaos Defaults to litmus supported litmus only @@ -142,7 +142,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-restart-sa + chaosServiceAccount: litmus-admin experiments: - name: node-restart spec: @@ -174,7 +174,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-restart-sa + chaosServiceAccount: litmus-admin experiments: - name: node-restart spec: @@ -206,7 +206,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-restart-sa + chaosServiceAccount: litmus-admin experiments: - name: node-restart spec: @@ -214,7 +214,7 @@ spec: env: # internal ip of the targeted node - name: TARGET_NODE_IP - value: '' + value: '10.0.170.92' # name of the target node - name: TARGET_NODE value: 'node01' diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-taint.md b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-taint.md index 276507110b2..6316eab5a2f 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/node-taint.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/node-taint.md @@ -21,7 +21,7 @@ Coming soon. ## Prerequisites :::info - Ensure that Kubernetes Version > 1.16. -- Ensure that the node specified in the experiment ENV variable TARGET_NODE (the node for which docker service need to be killed) should be cordoned before execution of the chaos experiment (before applying the chaosengine manifest) to ensure that the litmus experiment runner pods are not scheduled on it / subjected to eviction. This can be achieved with the following steps: +- Ensure that the node specified in the experiment ENV variable TARGET_NODE (the node for which docker service need to be killed) should be cordoned before execution of the chaos experiment to ensure that the experiment resources are not scheduled on it or subjected to eviction. This can be achieved with the following steps: - Get node names against the applications pods: kubectl get pods -o wide - Cordon the node kubectl cordon <nodename> ::: @@ -48,8 +48,8 @@ The target nodes should be in ready state before and after chaos injection. NODE_LABEL - It contains node label, which will be used to filter the target node if TARGET_NODE ENV is not set - It is mutually exclusive with the TARGET_NODE ENV. If both are provided then it will use the TARGET_NODE + It contains node label, which will be used to filter the target node if TARGET_NODE ENV is not set + It is mutually exclusive with the TARGET_NODE ENV. If both are provided then it will use the TARGET_NODE TAINT_LABEL @@ -70,14 +70,14 @@ The target nodes should be in ready state before and after chaos injection. Defaults to 60s - LIB + LIB The chaos lib used to inject the chaos Defaults to `litmus` RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 @@ -103,7 +103,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-taint-sa + chaosServiceAccount: litmus-admin experiments: - name: node-taint spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/node-affected-percentage.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/node-affected-percentage.yaml new file mode 100644 index 00000000000..400d1d78d36 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/node-affected-percentage.yaml @@ -0,0 +1,22 @@ +## provide the percentage of nodes to be targeted with matching labels +## it is applicable for the [node-cpu-hog, node-memory-hog, node-io-stress] +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: node-cpu-hog + spec: + components: + env: + # percentage of nodes to be targeted with matching node labels + - name: NODES_AFFECTED_PERC + value: '100' + # labels of the targeted node + # it will derive the target nodes if TARGET_NODE(S) ENV is not set + - name: NODE_LABEL + value: 'key=value' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-label.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-label.yaml new file mode 100644 index 00000000000..20f6fd40561 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-label.yaml @@ -0,0 +1,18 @@ +## provide the labels of the targeted nodes +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: node-cpu-hog + spec: + components: + env: + # labels of the targeted node + # it will derive the target nodes if TARGET_NODE(S) ENV is not set + - name: NODE_LABEL + value: 'key=value' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-node.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-node.yaml new file mode 100644 index 00000000000..be644d606ef --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-node.yaml @@ -0,0 +1,18 @@ +## provide the target node name +## it is applicable for the [node-drain, node-taint, node-restart, kubelet-service-kill, docker-service-kill] +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: node-drain + spec: + components: + env: + # name of the target node + - name: TARGET_NODE + value: 'node01' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-nodes.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-nodes.yaml new file mode 100644 index 00000000000..34500979c1f --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/common/target-nodes.yaml @@ -0,0 +1,18 @@ +## provide the comma separated target node names +## it is applicable for the [node-cpu-hog, node-memory-hog, node-io-stress] +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: node-cpu-hog + spec: + components: + env: + # comma separated target node names + - name: TARGET_NODES + value: 'node01,node02' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/docker-service-kill/docker-service-kill.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/docker-service-kill/docker-service-kill.yaml index 9da79857928..b0dc0fb6053 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/docker-service-kill/docker-service-kill.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/docker-service-kill/docker-service-kill.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: docker-service-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: docker-service-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/kubelet-service-kill/kubelet-service-kill.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/kubelet-service-kill/kubelet-service-kill.yaml index 6bedff20002..b88f5b10e43 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/kubelet-service-kill/kubelet-service-kill.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/kubelet-service-kill/kubelet-service-kill.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: kubelet-service-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: kubelet-service-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-cpu-hog/node-cpu-core.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-cpu-hog/node-cpu-core.yaml index 96d87703d0a..830f076fe9c 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-cpu-hog/node-cpu-core.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-cpu-hog/node-cpu-core.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-cpu-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-cpu-hog/node-cpu-load.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-cpu-hog/node-cpu-load.yaml index f5eab2b49fe..0c78954c443 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-cpu-hog/node-cpu-load.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-cpu-hog/node-cpu-load.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-cpu-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-drain/node-drain.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-drain/node-drain.yaml index 1b857a9c75e..9c495346292 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-drain/node-drain.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-drain/node-drain.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-drain-sa + chaosServiceAccount: litmus-admin experiments: - name: node-drain spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/filesystem-utilization-bytes.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/filesystem-utilization-bytes.yaml index 7df43ba61ea..a041e4aa418 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/filesystem-utilization-bytes.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/filesystem-utilization-bytes.yaml @@ -8,7 +8,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: node-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/filesystem-utilization-percentage.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/filesystem-utilization-percentage.yaml index 0d6a20993ab..200ab6ae952 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/filesystem-utilization-percentage.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/filesystem-utilization-percentage.yaml @@ -8,7 +8,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: node-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/limit-cpu-utilization.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/limit-cpu-utilization.yaml index 49999cc9a65..ba47805b407 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/limit-cpu-utilization.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/limit-cpu-utilization.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: node-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/workers.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/workers.yaml index 93d42159cd4..d5be8e089dc 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/workers.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-io-stress/workers.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: node-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/memory-consumption-mebibytes.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/memory-consumption-mebibytes.yaml index db0f80e37e0..2bbe4f90710 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/memory-consumption-mebibytes.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/memory-consumption-mebibytes.yaml @@ -8,7 +8,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-memory-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/memory-consumption-percentage.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/memory-consumption-percentage.yaml index b7b473f01db..b0008198345 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/memory-consumption-percentage.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/memory-consumption-percentage.yaml @@ -8,7 +8,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-memory-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/workers.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/workers.yaml index d932c06e751..762f5ee9e1c 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/workers.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-memory-hog/workers.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: node-memory-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/reboot-command.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/reboot-command.yaml index 8d383dc6420..2090fef1ed3 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/reboot-command.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/reboot-command.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-restart-sa + chaosServiceAccount: litmus-admin experiments: - name: node-restart spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/ssh-user.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/ssh-user.yaml index e67107f1dae..58749d440ed 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/ssh-user.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/ssh-user.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-restart-sa + chaosServiceAccount: litmus-admin experiments: - name: node-restart spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/target-node-ip.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/target-node-ip.yaml index 96a90277288..6ede3431428 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/target-node-ip.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-restart/target-node-ip.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-restart-sa + chaosServiceAccount: litmus-admin experiments: - name: node-restart spec: @@ -14,7 +14,7 @@ spec: env: # internal ip of the targeted node - name: TARGET_NODE_IP - value: '' + value: '10.0.170.92' # name of the target node - name: TARGET_NODE value: 'node01' diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-taint/taint-labels.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-taint/taint-labels.yaml index cad344785e5..53e20cfd451 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-taint/taint-labels.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/node/static/manifests/node-taint/taint-labels.yaml @@ -6,7 +6,7 @@ metadata: spec: engineState: "active" annotationCheck: "false" - chaosServiceAccount: node-taint-sa + chaosServiceAccount: litmus-admin experiments: - name: node-taint spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/common-tunables-for-pod-experiments.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/common-tunables-for-pod-experiments.md index 1cdd84620e7..13101bb3728 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/common-tunables-for-pod-experiments.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/common-tunables-for-pod-experiments.md @@ -9,7 +9,7 @@ It defines the comma-separated name of the target pods subjected to chaos. The t Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/pods/common/target-pods.yaml yaml) +[embedmd]:# (./static/manifests/common/target-pods.yaml yaml) ```yaml ## it contains comma separated target pod names apiVersion: litmuschaos.io/v1alpha1 @@ -23,7 +23,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -32,8 +32,6 @@ spec: ## comma separated target pod names - name: TARGET_PODS value: 'pod1,pod2' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Pod Affected Percentage @@ -42,7 +40,7 @@ It defines the percentage of pods subjected to chaos with matching labels provid Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmusThe target pods are selected that resides on node with given node label/master/mkdocs/docs/experiments/categories/pods/common/pod-affected-percentage.yaml yaml) +[embedmd]:# (./static/manifests/common/pod-affected-percentage.yaml yaml) ```yaml ## it contains percentage of application pods to be targeted with matching labels or names in the application namespace ## supported for all pod-level experiment expect pod-autoscaler @@ -57,7 +55,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -66,8 +64,6 @@ spec: # percentage of application pods - name: PODS_AFFECTED_PERC value: '100' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Target Specific Container @@ -76,7 +72,7 @@ It defines the name of the targeted container subjected to chaos. It can be tune Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/pods/common/target-container.yaml yaml) +[embedmd]:# (./static/manifests/common/target-container.yaml yaml) ```yaml ## name of the target container ## it will use first container as target container if TARGET_CONTAINER is provided as empty @@ -91,7 +87,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -100,8 +96,6 @@ spec: # name of the target container - name: TARGET_CONTAINER value: 'nginx' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' ``` ### Default Application Health Check @@ -110,7 +104,7 @@ It defines the default application status checks as a tunable. It is helpful for Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/pods/common/default-app-health-check.yaml yaml) +[embedmd]:# (./static/manifests/common/default-app-health-check.yaml yaml) ```yaml ## application status check as tunable apiVersion: litmuschaos.io/v1alpha1 @@ -124,7 +118,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -180,7 +174,7 @@ It defines the target application pod selection from a specific node. It is help Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/pods/common/node-label-filter.yaml yaml) +[embedmd]:# (./static/manifests/common/node-label-filter.yaml yaml) ```yaml ## node label to filter target pods apiVersion: litmuschaos.io/v1alpha1 @@ -194,7 +188,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/container-kill.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/container-kill.md index 19587e9db11..66b57a4c366 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/container-kill.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/container-kill.md @@ -41,17 +41,17 @@ The application pods should be in running state before and after chaos injection Notes - TARGET_CONTAINER + TARGET_CONTAINER The name of container to be killed inside the pod If the TARGET_CONTAINER is not provided it will delete the first container - CHAOS_INTERVAL + CHAOS_INTERVAL Time interval b/w two successive container kill (in sec) If the CHAOS_INTERVAL is not provided it will take the default value of 10s - TOTAL_CHAOS_DURATION + TOTAL_CHAOS_DURATION The time duration for chaos injection (seconds) Defaults to 20s @@ -66,19 +66,19 @@ The application pods should be in running state before and after chaos injection If not provided, it will select target pods randomly based on provided appLabels - LIB_IMAGE + LIB_IMAGE LIB Image used to kill the container Defaults to litmuschaos/go-runner:latest - LIB + LIB The category of lib use to inject chaos Default value: litmus, supported values: pumba and litmus RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 SEQUENCE @@ -96,7 +96,7 @@ The application pods should be in running state before and after chaos injection Defaults to `/var/run/docker.sock` - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -126,7 +126,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: @@ -139,38 +139,6 @@ spec: VALUE: '60' ``` -### Multiple Iterations Of Chaos - -The multiple iterations of chaos can be tuned via setting `CHAOS_INTERVAL` ENV. Which defines the delay between each iteration of chaos. - -[embedmd]:# (./static/manifests/container-kill/chaos-interval.yaml yaml) -```yaml -# defines delay between each successive iteration of the chaos -apiVersion: litmuschaos.io/v1alpha1 -kind: ChaosEngine -metadata: - name: engine-nginx -spec: - engineState: "active" - annotationCheck: "false" - appinfo: - appns: "default" - applabel: "app=nginx" - appkind: "deployment" - chaosServiceAccount: container-kill-sa - experiments: - - name: container-kill - spec: - components: - env: - # delay between each iteration of chaos - - name: CHAOS_INTERVAL - value: '15' - # time duration for the chaos execution - - name: TOTAL_CHAOS_DURATION - VALUE: '60' -``` - ### Container Runtime Socket Path It defines the `CONTAINER_RUNTIME` and `SOCKET_PATH` ENV to set the container runtime and socket file path: @@ -192,7 +160,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: @@ -227,7 +195,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: @@ -259,7 +227,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/disk-fill.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/disk-fill.md index 658d119ec9f..c1ace7d012e 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/disk-fill.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/disk-fill.md @@ -115,19 +115,19 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - LIB + LIB The chaos lib used to inject the chaos Defaults to `litmus` supported litmus only - LIB_IMAGE + LIB_IMAGE The image used to fill the disk Defaults to litmuschaos/go-runner:latest RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 SEQUENCE @@ -162,7 +162,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: disk-fill-sa + chaosServiceAccount: litmus-admin experiments: - name: disk-fill spec: @@ -197,7 +197,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: disk-fill-sa + chaosServiceAccount: litmus-admin experiments: - name: disk-fill spec: @@ -231,7 +231,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: disk-fill-sa + chaosServiceAccount: litmus-admin experiments: - name: disk-fill spec: @@ -264,7 +264,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: disk-fill-sa + chaosServiceAccount: litmus-admin experiments: - name: disk-fill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-autoscaler.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-autoscaler.md index 056abe0e7fc..eecc3d0f905 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-autoscaler.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-autoscaler.md @@ -66,7 +66,7 @@ The application pods should be in running state before and after chaos injection RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 @@ -96,7 +96,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-autoscaler-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-autoscaler spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-cpu-hog-exec.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-cpu-hog-exec.md index 041a7a606db..1ddc640b259 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-cpu-hog-exec.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-cpu-hog-exec.md @@ -4,7 +4,7 @@ title: Pod CPU Hog Exec --- ## Introduction -- This experiment consumes the CPU resources of the application container +- This experiment consumes the CPU resources of the application container. - It simulates conditions where app pods experience CPU spikes either due to expected/undesired processes thereby testing how the overall application stack behaves when this occurs. @@ -53,7 +53,7 @@ The application pods should be in running state before and after chaos injection Default to 60s - LIB + LIB The chaos lib used to inject the chaos. Available libs are litmus Default to litmus @@ -85,7 +85,7 @@ The application pods should be in running state before and after chaos injection RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 SEQUENCE @@ -120,7 +120,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-exec-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog-exec spec: @@ -157,7 +157,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-exec-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog-exec spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-cpu-hog.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-cpu-hog.md index 0ca8dd7e274..d2afdd1e453 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-cpu-hog.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-cpu-hog.md @@ -52,12 +52,12 @@ The application pods should be in running state before and after chaos injection Default to 60s - LIB + LIB The chaos lib used to inject the chaos. Available libs are litmus and pumba Default to litmus - LIB_IMAGE + LIB_IMAGE Image used to run the helper pod. Defaults to litmuschaos/go-runner:1.13.8 @@ -82,7 +82,7 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -94,7 +94,7 @@ The application pods should be in running state before and after chaos injection RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 SEQUENCE @@ -115,7 +115,7 @@ It stresses the `CPU_CORE` of the targeted pod for the `TOTAL_CHAOS_DURATION` du Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/pods/pod-cpu-hog/cpu-cores.yaml yaml) +[embedmd]:# (./static/manifests/pod-cpu-hog/cpu-cores.yaml yaml) ```yaml # cpu cores for the stress apiVersion: litmuschaos.io/v1alpha1 @@ -129,7 +129,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog spec: @@ -147,7 +147,7 @@ It contains percentage of pod CPU to be consumed. It can be tuned via `CPU_LOAD` Use the following example to tune this: -[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/pods/pod-cpu-hog/cpu-load.yaml yaml) +[embedmd]:# (./static/manifests/pod-cpu-hog/cpu-load.yaml yaml) ```yaml # cpu load for the stress apiVersion: litmuschaos.io/v1alpha1 @@ -161,7 +161,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog spec: @@ -201,7 +201,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog spec: @@ -239,7 +239,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-delete.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-delete.md index bffe13982a8..962a4a9102c 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-delete.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-delete.md @@ -45,7 +45,7 @@ The application pods should be in running state before and after chaos injection TOTAL_CHAOS_DURATION The time duration for chaos insertion (in sec) - Defaults to 15s, NOTE: Overall run duration of the experiment may exceed the TOTAL_CHAOS_DURATION by a few min + Defaults to 15s, NOTE: Overall run duration of the experiment may exceed the TOTAL_CHAOS_DURATION by a few min CHAOS_INTERVAL @@ -54,7 +54,7 @@ The application pods should be in running state before and after chaos injection RANDOMNESS - Introduces randomness to pod deletions with a minimum period defined by CHAOS_INTERVAL + Introduces randomness to pod deletions with a minimum period defined by CHAOS_INTERVAL It supports true or false. Default value: false @@ -66,16 +66,16 @@ The application pods should be in running state before and after chaos injection TARGET_PODS Comma separated list of application pod name subjected to pod delete chaos If not provided, it will select target pods randomly based on provided appLabels - + PODS_AFFECTED_PERC The Percentage of total pods to target Defaults to 0 (corresponds to 1 replica), provide numeric value only - + RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -88,7 +88,7 @@ The application pods should be in running state before and after chaos injection ## Experiment Examples ### Common and Pod specific tunables -Refer the [common attributes](../../common-tunables-for-all-experiments) and [Pod specific tunable](./common-tunables-for-pod-experiments) to tune the common tunables for all experiments and pod specific tunables. +Refer the [common attributes](../../common-tunables-for-all-experiments) and [Pod specific tunable](./common-tunables-for-pod-experiments) to tune the common tunables for all experiments and pod specific tunables. ### Force Delete @@ -110,7 +110,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -124,44 +124,10 @@ spec: value: '60' ``` -### Multiple Iterations Of Chaos - -The multiple iterations of chaos can be tuned via setting `CHAOS_INTERVAL` ENV. Which defines the delay between each iteration of chaos. - -Use the following example to tune this: - -[embedmd]:# (./static/manifests/pod-delete/chaos-interval.yaml yaml) -```yaml -# defines delay between each successive iteration of the chaos -apiVersion: litmuschaos.io/v1alpha1 -kind: ChaosEngine -metadata: - name: engine-nginx -spec: - engineState: "active" - annotationCheck: "false" - appinfo: - appns: "default" - applabel: "app=nginx" - appkind: "deployment" - chaosServiceAccount: pod-delete-sa - experiments: - - name: pod-delete - spec: - components: - env: - # delay between each iteration of chaos - - name: CHAOS_INTERVAL - value: '15' - # time duration for the chaos execution - - name: TOTAL_CHAOS_DURATION - VALUE: '60' -``` - ### Random Interval The randomness in the chaos interval can be enabled via setting `RANDOMNESS` ENV to `true`. It supports boolean values. The default value is `false`. -The chaos interval can be tuned via `CHAOS_INTERVAL` ENV. +The chaos interval can be tuned via `CHAOS_INTERVAL` ENV. - If `CHAOS_INTERVAL` is set in the form of `l-r` i.e, `5-10` then it will select a random interval between l & r. - If `CHAOS_INTERVAL` is set in the form of `value` i.e, `10` then it will select a random interval between 0 & value. @@ -182,7 +148,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -197,5 +163,5 @@ spec: # it will select a random interval within this range # if only one value is provided then it will select a random interval within 0-CHAOS_INTERVAL range - name: CHAOS_INTERVAL - value: '5-10' + value: '5-10' ``` diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-dns-error.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-dns-error.md index e6906c10f43..99c33f9fbf6 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-dns-error.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-dns-error.md @@ -39,7 +39,7 @@ The application pods should be in running state before and after chaos injection Notes - TARGET_CONTAINER + TARGET_CONTAINER Name of container which is subjected to dns-error None @@ -64,7 +64,7 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker @@ -79,14 +79,14 @@ The application pods should be in running state before and after chaos injection Default value: litmus, supported values: litmus - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to litmuschaos/go-runner:latest RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -122,7 +122,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-error-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-error spec: @@ -156,7 +156,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-error-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-error spec: @@ -192,7 +192,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-error-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-error spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-dns-spoof.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-dns-spoof.md index 249a611de45..a09cddb41fd 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-dns-spoof.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-dns-spoof.md @@ -40,7 +40,7 @@ The application pods should be in running state before and after chaos injection Notes - TARGET_CONTAINER + TARGET_CONTAINER Name of container which is subjected to dns spoof None @@ -60,7 +60,7 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker @@ -75,14 +75,14 @@ The application pods should be in running state before and after chaos injection Default value: litmus, supported values: litmus - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to litmuschaos/go-runner:latest RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -117,7 +117,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-spoof-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-spoof spec: @@ -153,7 +153,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-spoof-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-spoof spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-latency.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-latency.md index 5fb0faa9498..9f8440faac2 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-latency.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-latency.md @@ -58,12 +58,12 @@ The application pods should be in running state before and after chaos injection Notes - PROXY_PORT + PROXY_PORT Port where the proxy will be listening for requests Defaults to 20000 - NETWORK_INTERFACE + NETWORK_INTERFACE Network interface to be used for the proxy Defaults to `eth0` @@ -73,7 +73,7 @@ The application pods should be in running state before and after chaos injection Defaults to 100 - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -98,14 +98,14 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -140,7 +140,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: @@ -170,7 +170,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: @@ -204,7 +204,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: @@ -238,7 +238,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: @@ -273,7 +273,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: @@ -310,7 +310,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-modify-body.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-modify-body.md index 118c2341f66..795da69c4fa 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-modify-body.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-modify-body.md @@ -43,7 +43,7 @@ The application pods should be in running state before and after chaos injection TARGET_SERVICE_PORT Port of the service to target - Defaults to port 80 + Defaults to port 80 RESPONSE_BODY @@ -69,12 +69,12 @@ The application pods should be in running state before and after chaos injection Defaults to text/plain - PROXY_PORT + PROXY_PORT Port where the proxy will be listening for requests Defaults to 20000 - NETWORK_INTERFACE + NETWORK_INTERFACE Network interface to be used for the proxy Defaults to `eth0` @@ -84,7 +84,7 @@ The application pods should be in running state before and after chaos injection Defaults to 100 - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -109,14 +109,14 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -151,7 +151,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: @@ -184,7 +184,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: @@ -218,7 +218,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: @@ -253,7 +253,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: @@ -287,7 +287,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: @@ -329,7 +329,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: @@ -369,7 +369,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-modify-header.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-modify-header.md index 0228f61fa2b..b8ce3684775 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-modify-header.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-modify-header.md @@ -45,12 +45,12 @@ The application pods should be in running state before and after chaos injection Defaults to port 80 - HEADERS_MAP + HEADERS_MAP Map of headers to modify/add Eg: {"X-Litmus-Test-Header": "X-Litmus-Test-Value"}. To remove a header, just set the value to ""; Eg: {"X-Litmus-Test-Header": ""} - HEADER_MODE + HEADER_MODE Whether to modify response headers or request headers. Accepted values: request, response Defaults to response @@ -63,12 +63,12 @@ The application pods should be in running state before and after chaos injection Notes - PROXY_PORT + PROXY_PORT Port where the proxy will be listening for requests Defaults to 20000 - NETWORK_INTERFACE + NETWORK_INTERFACE Network interface to be used for the proxy Defaults to `eth0` @@ -78,7 +78,7 @@ The application pods should be in running state before and after chaos injection Defaults to 100 - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -103,14 +103,14 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -145,7 +145,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: @@ -178,7 +178,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: @@ -215,7 +215,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: @@ -248,7 +248,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: @@ -285,7 +285,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-header-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-header spec: @@ -320,7 +320,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: @@ -360,7 +360,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-reset-peer.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-reset-peer.md index e63f546539f..dfccc00e8cf 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-reset-peer.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-reset-peer.md @@ -45,7 +45,7 @@ The application pods should be in running state before and after chaos injection Defaults to port 80 - RESET_TIMEOUT + RESET_TIMEOUT Reset Timeout specifies after how much duration to reset the connection Defaults to 0 @@ -58,12 +58,12 @@ The application pods should be in running state before and after chaos injection Notes - PROXY_PORT + PROXY_PORT Port where the proxy will be listening for requests Defaults to 20000 - NETWORK_INTERFACE + NETWORK_INTERFACE Network interface to be used for the proxy Defaults to `eth0` @@ -73,7 +73,7 @@ The application pods should be in running state before and after chaos injection Defaults to 100 - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -98,14 +98,14 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -140,7 +140,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: @@ -171,7 +171,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: @@ -206,7 +206,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: @@ -240,7 +240,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: @@ -275,7 +275,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: @@ -313,7 +313,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-status-code.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-status-code.md index a06f85f9e10..a61dc9c757a 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-status-code.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-http-status-code.md @@ -66,7 +66,7 @@ The application pods should be in running state before and after chaos injection Notes - RESPONSE_BODY + RESPONSE_BODY Body string to overwrite the http response body This will be used only if MODIFY_RESPONSE_BODY is set to true. If no value is provided, response will be an empty body. Defaults to empty body @@ -81,12 +81,12 @@ The application pods should be in running state before and after chaos injection Defaults to text/plain - PROXY_PORT + PROXY_PORT Port where the proxy will be listening for requests Defaults to 20000 - NETWORK_INTERFACE + NETWORK_INTERFACE Network interface to be used for the proxy Defaults to `eth0` @@ -96,7 +96,7 @@ The application pods should be in running state before and after chaos injection Defaults to 100 - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -121,14 +121,14 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -164,7 +164,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: @@ -197,7 +197,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: @@ -234,7 +234,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: @@ -272,7 +272,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: @@ -310,7 +310,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: @@ -347,7 +347,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: @@ -386,7 +386,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: @@ -431,7 +431,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: @@ -471,7 +471,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-io-stress.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-io-stress.md index e0cf249156a..5e3f733c99f 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-io-stress.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-io-stress.md @@ -47,7 +47,7 @@ The application pods should be in running state before and after chaos injection FILESYSTEM_UTILIZATION_BYTES - Specify the size in GigaBytes(GB). FILESYSTEM_UTILIZATION_PERCENTAGE & FILESYSTEM_UTILIZATION_BYTES are mutually exclusive. If both are provided, FILESYSTEM_UTILIZATION_PERCENTAGE is prioritized. + Specify the size in GigaBytes(GB). FILESYSTEM_UTILIZATION_PERCENTAGE & FILESYSTEM_UTILIZATION_BYTES are mutually exclusive. If both are provided, FILESYSTEM_UTILIZATION_PERCENTAGE is prioritized. @@ -66,12 +66,12 @@ The application pods should be in running state before and after chaos injection - LIB + LIB The chaos lib used to inject the chaos Default to litmus. Available litmus and pumba. - LIB_IMAGE + LIB_IMAGE Image used to run the stress command Default to litmuschaos/go-runner:latest @@ -86,7 +86,7 @@ The application pods should be in running state before and after chaos injection Defaults to 0 (corresponds to 1 replica), provide numeric value only - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -98,7 +98,7 @@ The application pods should be in running state before and after chaos injection RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -130,7 +130,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: @@ -166,7 +166,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: @@ -202,7 +202,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: @@ -239,7 +239,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: @@ -272,7 +272,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: @@ -305,7 +305,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-memory-hog-exec.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-memory-hog-exec.md index a6ba76c5ceb..8faed7d9968 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-memory-hog-exec.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-memory-hog-exec.md @@ -42,7 +42,7 @@ The application pods should be in running state before and after chaos injection MEMORY_CONSUMPTION - The amount of memory used of hogging a Kubernetes pod (megabytes) + The amount of memory used of hogging a Kubernetes pod (megabytes) Defaults to 500MB (Up to 2000MB) @@ -51,7 +51,7 @@ The application pods should be in running state before and after chaos injection Defaults to 60s - LIB + LIB The chaos lib used to inject the chaos. Available libs are litmus Defaults to litmus @@ -78,7 +78,7 @@ The application pods should be in running state before and after chaos injection RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 SEQUENCE @@ -114,13 +114,13 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog spec: components: env: - # memory consuption value in MB + # memory consumption value in MB # it is limited to 2000MB - name: MEMORY_CONSUMPTION value: '500' #in MB @@ -151,7 +151,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-exec-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog-exec spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-memory-hog.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-memory-hog.md index 6d72f9fbb31..3666b771d82 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-memory-hog.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-memory-hog.md @@ -15,7 +15,7 @@ title: Pod Memory Hog
View the uses of the experiment
-Memory usage within containers is subject to various constraints in Kubernetes. If the limits are specified in their spec, exceeding them can cause termination of the container (due to OOMKill of the primary process, often pid 1) - the restart of the container by kubelet, subject to the policy specified. For containers with no limits placed, the memory usage is uninhibited until such time as the Node level OOM Behaviour takes over. In this case, containers on the node can be killed based on their oom_score and the QoS class a given pod belongs to (bestEffort ones are first to be targeted). This eval is extended to all pods running on the node - thereby causing a bigger blast radius. +Memory usage within containers is subject to various constraints in Kubernetes. If the limits are specified in their spec, exceeding them can cause termination of the container (due to OOMKill of the primary process, often pid 1) - the restart of the container by kubelet, subject to the policy specified. For containers with no limits placed, the memory usage is uninhibited until such time as the Node level OOM behavior takes over. In this case, containers on the node can be killed based on their oom_score and the QoS class a given pod belongs to (bestEffort ones are first to be targeted). This eval is extended to all pods running on the node - thereby causing a bigger blast radius. This experiment launches a stress process within the target container - which can cause either the primary process in the container to be resource constrained in cases where the limits are enforced OR eat up available system memory on the node in cases where the limits are not specified.
@@ -57,17 +57,17 @@ The application pods should be in running state before and after chaos injection Defaults to 60s - LIB + LIB The chaos lib used to inject the chaos. Available libs are litmus and pumba Defaults to litmus - LIB_IMAGE + LIB_IMAGE Image used to run the helper pod. Defaults to litmuschaos/go-runner:1.13.8 - STRESS_IMAGE + STRESS_IMAGE Container run on the node at runtime by the pumba lib to inject stressors. Only used in LIB pumba Default to alexeiled/stress-ng:latest-ubuntu @@ -82,7 +82,7 @@ The application pods should be in running state before and after chaos injection If not provided, it will select the first container of the target pod - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -99,7 +99,7 @@ The application pods should be in running state before and after chaos injection RAMP_TIME Period to wait before injection of chaos in sec - + Eg. 30 SEQUENCE @@ -134,7 +134,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog spec: @@ -167,7 +167,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog spec: @@ -208,7 +208,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-corruption.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-corruption.md index 9e9500171e9..4d5d963ab67 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-corruption.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-corruption.md @@ -41,21 +41,21 @@ The application pods should be in running state before and after chaos injection NETWORK_INTERFACE - Name of ethernet interface considered for shaping traffic + Name of ethernet interface considered for shaping traffic - TARGET_CONTAINER + TARGET_CONTAINER Name of container which is subjected to network corruption Applicable for containerd & CRI-O runtime only. Even with these runtimes, if the value is not provided, it injects chaos on the first container of the pod - NETWORK_PACKET_CORRUPTION_PERCENTAGE + NETWORK_PACKET_CORRUPTION_PERCENTAGE Packet corruption in percentage Default (100) - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -100,14 +100,14 @@ The application pods should be in running state before and after chaos injection default value is `gaiadocker/iproute2` - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -130,7 +130,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-corruption/network-corruption.yaml yaml) ```yaml -# it inject the network-corruption for the ingrees and egress traffic +# it injects network-corruption for the egress traffic apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -142,7 +142,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: @@ -166,7 +166,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-corruption/destination-ips-and-hosts.yaml yaml) ```yaml -# it inject the chaos for the ingrees and egress traffic for specific ips/hosts +# it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -178,7 +178,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: @@ -214,7 +214,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: @@ -250,7 +250,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: @@ -288,7 +288,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-duplication.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-duplication.md index 7ff85f71fda..8f90db6645d 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-duplication.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-duplication.md @@ -45,7 +45,7 @@ The application pods should be in running state before and after chaos injection - TARGET_CONTAINER + TARGET_CONTAINER Name of container which is subjected to network latency Optional Applicable for containerd & CRI-O runtime only. Even with these runtimes, if the value is not provided, it injects chaos on the first container of the pod @@ -57,7 +57,7 @@ The application pods should be in running state before and after chaos injection Default to 100 percentage - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -102,14 +102,14 @@ The application pods should be in running state before and after chaos injection default value is `gaiadocker/iproute2` - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -132,7 +132,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-duplication/network-duplication.yaml yaml) ```yaml -# it inject the network-duplication for the ingrees and egress traffic +# it injects network-duplication for the egress traffic apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -144,7 +144,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: @@ -168,7 +168,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-duplication/destination-ips-and-hosts.yaml yaml) ```yaml -# it inject the chaos for the ingrees and egress traffic for specific ips/hosts +# it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -180,7 +180,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: @@ -216,7 +216,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: @@ -252,7 +252,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: @@ -272,7 +272,7 @@ spec: ### Pumba Chaos Library It specifies the Pumba chaos library for the chaos injection. It can be tuned via `LIB` ENV. The defaults chaos library is `litmus`. -Provide the traffic control image via `TC_IMAGE` ENV for the pumba library. +Provide the traffic control image via `TC_IMAGE` ENV for the Pumba library. Use the following example to tune this: @@ -290,7 +290,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-latency.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-latency.md index f3f352a6d81..964d4faaf31 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-latency.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-latency.md @@ -49,7 +49,7 @@ The application pods should be in running state before and after chaos injection - TARGET_CONTAINER + TARGET_CONTAINER Name of container which is subjected to network latency Applicable for containerd & CRI-O runtime only. Even with these runtimes, if the value is not provided, it injects chaos on the first container of the pod @@ -64,7 +64,7 @@ The application pods should be in running state before and after chaos injection Default 0, provide numeric value only - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -109,14 +109,14 @@ The application pods should be in running state before and after chaos injection default value is `gaiadocker/iproute2` - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -139,7 +139,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-latency/network-latency.yaml yaml) ```yaml -# it inject the network-latency for the ingrees and egress traffic +# it injects network-latency for the egress traffic apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -151,7 +151,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: @@ -175,7 +175,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-latency/destination-ips-and-hosts.yaml yaml) ```yaml -# it inject the chaos for the ingrees and egress traffic for specific ips/hosts +# it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -187,7 +187,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: @@ -223,7 +223,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: @@ -256,7 +256,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: @@ -290,7 +290,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: @@ -310,7 +310,7 @@ spec: ### Pumba Chaos Library It specifies the Pumba chaos library for the chaos injection. It can be tuned via `LIB` ENV. The defaults chaos library is `litmus`. -Provide the traffic control image via `TC_IMAGE` ENV for the pumba library. +Provide the traffic control image via `TC_IMAGE` ENV for the Pumba library. Use the following example to tune this: @@ -328,7 +328,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-loss.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-loss.md index e283e2b79ea..d7970a411ec 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-loss.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-loss.md @@ -44,7 +44,7 @@ The application pods should be in running state before and after chaos injection - TARGET_CONTAINER + TARGET_CONTAINER Name of container which is subjected to network loss Optional Applicable for containerd & CRI-O runtime only. Even with these runtimes, if the value is not provided, it injects chaos on the first container of the pod @@ -56,7 +56,7 @@ The application pods should be in running state before and after chaos injection Default to 100 percentage - CONTAINER_RUNTIME + CONTAINER_RUNTIME container runtime interface for the cluster Defaults to docker, supported values: docker, containerd and crio for litmus and only docker for pumba LIB @@ -83,7 +83,7 @@ The application pods should be in running state before and after chaos injection DESTINATION_HOSTS DNS Names/FQDN names of the services, the accessibility to which, is impacted - if not provided, it will induce network chaos for all ips/destinations or DESTINATION_IPS if already defined + if not provided, it will induce network chaos for all ips/destinations or DESTINATION_IPS if already defined PODS_AFFECTED_PERC @@ -101,14 +101,14 @@ The application pods should be in running state before and after chaos injection default value is `gaiadocker/iproute2` - LIB_IMAGE + LIB_IMAGE Image used to run the netem command Defaults to `litmuschaos/go-runner:latest` RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 SEQUENCE @@ -131,7 +131,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-loss/network-loss.yaml yaml) ```yaml -# it inject the network-loss for the ingrees and egress traffic +# it injects network-loss for the egress traffic apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -143,7 +143,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: @@ -166,7 +166,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-loss/destination-ips-and-hosts.yaml yaml) ```yaml -# it inject the chaos for the ingrees and egress traffic for specific ips/hosts +# it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -178,7 +178,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: @@ -214,7 +214,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: @@ -250,7 +250,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: @@ -270,7 +270,7 @@ spec: ### Pumba Chaos Library It specifies the Pumba chaos library for the chaos injection. It can be tuned via `LIB` ENV. The defaults chaos library is `litmus`. -Provide the traffic control image via `TC_IMAGE` ENV for the pumba library. +Provide the traffic control image via `TC_IMAGE` ENV for the Pumba library. Use the following example to tune this: @@ -288,7 +288,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-partition.md b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-partition.md index 5c62f9dae30..00dcbb5b868 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-partition.md +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/pod-network-partition.md @@ -51,17 +51,17 @@ The application pods should be in running state before and after chaos injection POD_SELECTOR Contains labels of the destination pods - + Eg. app=cart NAMESPACE_SELECTOR Contains labels of the destination namespaces - + Eg. env=prod PORTS Comma separated list of the targeted ports - + Eg. 80,443,22 DESTINATION_IPS @@ -81,7 +81,7 @@ The application pods should be in running state before and after chaos injection RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30
@@ -102,7 +102,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-partition/destination-ips-and-hosts.yaml yaml) ```yaml -# it inject the chaos for specific ips/hosts +# it injects the chaos for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -114,7 +114,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: @@ -138,7 +138,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-partition/namespace-selectors.yaml yaml) ```yaml -# it inject the chaos for specified namespaces, matched by labels +# it injects the chaos for specified namespaces, matched by labels apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -150,7 +150,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: @@ -164,13 +164,13 @@ spec: ``` ### Target Specific Pod(s) -The network partition experiment interrupt traffic for all the extranal pods by default. The access to/from specific pod(s) can be allowed via providing pod labels inside `POD_SELECTOR` ENV. +The network partition experiment interrupt traffic for all the external pods by default. The access to/from specific pod(s) can be allowed via providing pod labels inside `POD_SELECTOR` ENV. Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-partition/pod-selectors.yaml yaml) ```yaml -# it inject the chaos for specified pods, matched by labels +# it injects the chaos for specified pods, matched by labels apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -182,7 +182,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: @@ -203,7 +203,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-partition/policy-type.yaml yaml) ```yaml -# inject network loss for only ingress or only engress or all traffics +# inject network loss for only ingress or only egress or all traffics apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -215,7 +215,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: @@ -243,7 +243,7 @@ Use the following example to tune this: [embedmd]:# (./static/manifests/pod-network-partition/ports.yaml yaml) ```yaml -# it inject the chaos for specified ports +# it injects the chaos for specified ports apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -255,7 +255,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/default-app-health-check.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/default-app-health-check.yaml new file mode 100644 index 00000000000..337a90528f1 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/default-app-health-check.yaml @@ -0,0 +1,20 @@ +## application status check as tunable +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + - name: DEFAULT_APP_HEALTH_CHECK + value: 'false' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/node-label-filter.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/node-label-filter.yaml new file mode 100644 index 00000000000..38e75c9e019 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/node-label-filter.yaml @@ -0,0 +1,20 @@ +## node label to filter target pods +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + - name: NODE_LABEL + value: 'kubernetes.io/hostname=worker-01' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/pod-affected-percentage.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/pod-affected-percentage.yaml new file mode 100644 index 00000000000..2a3bd40149f --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/pod-affected-percentage.yaml @@ -0,0 +1,22 @@ +## it contains percentage of application pods to be targeted with matching labels or names in the application namespace +## supported for all pod-level experiment expect pod-autoscaler +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + # percentage of application pods + - name: PODS_AFFECTED_PERC + value: '100' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/target-container.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/target-container.yaml new file mode 100644 index 00000000000..98e852a1851 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/target-container.yaml @@ -0,0 +1,22 @@ +## name of the target container +## it will use first container as target container if TARGET_CONTAINER is provided as empty +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + # name of the target container + - name: TARGET_CONTAINER + value: 'nginx' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/target-pods.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/target-pods.yaml new file mode 100644 index 00000000000..bb3e8a5a147 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/common/target-pods.yaml @@ -0,0 +1,21 @@ +## it contains comma separated target pod names +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + ## comma separated target pod names + - name: TARGET_PODS + value: 'pod1,pod2' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/container-runtime-and-socket-path.yaml index 5089bfa1ca4..4ad6f418597 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/kill-specific-container.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/kill-specific-container.yaml index 5862d6f834e..c3760912c83 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/kill-specific-container.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/kill-specific-container.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/pumba.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/pumba.yaml index 06a4d1cc6a0..7db283493c4 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/pumba.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/pumba.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/signal.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/signal.yaml index 1f63ed78f2b..6370e08a214 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/signal.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/signal.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - name: container-kill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/container-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/container-path.yaml index ff53a2d8c60..33065a83510 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/container-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/container-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: disk-fill-sa + chaosServiceAccount: litmus-admin experiments: - name: disk-fill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/data-block-size.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/data-block-size.yaml index 41b56ddabcb..ff58aed71e5 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/data-block-size.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/data-block-size.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: disk-fill-sa + chaosServiceAccount: litmus-admin experiments: - name: disk-fill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/ephemeral-storage-mebibytes.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/ephemeral-storage-mebibytes.yaml index a08937325a1..0ddd1a58cf2 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/ephemeral-storage-mebibytes.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/ephemeral-storage-mebibytes.yaml @@ -11,7 +11,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: disk-fill-sa + chaosServiceAccount: litmus-admin experiments: - name: disk-fill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/fill-percentage.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/fill-percentage.yaml index f9b4e8d39cb..b5a673634f0 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/fill-percentage.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/disk-fill/fill-percentage.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: disk-fill-sa + chaosServiceAccount: litmus-admin experiments: - name: disk-fill spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-autoscaler/replica-count.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-autoscaler/replica-count.yaml index fcd4168c5e6..027892feab6 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-autoscaler/replica-count.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-autoscaler/replica-count.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-autoscaler-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-autoscaler spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog-exec/cpu-cores.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog-exec/cpu-cores.yaml index 0486db4186d..b974ea2c64d 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog-exec/cpu-cores.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog-exec/cpu-cores.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-exec-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog-exec spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog-exec/inject-and-kill-commands.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog-exec/inject-and-kill-commands.yaml index 20d25304db7..6b1ef356ca9 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog-exec/inject-and-kill-commands.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog-exec/inject-and-kill-commands.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-exec-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog-exec spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/container-runtime-and-socket-path.yaml index 87f16cd8b5d..1366d8244d0 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/cpu-cores.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/cpu-cores.yaml index fbac1f335fc..68feed4134e 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/cpu-cores.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/cpu-cores.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/cpu-load.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/cpu-load.yaml index 91f9ed13954..1e0dd7b89b9 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/cpu-load.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/cpu-load.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/pumba-lib.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/pumba-lib.yaml index cf7f2f0c228..babd3e9bba9 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/pumba-lib.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-cpu-hog/pumba-lib.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-cpu-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-cpu-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/force.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/force.yaml index 9c9315d222e..b79d3b91b87 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/force.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/force.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -21,6 +21,4 @@ spec: - name: FORCE value: 'true' - name: TOTAL_CHAOS_DURATION - value: '60' - - \ No newline at end of file + value: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/randomness-interval.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/randomness-interval.yaml index fe8ae61d25b..c532788f30b 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/randomness-interval.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/randomness-interval.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -25,4 +25,4 @@ spec: # it will select a random interval within this range # if only one value is provided then it will select a random interval within 0-CHAOS_INTERVAL range - name: CHAOS_INTERVAL - value: '5-10' + value: '5-10' diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/container-runtime-and-socket-path.yaml index d419e3ebecf..f9ea189a8f3 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-error-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-error spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/match-scheme.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/match-scheme.yaml index b570b228272..d86086f4006 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/match-scheme.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/match-scheme.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-error-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-error spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/target-hostnames.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/target-hostnames.yaml index 2e0ef283580..66cc49e994c 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/target-hostnames.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-error/target-hostnames.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-error-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-error spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-spoof/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-spoof/container-runtime-and-socket-path.yaml index e7b5d65d7a4..8a5641d857e 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-spoof/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-spoof/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-spoof-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-spoof spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-spoof/spoof-map.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-spoof/spoof-map.yaml index 3d8cf55acef..9e6e795cecc 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-spoof/spoof-map.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-dns-spoof/spoof-map.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-dns-spoof-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-dns-spoof spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/container-runtime-and-socket-path.yaml index 771798436cc..4bf312ab5af 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/latency.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/latency.yaml index 73f537842fe..1949da41415 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/latency.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/latency.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/network-interface.yaml index 5727f423371..e80fa0b87d3 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/proxy-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/proxy-port.yaml index ad94abef340..1801dbe2815 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/proxy-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/proxy-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/target-service-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/target-service-port.yaml index 266d4ceb11d..be9b36da5bd 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/target-service-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/target-service-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/toxicity.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/toxicity.yaml index 743b9135b49..efe30cf9493 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/toxicity.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-latency/toxicity.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/container-runtime-and-socket-path.yaml index 712f809cf89..0d576173968 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/modify-body-with-encoding-type.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/modify-body-with-encoding-type.yaml index 8f01d200bd4..48ac70cd423 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/modify-body-with-encoding-type.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/modify-body-with-encoding-type.yaml @@ -9,7 +9,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/network-interface.yaml index 758562b4a75..4f2839c31e8 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/proxy-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/proxy-port.yaml index 888f449d513..ea30ca2f79a 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/proxy-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/proxy-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/response-body.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/response-body.yaml index 94e008c6d4f..c3c249493ba 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/response-body.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/response-body.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/target-service-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/target-service-port.yaml index f8a5da4a66b..b7777a9541d 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/target-service-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/target-service-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/toxicity.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/toxicity.yaml index fd8d7d95d0f..68dd2655a86 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/toxicity.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-body/toxicity.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-body-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-body spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/container-runtime-and-socket-path.yaml index e117a3ec195..0decb60c799 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/header-mode.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/header-mode.yaml index 32aaf995b3c..57aeb955741 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/header-mode.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/header-mode.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/headers-map.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/headers-map.yaml index 3ce412d3cbc..1c6c6b14039 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/headers-map.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/headers-map.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/network-interface.yaml index 9bc69c67a7d..f44d46e9c72 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/proxy-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/proxy-port.yaml index f158e949eda..64e01f7cb42 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/proxy-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/proxy-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/target-service-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/target-service-port.yaml index fcec67cf05a..e9ab7247a6c 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/target-service-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/target-service-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-chaos-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-chaos spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/toxicity.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/toxicity.yaml index 31b3a8bec98..01ae202128c 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/toxicity.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-modify-header/toxicity.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-modify-header-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-modify-header spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/container-runtime-and-socket-path.yaml index 21e97781c9f..d36d47d58c8 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/network-interface.yaml index 4030c3b2d30..9628f1707a6 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/proxy-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/proxy-port.yaml index af0c438ab9e..277faab0d27 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/proxy-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/proxy-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/reset-timeout.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/reset-timeout.yaml index e924c244e93..c3fd3ca7a8a 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/reset-timeout.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/reset-timeout.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/target-service-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/target-service-port.yaml index dd1c94eac85..6816610625d 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/target-service-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/target-service-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/toxicity.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/toxicity.yaml index eae745c00b5..5abf46f1e57 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/toxicity.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-reset-peer/toxicity.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-reset-peer-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-reset-peer spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/container-runtime-and-socket-path.yaml index 1c9afe9ac2b..f517b1c87a9 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-encoding-type.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-encoding-type.yaml index 7f4181fec03..196c3a10885 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-encoding-type.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-encoding-type.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-response-pre-defined.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-response-pre-defined.yaml index c17f349ed7f..b55d5d6ff45 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-response-pre-defined.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-response-pre-defined.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-response.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-response.yaml index 9f391b7d8ed..152b2d063e5 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-response.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/modify-body-with-response.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/network-interface.yaml index 5da5f7c1e82..a95fe133bf9 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/proxy-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/proxy-port.yaml index ba010538b88..961209c936f 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/proxy-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/proxy-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/status-code.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/status-code.yaml index e4d795f26f7..5f070787889 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/status-code.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/status-code.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/target-service-port.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/target-service-port.yaml index a05ed70ce43..1757e2acd76 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/target-service-port.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/target-service-port.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/toxicity.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/toxicity.yaml index a39eac0f667..97c6051f8c0 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/toxicity.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-http-status-code/toxicity.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-http-status-code-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-http-status-code spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/container-runtime-and-socket-path.yaml index 1a0fe897f95..00248f4ba91 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/filesystem-utilization-bytes.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/filesystem-utilization-bytes.yaml index c34e46a7211..879defd1431 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/filesystem-utilization-bytes.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/filesystem-utilization-bytes.yaml @@ -12,7 +12,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/filesystem-utilization-percentage.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/filesystem-utilization-percentage.yaml index 01bfea1007e..7d752a89fa4 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/filesystem-utilization-percentage.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/filesystem-utilization-percentage.yaml @@ -12,7 +12,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/mount-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/mount-path.yaml index 382454a64e9..b31c47af48f 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/mount-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/mount-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/pumba.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/pumba.yaml index eb8281d9624..8a51e147cb0 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/pumba.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/pumba.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/workers.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/workers.yaml index 7ee64a478b8..4b7be51e243 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/workers.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-io-stress/workers.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-io-stress-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-io-stress spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog-exec/kill-command.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog-exec/kill-command.yaml index 9bcb2a84595..7e321f74132 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog-exec/kill-command.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog-exec/kill-command.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-exec-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog-exec spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog-exec/memory-consumption.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog-exec/memory-consumption.yaml index 2d88f73548d..26d9ca471c8 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog-exec/memory-consumption.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog-exec/memory-consumption.yaml @@ -10,13 +10,13 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog spec: components: env: - # memory consuption value in MB + # memory consumption value in MB # it is limited to 2000MB - name: MEMORY_CONSUMPTION value: '500' #in MB diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/memory-consumption.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/memory-consumption.yaml index b4014ca2209..491f75a6547 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/memory-consumption.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/memory-consumption.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/pumba-lib.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/pumba-lib.yaml index ae16057805e..a2bf3b5d2f5 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/pumba-lib.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/pumba-lib.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/workers.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/workers.yaml index e65cc7aa629..b6883476816 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/workers.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-memory-hog/workers.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-memory-hog-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-memory-hog spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/container-runtime-and-socket-path.yaml index 5857ef8a3d2..863ebdf3b57 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/destination-ips-and-hosts.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/destination-ips-and-hosts.yaml index f5928bb23c9..edd39459264 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/destination-ips-and-hosts.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/destination-ips-and-hosts.yaml @@ -1,4 +1,4 @@ -# it inject the chaos for the ingrees and egress traffic for specific ips/hosts +# it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/network-corruption.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/network-corruption.yaml index 224253defd0..7328a44d665 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/network-corruption.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/network-corruption.yaml @@ -1,4 +1,4 @@ -# it inject the network-corruption for the ingrees and egress traffic +# it injects network-corruption for the egress traffic apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/network-interface.yaml index 1414d21180d..22dce5d6ef2 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/pumba-lib.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/pumba-lib.yaml index 89957e83820..5aaa18c3644 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/pumba-lib.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-corruption/pumba-lib.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-corruption-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-corruption spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/container-runtime-and-socket-path.yaml index 5d18455c980..fb4b48a707c 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/destination-ips-and-hosts.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/destination-ips-and-hosts.yaml index 94e1fd0f850..d41feb4d842 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/destination-ips-and-hosts.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/destination-ips-and-hosts.yaml @@ -1,4 +1,4 @@ -# it inject the chaos for the ingrees and egress traffic for specific ips/hosts +# it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/network-duplication.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/network-duplication.yaml index 5ccbfed41d9..3462e93d4ba 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/network-duplication.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/network-duplication.yaml @@ -1,4 +1,4 @@ -# it inject the network-duplication for the ingrees and egress traffic +# it injects network-duplication for the egress traffic apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/network-interface.yaml index f016600ab12..1c6c0ad1171 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/pumba-lib.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/pumba-lib.yaml index bc5af693cb6..dad1ddadd22 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/pumba-lib.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-duplication/pumba-lib.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-duplication-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-duplication spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/container-runtime-and-socket-path.yaml index a41a50a5ef6..a6000b6e265 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/destination-ips-and-hosts.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/destination-ips-and-hosts.yaml index c8d8fad43ab..635e85b0262 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/destination-ips-and-hosts.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/destination-ips-and-hosts.yaml @@ -1,4 +1,4 @@ -# it inject the chaos for the ingrees and egress traffic for specific ips/hosts +# it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-interface.yaml index 87a4d84ca35..32fb4e27270 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-latency-jitter.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-latency-jitter.yaml index d958a0cdd45..b1118dc326b 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-latency-jitter.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-latency-jitter.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-latency.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-latency.yaml index 6e827c38139..8c7606d698e 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-latency.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/network-latency.yaml @@ -1,4 +1,4 @@ -# it inject the network-latency for the ingrees and egress traffic +# it injects network-latency for the egress traffic apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/pumba-lib.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/pumba-lib.yaml index 6061307ad14..c81882d6b8c 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/pumba-lib.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-latency/pumba-lib.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-latency-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-latency spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/container-runtime-and-socket-path.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/container-runtime-and-socket-path.yaml index a5ce19e7e73..a35e0dd5051 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/container-runtime-and-socket-path.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/container-runtime-and-socket-path.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/destination-ips-and-hosts.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/destination-ips-and-hosts.yaml index e56f3a019c8..82375cb6b50 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/destination-ips-and-hosts.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/destination-ips-and-hosts.yaml @@ -1,4 +1,4 @@ -# it inject the chaos for the ingrees and egress traffic for specific ips/hosts +# it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/network-interface.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/network-interface.yaml index 55bd80ae7d3..6dee71b303e 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/network-interface.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/network-loss.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/network-loss.yaml index 6bd91b463cb..b7a7e089bf2 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/network-loss.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/network-loss.yaml @@ -1,4 +1,4 @@ -# it inject the network-loss for the ingrees and egress traffic +# it injects network-loss for the egress traffic apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/pumba-lib.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/pumba-lib.yaml index 58177f1d54a..7c17e093155 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/pumba-lib.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-loss/pumba-lib.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-loss-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-loss spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/destination-ips-and-hosts.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/destination-ips-and-hosts.yaml index 571e4d0181a..bad22e4b39a 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/destination-ips-and-hosts.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/destination-ips-and-hosts.yaml @@ -1,4 +1,4 @@ -# it inject the chaos for specific ips/hosts +# it injects the chaos for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/namespace-selectors.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/namespace-selectors.yaml index 6096d18cf55..e064c73f233 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/namespace-selectors.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/namespace-selectors.yaml @@ -1,4 +1,4 @@ -# it inject the chaos for specified namespaces, matched by labels +# it injects the chaos for specified namespaces, matched by labels apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/pod-selectors.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/pod-selectors.yaml index a95b7d62fd6..ad09aaf3b68 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/pod-selectors.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/pod-selectors.yaml @@ -1,4 +1,4 @@ -# it inject the chaos for specified pods, matched by labels +# it injects the chaos for specified pods, matched by labels apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/policy-type.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/policy-type.yaml index 3212c607dd3..ad63b9f0467 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/policy-type.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/policy-type.yaml @@ -1,4 +1,4 @@ -# inject network loss for only ingress or only engress or all traffics +# inject network loss for only ingress or only egress or all traffics apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/ports.yaml b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/ports.yaml index 0b83a06e4d0..28cc028b53e 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/ports.yaml +++ b/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-network-partition/ports.yaml @@ -1,4 +1,4 @@ -# it inject the chaos for specified ports +# it injects the chaos for specified ports apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-network-partition-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-network-partition spec: diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/chaos-interval.yaml b/docs/chaos-engineering/chaos-faults/static/manifest/common/chaos-duration.yaml similarity index 62% rename from docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/chaos-interval.yaml rename to docs/chaos-engineering/chaos-faults/static/manifest/common/chaos-duration.yaml index abb2798a46e..cbf7505f3b9 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/container-kill/chaos-interval.yaml +++ b/docs/chaos-engineering/chaos-faults/static/manifest/common/chaos-duration.yaml @@ -1,4 +1,4 @@ -# defines delay between each successive iteration of the chaos +# defines total time duration of the chaos apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: @@ -10,15 +10,12 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: container-kill-sa + chaosServiceAccount: litmus-admin experiments: - - name: container-kill + - name: pod-delete spec: components: env: - # delay between each iteration of chaos - - name: CHAOS_INTERVAL - value: '15' # time duration for the chaos execution - name: TOTAL_CHAOS_DURATION VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/chaos-interval.yaml b/docs/chaos-engineering/chaos-faults/static/manifest/common/chaos-interval.yaml similarity index 90% rename from docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/chaos-interval.yaml rename to docs/chaos-engineering/chaos-faults/static/manifest/common/chaos-interval.yaml index 29c0cd42af4..0abb78163c0 100644 --- a/docs/chaos-engineering/chaos-faults/kubernetes/pod/static/manifests/pod-delete/chaos-interval.yaml +++ b/docs/chaos-engineering/chaos-faults/static/manifest/common/chaos-interval.yaml @@ -10,7 +10,7 @@ spec: appns: "default" applabel: "app=nginx" appkind: "deployment" - chaosServiceAccount: pod-delete-sa + chaosServiceAccount: litmus-admin experiments: - name: pod-delete spec: @@ -21,4 +21,4 @@ spec: value: '15' # time duration for the chaos execution - name: TOTAL_CHAOS_DURATION - VALUE: '60' + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/static/manifest/common/instance-id.yaml b/docs/chaos-engineering/chaos-faults/static/manifest/common/instance-id.yaml new file mode 100644 index 00000000000..33a9d17d04e --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/static/manifest/common/instance-id.yaml @@ -0,0 +1,21 @@ +# provide to append user-defined suffix in the end of chaosresult name +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + # user-defined string appended as suffix in the chaosresult name + - name: INSTANCE_ID + value: '123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/static/manifest/common/lib-image.yaml b/docs/chaos-engineering/chaos-faults/static/manifest/common/lib-image.yaml new file mode 100644 index 00000000000..ea34e6fba7e --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/static/manifest/common/lib-image.yaml @@ -0,0 +1,23 @@ +# it contains the lib image used for the helper pod +# it support [container-kill, network-experiments, stress-experiments, dns-experiments, disk-fill, +# kubelet-service-kill, docker-service-kill, node-restart] experiments +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: container-kill + spec: + components: + env: + # nane of the lib image + - name: LIB_IMAGE + value: 'litmuschaos/go-runner:latest' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/static/manifest/common/lib.yaml b/docs/chaos-engineering/chaos-faults/static/manifest/common/lib.yaml new file mode 100644 index 00000000000..1fb680c5446 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/static/manifest/common/lib.yaml @@ -0,0 +1,21 @@ +# lib for the chaos injection +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + # defines the name of the chaoslib used for the experiment + - name: LIB + value: 'litmus' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/static/manifest/common/ramp-time.yaml b/docs/chaos-engineering/chaos-faults/static/manifest/common/ramp-time.yaml new file mode 100644 index 00000000000..49d8327c73e --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/static/manifest/common/ramp-time.yaml @@ -0,0 +1,21 @@ +# waits for the ramp time before and after injection of chaos +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + # waits for the time interval before and after injection of chaos + - name: RAMP_TIME + value: '10' # in seconds \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/static/manifest/common/sequence.yaml b/docs/chaos-engineering/chaos-faults/static/manifest/common/sequence.yaml new file mode 100644 index 00000000000..7758ee6372a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/static/manifest/common/sequence.yaml @@ -0,0 +1,22 @@ +# define the order of execution of chaos in case of multiple targets +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: litmus-admin + experiments: + - name: pod-delete + spec: + components: + env: + # define the sequence of execution of chaos in case of mutiple targets + # supports: serial, parallel. default: parallel + - name: SEQUENCE + value: 'parallel' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-cpu-hog.png b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-cpu-hog.png new file mode 100644 index 00000000000..8626fe15740 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-cpu-hog.png differ diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-disk-loss.png b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-disk-loss.png new file mode 100644 index 00000000000..20d2e5b1c26 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-disk-loss.png differ diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-host-reboot.png b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-host-reboot.png new file mode 100644 index 00000000000..5e09b6446c9 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-host-reboot.png differ diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-io-stress.png b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-io-stress.png new file mode 100644 index 00000000000..3228923f62d Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-io-stress.png differ diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-memory-hog.png b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-memory-hog.png new file mode 100644 index 00000000000..c7d7b9fb8f8 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-memory-hog.png differ diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-process-kill.png b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-process-kill.png new file mode 100644 index 00000000000..ac2fd406fa2 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-process-kill.png differ diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-service-stop.png b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-service-stop.png new file mode 100644 index 00000000000..e600794dfbc Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/vmware/static/images/vmware-service-stop.png differ diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vm-poweroff/app-vm-moid.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vm-poweroff/app-vm-moid.yaml index dfa6b049dc3..ba8e6eca473 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vm-poweroff/app-vm-moid.yaml +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vm-poweroff/app-vm-moid.yaml @@ -5,8 +5,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: vm-poweroff-sa + chaosServiceAccount: litmus-admin experiments: - name: vm-poweroff spec: @@ -15,6 +14,5 @@ spec: # MOID of the VM - name: APP_VM_MOIDS value: 'vm-53,vm-65' - - name: TOTAL_CHAOS_DURATION - VALUE: '60' + VALUE: '60' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-cpu-hog/vm-cpu-hog-core.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-cpu-hog/vm-cpu-hog-core.yaml new file mode 100644 index 00000000000..b1448c0b68a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-cpu-hog/vm-cpu-hog-core.yaml @@ -0,0 +1,19 @@ +# cpu hog in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-cpu-hog + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # cpu cores for stress + - name: CPU_CORES + value: '1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-cpu-hog/vm-cpu-hog-load.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-cpu-hog/vm-cpu-hog-load.yaml new file mode 100644 index 00000000000..71de228bc11 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-cpu-hog/vm-cpu-hog-load.yaml @@ -0,0 +1,19 @@ +# cpu hog in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-cpu-hog + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # cpu load in percentage for the stress + - name: CPU_LOAD + value: '100' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-disk-loss/vm-disk-loss-diskname.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-disk-loss/vm-disk-loss-diskname.yaml new file mode 100644 index 00000000000..e09f06bf1ae --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-disk-loss/vm-disk-loss-diskname.yaml @@ -0,0 +1,19 @@ +# Disk loss in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-disk-loss + spec: + components: + env: + # Name of the VM + - name: APP_VM_MOIDS + value: 'vm-2055' + # Name of target disk + - name: VIRTUAL_DISK_NAMES + value: 'disk-1.vmdk' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-match-scheme.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-match-scheme.yaml new file mode 100644 index 00000000000..77e02f22cbc --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-match-scheme.yaml @@ -0,0 +1,22 @@ +# induces dns chaos on the VMware VMs +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-dns-chaos + spec: + components: + env: + # match scheme type + - name: MATCH_SCHEME + value: 'exact' + - name: VM_NAME + value: 'vm-1,vm-2' + - name: VM_USER_NAME + value: 'ubuntu,debian' + - name: VM_PASSWORD + value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-port.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-port.yaml index 009d335dd53..53c28703c41 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-port.yaml +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-port.yaml @@ -5,25 +5,17 @@ metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-dns-chaos spec: components: env: - # MOID of the VM - name: PORT value: '54' - - name: VM_NAME value: 'vm-1,vm-2' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-target-hostnames.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-target-hostnames.yaml new file mode 100644 index 00000000000..78a97c405a5 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-target-hostnames.yaml @@ -0,0 +1,22 @@ +# induces dns chaos on the VMware VMs +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-dns-chaos + spec: + components: + env: + # list of target host names + - name: TARGET_HOSTNAMES + value: '["litmuschaos","chaosnative.com"]' + - name: VM_NAME + value: 'vm-1,vm-2' + - name: VM_USER_NAME + value: 'ubuntu,debian' + - name: VM_PASSWORD + value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-upstream-server.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-upstream-server.yaml new file mode 100644 index 00000000000..8666c6b0955 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-dns-chaos/vmware-dns-upstream-server.yaml @@ -0,0 +1,22 @@ +# induces dns chaos on the VMware VMs +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-dns-chaos + spec: + components: + env: + # name of the upstream server + - name: UPSTREAM_SERVER + value: '8.8.8.8' + - name: VM_NAME + value: 'vm-1,vm-2' + - name: VM_USER_NAME + value: 'ubuntu,debian' + - name: VM_PASSWORD + value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-host-reboot/ha-host-reboot.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-host-reboot/ha-host-reboot.yaml new file mode 100644 index 00000000000..64f4b9c11f0 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-host-reboot/ha-host-reboot.yaml @@ -0,0 +1,23 @@ +# vCenter HA cluster host reboot +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-host-reboot + spec: + components: + env: + # Name of the host + - name: HOST_NAME + value: 'host-1' + # Host datacenter + - name: HOST_DATACENTER + value: 'datacenter-1' + # Is host part of HA cluster + - name: HIGH_AVAILABILITY_CLUSTER + value: 'enable' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-host-reboot/host-reboot.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-host-reboot/host-reboot.yaml new file mode 100644 index 00000000000..cb21c8840b4 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-host-reboot/host-reboot.yaml @@ -0,0 +1,20 @@ +# vCenter host reboot +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-host-reboot + spec: + components: + env: + # Name of the host + - name: HOST_NAME + value: 'host-1' + # Host datacenter + - name: HOST_DATACENTER + value: 'datacenter-1' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-mount-path.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-mount-path.yaml new file mode 100644 index 00000000000..bfcdb489234 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-mount-path.yaml @@ -0,0 +1,22 @@ +# io-stress in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-io-stress + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # path need to be stressed/filled + - name: VOLUME_MOUNT_PATH + value: '/some-dir-in-container' + # size of io to be stressed + - name: FILESYSTEM_UTILIZATION_BYTES + value: '1' #in GB \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-utilization-bytes.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-utilization-bytes.yaml new file mode 100644 index 00000000000..1cef86a347e --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-utilization-bytes.yaml @@ -0,0 +1,18 @@ +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-io-stress + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # size of io to be stressed + - name: FILESYSTEM_UTILIZATION_BYTES + value: '1' #in GB \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-utilization-percenatge.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-utilization-percenatge.yaml new file mode 100644 index 00000000000..ba67e25a1f6 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-utilization-percenatge.yaml @@ -0,0 +1,19 @@ +# io-stress in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-io-stress + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # percentage of free space of file system, need to be stressed + - name: FILESYSTEM_UTILIZATION_PERCENTAGE + value: '10' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-worker.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-worker.yaml new file mode 100644 index 00000000000..b488360347c --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-io-stress/vm-io-stress-filesystem-worker.yaml @@ -0,0 +1,22 @@ +# io-stress in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-io-stress + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # number of io workers + - name: NUMBER_OF_WORKERS + value: '4' + # size of io to be stressed + - name: FILESYSTEM_UTILIZATION_BYTES + value: '1' #in GB \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-memory-hog/vm-memory-hog-memoryconsumption.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-memory-hog/vm-memory-hog-memoryconsumption.yaml new file mode 100644 index 00000000000..c0ab79880a1 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-memory-hog/vm-memory-hog-memoryconsumption.yaml @@ -0,0 +1,19 @@ +# Memory hog in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-memory-hog + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # memory consumption value + - name: MEMORY_CONSUMPTION_MEBIBYTES + value: '500' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-memory-hog/vm-memory-hog-worker.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-memory-hog/vm-memory-hog-worker.yaml new file mode 100644 index 00000000000..f435a356872 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-memory-hog/vm-memory-hog-worker.yaml @@ -0,0 +1,19 @@ +# Memory hog in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-memory-hog + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # Number of workers for stress + - name: NUMBER_OF_WORKERS + value: '4' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/destination-host-and-ip.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/destination-host-and-ip.yaml similarity index 78% rename from docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/destination-host-and-ip.yaml rename to docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/destination-host-and-ip.yaml index 398945550bd..914d31ea4fa 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/destination-host-and-ip.yaml +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/destination-host-and-ip.yaml @@ -1,11 +1,10 @@ -## it inject the chaos for the ingrees and egress traffic for specific ips/hosts +## it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-latency @@ -18,15 +17,9 @@ spec: # supports comma separated destination hosts - name: DESTINATION_HOSTS value: 'google.com' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-interface.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-interface.yaml similarity index 67% rename from docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-interface.yaml rename to docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-interface.yaml index b58903c8e56..b56ff0c0ae4 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-interface.yaml +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-interface.yaml @@ -1,29 +1,22 @@ -## it inject the chaos for the ingrees and egress traffic for specific ips/hosts +## it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-latency spec: components: env: - # name of the network interface + # name of the network interface - name: NETWORK_INTERFACE value: 'eth0' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-latency-with-jitter.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-latency-with-jitter.yaml similarity index 77% rename from docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-latency-with-jitter.yaml rename to docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-latency-with-jitter.yaml index 91f0484851d..7621406ad62 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-latency-with-jitter.yaml +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-latency-with-jitter.yaml @@ -4,28 +4,20 @@ metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-latency spec: components: env: - # value of the network latency jitter (in ms) + # value of the network latency jitter (in ms) - name: JITTER value: '200' - - name: NETWORK_LATENCY value: '2000' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-latency.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-latency.yaml similarity index 84% rename from docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-latency.yaml rename to docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-latency.yaml index 47dfc3b45a2..5f88a10c27e 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-latency.yaml +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-latency/network-latency.yaml @@ -4,7 +4,6 @@ metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-latency @@ -14,15 +13,9 @@ spec: # network packet latency - name: NETWORK_LATENCY value: '2000' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/destination-host-and-ip.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/destination-host-and-ip.yaml new file mode 100644 index 00000000000..e5856e1e364 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/destination-host-and-ip.yaml @@ -0,0 +1,25 @@ +## it injects the chaos for the egress traffic for specific ips/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: vmware-engine +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-network-loss + spec: + components: + env: + # supports comma separated destination ips + - name: DESTINATION_IPS + value: '8.8.8.8,192.168.5.6' + # supports comma separated destination hosts + - name: DESTINATION_HOSTS + value: 'google.com' + - name: VM_NAME + value: 'vm-1,vm-2' + - name: VM_USER_NAME + value: 'ubuntu,debian' + - name: VM_PASSWORD + value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/network-interface.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/network-interface.yaml new file mode 100644 index 00000000000..d748bf0e403 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/network-interface.yaml @@ -0,0 +1,22 @@ +## it injects the chaos for the egress traffic for specific ips/hosts +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: vmware-engine +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-network-loss + spec: + components: + env: + # name of the network interface + - name: NETWORK_INTERFACE + value: 'eth0' + - name: VM_NAME + value: 'vm-1,vm-2' + - name: VM_USER_NAME + value: 'ubuntu,debian' + - name: VM_PASSWORD + value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-packet-loss-percentage.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/network-packet-loss-percentage.yaml similarity index 85% rename from docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-packet-loss-percentage.yaml rename to docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/network-packet-loss-percentage.yaml index 8d68163066b..da0e16a89ff 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-chaos/network-packet-loss-percentage.yaml +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-network-loss/network-packet-loss-percentage.yaml @@ -4,7 +4,6 @@ metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-loss @@ -14,15 +13,9 @@ spec: # network packet loss percentage - name: NETWORK_PACKET_LOSS_PERCENTAGE value: '100' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-process-kill/vmware-process-kill.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-process-kill/vmware-process-kill.yaml new file mode 100644 index 00000000000..39cca287d93 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-process-kill/vmware-process-kill.yaml @@ -0,0 +1,19 @@ +# Process kill in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-process-kill + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # List of Process IDs + - name: PROCESS_IDS + value: '8688,4678' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-service-stop/vmware-service-stop.yaml b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-service-stop/vmware-service-stop.yaml new file mode 100644 index 00000000000..76e8ef9fda1 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/static/manifests/vmware-service-stop/vmware-service-stop.yaml @@ -0,0 +1,19 @@ +# Service Stop in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-service-stop + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # Name of service + - name: SERVICE_NAME + value: 'nginx' \ No newline at end of file diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-cpu-hog.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-cpu-hog.md new file mode 100644 index 00000000000..1cd9fe66cac --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-cpu-hog.md @@ -0,0 +1,160 @@ +--- +id: vmware-cpu-hog +title: VMware Cpu Hog +--- + +## Introduction +- VMware cpu hog experiment consumes the CPU resources on Linux OS based VMware VM . +- It helps to check the performance of the application running on the VMWare VMs. + +:::tip Fault execution flow chart +![VMware Cpu Hog](./static/images/vmware-cpu-hog.png) +::: + +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +** vCenter Requirements ** +- Ensure the connectivity of execution plane with vCenter and the hosts over 443 port. +- Ensure that Vmware tool is installed on the target VM with remote execution enabled. +- Ensure that you have sufficient vCenter permission to access hosts and VMs. +- Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: vcenter-secret + namespace: litmus +type: Opaque +stringData: + VCENTERSERVER: XXXXXXXXXXX + VCENTERUSER: XXXXXXXXXXXXX + VCENTERPASS: XXXXXXXXXXXXX +``` + +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- VM should be in healthy state. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + +
Variables Description Notes
VM_NAME Name of the target VM ubuntu-vm-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
CPU_CORES Number of the cpu cores subjected to CPU stress Default to 1
CPU_LOAD Percentage of cpu to be consumed Default to 100
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### CPU_CORES +It stresses the `CPU_CORE` of the targeted vm for the `TOTAL_CHAOS_DURATION` duration + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-cpu-hog/vm-cpu-hog-core.yaml yaml) +```yaml +# cpu hog in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-cpu-hog + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # cpu cores for stress + - name: CPU_CORES + value: '1' +``` +### CPU Load +It contains percentage of vm CPU to be consumed. It can be tuned via `CPU_LOAD` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-cpu-hog/vm-cpu-hog-load.yaml yaml) +```yaml +# cpu hog in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-cpu-hog + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # cpu load in percentage for the stress + - name: CPU_LOAD + value: '100' +``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-disk-loss.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-disk-loss.md new file mode 100644 index 00000000000..cfb2e0029aa --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-disk-loss.md @@ -0,0 +1,124 @@ +--- +id: vmware-disk-loss +title: VMware Disk Loss +--- + +## Introduction +- VMware Disk Loss experiment will detach the disks attached to a Linux OS based VMware VM. + +:::tip Fault execution flow chart +![VMware Disk Loss](./static/images/vmware-disk-loss.png) +::: + +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +** vCenter Requirements ** +- Ensure the connectivity of execution plane with vCenter and the hosts over 443 port. +- Ensure that Vmware tool is installed on the target VM with remote execution enabled. +- Ensure that you have sufficient vCenter permission to access hosts and VMs. +- Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: vcenter-secret + namespace: litmus +type: Opaque +stringData: + VCENTERSERVER: XXXXXXXXXXX + VCENTERUSER: XXXXXXXXXXXXX + VCENTERPASS: XXXXXXXXXXXXX +``` +::: +## Default Validations +:::info +- VM should be in healthy state. +- The target disks should be attached to the VM. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
APP_VM_MOIDS Once you open VM in vCenter WebClient, you can find MOID in address field (VirtualMachine:vm-5365). Alternatively you can use the CLI to fetch the MOID vm-5365
VIRTUAL_DISK_NAMES Name of target disks provided as comma separated values disk-1.vmdk,disk-2.vmdk
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### VIRTUAL_DISK_NAMES +It contains the name of target disks attached to a particular VM. It can be tuned via `VIRTUAL_DISK_NAMES` ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-disk-loss/vm-disk-loss-diskname.yaml yaml) +```yaml +# Disk loss in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-disk-loss + spec: + components: + env: + # Name of the VM + - name: APP_VM_MOIDS + value: 'vm-2055' + # Name of target disk + - name: VIRTUAL_DISK_NAMES + value: 'disk-1.vmdk' +``` + diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-dns-chaos.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-dns-chaos.md index 7b914584642..c13e143ad28 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/vmware-dns-chaos.md +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-dns-chaos.md @@ -4,7 +4,7 @@ title: VMware DNS Chaos --- ## Introduction -- It causes DNS errors in the provided VMWare VMs for a specified chaos duration. +- It causes DNS errors in the provided VMWare VMs for a specified chaos duration. - It helps to check the performance of the application/process running on the VMWare VMs. :::tip Fault execution flow chart @@ -41,83 +41,11 @@ stringData: You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. ::: - + ## Default Validations :::info - VM should be in healthy state before and after chaos. ::: -## Minimal RBAC configuration example (optional) - -
-Minimal RBAC configuration -If you are using this experiment as part of a litmus workflow scheduled constructed & executed from chaos-center, then you may be making use of the litmus-admin RBAC, which is pre installed in the cluster as part of the agent setup. - -```yaml ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: vm-poweroff-sa - namespace: default - labels: - name: vm-poweroff-sa - app.kubernetes.io/part-of: litmus ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: vm-poweroff-sa - labels: - name: vm-poweroff-sa - app.kubernetes.io/part-of: litmus -rules: - # Create and monitor the experiment & helper pods - - apiGroups: [""] - resources: ["pods"] - verbs: ["create","delete","get","list","patch","update", "deletecollection"] - # Performs CRUD operations on the events inside chaosengine and chaosresult - - apiGroups: [""] - resources: ["events"] - verbs: ["create","get","list","patch","update"] - # Fetch configmaps & secrets details and mount it to the experiment pod (if specified) - - apiGroups: [""] - resources: ["secrets","configmaps"] - verbs: ["get","list",] - # Track and get the runner, experiment, and helper pods log - - apiGroups: [""] - resources: ["pods/log"] - verbs: ["get","list","watch"] - # for creating and managing to execute comands inside target container - - apiGroups: [""] - resources: ["pods/exec"] - verbs: ["get","list","create"] - # for configuring and monitor the experiment job by the chaos-runner pod - - apiGroups: ["batch"] - resources: ["jobs"] - verbs: ["create","list","get","delete","deletecollection"] - # for creation, status polling and deletion of litmus chaos resources used within a chaos workflow - - apiGroups: ["litmuschaos.io"] - resources: ["chaosengines","chaosexperiments","chaosresults"] - verbs: ["create","list","get","patch","update","delete"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: vm-poweroff-sa - labels: - name: vm-poweroff-sa - app.kubernetes.io/part-of: litmus -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: vm-poweroff-sa -subjects: -- kind: ServiceAccount - name: vm-poweroff-sa - namespace: default -``` -Use this sample RBAC manifest to create a chaosServiceAccount in the desired (app) namespace. This example consists of the minimum necessary role permissions to execute the experiment. -
## Experiment tunables
@@ -129,12 +57,12 @@ Use this sample RBAC manifest to create a chaosServiceAccount in the desired (ap Description Notes - + VM_USER_NAME Provide the username of the target VM(s) Multiple usernames can be provided as comma separated (for more than one VM under chaos). It is used to run the govc command. - + VM_PASSWORD Provide the password for the target VM(s) It is used to run the govc command. @@ -152,12 +80,12 @@ Use this sample RBAC manifest to create a chaosServiceAccount in the desired (ap Description Notes - + TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s - + CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s @@ -170,7 +98,22 @@ Use this sample RBAC manifest to create a chaosServiceAccount in the desired (ap RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 + + + TARGET_HOSTNAMES + List of the target hostnames or keywords eg. '["litmuschaos","chaosnative.com"]' + If not provided, all hostnames/domains will be targeted + + + MATCH_SCHEME + Determines whether the dns query has to match exactly with one of the targets or can have any of the targets as substring. Can be either exact or substring + if not provided, it will be set as exact + + + UPSTREAM_SERVER + Custom upstream server to which intercepted dns requests will be forwarded + defaults to the server mentioned in resolv.conf

Secret Fields

@@ -200,7 +143,7 @@ Use this sample RBAC manifest to create a chaosServiceAccount in the desired (ap Provide the value as true It is used to run the govc in insecure mode and this ENV is setup using secret. - +
## Experiment Examples @@ -223,26 +166,116 @@ metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-dns-chaos spec: components: env: - # MOID of the VM - name: PORT value: '54' + - name: VM_NAME + value: 'vm-1,vm-2' + - name: VM_USER_NAME + value: 'ubuntu,debian' + - name: VM_PASSWORD + value: '123,123' +``` + +### Run DNS Chaos With Target HostNames + +It contains the list of the target host name to inject the DNS chaos. The value can be provided using `TARGET_HOSTNAMES` Env. +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-dns-chaos/vmware-dns-target-hostnames.yaml yaml) +```yaml +# induces dns chaos on the VMware VMs +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-dns-chaos + spec: + components: + env: + # list of target host names + - name: TARGET_HOSTNAMES + value: '["litmuschaos","chaosnative.com"]' - name: VM_NAME value: 'vm-1,vm-2' + - name: VM_USER_NAME + value: 'ubuntu,debian' + - name: VM_PASSWORD + value: '123,123' +``` + - - name: TOTAL_CHAOS_DURATION - VALUE: '60' +### Run DNS Chaos With Match scheme +It determines whether the dns query has to match exactly with one of the targets or can have any of the targets as substring. It can be either exact or substring. The value can be provided using `MATCH_SCHEME` Env. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-dns-chaos/vmware-dns-match-scheme.yaml yaml) +```yaml +# induces dns chaos on the VMware VMs +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-dns-chaos + spec: + components: + env: + # match scheme type + - name: MATCH_SCHEME + value: 'exact' + - name: VM_NAME + value: 'vm-1,vm-2' - name: VM_USER_NAME value: 'ubuntu,debian' + - name: VM_PASSWORD + value: '123,123' +``` + + +### Run DNS Chaos With Upstream server + +It contains the custom upstream server to which intercepted dns requests will be forwarded. It is defaults to the server mentioned in resolv.conf. The value can be provided using `UPSTREAM_SERVER` Env. + +Use the following example to tune this: +[embedmd]:# (./static/manifests/vmware-dns-chaos/vmware-dns-upstream-server.yaml yaml) +```yaml +# induces dns chaos on the VMware VMs +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-dns-chaos + spec: + components: + env: + # name of the upstream server + - name: UPSTREAM_SERVER + value: '8.8.8.8' + - name: VM_NAME + value: 'vm-1,vm-2' + - name: VM_USER_NAME + value: 'ubuntu,debian' - name: VM_PASSWORD value: '123,123' ``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-host-reboot.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-host-reboot.md new file mode 100644 index 00000000000..ccea905f287 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-host-reboot.md @@ -0,0 +1,157 @@ +--- +id: vmware-host-reboot +title: VMware Host Reboot +--- +## Introduction +- VMware Host Reboot fault reboots a VMware host attached to the Vcenter. +- It helps determining VMware infrastructure resiliency upon host reboot. +- It can also be used to measure the infrastructure resiliency in case of an HA cluster. + +:::tip Fault execution flow chart +![VMware Host Reboot](./static/images/vmware-host-reboot.png) +::: + +## Uses +
+View the uses of the experiment +
+This fault has a high blast radius wherein all the VMs under the target host get disrupted.It can be used to measure the impact of host reboot on the VMs and underlying applications. It can be also used to measure the effectiveness of an HA cluster. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +**vCenter Requirements** +- Ensure the connectivity of execution plane with vCenter and the hosts over 443 port. +- Ensure that VMware tool is installed on the target VM with remote execution enabled. +- Ensure that you have sufficient vCenter permission to access hosts and VMs. +- Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: vcenter-secret + namespace: litmus +type: Opaque +stringData: + VCENTERSERVER: XXXXXXXXXXX + VCENTERUSER: XXXXXXXXXXXXX + VCENTERPASS: XXXXXXXXXXXXX +``` +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + +## Default Validations +:::info +- Host should be in healthy state. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
HOST_NAME The name of the target host Eg. host-1
HOST_DATACENTER The name of the datacenter to which the host belongs Eg. datacenter-1
HIGH_AVAILABILITY_CLUSTER Whether the host is part of a high availability cluster Default value: disable. Supported: disable, enable
+

Optional Fields

+ + + + + + + + + + + +
Variables Description Notes
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### Host Reboot +Reboot a vCenter host. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-host-reboot/host-reboot.yaml yaml) +```yaml +# vCenter host reboot +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-host-reboot + spec: + components: + env: + # Name of the host + - name: HOST_NAME + value: 'host-1' + # Host datacenter + - name: HOST_DATACENTER + value: 'datacenter-1' +``` + +### HA Cluster +Reboot a vCenter host which is part of an HA cluster. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-host-reboot/ha-host-reboot.yaml yaml) +```yaml +# vCenter HA cluster host reboot +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-host-reboot + spec: + components: + env: + # Name of the host + - name: HOST_NAME + value: 'host-1' + # Host datacenter + - name: HOST_DATACENTER + value: 'datacenter-1' + # Is host part of HA cluster + - name: HIGH_AVAILABILITY_CLUSTER + value: 'enable' +``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-http-latency.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-http-latency.md index 68019310254..93aee8e5708 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/vmware-http-latency.md +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-http-latency.md @@ -57,7 +57,7 @@ You can pass the VM credentials as secrets or as an chaosengine ENV variable. VM_USER_NAME - Username with sudo priviliges. + Username with sudo privileges. Eg: vm-user @@ -67,7 +67,7 @@ You can pass the VM credentials as secrets or as an chaosengine ENV variable. LATENCY - Provide latency to be added to request in miliseconds. + Provide latency to be added to request in milliseconds. Eg: 1000 @@ -105,7 +105,7 @@ You can pass the VM credentials as secrets or as an chaosengine ENV variable. INSTALL_DEPENDENCY - Whether to install the dependancy to run the experiment + Whether to install the dependency to run the experiment If the dependency already exists, you can turn it off. Defaults to True. diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-http-modify-response.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-http-modify-response.md index 7b850e997e3..25cffdb3473 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/vmware-http-modify-response.md +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-http-modify-response.md @@ -66,7 +66,7 @@ You can pass the VM credentials as secrets or as an chaosengine ENV variable. VM_USER_NAME - Username with sudo priviliges. + Username with sudo privileges. Eg: vm-user @@ -151,7 +151,7 @@ You can pass the VM credentials as secrets or as an chaosengine ENV variable. INSTALL_DEPENDENCY - Whether to install the dependancy to run the experiment + Whether to install the dependency to run the experiment If the dependency already exists, you can turn it off. Defaults to True. diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-http-reset-peer.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-http-reset-peer.md index 17a3a75e04f..e845c6abc4a 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/vmware-http-reset-peer.md +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-http-reset-peer.md @@ -64,7 +64,7 @@ You can pass the VM credentials as secrets or as an chaosengine ENV variable. VM_USER_NAME - Username with sudo priviliges. + Username with sudo privileges. Eg: vm-user @@ -112,7 +112,7 @@ You can pass the VM credentials as secrets or as an chaosengine ENV variable. INSTALL_DEPENDENCY - Whether to install the dependancy to run the experiment + Whether to install the dependency to run the experiment If the dependency already exists, you can turn it off. Defaults to True. diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-io-stress.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-io-stress.md new file mode 100644 index 00000000000..1f29b3faac9 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-io-stress.md @@ -0,0 +1,230 @@ +--- +id: vmware-io-stress +title: VMware IO Stress +--- + +## Introduction +- This experiment causes disk stress on the target VMware VMs. The experiment aims to verify the resiliency of applications that share this disk resource to the VM. + +:::tip Fault execution flow chart +![VMware IO Stress](./static/images/vmware-io-stress.png) +::: + +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +** vCenter Requirements ** +- Ensure the connectivity of execution plane with vCenter and the hosts over 443 port. +- Ensure that Vmware tool is installed on the target VM with remote execution enabled. +- Ensure that you have sufficient vCenter permission to access hosts and VMs. +- Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: vcenter-secret + namespace: litmus +type: Opaque +stringData: + VCENTERSERVER: XXXXXXXXXXX + VCENTERUSER: XXXXXXXXXXXXX + VCENTERPASS: XXXXXXXXXXXXX +``` +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- VM should be in healthy state. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + +
Variables Description Notes
VM_NAME Name of the target VM ubuntu-vm-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
FILESYSTEM_UTILIZATION_PERCENTAGE Specify the size as percentage of free space on the file system
FILESYSTEM_UTILIZATION_BYTES Specify the size in GigaBytes(GB). FILESYSTEM_UTILIZATION_PERCENTAGE & FILESYSTEM_UTILIZATION_BYTES are mutually exclusive. If both are provided, FILESYSTEM_UTILIZATION_PERCENTAGE is prioritized.
NUMBER_OF_WORKERS It is the number of IO workers involved in IO disk stress Default to 4
VOLUME_MOUNT_PATH Fill the given volume mount path
CPU_CORES Number of the cpu cores subjected to CPU stress Default to 1
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### FILESYSTEM_UTILIZATION_PERCENTAGE +It stresses the `FILESYSTEM_UTILIZATION_PERCENTAGE` percentage of total free space available in the VM. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-io-stress/vm-io-stress-filesystem-utilization-percenatge.yaml yaml) +```yaml +# io-stress in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-io-stress + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # percentage of free space of file system, need to be stressed + - name: FILESYSTEM_UTILIZATION_PERCENTAGE + value: '10' +``` +### Filesystem Utilization Bytes +It stresses the `FILESYSTEM_UTILIZATION_BYTES` GB of the i/o of the targeted VM. It is mutually exclusive with the FILESYSTEM_UTILIZATION_PERCENTAGE ENV. If FILESYSTEM_UTILIZATION_PERCENTAGE ENV is set then it will use the percentage for the stress otherwise, it will stress the i/o based on FILESYSTEM_UTILIZATION_BYTES ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-io-stress/vm-io-stress-filesystem-utilization-bytes.yaml yaml) +```yaml +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-io-stress + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # size of io to be stressed + - name: FILESYSTEM_UTILIZATION_BYTES + value: '1' #in GB +``` +### Mount Path +The volume mount path, which needs to be filled. It can be tuned with `VOLUME_MOUNT_PATH` ENV + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-io-stress/vm-io-stress-filesystem-mount-path.yaml yaml) +```yaml +# io-stress in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-io-stress + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # path need to be stressed/filled + - name: VOLUME_MOUNT_PATH + value: '/some-dir-in-container' + # size of io to be stressed + - name: FILESYSTEM_UTILIZATION_BYTES + value: '1' #in GB +``` +### Workers For Stress +The worker's count for the stress can be tuned with `NUMBER_OF_WORKERS` ENV. + +[embedmd]:# (./static/manifests/vmware-io-stress/vm-io-stress-filesystem-worker.yaml yaml) +```yaml +# io-stress in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-io-stress + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # number of io workers + - name: NUMBER_OF_WORKERS + value: '4' + # size of io to be stressed + - name: FILESYSTEM_UTILIZATION_BYTES + value: '1' #in GB +``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-memory-hog.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-memory-hog.md new file mode 100644 index 00000000000..4795943ba43 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-memory-hog.md @@ -0,0 +1,165 @@ +--- +id: vmware-memory-hog +title: VMware Memory Hog +--- + +## Introduction +- VMware memory hog experiment consumes the Memory resources on Linux OS based VMware VM . +- It helps to check the performance of the application running on the VMWare VMs. + +:::tip Fault execution flow chart +![VMware Memory Hog](./static/images/vmware-memory-hog.png) +::: + +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +** vCenter Requirements ** +- Ensure the connectivity of execution plane with vCenter and the hosts over 443 port. +- Ensure that Vmware tool is installed on the target VM with remote execution enabled. +- Ensure that you have sufficient vCenter permission to access hosts and VMs. +- Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: vcenter-secret + namespace: litmus +type: Opaque +stringData: + VCENTERSERVER: XXXXXXXXXXX + VCENTERUSER: XXXXXXXXXXXXX + VCENTERPASS: XXXXXXXXXXXXX +``` + +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- VM should be in healthy state. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + +
Variables Description Notes
VM_NAME Name of the target VM ubuntu-vm-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
MEMORY_CONSUMPTION_MEBIBYTES The amount of memory used of hogging VMware VMs(megabytes)
MEMORY_CONSUMPTION_PERCENTAGE Percentage of memory to be consumed Default to 100
NUMBER_OF_WORKERS The number of workers used to run the stress process Default to 4
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### MEMORY_CONSUMPTION_MEBIBYTES +It stresses the MEMORY_CONSUMPTION MB memory of the targeted VM for the TOTAL_CHAOS_DURATION duration. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-memory-hog/vm-memory-hog-memoryconsumption.yaml yaml) +```yaml +# Memory hog in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-memory-hog + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # memory consumption value + - name: MEMORY_CONSUMPTION_MEBIBYTES + value: '500' +``` +### Workers For Stress +The worker's count for the stress can be tuned with NUMBER_OF_WORKERS ENV. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-memory-hog/vm-memory-hog-worker.yaml yaml) +```yaml +# Memory hog in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-memory-hog + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # Number of workers for stress + - name: NUMBER_OF_WORKERS + value: '4' +``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-network-latency.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-network-latency.md index 8b3ac08a4a8..d3400f38610 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/vmware-network-latency.md +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-network-latency.md @@ -25,7 +25,7 @@ The vm may stall or get corrupted while they wait endlessly for a packet. The ex ## Prerequisites :::info -- Ensure that Kubernetes Version > 1.16 +- Ensure that Kubernetes Version > 1.16 - Ensure that you have sufficient Vcenter access to stop and start the VM. - Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A secret file looks like: ```yaml @@ -45,7 +45,7 @@ stringData: You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. ::: - + ## Default Validations :::info - VM should be in healthy state before and after chaos. @@ -66,12 +66,12 @@ You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. Provide the target vm names You can provide multiple vm names using comma separated value eg: vm-1,vm-2 - + VM_USER_NAME Provide the username of the target VM(s) Multiple usernames can be provided as comma separated (for more than one VM under chaos). It is used to run the govc command. - + VM_PASSWORD Provide the password for the target VM(s) It is used to run the govc command. @@ -84,32 +84,32 @@ You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. Description Notes - + TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s - + CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s - + NETWORK_LATENCY The latency/delay in milliseconds Default 2000, provide numeric value only - + JITTER The network jitter value in ms Default 0, provide numeric value only - + DESTINATION_IPS IP addresses of the services or the CIDR blocks(range of IPs), the accessibility to which is impacted Comma separated IP(S) or CIDR(S) can be provided. if not provided, it will induce network chaos for all ips/destinations - + DESTINATION_HOSTS DNS Names of the services, the accessibility to which, is impacted if not provided, it will induce network chaos for all ips/destinations or DESTINATION_IPS if already defined @@ -122,7 +122,7 @@ You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30

Secret Fields

@@ -166,7 +166,7 @@ It defines the network packet latency to be injected on the vm. It can be tuned Use the following example to tune this: -[embedmd]:# (./static/manifests/vmware-network-chaos/network-latency.yaml yaml) +[embedmd]:# (./static/manifests/vmware-network-latency/network-latency.yaml yaml) ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine @@ -174,7 +174,6 @@ metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-latency @@ -184,16 +183,10 @@ spec: # network packet latency - name: NETWORK_LATENCY value: '2000' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' ``` @@ -204,7 +197,7 @@ It defines the jitter (in ms), a parameter that allows introducing a network del Use the following example to tune this: -[embedmd]:# (./static/manifests/vmware-network-chaos/network-latency-with-jitter.yaml yaml) +[embedmd]:# (./static/manifests/vmware-network-latency/network-latency-with-jitter.yaml yaml) ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine @@ -212,29 +205,21 @@ metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-latency spec: components: env: - # value of the network latency jitter (in ms) + # value of the network latency jitter (in ms) - name: JITTER value: '200' - - name: NETWORK_LATENCY value: '2000' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' ``` @@ -248,16 +233,15 @@ The network experiments interrupt traffic for all the IPs/hosts by default. The Use the following example to tune this: -[embedmd]:# (./static/manifests/vmware-network-chaos/destination-host-and-ip.yaml yaml) +[embedmd]:# (./static/manifests/vmware-network-latency/destination-host-and-ip.yaml yaml) ```yaml -## it inject the chaos for the ingrees and egress traffic for specific ips/hosts +## it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-latency @@ -270,16 +254,10 @@ spec: # supports comma separated destination hosts - name: DESTINATION_HOSTS value: 'google.com' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' ``` @@ -290,35 +268,28 @@ The defined name of the ethernet interface, which is considered for shaping traf Use the following example to tune this: -[embedmd]:# (./static/manifests/vmware-network-chaos/network-interface.yaml yaml) +[embedmd]:# (./static/manifests/vmware-network-latency/network-interface.yaml yaml) ```yaml -## it inject the chaos for the ingrees and egress traffic for specific ips/hosts +## it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-latency spec: components: env: - # name of the network interface + # name of the network interface - name: NETWORK_INTERFACE value: 'eth0' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' ``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-network-loss.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-network-loss.md index df2ca91440f..1429ab3a840 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/vmware-network-loss.md +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-network-loss.md @@ -25,7 +25,7 @@ The vm may stall or get corrupted while they wait endlessly for a packet. The ex ## Prerequisites :::info -- Ensure that Kubernetes Version > 1.16 +- Ensure that Kubernetes Version > 1.16 - Ensure that you have sufficient Vcenter access to stop and start the VM. - Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A secret file looks like: ```yaml @@ -45,7 +45,7 @@ stringData: You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. ::: - + ## Default Validations :::info - VM should be in healthy state before and after chaos. @@ -66,12 +66,12 @@ You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. Provide the target vm names You can provide multiple vm names using comma separated value eg: vm-1,vm-2 - + VM_USER_NAME Provide the username of the target VM(s) Multiple usernames can be provided as comma separated (for more than one VM under chaos). It is used to run the govc command. - + VM_PASSWORD Provide the password for the target VM(s) It is used to run the govc command. @@ -84,27 +84,27 @@ You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. Description Notes - + TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s - + CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s - + NETWORK_PACKET_LOSS_PERCENTAGE The packet loss in percentage Default to 100 percentage - + DESTINATION_IPS IP addresses of the services or the CIDR blocks(range of IPs), the accessibility to which is impacted Comma separated IP(S) or CIDR(S) can be provided. if not provided, it will induce network chaos for all ips/destinations - + DESTINATION_HOSTS DNS Names of the services, the accessibility to which, is impacted if not provided, it will induce network chaos for all ips/destinations or DESTINATION_IPS if already defined @@ -117,7 +117,7 @@ You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30

Secret Fields

@@ -130,7 +130,7 @@ You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. GOVC_URL Provide the VMCenter Server URL - It is used to perform the vmware api calls using govc command and is derived from sceret. + It is used to perform the vmware api calls using govc command and is derived from secret. GOVC_USERNAME @@ -161,7 +161,7 @@ It defines the network packet loss percentage to be injected on the vm. It can b Use the following example to tune this: -[embedmd]:# (./static/manifests/vmware-network-chaos/network-packet-loss-percentage.yaml yaml) +[embedmd]:# (./static/manifests/vmware-network-loss/network-packet-loss-percentage.yaml yaml) ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine @@ -169,7 +169,6 @@ metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-loss @@ -179,16 +178,10 @@ spec: # network packet loss percentage - name: NETWORK_PACKET_LOSS_PERCENTAGE value: '100' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' ``` @@ -202,16 +195,15 @@ The network experiments interrupt traffic for all the IPs/hosts by default. The Use the following example to tune this: -[embedmd]:# (./static/manifests/vmware-network-chaos/destination-host-and-ip.yaml yaml) +[embedmd]:# (./static/manifests/vmware-network-loss/destination-host-and-ip.yaml yaml) ```yaml -## it inject the chaos for the ingrees and egress traffic for specific ips/hosts +## it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-loss @@ -224,16 +216,10 @@ spec: # supports comma separated destination hosts - name: DESTINATION_HOSTS value: 'google.com' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' ``` @@ -244,35 +230,28 @@ The defined name of the ethernet interface, which is considered for shaping traf Use the following example to tune this: -[embedmd]:# (./static/manifests/vmware-network-chaos/network-interface.yaml yaml) +[embedmd]:# (./static/manifests/vmware-network-loss/network-interface.yaml yaml) ```yaml -## it inject the chaos for the ingrees and egress traffic for specific ips/hosts +## it injects the chaos for the egress traffic for specific ips/hosts apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: vmware-engine spec: engineState: "active" - annotationCheck: "false" chaosServiceAccount: litmus-admin experiments: - name: vmware-network-loss spec: components: env: - # name of the network interface + # name of the network interface - name: NETWORK_INTERFACE value: 'eth0' - - - name: TOTAL_CHAOS_DURATION - VALUE: '60' - - name: VM_NAME value: 'vm-1,vm-2' - - name: VM_USER_NAME value: 'ubuntu,debian' - - name: VM_PASSWORD value: '123,123' ``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-process-kill.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-process-kill.md new file mode 100644 index 00000000000..e114604da8a --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-process-kill.md @@ -0,0 +1,128 @@ +--- +id: vmware-process-kill +title: VMware Process kill +--- + +## Introduction +- VMware Process Kill experiment kills the target processes running as part of a Linux OS based VMware VM to determine the application/process resilience. +- It helps to check the performance of the application/process running on the VMWare VMs. + +:::tip Fault execution flow chart +![VMware Process kill](./static/images/vmware-process-kill.png) +::: + +## Uses +
+View the uses of the experiment +
+Disrupt the application critical processes such as databases or message queues running in the VMware VM by killing their underlying processes or threads. +
+
+ +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +** vCenter Requirements ** +- Ensure the connectivity of execution plane with vCenter and the hosts over 443 port. +- Ensure that Vmware tool is installed on the target VM with remote execution enabled. +- Ensure that you have sufficient vCenter permission to access hosts and VMs. +- Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: vcenter-secret + namespace: litmus +type: Opaque +stringData: + VCENTERSERVER: XXXXXXXXXXX + VCENTERUSER: XXXXXXXXXXXXX + VCENTERPASS: XXXXXXXXXXXXX +``` + +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- VM should be in healthy state. +- The target processes should exist in the VM. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
VM_NAME Name of the VM in which the target processes reside ubuntu-vm-1
PROCESS_IDS Process IDs of the target processes provided as comma separated values 183,253,857
+

Optional Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### PROCESS_IDS +It contains the target process Ids running on a particular VM + + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-process-kill/vmware-process-kill.yaml yaml) +```yaml +# Process kill in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-process-kill + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # List of Process IDs + - name: PROCESS_IDS + value: '8688,4678' +``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-service-stop.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-service-stop.md new file mode 100644 index 00000000000..a5b435118a7 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-service-stop.md @@ -0,0 +1,134 @@ +--- +id: vmware-service-stop +title: VMware Service Stop +--- + +## Introduction +- VMware Service Stop experiment stops the target systemd services running on Linux OS based VMware VM to determine the application/service resilience. +- It helps to check the performance of the application/service running on the VMWare VMs. + +:::tip Fault execution flow chart +![VMware ServiceStop](./static/images/vmware-service-stop.png) +::: + +## Prerequisites +:::info +- Ensure that Kubernetes Version > 1.16 + +** vCenter Requirements ** +- Ensure the connectivity of execution plane with vCenter and the hosts over 443 port. +- Ensure that Vmware tool is installed on the target VM with remote execution enabled. +- Ensure that you have sufficient vCenter permission to access hosts and VMs. +- Ensure to create a Kubernetes secret having the Vcenter credentials in the `CHAOS_NAMESPACE`. A sample secret file looks like: +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: vcenter-secret + namespace: litmus +type: Opaque +stringData: + VCENTERSERVER: XXXXXXXXXXX + VCENTERUSER: XXXXXXXXXXXXX + VCENTERPASS: XXXXXXXXXXXXX +``` +### NOTE +You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. +::: + + +## Default Validations +:::info +- VM should be in healthy state. +- The target services should exist in the VM. +::: + +## Experiment tunables +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + +
Variables Description Notes
VM_NAME Name of the VM in which the target service reside ubuntu-vm-1
SERVICE_NAME Name of the target service nginx
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
SELF_HEALING_SERVICES Set to enable if the target service is self healing Defaults to disable
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
CHAOS_INTERVAL The interval (in sec) between successive instance termination Defaults to 30s
SEQUENCE It defines sequence of chaos execution for multiple instance Default value: parallel. Supported: serial, parallel
RAMP_TIME Period to wait before and after injection of chaos in sec Eg. 30
+
+ +## Experiment Examples + +### Common Experiment Tunables +Refer the [common attributes](../common-tunables-for-all-experiments) to tune the common tunables for all the experiments. + +### SERVICE_NAME +It contains the target service running on a particular VM + + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/vmware-service-stop/vmware-service-stop.yaml yaml) +```yaml +# Service Stop in the VMWare VM +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + chaosServiceAccount: litmus-admin + experiments: + - name: vmware-service-stop + spec: + components: + env: + # Name of the VM + - name: VM_NAME + value: 'test-vm-01' + # Name of service + - name: SERVICE_NAME + value: 'nginx' +``` diff --git a/docs/chaos-engineering/chaos-faults/vmware/vmware-vm-poweroff.md b/docs/chaos-engineering/chaos-faults/vmware/vmware-vm-poweroff.md index 24a927493fb..ce385198647 100644 --- a/docs/chaos-engineering/chaos-faults/vmware/vmware-vm-poweroff.md +++ b/docs/chaos-engineering/chaos-faults/vmware/vmware-vm-poweroff.md @@ -95,7 +95,7 @@ You can pass the VM credentials as secrets or as an ChaosEngine ENV variable. RAMP_TIME Period to wait before and after injection of chaos in sec - + Eg. 30 @@ -120,8 +120,7 @@ metadata: name: engine-nginx spec: engineState: "active" - annotationCheck: "false" - chaosServiceAccount: vm-poweroff-sa + chaosServiceAccount: litmus-admin experiments: - name: vm-poweroff spec: @@ -130,7 +129,6 @@ spec: # MOID of the VM - name: APP_VM_MOIDS value: 'vm-53,vm-65' - - name: TOTAL_CHAOS_DURATION VALUE: '60' ``` diff --git a/tutorials/run-chaos-experiments/integration-with-harness-cd.md b/tutorials/run-chaos-experiments/integration-with-harness-cd.md new file mode 100644 index 00000000000..3bec8236d2a --- /dev/null +++ b/tutorials/run-chaos-experiments/integration-with-harness-cd.md @@ -0,0 +1,72 @@ +--- +sidebar_position: 3 +title: Integration with Harness CD +description: HCE integration for continuous chaos validation within CD pipelines. +--- + +Welcome to this tutorial on HCE integration for Harness CD which allows chaos experiments to be executed as part of a Harness CD pipeline. Before we start, please make sure you have completed the previous tutorials. + +## What is Harness CD? +[Harness CD](https://harness.io/products/continuous-delivery) is a continuous delivery platform for cloud and on-premise projects. It enables DevOps engineers to automate code testing, deployment, and rollbacks. + +The CD pipelines created as part of Harness CD can natively integrate HCE experiments for continuous resiliency validation as well as automated failure mitigation, which we will learn about here. + +As part of the tutorial we have a pre-curated CD pipeline for deploying our demo application, Online Boutique Shop, to a Kubernetes cluster from [this](https://github.com/neelanjan00/boutique-app-monitoring) repository. Also, we have defined a pipeline webhook trigger for the repository such that any code change in the `main` branch triggers the CD pipeline to create a new deployment. + +![Deployment Pipeline](./static/integration-with-harness-cd/deployment-pipeline.png) + +It can be observed that currently the pipeline is able to deploy the application and we have exactly one replica of each microservice, including the **cart** deployment which we are going to target. + +![Online Boutique App Cart](./static/integration-with-harness-cd/online-boutique-app-cart.png) + +## Adding a Chaos Step + +Now let us add a chaos step to this pipeline so that the chaos experiment we had created in the previous tutorial, `cart-pod-delete`, will run whenever a new pipeline deployment is triggered. This will allow us to validate the deployment against the chaos hypothesis. + +To add the chaos step, select the **Add Step** icon next to the **Rollout Deployment** icon for the CD deployment stage. + +![Add Chaos Step](./static/integration-with-harness-cd/add-chaos-step.png) + +Next, select **Chaos Step** to add it. Now we can configure this step. Name the step as **Boutique Cart Delete**. You can also provide a description, optionally. Next, under **Select Chaos Experiment** dropdown, search and select the **cart-pod-delete** experiment. + +![Select Experiment](./static/integration-with-harness-cd/select-experiment.png) + +Select **Add to Pipeline**. For expected resiliency score, provide **100**, which means that only mark the step as passed if the resiliency score obtained upon the experiment execution is 100%. + +![Chaos Step Config](./static/integration-with-harness-cd/chaos-step-config.png) + +Next, go to the **Advanced** tab. Under **Failure Strategy** select **Add**. For **On failure of type** select **All Errors** and for **Perform Action** select **Rollback Stage**. + +This will ensure that if the chaos experiment's resiliency score is less than 100%, the deployment will be rolled back to the previous version. Hence, the application deployment is continuously validated to be resilient before it gets deployed, otherwise the deployment is safely rolled back to the previous version until the weakness in the application can be mitigated. + +![Advanced Chaos Step Config](./static/integration-with-harness-cd/advanced-chaos-step-config.png) + +Now, select **Apply Changes**. That's all it takes to add a chaos step to your deployment pipeline. Select **Save** to save the changes to the pipeline. + +![Pipeline Updated](./static/integration-with-harness-cd/pipeline-updated.png) + +## Executing the CD Pipeline + +Now if we manually **Run** this pipeline, we will observe that the pipeline will attempt to deploy the application as part of the CD deployment stage. However, the stage will fail with an error due to the failure of the **Boutique Cart Delete** chaos step, causing the CD to initiate a rollback and revert to the previous healthy deployment. + +![CD Pipeline Failed](./static/integration-with-harness-cd/cd-pipeline-failed.png) + +At this point we can validate that the application is still accessible, which indicates that the rollback was indeed successful. + +A closer inspection indicates that the failure of the chaos step is caused by a resiliency score of only 50%, which is less than the passing criteria of 100%. This can be validated by checking the **cart-pod-delete** experiment under the **Chaos Experiments** page, where the last experiment run has yielded a resiliency score of 50% only. + +![Chaos Experiment Failed](./static/integration-with-harness-cd/chaos-experiment-failed.png) + +Hence, we were able to verify a potential weakness in our application using the HCE experiment and observed how the Harness CD pipeline integration can benefit from the continuous chaos validation. + +Now, let us see how you can resolve this weakness in your application so that it can be successfully deployed. If we update the manifest from which we are deploying the application in the repo (`manifest/app.yaml`) so that the number of pods for the cart deployment is bumped to **2**, we should be able to successfully deploy the application. + +As soon as the changes are pushed to the `main` branch of the repo, we can observe that a new pipeline has been triggered, due to the repository webhook that we have defined. + +![New Pipeline Triggered](./static/integration-with-harness-cd/new-pipeline-triggered.png) + +Upon the completion of the pipeline, we can observe that the deployment is successful with the chaos step obtaining 100% resiliency score. Hence, the experiment has passed and our resilient application is now deployed. We can also validate that the corresponding chaos experiment run has been successful with a 100% resiliency score. + +![CD Pipeline Passed](./static/integration-with-harness-cd/cd-pipeline-passed.png) + +Congratulations! You have now executed a chaos experiment as part of a Harness CD pipeline where you validated the resiliency of the application in a continuous manner. diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/add-chaos-step.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/add-chaos-step.png new file mode 100644 index 00000000000..f1d4cde0b34 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/add-chaos-step.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/advanced-chaos-step-config.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/advanced-chaos-step-config.png new file mode 100644 index 00000000000..26c314816f6 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/advanced-chaos-step-config.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/cd-pipeline-failed.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/cd-pipeline-failed.png new file mode 100644 index 00000000000..c89bbe58b10 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/cd-pipeline-failed.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/cd-pipeline-passed.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/cd-pipeline-passed.png new file mode 100644 index 00000000000..b79c47ef1a2 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/cd-pipeline-passed.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/chaos-experiment-failed.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/chaos-experiment-failed.png new file mode 100644 index 00000000000..cc250573846 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/chaos-experiment-failed.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/chaos-step-config.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/chaos-step-config.png new file mode 100644 index 00000000000..83108615401 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/chaos-step-config.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/deployment-pipeline.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/deployment-pipeline.png new file mode 100644 index 00000000000..f964b5be308 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/deployment-pipeline.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/new-pipeline-triggered.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/new-pipeline-triggered.png new file mode 100644 index 00000000000..9e80b3f676e Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/new-pipeline-triggered.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/online-boutique-app-cart.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/online-boutique-app-cart.png new file mode 100644 index 00000000000..c9cfffddfc4 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/online-boutique-app-cart.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/pipeline-updated.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/pipeline-updated.png new file mode 100644 index 00000000000..a7f474a273e Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/pipeline-updated.png differ diff --git a/tutorials/run-chaos-experiments/static/integration-with-harness-cd/select-experiment.png b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/select-experiment.png new file mode 100644 index 00000000000..1911358ce32 Binary files /dev/null and b/tutorials/run-chaos-experiments/static/integration-with-harness-cd/select-experiment.png differ