Open changtimwu opened 6 years ago
https://aws.amazon.com/datapipeline/
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.rolling-version-deploy.html https://www.quora.com/Whats-the-difference-between-immutable-and-blue-green-deployments-on-AWS-Elastic-Beanstalk https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecs.html https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.CNAMESwap.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-validate-template.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/updating.stacks.walkthrough.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html
https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-cloudwatch-metrics.html https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html https://medium.com/qbits/autoscaling-using-custom-metrics-5f977903bc45 https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html http://docs.aws.amazon.com/autoscaling/latest/userguide/as-enter-exit-standby.html https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html#as-suspend-resume https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-log-file-validation-intro.html https://aws.amazon.com/about-aws/whats-new/2016/03/cloudwatch-events-now-supports-amazon-sqs-queue-targets/ https://docs.aws.amazon.com/appsync/latest/devguide/monitoring.html
https://aws.amazon.com/opsworks/stacks/ https://aws.amazon.com/blogs/aws/using-aws-elasticache-for-redis-with-aws-opsworks/
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-steps.html https://aws.amazon.com/premiumsupport/knowledge-center/auto-scaling-group-rolling-updates/
https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html
https://docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_ad_connector.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html
* always create new instances
一個 eb application 可以有多個 env, 想像就是用同一份 application source, 建立出每不同的 deploy 參數,
instance & URL 都會不一樣.
所以 blue-green deploy, 就是用上面這招, 現有在跑的是 blue env, 把新版用green env deploy 出去, 然後進行互換
basic form of a CF entry
NameOfStuff:
Type: AWS::tellFormatOfStuff
Properties:
stuffContent1:
stuffContent2:
....
It's obvious that a CF parser basically a program travels a tree and process keys named Type. reference
to include a CF clip in S3
Transform:
Name: 'AWS::Include'
Parameters:
Location: 's3://MyAmazonS3BucketName/MyFileName.yaml'
the AWS::Serverless Transform extends resource types
MyServerlessFunctionLogicalID:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs4.3
CodeUri: 's3://testBucket/mySourceCode.zi
https://docs.aws.amazon.com/codestar/latest/userguide/how-to-modify-serverless-project.html something like rolling deployment for lambda
簡單的說 lambda function 更新了以後, traffic 仍然只導到舊的 lambda function, 慢慢根據底下策略的不同, 把 traffic 移到慢慢移到新的新的 lambda function codedeploy 上面有選項
用 codestar gen 出來的 lambda project, template.yml 會有下列, 想要 blue-green deploy, 就把 comment 拿掉, 讓它生效
Globals:
Function:
AutoPublishAlias: live
DeploymentPreference:
Enabled: true
Type: Canary10Percent5Minutes
其實 codestar 就是大 setup wizard + dashboard, 包含 codepipeline 的 wizard.
CodeDeploy
CloudFormation
, CodeBuild
, CodeDeploy
, CodePipeline
, IAM
, EC2
, S3
Source
->Build
-> Application
ElasticBeanstalk
, CloudFormation
, CodeBuild
, CodePipeline
, IAM
, S3
,EC2
Source
->Build
-> Application
APIGateway
, CloudFormation
, CodeBuild
, CodePipeline
, IAM
, S3
Source
->Build
-> Deploy
codestar 很方便, 但要搞清楚 local git push 後發生哪些事
source
-> build
-> deploy
source
-> build
-> integration
(deploy to test) -> production
Initiator
會 reference codepipline 裡的 pipeline id以 lambda app 來說, deploy stage 會有兩個 deploy action, provider 都是 CF
codepipeline get-pipeline --name nodeci-Pipeline | json2yaml
cloudformation describe-stacks --query 'Stacks[*].StackId'
summarized in https://aws.amazon.com/tw/machine-learning/
devops professional certification
https://aws.amazon.com/certification/certified-devops-engineer-professional/
white papers
advices