Code Pipeline Code Commit and Code Deploy - CI/CD Flashcards
What is a type of action supported by a code pipeline action (6)?
Source Build Test Compile Deploy Checkout Approval Invoke Update
Which if any of these steps is manual and are there restrictions on where this step can appear?
The six supported types are Source, Build, Test, Deploy, Approval, Invoke. Compile, Update, Checkout are NOT actions.
Approval is a manual step and cannot appear in a source action.
Your manager wants to receive emails when your CodePipeline fails in order to take action. How do you do it? Do you use SNS or a Cloudwatch Event
You use a CW event
What is the most likely root cause for when Code Pipeline cannot perform an action?
The most likely cause is the IAM SERVICE role for code pipeline does not have sufficient permission in its IAM policy
In chef, what is a layer and how does recipe code apply to a layer?
A layer is a group of instances or resources based on a common function. Your layer is where the configuration of nodes are stored. Chef recipe code applies to a layer and all instances in that layer.
What needs to be done to allow CodeBuild access to resources within a VPC’s private sub net?
You will need to specify a VPC configuration containing the VPC ID, Subnet ID’s and Security group ID’s when you are setting up your CodeBuild project
Code Deploy can take the outputs of which AWS CI/CD tool as its input (1)?
AWS Code Pipeline. Code Deploy is able to use output artefacts from Code Pipeline
is there a limit on the amount of code that you can store in code commit?
No. Code commit imposes no limits,
How can AWS API calls be audited in a Code Pipeline process?
CloudTrail can audit AWS API calls used during CP processes
Are code commit repos available outside of AWS
No. Code commit repos are private to AWS.
Does Code Deploy provision infrastructure?
No. Code deploy assumes that the EC2 instances it is deploying on already exist.
When specifying a VPC Configuration for CodeBuild, where will code build containers be launched? Why would you need to do this?
Within the specified VPC. Useful for integration testing, data query testing or if access is needed to internal load balancers.
CodeBuld logs can be output to two different AWS services. What are they?
S3 and Cloudwatch logs
Which order must the following hooks be executed in?
ApplicationStart BeforeInstall ApplicationStop AfterInstall ValidateService DownloadBundle
Does an appspec.yaml file need all of these?
- ApplicationStop
- DownloadBundle
- BeforeInstall
- AfterInstall
- ApplicationStart
- ValidateService
You appspec file does not require all of these steps, however the steps it does have MUST be in order.
Your CodePipeline hasn’t deployed code to Elastic Beanstalk even though you’ve pushed code to your CodeCommit repository. It used to work 10 minutes ago. What reason is the most likely to explain that situation and how do you roll back a CodeDeploy deployment (2 ways)?
Its likely that you code has failed tests within CodeBuild. You can Either re-deploy you old version or enable rollbacks when setting up CodeDeploy. This will deploy the last known good version as a new deployment.
What is the minimum number of stages in a CodePipeline pipeline. What restrictions are there around source actions? If you have a pipeline with multiple source actions, what happens if a change is detected in any one of the sources associated with an action?
A pipeline must have at least 2 stages. The first stage includes one or more source actions, and source actions can only occur in the first stage. If a change is detected in source for any of the source actions, then all actions will be invoked.
Can you perform a blue/green deployment on a mix of onpremise and EC2 instances in code deploy?
No, you can only do a blue/green deployment on EC2 instances with CodeDeploy
In Opsworks - when are instances associated with an ELB?
When the come on line within the layer
What is a Code Pipeline Artefact? Where would an artefact be stored?
An artefact is an output from a code pipeline process that is stored in S3 and used as an input for the next code pipeline process - I.e. the artefact of a commit is a bundle of code which can then be used as the input of the build.
Which AWS technologies are used in codebuild for:
- Encryption of Artefacts
- NETWORK Security
- Managing Build permissions
Encryption is handled by KMS
NETWORK security is done via VPC (not security groups)
Build Permissions are managed via IAM
When you perform a roll back in CodeDeploy to the last known good version - does this get a new version Id?
Yes.
What events in CodeCommit will trigger a notification to SNS or Lambda vs Cloudwatch Events?
When a change is made to the code base, we can trigger notifications to Lambda and SNS. When a pull (create, update, delete) request is made, we trigger a cloud watch event or when a comment is made on a commit.
What 2 deployment types are supported by codedeploy?
Blue/Green
All at Once
I am working with CodePipeline to manage the source build and deploy phases for my Elastic Beanstalk app. This was working previously, but significant code and resources have been added to my app meaning the application archive is now 527MB in size. My deployment is failing. Why?
The max archive size we can deploy to elastic beanstalk is 512MB
We are using code build for our project, and we have a large build cycle coming up. What do we need to do to minimize the build queue for our project?
Nothing - code build is scalable
What is a deployment group in code deploy? what does a deployment group contain?
A deployment group determines how EC2 instances are grouped in code deploy. For instance, Dev/Test/Prod groups.
Each application deployment uses one of its deployment groups. The deployment group contains settings and configurations used during the deployment.
Chef uses Berkshelf to manage dependencies of cookbooks throughout the dev and deployment cycle. From an AWS point of view is there a risk to this and what are the alternatives?
AWS recommends not to use berkshelf as this requires dependencies to be imported from the chef public supermarket. If this is not available the chef run may fail. AWS recommends packaging dependencies into a zip and store it on s3
In Opsworks are instances on-prem or in AWS?
They can be both
What are the three deployment targets that can be setup with respect to CodeDeploy ?
- EC2 instances with specified tags
- Autoscaling Groups
- Or a mix of ASGs and tagged EC2 instances