-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CreateServer and UpdateServer Canaries #23
Conversation
- arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore | ||
- arn:aws:iam::aws:policy/AWSOpsWorksCMInstanceProfileRole | ||
AssumeRolePolicyDocument: | ||
Statement: | ||
- Action: | ||
- "sts:AssumeRole" | ||
Effect: "Allow" | ||
Principal: | ||
Service: | ||
- "ec2.amazonaws.com" | ||
Version: "2012-10-17" | ||
Path: "/service-role/" | ||
CanaryInstanceProfile: | ||
Type: "AWS::IAM::InstanceProfile" | ||
Properties: | ||
Path: "/" | ||
Roles: | ||
- {Ref: CanaryInstanceRole} | ||
#Name needs "aws-opsworks-cm-" as prefix | ||
InstanceProfileName: "aws-opsworks-cm-CanaryInstanceProfile" | ||
CanaryServiceRole: | ||
Type: "AWS::IAM::Role" | ||
Properties: | ||
#Name needs "aws-opsworks-cm-" as prefix | ||
RoleName: "aws-opsworks-cm-CanaryServiceRole" | ||
ManagedPolicyArns: | ||
- arn:aws:iam::aws:policy/service-role/AWSOpsWorksCMServiceRole |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would un-hardcode the commercial AWS partition in these IAM ARNs in order to more easily support the other AWS partitions OpsWorks will hopefully support in the future:
https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax
https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/#pkg-constants
https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/
Adding the template used for the canary. We decided to have a single canary, since our code path does not depend on any of the API's parameters.
bootstrap.yaml
contains the prerequisite IAM roles (described in opsworks-cm docs).CanaryAutomate_001.yaml
contains what will be used for the "CanaryAutomate" canary Create callCanaryAutomate_002.yaml
contains what will be used for the "CanaryAutomate" canary Update callUsing the same
canary_settings
as we used to. A timeout of 28 minutes and 1 canary at a time means at least 2 runs per hour. 3 DPs to alarm would mean 1.5 h until we noice a failure.Testing Done
mvn package
pre-commit run --all-files