Mais conteúdo relacionado
Semelhante a Continuously Deploy Your CDK Application by Petra novandi barus (20)
Mais de DevOps Indonesia (20)
Continuously Deploy Your CDK Application by Petra novandi barus
- 2. Petra Novandi Barus
Senior Developer Advocate
Amazon Web Services Indonesia
© 2021, Amazon Web Services, Inc. or its Affiliates.
CDK Pipelines: Continuously
Deploy Your CDK Application
- 5. Main Components
Core Framework AWS Construct Library AWS CDK CLI
App
Stacks
Resources
Serverless App Integration / Foundational Services
Containers CI/CD
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 6. AWS Cloud Development Kit
Your language
Just classes and methods
AutoComplete
Inline documentation
Sane defaults
Reusable classes
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 7. Development Workflow
CDK CLI AWS CloudFormation
Stacks & Constructs
Source Code
Templates + Assets
Cloud Assembly
Cloud Resources
execute synthesize deploy provision
cdk init
npm run build
// create new project
// build project
cdk synth
cdk diff
cdk deploy
© 2021, Amazon Web Services, Inc. or its Affiliates.
// create templates and assets
// check what will change
// push changes to the cloud
- 9. CDK Pipeline
Source
Build
UpdatePipeline
PublishAssets
Stage 1
Stage 2
Stage 3
Source – Fetch from your repo and trigger
the pipeline every time you push new
commits to it.
© 2021, Amazon Web Services, Inc. or its Affiliates.
Build – Compile, Synth, Output Cloud
Assembly
UpdatePipeline – Modify the pipeline with
new stages
PublishAssets – Publish files to S3 or docker
- 10. © 2021, Amazon Web Services, Inc. or its Affiliates.
Deploy To Multiple AWS Environments/Accounts
AWS Cloud AWS Cloud
test account
AWS Cloud
prod account
source
synth
pipeline
asset
deploy test
approval
deploy prod
- 11. Before CDK Pipelines (0)
AWS Cloud
cdk init
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 12. Before CDK Pipelines (1)
AWS Cloud
cdk init
//add resources
cdk deploy
git commit && git push
source
build
deploy
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 13. Before CDK Pipelines (2)
AWS Cloud
cdk init
//add resources
cdk deploy
git commit && git push
//add resources & pipeline stages
cdk deploy
git commit && git push
source
build
integration test
deploy
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 14. After CDK Pipelines (1)
AWS Cloud
cdk init
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 15. Before CDK Pipelines (1)
AWS Cloud
cdk init
//add resources
git commit && git push
cdk deploy
source
synth
pipeline
asset
deploy
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 16. After CDK Pipelines (2)
AWS Cloud
cdk init
//add resources
cdk deploy
git commit && git push
//add resources & & add new
account & add new pipeline stages
git commit && git push
source
synth
pipeline
asset
deploy test
approval
deploy prod
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 18. Deploy to different AWS region/account
© 2021, Amazon Web Services, Inc. or its Affiliates.
- 20. References
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS CDK on GitHub
https://github.com/aws/aws-cdk
Demo
https://github.com/aws-samples/cdk-pipelines-demo
Blog Post
https://aws.amazon.com/blogs/developer/cdk-pipelines-continuous-delivery-for-aws-cdk-
applications/
Documentation
https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html
- 23. Stay Connected With Us!
t.me/iddevops
DevOps Indonesia
DevOps Indonesia
DevOps Indonesia
@iddevops
@iddevops
DevOps Indonesia
Scan here