DevOps and Continuous Delivery
• Automated deployments
• Repeatable and safer
• Smaller change sizes
• Deploy morefrequently
• Faster feedback loops
• Learn and reactquicker
• Deliver more value
Slide 6
Slide 6 text
CodeDeploy
DEPLOYING APPS W I T H
Slide 7
Slide 7 text
Benefits of CodeDeploy
• Automate yourdeployments
• Fully managed serverlessservice
• Free withinAWS
• $0.02 per on-premises instanceupdate
• Centralize control
• Versatile
Slide 8
Slide 8 text
Application
The core component
CodeDeploy Components
Deployment Group
A target for your
deployment
Deployment
Roll out anapp
revision
Slide 9
Slide 9 text
Compute platform
EC2/On-premises, AWS
Lambda, Amazon ECS
A uniquename
An identifier that isunique
inside its AWS account
A CodeDeploy Application
Slide 10
Slide 10 text
ECS
An ECS cluster +
An ECS service +
A load balancer +
Target Group 1 +
Target Group 2
Lambda
Lambda function name
EC2/On-premises
Autoscaling groups
EC2 instance tags
On-premises hosts
Deployment Groups
Slide 11
Slide 11 text
Deployment
group
Targets for the
deployment
A CodeDeploy Deployment
Deployment
configuration
Such as
“One At A Time”
Revision
An application
version
Deployment
type
“In Place” or
“Blue-Green”
Slide 12
Slide 12 text
ECS
AppSpec file
Task Definition version
Container name
Container port
Lambda
AppSpec file
Function name
Function alias
Version info
EC2/On-premises
GitHub commit ID
or
Zip file in S3
Revisions
EC2 or on-premisesinstance
Installing the CodeDeploy Agent
codedeploy-agent EC2 User Data
Slide 15
Slide 15 text
#!/bin/bash -xe
yum install -y ruby
cd /opt
curl -O https://aws-codedeploy-us-east-
1.s3.amazonaws.com/latest/install
chmod +x ./install
./install auto
Install CodeDeploy - Red Hat
Slide 16
Slide 16 text
CodeDeploy
ELB
EC2
Connecting All CodeDeploy Pieces
IAM
GitHub or S3
Revisions
agent IAM
Slide 17
Slide 17 text
CodeBuild
CONTINUOUS INTEGRATION W I T H
Slide 18
Slide 18 text
• Software licensing
• CI software upgrades
• Underlying host management
• Agent configurations
• Hand crafted build projects
• Queued builds
Traditional CI
Slide 19
Slide 19 text
Continuous Integration
• DevOps and agile processes
• Helps prevent merge conflicts
• Triggers off code commits
• Static code analysis
• Compiles code
• Runs tests
• Packages and publishes artifacts
• Catch and fix problems quicker
Slide 20
Slide 20 text
Continuous Integration Systems
Managed services
Master/agent Open Source andfree
Slide 21
Slide 21 text
Teamcity
Bamboo
Jenkins GitLab
Travis CircleCI
Alternatives to CodeBuild
Slide 22
Slide 22 text
Benefits of CodeBuild
• Fully managed build service
• Elastic scaling
• Pay only for build time used
• CLI and API driven
• Define builds as code
• Tightly knit AWS integrations
• Extensible
Slide 23
Slide 23 text
Sends
notifications
Runs tests
Static code
analysis
Compiles code
Runs builds
How Is CodeBuild Used
in a CI/CD pipeline?
1
2
3
4
6
Publishes
Artifacts
5
Slide 24
Slide 24 text
Build project
The definition ofyour project
Build or Build run
An execution of your Build
project
CodeBuild Components
Slide 25
Slide 25 text
Metrics
Build triggers
Build details
Build history
Build Project
Continuous Delivery Pipelines
• A Continuous Delivery tool
• Define your entire release process
• Ties together disparate systems
• Flows Code out to production
Slide 33
Slide 33 text
Prerequisites for CodePipeline
AW S account IAM credentials
Slide 34
Slide 34 text
Prerequisites for CodePipeline
Source code Build process D eployment
or
Slide 35
Slide 35 text
Benefits of CodePipeline
• Fully managed pipeline service
• Pay only for active pipelines
• Tightly tightly AWS integrations
• Third party developer tool actions
• Extensible via Lambda and custom actions
Slide 36
Slide 36 text
Artifacts
Bundles of code
produced by astage
and ingested by
another stage
Transitions
The connections
between stages
Stages
A collection of action
groups that contain
actions
Pipeline Components
Slide 37
Slide 37 text
A CodePipeline Stage
Action Group
Actions
Pipeline Stage
Action Group
Actions
runOrder: 1
runOrder: 1
runOrder: 2
runOrder: 2
Slide 38
Slide 38 text
Visualizing CodePipeline
Transition
Source Stage
Action Group
G itHub
action
Build Stage
Action Group
C o deB uild
action
Deploy Stage
Action Group
C o deD eploy
action
Transition
Pipeline
CloudWatch Events
A configured rule can route
CodePipeline event info to
one or more targets
CodeDeploy Triggers
Publish to an S N S topic when
deployment events occur for a
deployment group
Pipeline Execution Monitoring