CI/CD Flashcards
What is continuous integration?
- Developer pushes code to an online repository
- A testing / build server checks the code as soon as its pushed
- The developer gets feedback about tests / build (pass/fail)
What are the benefits of continuous integration?
- Find and fix bugs early
- Deliver faster Deploy often
- Happier developers
What is continuous delivery?
- Ensures that the software can be released reliably whenever needed
- Ensures deployments happen often and are quick
- Usually means auto deployment (CodeDeploy / Jenkins)
At a high level, what are the 5 steps for CICD on AWS?
- Write and Push Code (CodeCommit)
- Build Code (AWS Code build)
- Test Code (AWS Code Build)
- Deploy Code (AWS CodeDeploy)
- Provision
What is AWS CodeCommit?
Version control system (think Git)
What are the benefits of a version control system (AWS CodeCommit, Github)?
- Easily collaborate with other developers
- Provides code backup
- code is viewable and auditable
What are the characteristics of AWS CodeCommit?
- private Git repos
- No size limits on repositories
- Fully managed
- Highly available
- Code only in AWS Cloud = increased security and compliance
- Secure
- Can be integrated in with other CI tools like CodeBuild or Jenkins
What are the 2 ways to authenticate using CodeCommit?
- SSH Keys
- HTTPS
- MFA (Multi Factor Authentication) can be enables for extra safety
How should authorization be handled with CodeCommit?
IAM Policies should be used to manage user / roles rights to repos
How is encryption implemented on AWS Code Commit?
- Repos are automatically encrypted at rest using KMS
- Encrypted in transit (can only use HTTPs or SSH - both secure)
How are CodeCommit and Github different?
- Security: CodeCommit uses AWS IAM users and roles
- Hosted: managed and hosted by AWS
- UI: CodeCommit UI is minimal copared to Github where UI is fully featured
What AWS services can be used to provide notifications for CodeCommit?
- Lambda functions
- AWS SNS
- AWS CloudWatch Event Rules
Describe use cases for using AWS SNS / AWS Lambda notifications for AWS CodeCommit.
- Deletion of branches
- Trigger for pushes that happens in the master branch
- Notify external build system
- Trigger AWS Lambda function to perform codebase analysis (i.e make sure creds did not get commited to code).
Descibe use case(s) to use CloudWatch Event Rules for CodeCommit notifications.
- Trigger for pull request updates
- Commit COMMENT events
- CloudWatch Event Rules goes into a SNS topic
What is AWS CodePipeline?
- AWS CodePipeline is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates.
- Automates the build, test, and deploy phases of your release process every time there is a code change, based on the release model you define.
What are AWS CodePipeline Artifacts?
Each stage in the pipeline can create “artifacts” that are stored into and retieved from an S3 bucket