31
Learning the Alphabet – A/B, CD… Brett Timperman Developer Lead, Kroger @BrettTimperman

Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Embed Size (px)

Citation preview

Page 1: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Learning the Alphabet – A/B, CD…

BrettTimpermanDeveloper Lead, Kroger@BrettTimperman

Page 2: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman
Page 3: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

10 102013:

10 102016:

10 10

10 10

10 10

10 10

10 10

10

10

*This slide needs better graphics

Page 4: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Contentious DeliveryA Tale of Dev and Ops

Page 5: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Contentious Delivery

Deploy my code faster!

Your crap code crashes!

* Placeholder graphics

Page 6: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Contentious Delivery

Features in prod right

NOW!

99.99999%uptime!

* Placeholder graphics

_

Page 7: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Contentious Delivery

Prod broke, WHAT

CHANGED?!

* Placeholder graphics

_

Page 8: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Contentious Delivery

I haven’t committed in 6

months.

* Placeholder graphics

My code is flawless. 10 lines.2,000 unit tests.

Page 9: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Contentious Delivery* Placeholder graphics

Let’s write functional tests so this never

happens again.

What are all these red things?

42 TESTS FAILED *coding*

codecodecode

Page 10: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Collaborate!

Easier said than done, but also:

• Microservices• Docker!

• Monitoring• Docker!

• Communication• Not yet Dockerized

and…

Lessons learned

Page 11: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

How can we deployfaster and safer?

Page 12: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Faster and SaferA DevOps Compromise

Page 13: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Pull requests!

All commits subject to approval.

• Applications• Base Docker images• Deploy scripts• Reverse proxy configuration

Open source model

Faster

Safer

- +

+-

Page 14: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Regression’s a dirty job but someone’s got to do it

What test cases can’t be covered with a lower level unit or contract test?

Automation is required for true Continuous Delivery.

Reduce manual regression tests

Faster

Safer

- +

+-

Page 15: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

http://www,martinfowler.com/bliki/TestPyramid.html

Move functional to unit tests

Faster

Safer

Mike Cohn’s Test Pyramid

- +

+-

Page 16: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Echo – coming to open source soon!

Technical diagram of Echo system:

• Kafka• ElasticSearch• Kibana• Thrift• Custom apps

Custom Monitoring System

Faster

Safer

- +

+-

Page 17: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Echo demo

$ cat docker-compose.yml$ docker-compose up

Page 18: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Docker Trusted Registry and Universal Control Plane

Docker with additional manageability including:

• Trusted CI build and push to DTR• RBAC for running containers on UCP• Auditing

Docker Datacenter

Faster

Safer

Page 19: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Colorful Delivery

• Two versions of app deployed• Docker!

• Dark test non-prod color• If (failed):

• Remove non-prod color• Else:

• Swap non-prod color to prod• Profit

Blue/Green deploys

Faster

Safer

- +

+-

Page 20: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Blue/green demo

Deploy new version to UCP Run tests Switch color

Code walkthrough See new version in prod Rollback

Page 21: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

• Consul vs. Interlock• Registration by apps vs.

Registrator

• Docker open source vs. Datacenter• Admin UI vs. Authz plugins

Tech stack considerations

Page 22: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Continuous Delivery and Experimentation (CDE)A/B testing and Canary deploys

Faster

Safer

NGiNX

User1

User2

Echo

A B

- +

+-

Page 23: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

• Marriages and relationships?• Stock trades?• Startups?• Job candidates?• Conference presentations?• Anything and everything?

Real life A/BWhat if we could A/B test…

Page 24: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

A/B demo

Show button clicking site Monitor button click metrics

Page 25: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

What color do you think will generate the most

clicks?

Page 26: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

A/B demo

Configure and deploy app with new color as B route Code walkthrough Demonstrate UCP RBAC with routing and app stacks

Audience vote Monitor performance metrics in real time

Page 27: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Go to [demo URL] on your mobile device and

click away!

Page 28: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

A/B demo

Determine winner and scale down losing route

Page 29: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

• A/B, always better• CD, cautious distribution• CDE, carefully doing experiments• DTR, docked trusty register• UCP, ultimate container platform• RBAC, read books about cats

Your new alphabetThere will be a quiz

Page 30: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

• Open source all code• https://github.com/timperman

• Automated scaling• Automated rollback• Blog posts

Next steps

Page 31: Learning the Alphabet: A/B, CD and [E-Z] in the Docker Datacenter by Brett Timperman

Thank you!