continuous deployment at kitchensurfing

33
CONTINUOUS DEPLOYMENT Lars Kluge, CTO and Co-founder of Kitchensurfing

Upload: lars-kluge

Post on 15-Jan-2015

2.953 views

Category:

Technology


2 download

DESCRIPTION

Continuous Deployment is gaining popularity with companies like Facebook and Etsy, but its successful implementation creates technical challenges and will require any team to make workflow changes. Learn how Kitchensurfing switched to continuous deployments and how they’ve grown from one deploy a week to 10+ deploys a day with zero downtime and zero worries, thanks to MongoDB. Hear about our workflow, the tools we use, and how we manage communication with product owners to make sure everyone is always in the loop.

TRANSCRIPT

Page 1: Continuous Deployment at Kitchensurfing

CONTINUOUSDEPLOYMENT

Lars Kluge, CTO and Co-founder of Kitchensurfing

Page 2: Continuous Deployment at Kitchensurfing

KITCHENSURFING

Page 3: Continuous Deployment at Kitchensurfing
Page 4: Continuous Deployment at Kitchensurfing
Page 5: Continuous Deployment at Kitchensurfing
Page 6: Continuous Deployment at Kitchensurfing

WHO IS FAMILIAR WITH …?

Page 7: Continuous Deployment at Kitchensurfing

DEFINITION

Page 8: Continuous Deployment at Kitchensurfing

Continuous Deployment is the automatedprocess of shipping your product to

production, with every push to master.

Page 9: Continuous Deployment at Kitchensurfing
Page 10: Continuous Deployment at Kitchensurfing

MOTIVATION?Earlier feedback for your business: get features in front ofusers as early as possibleFaster development: develop, push, next featureLower the risk of deploymentsMotivation for everyone involved: changes can be doneimmediately--no wait for the next scheduled release

Page 11: Continuous Deployment at Kitchensurfing

WHO IS USING IT?Facebook, Etsy, Quora, Linkedin, …

Page 12: Continuous Deployment at Kitchensurfing

IS IT PRACTICAL FOR SMALLER STARTUPS?

Page 13: Continuous Deployment at Kitchensurfing

YES.We use it and love it at Kitchensurfing.

Page 14: Continuous Deployment at Kitchensurfing

OUR STACKRuby on Rails, MongoDB, Heroku, …

Page 15: Continuous Deployment at Kitchensurfing

OUR WORKFLOW

Page 16: Continuous Deployment at Kitchensurfing

1. Pick up a ticket in Pivotal Tracker2. Code3. Commit with reference to ticket id4. Pull Request on Github5. Code Review6. Multiple Staging Environments if manual check necessary7. CI: Codeship runs test suite for pull request8. Merge into master9. Github notifies Pivotal Tracker that ticket is merged

10. CI runs again11. On successful build, Codeship deploys to Heroku12. Release Notes Email sent by Heroku

Page 17: Continuous Deployment at Kitchensurfing

OUR LEARNINGS

Page 18: Continuous Deployment at Kitchensurfing

MONGODB HELPS.

Page 19: Continuous Deployment at Kitchensurfing

NO SCHEMA.

Page 20: Continuous Deployment at Kitchensurfing

ETSY

source

Page 21: Continuous Deployment at Kitchensurfing

WITH MONGODB:While (re)inventing your product,

no* schema migration necessary.

Page 22: Continuous Deployment at Kitchensurfing

YOUNG PRODUCT = A LOT SCHEMA CHANGES

Page 23: Continuous Deployment at Kitchensurfing

TRUST YOUR TEST SUITE

Page 24: Continuous Deployment at Kitchensurfing

RELEASE BIG PRODUCTS IN SMALL PIECES

Page 25: Continuous Deployment at Kitchensurfing

USE FEATURE FLAGSShow new features only to your beta user group

Avoid the 'big bang' release

Page 26: Continuous Deployment at Kitchensurfing

OBSERVE PRODUCTION AFTER DEPLOYNot only exception tracking

How are business #s changing?

Cloud behavior

MMS (MongoDB Monitoring Service)

New Relic

Page 27: Continuous Deployment at Kitchensurfing

BEHAVIOR CHANGEIs your team ready to make the behavior change?The whole team needs to support it.Introduce Continuous Deployment as early as possible; it'sgetting harder down the road.

Page 28: Continuous Deployment at Kitchensurfing

PRODUCT TEAMHow to break down features into small, easy to release pieces?

What is the order of operation?

Page 29: Continuous Deployment at Kitchensurfing

COMMUNICATIONKeep your team in the loopRelease Notes EmailWhat is online, what's not?Ticket finished, does it mean it's online?

Page 30: Continuous Deployment at Kitchensurfing

RUNTIME OF TEST SUITE> 15 Min. trickyContext Switch is expensive for Engineers

Page 31: Continuous Deployment at Kitchensurfing

HEROKU PREBOOT$ heroku labs:enable -a myapp preboot

Page 32: Continuous Deployment at Kitchensurfing

OUR FUTURE PLANSBetter Release Notes Email based on finished stories inTrackerStatistics in Pull Request to understand the change basedon compiled JS, CSS size, test suite build time, # of databasequeries, etc.Engineering Dashboard: See how a deploy changes business#s

Page 33: Continuous Deployment at Kitchensurfing

THANK YOU.larskluge.com

@aekym