© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
November 13, 2014 | Las Vegas
Automating Your Software Delivery Pipeline
Corey Donohoe, GitHub
DEV308
Introduction
I’m @atmos
Release Process
Change Control
Board
Ops and Devs
Deploy on Sunday
Find a better way
Automation
Org wasn’t ready
Fast forward to 2014
Different Methods
Not All In
Experiences to Products
• Scripts
• Testing
• Branch Deployments
• Chat Deployments
• AutoDeployment
Buzz Words
Delivering Code
App Repository
A Revision
An Environment
Continuous
Integration
Lots of Options
Great First Step
Continuous Delivery
Has Gatekeepers
Less Risky
Continuous
Deployment
More Risky
GitHub’s Approach
What’s the difference again?
Deployment Basics
Deploy Anytime
Reliable Deployment
Less Ops Reliance
Understanding
Consistent Process
Empowering Devs
Faster to Market
Automating
Scripting Deploys
Deployment Service
hubot
Chat Deployments
Deploying from Chat
Deployments API
Deployments API State Diagram
hubot-deploy
Deploying from Chat
Links right your deployment dashboard
Example hubot-deploy config file
{
"camo": {
"provider": "aws_opsworks",
"repository": "legions/camo",
"environments": ["production", "staging"],
"github_api": "https://enterprise.me.org/api/v3",
"github_token": "<redacted>",
"opsworks": {
"production": {
"app_id": "f59a45e4-59b0-11e4-aa15-123b93f75cba",
"stack_id": "f59a4832-59b0-11e4-aa15-123b93f75cba"
},
"staging": {
"app_id": "f59a4832-59b0-11e4-aa15-123b93f75cba",
"stack_id": "f59a4be8-59b0-11e4-aa15-123b93f75cba"
}
}
}
}
Code Review
GitHub Flow
Push to a Branch
Open Pull Request
Opening a Pull Request
Coworker Signs Off
Deploying from Chat
Pull Request Merged
Deploying from Chat
‘master’ goes out
Continuous
Integration
Settles these kinds of arguments
Piece of mind
GitHub Status API
How the status API works
Multiple Services
Status Contexts
GH Flow Enhanced
Pull Request with CI Output
Easily bounce to the right build in Travis
Iterating on Change
Branch Deploys
Deploying a branch to verify it
Reflected in the pull request
Rollback Strategy?
Performance
Problems?
Elevated
Error Rates
Revert a
Pull Request?
Enable Experiments
Removing complex caching
Branch Deploy Flow
Experiment in environments, document in pull requests
Merge and Deploy
GitHub Auto-Deploy
It’s a service inside of github
Uses the Status API
Create Deployments
Specify Environment
Provides
Continuous Delivery
Provides
Continuous
Deployment
auto-deploy in action
auto-deploy in action
Other Approaches
Environment Locks
Service Validation
Service Validation Example
hooks:
ApplicationStart:
- location: scripts/verify_functional_tests.sh
timeout: 600
ValidateService:
- location: scripts/verify_new_user_signups.sh
timeout: 600
Does new code work
Elevated Error Rates
Exciting Stuff
Continuous Branch
Deployments
Discussing
Performance
Schema Changes
Lots of Possibilities
This model has worked well for me
Helping Deliver
Thank You 👍
Please give us your feedback on this session.
Complete session evaluations and earn re:Invent swag.
http://bit.ly/awsevals
That’s all folks.