2. What we’ll cover
The value of Automation
GitHub line of products
AWS CodeDeploy
GitHub integration
3. The value of Automation(It’s not just about laziness)
4. We’ve already defined DevOps …
developers customers
releasetestbuild
plan monitor
delivery pipeline
feedback loop
Software development lifecycle
5. The problem, and its solution
The problem: Humans make mistakes!
• Releasing Code and/or Infrastructure
manually is wrought with human error – That
brings inconsistency
The solution: Automation!
• It bring consistency of outcome (sometimes
it even saves us time)
6. Setting up a delivery pipeline
Testing Staging Production
deploy
deploy
deploy
Source Build
release
8. AWS CodeDeploy – What is it?
Managed Service to deploy code to a fleet of
machines
• Efficient
• Highly Scalable
• Reliable
Agent-based: Can deploy to EC2 instances as
well as on-premises instances
Flexible:
• Deploy any type of application
• Re-use existing scripts & tools
Integration with other parts of the developer
toolchain
10. AWS Code Deploy – Components
Application: What you are
deploying – A container for
revisions
Revision:
A given
version of
your
application
Instance:
Target instance
for deployment
Deployment Groups: Group of
instances – A construct for
environment segregation
(Dev/QA/Prod, Blue/Green, A/B, etc.)
AppSpec File: Describes
actions that needs to be taken
pre- or post-deployment
Deployment: The
action of deploying a
new revision onto
instances
11. AWS Code Deploy – Application
• The Application is
the highest level
container
• Revisions will be
attached to the
Application
12. AWS Code Deploy – Revisions
Revisions are versions of your application
They can be uploaded to:
• Amazon S3
• GitHub
Revisions are deployed onto Deployment Groups, which are
groups of instance
13. • Verify your instance has an IAM instance profile and verify
the permissions allows it to participate in AWS CodeDeploy
deployments
• Tag the instance - or make sure it’s in an Auto Scaling Group
• Install the agent (can be automated)
• Verify the agent is running
AWS Code Deploy – Instance setup
14. AWS Code Deploy – Set up Deployment Groups
Group instances by:
• Auto Scaling Groups
• EC2 Tags
• On-Premise tags
Deploy to Deployment Groups
independently from each other
Could be used for “DevOps” constructs:
• Dev/QA/Prod/etc.
• Blue/Green
• A/B Testing
• Etc.
15. AWS Code Deploy – Lifecycle Events
AfterInstall
ApplicationStart
ValidateService
ApplicationStop
BeforeInstall
Agent
The agent goes through a
series of steps before and
after deployment
These steps allow you to
tightly control how your
application is deployed
For example, you may want
to stop your application
cleanly
16. AWS Code Deploy – AppSpec File
version: 0.0
os: linux
files:
- source: /
destination: /var/www/html/WordPress
hooks:
ApplicationStop:
- location: helper_scripts/stop_server.sh
BeforeInstall:
- location: deploy_hooks/install-apache.sh
- location: deploy_hooks/install-mysql.sh
AfterInstall:
- location: deploy_hooks /configure_app.sh
timeout: 30
runas: root
• AppSpec.yml sits in
your application’s
source directory
structure
• Allows you to defines
the hooks you want to
use.
18. AWS Code Deploy – Service Integrations – Now and
Future
Auto Scaling – Deploy revisions to an ASG
Elastic Load Balancing (ELB) – Coordinate a Deployment to
Instances behind an ELB.
Amazon S3 – Pull any package for deployment from S3
AWS CodeCommit – Deploy Revisions from AWS
CodeCommit repositories
AWS CodePipeline – Fully automate your deployment with
integration of AWS CodeDeploy and AWS CodePipeline
AWS Lambda – Trigger CodeDeploy to release from AWS
Lambda
welcome everyone
I’m Nico, SA Manager
- today, we're going to talk about DevOps at Amazon, and give you an inside peak at how Amazon develops our web applications and services
2 SECTION:
1. Amazon own DevOps transformation – Changes to product delivery
2. Introduce 3 AWS services that are used internally
You should walk away with a high level understanding of the different parts involved with a DevOps transformation, and an idea of how you could use our AWS Code services in your own DevOps processes
Let’s look at amazon.
We did not start that way that I just described
SPEEED AND CONSISTENCY
It’s not just about speed or not having to do things manually
It’s about consistency. Consistency of processes bring consistency of outcomes
WE SAW THIS DIAGRAM BEFORE
Let’s look at amazon.
We did not start that way that I just described
Using AWS CodeDeploy you can perform a true rolling deployment.
Each node will be updated sequentially by CodeDeploy. The next slide shows how this could be done using Deployment Configurations.
We’ll see in the next presentation how AWS CodeDeploy allows us to implement and automate the “If things don’t look right, STOP” which we discussed earlier.
Let’s look at amazon.
We did not start that way that I just described