CICD Flashcards
What is the basic flow of CI?
- Devs push code to repo often
- A testing / build server checks the code as soon as it’s pushed (CodeBuild, Jenkins CI …)
- Dev gets feedback about the tests and checks that have passed / failed
What is the basic flow of CD?
- Devs push code and CI flow takes place
- Deployment server deploys every passed build
Automated deployment (e.g., CodeDeploy, Jenkins CD…)
What are the benefits of using CodeCommit?
Git repositories can be expensive - with CodeCommit:
- Private Git repos within your VPC
- No size limit on repos
- Fully managed, highly available
- Code is only in the AWS Cloud (increased security and compliance)
- Integrated with CI tools such as Jenkins, CodeBuild
What security does CodeCommit wrt. Authentication?
- Configure SSH keys in IAM Console
- HTTPS with AWS CLI Credential helper or Git Credentials for IAM user
What security does CodeCommit wrt. Authorization?
IAM policies manage users/roles permissions to repos
What security does CodeCommit wrt. Encryption?
Repos are automatically encrypted at rest using AWS KMS
How would you provide cross-account access to a CodeCommit repo?
Use an IAM Role in your AWS account and use AWS STS (AssumeRole API)
What are CodePipeline Artifacts?
Each stage of the pipeline can create artifacts
- These artifacts are stored in an S3 bucket and passed on to the next stage
How would you configure a pipeline to require a manual check and then deploy to production after the dev. deployment has succeeded?
Add a stage to the Pipeline, and within that stage and an Action Group for Manual Approval, followed by an Action Group for deploying to production env.
What is the name of the file that contains the build instructions for CodeBuild?
buildspec.yml - should be at root of code
Where is CodeBuild normally launched in relation to your VPC, and what a the result of this?
Outside the VPC - CodeBuild cannot access resources in the VPC (AWS resources)
How can you allow CodeBuild to access AWS resources? What is a use case of this?
Launch CodeBuild within the VPC by specifying the configuration (VPC ID, Subnet IDs, Security Group IDs)
- Used for integration tests, data querying, access internal load balancers etc.
How do you enable CodeDeploy on your EC2 instance/on-premises server?
Any server that wants to run CodeDeploy must be running the CodeDeploy Agent
What file do you use to instruct CodeDeploy?
appspec.yml
Where should the source code and appspec.yml file be stored?
S3 or GitHub