"workstation up" - docker development at flow by mike roth

19
“workstation up” - Docker Development at Flow Mike Roth Principal Engineer [email protected]

Upload: docker-inc

Post on 13-Feb-2017

170 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: "Workstation Up" - Docker Development at Flow by Mike Roth

“workstation up” - Docker Development at Flow

Mike RothPrincipal [email protected]

Page 2: "Workstation Up" - Docker Development at Flow by Mike Roth

Flow CommerceFlow 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: "Workstation Up" - Docker Development at Flow by Mike Roth

“Everything should be made as simple as

possible, but not simpler.”— Albert Einstein

Page 4: "Workstation Up" - Docker Development at Flow by Mike Roth

Flow uses Docker for…Local development environment (workstation)https://github.com/flowcommere/workstationBuilding custom base images (Play & PostgresQL)https://github.com/flowcommerce/dockerContinuous Integration (Travis CI)https://travis-ci.org/flowcommerce/deltaContinuous Delivery (Delta)https://github.com/flowcommerce/deltaExternal APIshttps://github.com/flowcommerce/goutilsProduction (AWS/ECS)

Page 5: "Workstation Up" - Docker Development at Flow by Mike Roth

Open Source!

github.com/flowcommerce

Page 6: "Workstation Up" - Docker Development at Flow by Mike Roth

Right now, let’s make a change…

in Production

Page 7: "Workstation Up" - Docker Development at Flow by Mike Roth

Key Stages in Delta• Syncs GitHub SHAs with master branch

• Syncs tags & applies new one

• Creates/Builds Docker Hub Automated Build

• Scale

**More on CD @ Flow** http://www.slideshare.net/mbryzek/nyc-continuous-delivery-meetup-introducing-delta

Page 8: "Workstation Up" - Docker Development at Flow by Mike Roth

Now, back to Development

Page 9: "Workstation Up" - Docker Development at Flow by Mike Roth

Docker for Mac• Simple

• Containers referenced via `localhost`

• Developers install less (e.g. No Virtual Box)

Page 10: "Workstation Up" - Docker Development at Flow by Mike Roth

CLIs at FlowRuby Go

• CLI essentially “baked in”

• Get stuff done - repetitive tasks (e.g. repo tagging, environment variable updates in S3, check kinesis, etc.)

• Binaries can be passed around, and they “just work”

• Super useful for non-tech

• Robust

Page 11: "Workstation Up" - Docker Development at Flow by Mike Roth

Application DependenciesFlow manages dependencies with Registryhttps://github.com/flowcommerce/registry

Page 12: "Workstation Up" - Docker Development at Flow by Mike Roth

Application Dependencies• Implement custom health checks (with substance)

• Loosely couple dependencies

• No extends or links needed

• No volumes

• Use S3 for environment variables (in Dev & Prod)

Page 13: "Workstation Up" - Docker Development at Flow by Mike Roth

External APIsDocker Hub API

https://github.com/flowcommerce/external-apis/blob/master/docker/hub.json

Docker Registry

https://github.com/flowcommerce/external-apis/tree/master/docker

Clients integrated with applications like Workstation and Delta

Page 14: "Workstation Up" - Docker Development at Flow by Mike Roth

Workstation

Page 15: "Workstation Up" - Docker Development at Flow by Mike Roth

Sample Process FlowFor example: workstation up —app www

Checks YAML configuration for app details

Recursively checks for upstream dependencies and maintains priority order (based on their upstream dependencies)

Page 16: "Workstation Up" - Docker Development at Flow by Mike Roth

Sample Process Flow (up)Container Running?

Get “latest” from

Docker Hub

docker run

NO

Healthy?

YES

YES

NO

Page 17: "Workstation Up" - Docker Development at Flow by Mike Roth

Live Demo

Page 18: "Workstation Up" - Docker Development at Flow by Mike Roth

Let’s Check Prod

and send some Docker love!

Page 19: "Workstation Up" - Docker Development at Flow by Mike Roth

Thank you!

[email protected]@DevsClimbRock