nyc continuous delivery meetup - introducing delta
TRANSCRIPT
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
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
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
as of tonight, delta is open source
and still early enough to contribute
github.com/flowcommerce/delta
Key Insight
CD systems should focus on audit and transparency
Not an opinionated way to do things
Deploys at Flow are triggered automatically by new tags
New tags are created automatically By Merging Pull Requests
Live demo
Delta Architecture
UI: playframework/scala webapp that speaks
only to API
REST API in playframework/scala + akka -
http://apidoc.me/flow/delta
Postgresql
Key stages of Continuous Delivery
Stage 1: Sync Shas
For each repository, keep a list of all of the
unique shas
Stage 2: Sync tags
For each repository, keep a list of all of the
unique tags
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
Stage 4: Set Desired State
Declare which tag should be in production
Stage 5: Build docker image
Automatically build docker images for every tag
in desired state
Stage 6: scale
Once docker image is ready:
Create new cluster running new version
Once healthy, move traffic
Scale down old version
Stage 6: scale & Diffs
Delta Event Log
Continuous delivery
Delta configuration
github.com/flowcommerce/delta/blob/master/DotDelta.md
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
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!
What about Continuous Integration?
We use travis-ci, and merge pull requests when
all automated tests pass
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
“Delta deploys itself while deploying
almost all of our applications on OCD
Update Days at Flow”
Continuous Delivery
Has Become a
Basic Need
Thank You
Michael [email protected] / @mbryzek
Cofounder / CTO
Cofounder / ex-CTO Gilt Groupe
Flow is Hiring – email [email protected]
github.com/flowcommerce/delta
APPENDIX
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