CI/CD Flashcards
What is the GitHub but in AWS?
CodeCommit
What is the WebHook that tells CircleCi Changes in AWS?
Lambda
What es the CircleCi in AWS?
CodeBuild
The development practice of automating the preparation of code to be released into production or staging branches is referred to as what?
Continuous Delivery (CD)
The development practice of automatically integrating changes from multiple contributors into a single software project is called what?
Continuous Integration (CI)
The development practice of automatically pushing code changes into production after all tests have passed is referred to as this
Continuous Deployment (CD)
Which AWS service would you use to control user access to CodeCommit?
IAM
What is produced at the end of the CodeBuild build process?
An Artifact
Two Things about CodeBuild
Scales automatically to meet peek build requests
It builds code, runs unit tests, and produces artifacts
This AWS service is a fully managed continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy.
AWS Codebuild
What are the 2 options for providing the build specifications?
Inserting build commands
A buildspec file
In CodeBuild,
How can you override the values provided in the buildspec.yml file?
Using the CLI
This file is used to provide the build specifications to Codebuild and is stored in the root of your project folder
buildspec.yml
What are the 3 OS options for Codebuild Managed images?
Ubuntu
Amazon Linux
Windows
What is the recommended version to use in your buildspec.yml file?
.2
Which buildspec version runs each command in a separate instance?
.1
What are 4 phases in a buildspec.yml file?
install
pre_build
build
post_build
What 4 indexes can you find in a buildspec.yml file?
version
env
phases
- install (npm install)
- pre_build (npm run test)
- build (npm run build)
artifacts
- files
This buildspec version runs all of your build commands in the same instance and is the recommended version to use.
.2
Use case in CodeBuild with a static site?
CodeCommit (Gatsby)
CodeBuild
Render StaticFiles
S3
What does each service?
CodePipeline
CodeCommit
CodeBuild
CodeDeploy
CodePipeline: Continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates
CodeCommit: Source control service that hosts secure Git-based repositories
CodeBuild: continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy, on a dynamically created build server
CodeDeploy: Deployment service that automates software deployments to a variety of compute services such as Amazon EC2, AWS Fargate, AWS Lambda, and your on-premises servers.
This software platform allows you to build, test, and deploy applications quickly by packaging software into standardized units called containers.
Docker
Which Dockerfile command lets you specify another docker image as the basis for your Dockerfile?
FROM
What are the 7 indexes you can find in a Dockerfile?
FROM (uses another docker image)
RUN (executes commands)
WORKDIR (It’s like a cd)
COPY (Copies images from local to the image)
ENTRYPOINT (Command executed when the container is started)
EXPOSE (Listens on the specific network ports at runtime)
CMD (default arguments for entrypoint)
Which Dockerfile command specifies the network ports to listen on at runtime?
EXPOSE
Docker can build images automatically by reading the instructions from this file.
Docker File
What is the Docker command to download an image from a repository?
docker pull
What is the Docker command to build an image out of a Dockerfile?
docker build
Where can you deploy with CodeDeploy?
4 elements
- EC2
- On Premise
- Lambda
- ECS
This AWS service is a fully managed deployment service that automates software deployments to a variety of compute services such as Amazon EC2, AWS Fargate, AWS Lambda, and your on-premises servers.
AWS CodeDeploy
6 CodeDeploy Components
Application: Identifier…
Deployment groups: A set of Ec2 Instances or Lambda…
Deployment:
Deployment Configuration: Rules during deployment
AppSpec File: Actions that codeDeploy should execute during deployment
Revision: Everything required to deploy a new version
Two options when you’re configuring your deploy in CodeDeploy
In-Place: EC2, ASG, On Premises
Blue/Green
Which of the following are valid targets for in-place deployment?
EC2
On Premise
This configuration file specifies the files to be copied and scripts to be executed during a CodeDeploy deployment
appspec.yml
The application specification file (AppSpec file) is a YAML-formatted or JSON-formatted file used by CodeDeploy to manage a deployment.
Describe the file structure
version: 0.0
os:
files
hooks
- AfterInstall
- BeforeInstall
- Install
- BlockTraffic
- AllowTraffic
- ApplicationStart
The 2 steps required to setup the CodeDeploy agent for an EC2 instance
- Install the agent software (Service, a binary, It will have CodeDeploy Continuously running)
- Create IAM service role for CodeDeploy
What are the 2 repository options for a new CodeStar project?
AWS CodeCommit
Github
What are the 3 components of Codestar?
Deployment Pipeline
Project Dashboard
Access Management
This AWS service lets you to set up your entire development and continuous delivery toolchain for coding, building, testing, and deploying your application code.
It uses codepipeline
AWS Codestar
What are the 4 elements of CodeDeploy’s anatomy?
Pipeline
Stage, Stage transition
Action Group, Actions
Artifact
For a deployment using AWS CodeDeploy, what is the run order of the hooks for in-place deployments?
There are 7 steps
Start - ApplicationStop - DownloadBundle - BeforeInstall - Install - AfterInstall - ApplicationStart - ValidateService End