diff --git a/docs/chaos-engineering/chaos-faults/aws/rds-instance-delete.md b/docs/chaos-engineering/chaos-faults/aws/rds-instance-delete.md new file mode 100644 index 00000000000..83f8fe9df01 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/rds-instance-delete.md @@ -0,0 +1,181 @@ +--- +id: rds-instance-delete +title: RDS Instance Delete +--- + +## Introduction + +- RDS Instance delete can induce an rds instance delete chaos on AWS RDS cluster. It derives the instance under chaos from RDS cluster. + + +:::tip Fault execution flow chart +![RDS Instance Delete](./static/images/rds-instance-delete.png) +::: + + +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS RDS Access Requirement:** + +- Ensure that you have sufficient AWS access to delete RDS instances. + +- 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 + +- RDS instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target RDS cluster Eg. rds-cluster-1
RDS_INSTANCE_IDENTIFIER Name of the target RDS Instances Eg. rds-cluster-1-instance
REGION The region name of the target RDS cluster Eg. us-east-1
+

Optional Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
TOTAL_CHAOS_DURATION The total time duration for chaos insertion (sec) Defaults to 30s
INSTANCE_AFFECTED_PERC The Percentage of total rds instance that are part of rds cluster 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
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
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. + +### RDS_CLUSTER_NAME + +It defines the cluster name of the target RDS cluster. We can provide the RDS_CLUSTER_NAME using `CLUSTER_NAME` ENVs as well. If not provided experiment will select the Instance Idenfier provided. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/rds-instance-delete/instance-delete-cluster.yaml yaml) +```yaml +# delete the rds instance +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: rds-instance-delete + spec: + components: + env: + # provide the name of rds cluster + - name: CLUSTER_NAME + value: 'rds-demo-cluster' + - name: REGION + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` +### RDS_INSTANCE_IDENTIFIER + +It defines the RDS instnace name. We can provide the RDS_INSTANCE_IDENTIFIER using `RDS_INSTANCE_IDENTIFIER` ENVs. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/rds-instance-delete/instance-delete-instance.yaml yaml) +```yaml +# delete the rds instance +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: rds-instance-delete + spec: + components: + env: + # provide the rds instance identifier + - name: RDS_INSTANCE_IDENTIFIER + value: 'rds-demo-instance-1,rds-demo-instance-2' + - name: INSTANCE_AFFECTED_PERC + value: '100' + - name: REGION + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/rds-instance-reboot.md b/docs/chaos-engineering/chaos-faults/aws/rds-instance-reboot.md new file mode 100644 index 00000000000..8f429a5fd33 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/rds-instance-reboot.md @@ -0,0 +1,182 @@ +--- +id: rds-instance-reboot +title: RDS Instance Reboot +--- + +## Introduction + +- RDS Instance Reboot can induce an RDS Instance Reboot chaos on AWS RDS cluster. It derives the instance under chaos from RDS cluster. + + +:::tip Fault execution flow chart +![RDS Instance Reboot](./static/images/rds-instance-reboot.png) +::: + + +## Prerequisites + +:::info + +- Ensure that Kubernetes Version >= 1.17 + +**AWS RDS Access Requirement:** + +- Ensure that you have sufficient AWS access to reboot RDS instances. + +- 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 + +- RDS instance should be in healthy state. + +::: + +## Experiment tunables + +
+ Check the Experiment Tunables +

Mandatory Fields

+ + + + + + + + + + + + + + + + + + + + + +
Variables Description Notes
CLUSTER_NAME Name of the target RDS cluster Eg. rds-cluster-1
RDS_INSTANCE_IDENTIFIER Name of the target RDS Instances Eg. rds-cluster-1-instance
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
INSTANCE_AFFECTED_PERC The Percentage of total rds instance that are part of rds cluster 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
AWS_SHARED_CREDENTIALS_FILE Provide the path for aws secret credentials Defaults to /tmp/cloud_config.yml
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. + +### RDS_CLUSTER_NAME + +It defines the cluster name of the target RDS cluster. We can provide the RDS_CLUSTER_NAME using `CLUSTER_NAME` ENVs as well. If not provided experiment will select the Instance Idenfier provided. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/rds-instance-reboot/instance-reboot-cluster.yaml yaml) +```yaml +# reboot the rds instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: rds-instance-reboot + spec: + components: + env: + # provide the name of rds cluster + - name: CLUSTER_NAME + value: 'rds-demo-cluster' + - name: REGION + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` +### RDS_INSTANCE_IDENTIFIER + +It defines the RDS instnace name. We can provide the RDS_INSTANCE_IDENTIFIER using `RDS_INSTANCE_IDENTIFIER` ENVs. + +Use the following example to tune this: + +[embedmd]:# (./static/manifests/rds-instance-reboot/instance-reboot-instance.yaml yaml) +```yaml +# reboot the rds instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: rds-instance-reboot + spec: + components: + env: + # provide the rds instance identifier + - name: RDS_INSTANCE_IDENTIFIER + value: 'rds-demo-instance-1,rds-demo-instance-2' + - name: INSTANCE_AFFECTED_PERC + value: '100' + - name: REGION + value: 'us-east-2' + - name: TOTAL_CHAOS_DURATION + VALUE: '60' +``` diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/rds-instance-delete.png b/docs/chaos-engineering/chaos-faults/aws/static/images/rds-instance-delete.png new file mode 100644 index 00000000000..6142d599842 Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/rds-instance-delete.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/images/rds-instance-reboot.png b/docs/chaos-engineering/chaos-faults/aws/static/images/rds-instance-reboot.png new file mode 100644 index 00000000000..4c9aea566ee Binary files /dev/null and b/docs/chaos-engineering/chaos-faults/aws/static/images/rds-instance-reboot.png differ diff --git a/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-delete/instance-delete-cluster.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-delete/instance-delete-cluster.yaml new file mode 100644 index 00000000000..5afbacd0561 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-delete/instance-delete-cluster.yaml @@ -0,0 +1,21 @@ +# delete the rds instance +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: rds-instance-delete + spec: + components: + env: + # provide the name of rds cluster + - name: CLUSTER_NAME + value: 'rds-demo-cluster' + - 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/rds-instance-delete/instance-delete-instance.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-delete/instance-delete-instance.yaml new file mode 100644 index 00000000000..31f64707ae2 --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-delete/instance-delete-instance.yaml @@ -0,0 +1,23 @@ +# delete the rds instance +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: rds-instance-delete + spec: + components: + env: + # provide the rds instance identifier + - name: RDS_INSTANCE_IDENTIFIER + value: 'rds-demo-instance-1,rds-demo-instance-2' + - name: INSTANCE_AFFECTED_PERC + value: '100' + - 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/rds-instance-reboot/instance-reboot-cluster.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-reboot/instance-reboot-cluster.yaml new file mode 100644 index 00000000000..a72d418797e --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-reboot/instance-reboot-cluster.yaml @@ -0,0 +1,21 @@ +# reboot the rds instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: rds-instance-reboot + spec: + components: + env: + # provide the name of rds cluster + - name: CLUSTER_NAME + value: 'rds-demo-cluster' + - 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/rds-instance-reboot/instance-reboot-instance.yaml b/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-reboot/instance-reboot-instance.yaml new file mode 100644 index 00000000000..1605f56618e --- /dev/null +++ b/docs/chaos-engineering/chaos-faults/aws/static/manifests/rds-instance-reboot/instance-reboot-instance.yaml @@ -0,0 +1,23 @@ +# reboot the rds instances +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + chaosServiceAccount: litmus-admin + experiments: + - name: rds-instance-reboot + spec: + components: + env: + # provide the rds instance identifier + - name: RDS_INSTANCE_IDENTIFIER + value: 'rds-demo-instance-1,rds-demo-instance-2' + - name: INSTANCE_AFFECTED_PERC + value: '100' + - 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/chaos-faults.md b/docs/chaos-engineering/chaos-faults/chaos-faults.md index 80a03482300..432549a4a32 100644 --- a/docs/chaos-engineering/chaos-faults/chaos-faults.md +++ b/docs/chaos-engineering/chaos-faults/chaos-faults.md @@ -295,6 +295,16 @@ Following Platform Chaos faults are available: Injects ECS instance stop chaos on target ECS cluster ecs-instance-stop + + RDS Instance Delete + Injects RDS instance delete chaos on target RDS instance/cluster + rds-instance-delete + + + RDS Instance Reboot + Injects RDS instance reboot chaos on target RDS instance/cluster + rds-instance-reboot + ### GCP