CICD Flashcards

1
Q

What is the basic flow of CI?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the basic flow of CD?

A
  • Devs push code and CI flow takes place
  • Deployment server deploys every passed build
    Automated deployment (e.g., CodeDeploy, Jenkins CD…)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the benefits of using CodeCommit?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What security does CodeCommit wrt. Authentication?

A
  • Configure SSH keys in IAM Console
  • HTTPS with AWS CLI Credential helper or Git Credentials for IAM user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What security does CodeCommit wrt. Authorization?

A

IAM policies manage users/roles permissions to repos

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What security does CodeCommit wrt. Encryption?

A

Repos are automatically encrypted at rest using AWS KMS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How would you provide cross-account access to a CodeCommit repo?

A

Use an IAM Role in your AWS account and use AWS STS (AssumeRole API)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are CodePipeline Artifacts?

A

Each stage of the pipeline can create artifacts
- These artifacts are stored in an S3 bucket and passed on to the next stage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How would you configure a pipeline to require a manual check and then deploy to production after the dev. deployment has succeeded?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the name of the file that contains the build instructions for CodeBuild?

A

buildspec.yml - should be at root of code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where is CodeBuild normally launched in relation to your VPC, and what a the result of this?

A

Outside the VPC - CodeBuild cannot access resources in the VPC (AWS resources)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How can you allow CodeBuild to access AWS resources? What is a use case of this?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you enable CodeDeploy on your EC2 instance/on-premises server?

A

Any server that wants to run CodeDeploy must be running the CodeDeploy Agent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What file do you use to instruct CodeDeploy?

A

appspec.yml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Where should the source code and appspec.yml file be stored?

A

S3 or GitHub

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the Application Revision?

A

The combination of the application code and the appspec.yml file.

17
Q

What is CodeArtifact, and why would you use it?

A

Cloud based dependency management system - allows you to store your dependencies (artifacts) within your VPC (to be accessed later)
- Can store public and private artifacts in the VPC, preventing them from being lost.
- Allows CodeBuild to access artifacts from the VPC.

18
Q

What are the two functionalities of CodeGuru?

A

Reviewer - automated code reviews for static code analysis
Profiler - visibility/recommendations about application performance during runtime

19
Q

You’re using CodeBuild to build your application as part of the CICD process. The build process takes a long time, so you investigated this and found that 15 minutes at each build is spent on pulling dependencies from remote repositories. What should you do to drastically speed up the build process?

A

Modify the buildspec.yml to enable Dependencies Caching in S3

20
Q

Which Lifecycle Event hook should be used in the appspec.yml file to ensure the application is properly running after being deployed?

A

ValidateService