nyc continuous delivery meetup - introducing delta

27
Continuous Delivery w/ Travis, Github, Docker, and AWS Michael Bryzek [email protected] / @mbryzek Cofounder / CTO Cofounder / ex-CTO Gilt Groupe NYC Continuous Delivery Meetup June 1 2016

Upload: michael-bryzek

Post on 15-Apr-2017

380 views

Category:

Software


7 download

TRANSCRIPT

Page 1: NYC Continuous Delivery Meetup - Introducing delta

Continuous Delivery w/ Travis, Github, Docker, and AWS

Michael [email protected] / @mbryzek

Cofounder / CTO

Cofounder / ex-CTO Gilt Groupe

NYC Continuous Delivery MeetupJune 1 2016

Page 2: NYC Continuous Delivery Meetup - Introducing delta

Flow Commerce

Flow is a next-generation solution for taking

merchants global - more at https://flow.io

We are about to launch and are hiring – email

[email protected] if interested

Page 3: NYC Continuous Delivery Meetup - Introducing delta

Why this Talk

Many of our friends in the community saw a glimpse

and asked if we could share more

Paolo presented this year at PG Conf NYC on psql

work – and lots of people expressed interest in CD

We are thrilled to introduce delta today

Page 4: NYC Continuous Delivery Meetup - Introducing delta

as of tonight, delta is open source

and still early enough to contribute

github.com/flowcommerce/delta

Page 5: NYC Continuous Delivery Meetup - Introducing delta

Key Insight

CD systems should focus on audit and transparency

Not an opinionated way to do things

Page 6: NYC Continuous Delivery Meetup - Introducing delta

Deploys at Flow are triggered automatically by new tags

New tags are created automatically By Merging Pull Requests

Page 7: NYC Continuous Delivery Meetup - Introducing delta

Live demo

Page 8: NYC Continuous Delivery Meetup - Introducing delta

Delta Architecture

UI: playframework/scala webapp that speaks

only to API

REST API in playframework/scala + akka -

http://apidoc.me/flow/delta

Postgresql

Page 9: NYC Continuous Delivery Meetup - Introducing delta

Key stages of Continuous Delivery

Page 10: NYC Continuous Delivery Meetup - Introducing delta

Stage 1: Sync Shas

For each repository, keep a list of all of the

unique shas

Page 11: NYC Continuous Delivery Meetup - Introducing delta

Stage 2: Sync tags

For each repository, keep a list of all of the

unique tags

Page 12: NYC Continuous Delivery Meetup - Introducing delta

Stage 3: tag

Automatically apply a new tag whenever the

latest tag does not point to HEAD

For delta, we assume semantic versioning (x.y.z),

and each auto applied tag increments the micro

version

Page 13: NYC Continuous Delivery Meetup - Introducing delta

Stage 4: Set Desired State

Declare which tag should be in production

Page 14: NYC Continuous Delivery Meetup - Introducing delta

Stage 5: Build docker image

Automatically build docker images for every tag

in desired state

Page 15: NYC Continuous Delivery Meetup - Introducing delta

Stage 6: scale

Once docker image is ready:

Create new cluster running new version

Once healthy, move traffic

Scale down old version

Page 16: NYC Continuous Delivery Meetup - Introducing delta

Stage 6: scale & Diffs

Page 17: NYC Continuous Delivery Meetup - Introducing delta

Delta Event Log

Continuous delivery

Page 18: NYC Continuous Delivery Meetup - Introducing delta

Delta configuration

github.com/flowcommerce/delta/blob/master/DotDelta.md

Page 19: NYC Continuous Delivery Meetup - Introducing delta

Usage at Flow

select avg(count), stddev(count)

from (select date_trunc('week', journal_timestamp),

count(*)

from journal.build_desired_states

group by 1) m;

Releases:>1500Weekly:>100Teamsize:5

Thankyouto:github.com/gilt/db-journaling

Page 20: NYC Continuous Delivery Meetup - Introducing delta

Delta Roadmap

Deploy branches other than master

Dependency support within a repo

Smarter traffic management

Better healthchecks

More settings (enable/disable build in UI)

UI / UX Improvements

Contributors welcome and encouraged!

Page 21: NYC Continuous Delivery Meetup - Introducing delta

What about Continuous Integration?

We use travis-ci, and merge pull requests when

all automated tests pass

Page 22: NYC Continuous Delivery Meetup - Introducing delta

OCD Update Fridays

Micro service architectures need to be constantly

maintained

Every Friday, we update all projects to latest versions of every library

Enabled by another Flow open source project:

github.com/flowcommerce/dependency

Page 23: NYC Continuous Delivery Meetup - Introducing delta

“Delta deploys itself while deploying

almost all of our applications on OCD

Update Days at Flow”

Page 24: NYC Continuous Delivery Meetup - Introducing delta

Continuous Delivery

Has Become a

Basic Need

Page 25: NYC Continuous Delivery Meetup - Introducing delta

Thank You

Michael [email protected] / @mbryzek

Cofounder / CTO

Cofounder / ex-CTO Gilt Groupe

Flow is Hiring – email [email protected]

github.com/flowcommerce/delta

Page 26: NYC Continuous Delivery Meetup - Introducing delta

APPENDIX

Page 27: NYC Continuous Delivery Meetup - Introducing delta

Decoupling Deployment from Release

“We recommend strictly using the

term Deployment when referring to the act of

deploying a change to application components

or infrastructure. The term Release should be

used when a feature change is released to end

users, with a business impact.”

https://www.thoughtworks.com/radar/techniques