(dev308) automating your software delivery pipeline | aws re:invent 2014

108
© 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

Upload: amazon-web-services

Post on 29-Jun-2015

388 views

Category:

Technology


0 download

DESCRIPTION

The challenge facing developers today is to reduce the time between writing code and getting it into production, all while maintaining quality. What's needed is a workflow built upon highly integrated and automated tools so that developers can focus on building new features. This session demonstrates plugging together an end-to-end release workflow, including code review, acceptance testing, branch deployments, and chat ops, all using GitHub and Travis CI.

TRANSCRIPT

Page 1: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

© 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

Page 2: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Introduction

Page 3: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

I’m @atmos

Page 4: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014
Page 5: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Release Process

Page 6: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Change Control

Board

Page 7: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Ops and Devs

Page 8: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deploy on Sunday

Page 9: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Find a better way

Page 10: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Automation

Page 11: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Org wasn’t ready

Page 12: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Fast forward to 2014

Page 13: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Different Methods

Page 14: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Not All In

Page 15: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Experiences to Products

• Scripts

• Testing

• Branch Deployments

• Chat Deployments

• AutoDeployment

Page 16: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Buzz Words

Page 17: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Delivering Code

Page 18: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

App Repository

Page 19: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

A Revision

Page 20: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

An Environment

Page 21: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Continuous

Integration

Page 22: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Lots of Options

Page 23: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Great First Step

Page 24: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Continuous Delivery

Page 25: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Has Gatekeepers

Page 26: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Less Risky

Page 27: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Continuous

Deployment

Page 28: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

More Risky

Page 29: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

GitHub’s Approach

Page 30: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

What’s the difference again?

Page 31: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deployment Basics

Page 32: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deploy Anytime

Page 33: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Reliable Deployment

Page 34: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Less Ops Reliance

Page 35: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Understanding

Page 36: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Consistent Process

Page 37: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Empowering Devs

Page 38: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Faster to Market

Page 39: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Automating

Page 40: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Scripting Deploys

Page 41: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deployment Service

Page 42: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

hubot

Page 43: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Chat Deployments

Page 44: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deploying from Chat

Page 45: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deployments API

Page 46: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deployments API State Diagram

Page 47: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

hubot-deploy

Page 48: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deploying from Chat

Page 49: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Links right your deployment dashboard

Page 50: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

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"

}

}

}

}

Page 51: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Code Review

Page 52: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

GitHub Flow

Page 53: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Push to a Branch

Page 54: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Open Pull Request

Page 55: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Opening a Pull Request

Page 56: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Coworker Signs Off

Page 57: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deploying from Chat

Page 58: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Pull Request Merged

Page 59: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deploying from Chat

Page 60: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

‘master’ goes out

Page 61: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Continuous

Integration

Page 62: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Settles these kinds of arguments

Page 63: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Piece of mind

Page 64: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

GitHub Status API

Page 65: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

How the status API works

Page 66: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Multiple Services

Page 67: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Status Contexts

Page 68: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

GH Flow Enhanced

Page 69: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Pull Request with CI Output

Page 70: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Easily bounce to the right build in Travis

Page 71: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Iterating on Change

Page 72: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Branch Deploys

Page 73: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Deploying a branch to verify it

Page 74: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Reflected in the pull request

Page 75: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Rollback Strategy?

Page 76: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Performance

Problems?

Page 77: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Elevated

Error Rates

Page 78: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Revert a

Pull Request?

Page 79: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Enable Experiments

Page 80: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Removing complex caching

Page 81: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Branch Deploy Flow

Page 82: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Experiment in environments, document in pull requests

Page 83: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Merge and Deploy

Page 84: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

GitHub Auto-Deploy

Page 85: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

It’s a service inside of github

Page 86: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Uses the Status API

Page 87: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Create Deployments

Page 88: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Specify Environment

Page 89: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Provides

Continuous Delivery

Page 90: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Provides

Continuous

Deployment

Page 91: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

auto-deploy in action

Page 92: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

auto-deploy in action

Page 93: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Other Approaches

Page 94: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Environment Locks

Page 95: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Service Validation

Page 96: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Service Validation Example

hooks:

ApplicationStart:

- location: scripts/verify_functional_tests.sh

timeout: 600

ValidateService:

- location: scripts/verify_new_user_signups.sh

timeout: 600

Page 97: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Does new code work

Page 98: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Elevated Error Rates

Page 99: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Exciting Stuff

Page 100: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Continuous Branch

Deployments

Page 101: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Discussing

Performance

Page 102: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Schema Changes

Page 103: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Lots of Possibilities

Page 104: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

This model has worked well for me

Page 105: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Helping Deliver

Page 106: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Thank You 👍

Page 107: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

Please give us your feedback on this session.

Complete session evaluations and earn re:Invent swag.

http://bit.ly/awsevals

Page 108: (DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014

That’s all folks.