-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from zebrunner/develop
2.9
- Loading branch information
Showing
28 changed files
with
630 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Cleanup | ||
|
||
> Replace {Env} var in the next paragraph. | ||
1. Autoscaling | ||
* aws autoscaling delete-auto-scaling-group --auto-scaling-group-name e3s-{Env}-asg | ||
* aws autoscaling delete-auto-scaling-group --auto-scaling-group-name e3s-{Env}-win-asg | ||
|
||
2. Launch templates | ||
* aws ec2 delete-launch-template --launch-template-name e3s-{Env}-launch-template | ||
* aws ec2 delete-launch-template --launch-template-name e3s-{Env}-win-launch-template | ||
|
||
3. Cluster | ||
* aws ecs delete-cluster --cluster e3s-{Env} | ||
|
||
4. Capacity provider | ||
* aws ecs delete-capacity-provider --capacity-provider e3s-{Env}-capacityprovider | ||
* aws ecs delete-capacity-provider --capacity-provider e3s-{Env}-win-capacityprovider | ||
|
||
4. Listener | ||
* aws elbv2 describe-load-balancers --names e3s-{Env}-alb | ||
* aws elbv2 describe-listeners --load-balancer-arn | ||
* aws elbv2 delete-listener --listener-arn | ||
|
||
5. Target group | ||
* aws elbv2 describe-target-groups --names e3s-{Env}-tg | ||
* aws elbv2 delete-target-group --target-group-arn | ||
|
||
5. Load balancer | ||
* aws elbv2 describe-load-balancers --names e3s-{Env}-alb | ||
* aws elbv2 delete-load-balancer --load-balancer-arn |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"LoadBalancerArn": "", | ||
"Protocol": "HTTPS", | ||
"Port": 443, | ||
"SslPolicy": "ELBSecurityPolicy-2016-08", | ||
"Certificates": [ | ||
{ | ||
"CertificateArn": "" | ||
} | ||
], | ||
"DefaultActions": [ | ||
{ | ||
"Type": "forward", | ||
"TargetGroupArn": "", | ||
"Order": 1, | ||
"ForwardConfig": { | ||
"TargetGroups": [ | ||
{ | ||
"TargetGroupArn": "", | ||
"Weight": 1 | ||
} | ||
], | ||
"TargetGroupStickinessConfig": { | ||
"Enabled": false, | ||
"DurationSeconds": 3600 | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Subnets": ["{Subnets}"], | ||
"SecurityGroups": [ | ||
"{e3s-sg-id}" | ||
], | ||
"Scheme": "internet-facing", | ||
"Type": "application", | ||
"IpAddressType": "ipv4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"Protocol": "HTTP", | ||
"ProtocolVersion": "HTTP1", | ||
"Port": 4444, | ||
"VpcId": "{VpcId}", | ||
"HealthCheckProtocol": "HTTP", | ||
"HealthCheckPort": "traffic-port", | ||
"HealthCheckEnabled": true, | ||
"HealthCheckPath": "/", | ||
"HealthCheckIntervalSeconds": 30, | ||
"HealthCheckTimeoutSeconds": 5, | ||
"HealthyThresholdCount": 5, | ||
"UnhealthyThresholdCount": 5, | ||
"Matcher": { | ||
"HttpCode": "200" | ||
}, | ||
"TargetType": "instance" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"MixedInstancesPolicy": { | ||
"LaunchTemplate": { | ||
"LaunchTemplateSpecification": { | ||
"LaunchTemplateName": "e3s-{Env}-win-launch-template", | ||
"Version": "$Latest" | ||
}, | ||
"Overrides": [ | ||
{ | ||
"InstanceType": "c5a.2xlarge", | ||
"WeightedCapacity": "1" | ||
}, | ||
{ | ||
"InstanceType": "c5a.4xlarge", | ||
"WeightedCapacity": "2" | ||
} | ||
] | ||
}, | ||
"InstancesDistribution": { | ||
"OnDemandAllocationStrategy": "prioritized", | ||
"OnDemandPercentageAboveBaseCapacity": 100 | ||
} | ||
}, | ||
"MinSize": 0, | ||
"MaxSize": 30, | ||
"DesiredCapacity": 0, | ||
"DefaultCooldown": 10, | ||
"AvailabilityZones": [ "{Zones}" ], | ||
"HealthCheckType": "EC2", | ||
"HealthCheckGracePeriod": 10, | ||
"VPCZoneIdentifier": "{Subnets}", | ||
"TerminationPolicies": [ | ||
"AllocationStrategy" | ||
], | ||
"NewInstancesProtectedFromScaleIn": true, | ||
"ServiceLinkedRoleARN": "arn:aws:iam::{Account}:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"autoScalingGroupProvider": { | ||
"autoScalingGroupArn": "arn:aws:autoscaling:{Region}:{Account}:autoScalingGroup:{Uuid}:autoScalingGroupName/e3s-{Env}-win-asg", | ||
"managedScaling": { | ||
"status": "ENABLED", | ||
"targetCapacity": 100, | ||
"minimumScalingStepSize": 1, | ||
"maximumScalingStepSize": 100, | ||
"instanceWarmupPeriod": 300 | ||
}, | ||
"managedTerminationProtection": "DISABLED" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"LaunchTemplateData": { | ||
"ImageId": "{zebrunner-agent-ami-windows}", | ||
"KeyName": "{key-name}", | ||
"EbsOptimized": true, | ||
"SecurityGroupIds": [ | ||
"{e3s-agent-sg-id}" | ||
], | ||
"BlockDeviceMappings": [ | ||
{ | ||
"DeviceName": "/dev/sda1", | ||
"Ebs": { | ||
"VolumeSize": 100, | ||
"VolumeType": "gp3", | ||
"DeleteOnTermination": true, | ||
"Encrypted": false | ||
} | ||
} | ||
], | ||
"Monitoring": { | ||
"Enabled": true | ||
}, | ||
"DisableApiTermination": false, | ||
"InstanceInitiatedShutdownBehavior": "terminate", | ||
"UserData": "{base64 encoded data for windows}", | ||
"IamInstanceProfile": { | ||
"Arn": "arn:aws:iam::{Account}:instance-profile/e3s-{Env}-agent-role" | ||
}, | ||
"HibernationOptions": { | ||
"Configured": false | ||
}, | ||
"MetadataOptions": { | ||
"HttpTokens": "required", | ||
"HttpPutResponseHopLimit": 1, | ||
"HttpEndpoint": "enabled" | ||
}, | ||
"EnclaveOptions": { | ||
"Enabled": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "withoutConstraints", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ecs:CreateCapacityProvider" | ||
], | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "ec2", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:CreateLaunchTemplate", | ||
"ec2:CreateLaunchTemplateVersion", | ||
"ec2:DeleteLaunchTemplate", | ||
"ec2:DeleteLaunchTemplateVersion", | ||
"ec2:RunInstances" | ||
], | ||
"Resource": [ | ||
"*" | ||
], | ||
"Condition": { | ||
"StringLike": { | ||
"ec2:Region": "us-east-?" | ||
} | ||
} | ||
}, | ||
{ | ||
"Sid": "iamForAutoscaling", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"iam:PassRole" | ||
], | ||
"Resource": [ | ||
"arn:aws:iam::{Account}:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling" | ||
] | ||
}, | ||
{ | ||
"Sid": "iamForLaunchTemplates", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"iam:PassRole" | ||
], | ||
"Condition": { | ||
"StringEquals": { | ||
"iam:PassedToService": "ec2.amazonaws.com" | ||
} | ||
}, | ||
"Resource": [ | ||
"arn:aws:iam::{Account}:role/e3s-{Env}-agent-role" | ||
] | ||
}, | ||
{ | ||
"Sid": "autoscaling", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"autoscaling:CreateAutoScalingGroup", | ||
"autoscaling:DeleteAutoScalingGroup", | ||
"autoscaling:PutScalingPolicy", | ||
"autoscaling:PutScheduledUpdateGroupAction", | ||
"autoscaling:CreateOrUpdateTags" | ||
], | ||
"Resource": "arn:aws:autoscaling:*:{Account}:autoScalingGroup:*:autoScalingGroupName/e3s-*" | ||
}, | ||
{ | ||
"Sid": "ecs", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ecs:CreateCluster", | ||
"ecs:DeleteCluster", | ||
"ecs:PutClusterCapacityProviders", | ||
"ecs:DeleteCapacityProvider" | ||
], | ||
"Resource": [ | ||
"arn:aws:ecs:*:{Account}:cluster/e3s-*", | ||
"arn:aws:ecs:*:{Account}:capacity-provider/e3s-*" | ||
] | ||
}, | ||
{ | ||
"Sid": "elbv2", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"elasticloadbalancing:CreateLoadBalancer", | ||
"elasticloadbalancing:DeleteLoadBalancer", | ||
"elasticloadbalancing:CreateListener", | ||
"elasticloadbalancing:DeleteListener", | ||
"elasticloadbalancing:CreateTargetGroup", | ||
"elasticloadbalancing:DeleteTargetGroup", | ||
"elasticloadbalancing:RegisterTargets", | ||
"elasticloadbalancing:DeregisterTargets", | ||
"elasticloadbalancing:ModifyTargetGroupAttributes", | ||
"elasticloadbalancing:ModifyListener" | ||
], | ||
"Resource": [ | ||
"arn:aws:elasticloadbalancing:*:{Account}:loadbalancer/app/e3s-*", | ||
"arn:aws:elasticloadbalancing:*:{Account}:targetgroup/e3s-*", | ||
"arn:aws:elasticloadbalancing:*:{Account}:listener/app/e3s-*" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "autoscaling", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"autoscaling:UpdateAutoScalingGroup", | ||
"autoscaling:SetInstanceProtection" | ||
], | ||
"Resource": "arn:aws:autoscaling:*:{Account}:autoScalingGroup:*:autoScalingGroupName/e3s-*" | ||
}, | ||
{ | ||
"Sid": "ec2", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:TerminateInstances" | ||
], | ||
"Resource": [ | ||
"*" | ||
], | ||
"Condition": { | ||
"StringLike": { | ||
"ec2:Region": "us-east-?" | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.