Skip to content

Commit

Permalink
feat(aws-fis): Refactoring experiments
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed Jan 11, 2024
1 parent 078fbb6 commit 806dde0
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"tags": {
"Name": "fis-cpu-stress-test",
"Service": "ec2",
"Part-Of": "portefaix-aws-fis",
"Version": "0.1.0",
"Managed-By": "AWS"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"tags": {
"Name": "fis-internal-error",
"Service": "ec2",
"Part-Of": "portefaix-aws-fis",
"Version": "0.1.0",
"Managed-By": "AWS"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"tags": {
"Name": "fis-latency-injection",
"Service": "ec2",
"Part-Of": "portefaix-aws-fis",
"Version": "0.1.0",
"Managed-By": "AWS"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"tags": {
"Name": "fis-stop-instance-az",
"Service": "ec2",
"Part-Of": "portefaix-aws-fis",
"Version": "0.1.0",
"Managed-By": "AWS"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"tags": {
"Name": "fis-unavailable-error",
"Service": "ec2",
"Part-Of": "portefaix-aws-fis",
"Version": "0.1.0",
"Managed-By": "AWS"
Expand Down
33 changes: 33 additions & 0 deletions chaos/aws-fis/eks/eks-terminate-nodegroup-instances.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"tags": {
"Name": "fis-eks-terminate-nodegroup-instances",
"Service": "eks",
"Part-Of": "portefaix-aws-fis",
"Version": "0.1.0",
"Managed-By": "AWS"
},
"description": "Terminate EKS nodes",
"targets": {
"eks-nodes": {
"resourceType": "aws:eks:nodegroup",
"resourceArns": [
"<EKS_NODE_GROUP>"
],
"selectionMode": "ALL"
}
},
"actions": {
"TerminateInstances": {
"actionId": "aws:eks:terminate-nodegroup-instances",
"description": "terminate the node instances",
"parameters": {
"instanceTerminationPercentage": "40"
},
"targets": {
"Nodegroups": "eks-nodes"
}
}
},
"stopConditions": "<EKS_ALARM>",
"roleArn": "${role}"
}
60 changes: 60 additions & 0 deletions chaos/aws-fis/rds/rds-fault-injection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"tags": {
"Name": "fis-aurora-faultinjection",
"Service": "rds",
"Part-Of": "portefaix-aws-fis",
"Version": "0.1.0",
"Managed-By": "AWS"
},
"description": "fis-aurora-faultinjection",
"targets": {
"<INSTANCE_ID>": {
"resourceType": "aws:ec2:instance",
"resourceArns": [
"targetinstance"
],
"selectionMode": "ALL"
}
},
"actions": {
"fis-aurora-diskcongestion": {
"actionId": "aws:ssm:send-command",
"description": "fis-aurora-diskcongestion",
"parameters": {
"documentArn": "ssmdocument",
"documentParameters": "{\"ActionType\": \"diskcongestion\"}",
"duration": "PT1M"
},
"targets": {
"Instances": "<INSTANCE_ID>"
},
"startAfter": [
"fis-aurora-replicafailure"
]
},
"fis-aurora-replicafailure": {
"actionId": "aws:ssm:send-command",
"description": "fis-aurora-replicafailure",
"parameters": {
"documentArn": "ssmdocument",
"documentParameters": "{\"ActionType\": \"replicafailure\"}",
"duration": "PT1M"
},
"targets": {
"Instances": "<INSTANCE_ID>"
}
}
},
"stopConditions": [
{
"source": "none"
}
],
"roleArn": "rolearn",
"logConfiguration": {
"cloudWatchLogsConfiguration": {
"logGroupArn": "loggrouparn"
},
"logSchemaVersion": 2
}
}
41 changes: 41 additions & 0 deletions chaos/aws-fis/rds/rds-reboot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"tags": {
"Name": "fis-aurora-reboot",
"Service": "rds",
"Part-Of": "portefaix-aws-fis",
"Version": "0.1.0",
"Managed-By": "AWS"
},
"description": "fis-aurora-reboot",
"targets": {
"<INSTANCE_ID>": {
"resourceType": "aws:rds:db",
"resourceTags": {
"InstanceGroup": "auroralab-pg"
},
"selectionMode": "PERCENT(50)"
}
},
"actions": {
"fis-aurora-reboot-action": {
"actionId": "aws:rds:reboot-db-instances",
"description": "fis-aurora-reboot-action",
"parameters": {},
"targets": {
"DBInstances": "<INSTANCE_ID>"
}
}
},
"stopConditions": [
{
"source": "none"
}
],
"roleArn": "arn:aws:iam::<ACCOUNT_ID>:role/<IAM_ROLE>",
"logConfiguration": {
"cloudWatchLogsConfiguration": {
"logGroupArn": "loggrouparn"
},
"logSchemaVersion": 2
}
}

0 comments on commit 806dde0

Please sign in to comment.