Top Banner
How to deploy to production 10 times a day Andrii Shumada Sr. Software Developer at eagleeye eagleeye_s [email protected]
24

How to deploy to production 10 times per day v2 for Levi9

Aug 13, 2015

Download

Software

Andrii Shumada
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: How to deploy to production 10 times per day v2 for Levi9

How to deploy to production 10 times a day

Andrii Shumada

Sr. Software Developer at

[email protected]

Page 2: How to deploy to production 10 times per day v2 for Levi9

What is contious deployment?

A software engineering approach in which teams keep producing valuable software in short cycles and ensure that the software can be reliably released at any time

Page 3: How to deploy to production 10 times per day v2 for Levi9

Why to do Continuos deployment?

Page 4: How to deploy to production 10 times per day v2 for Levi9

less queues

no waiting till next scheduled release

more tasks get done

Speed

Page 5: How to deploy to production 10 times per day v2 for Levi9

Developer satisfaction

code with feauture is isolated

less planings

less stress

Page 6: How to deploy to production 10 times per day v2 for Levi9

Quality

Bugs can be found faster

Bugs can be fixed faster

More concentrated testing

Less risks

Page 7: How to deploy to production 10 times per day v2 for Levi9

Recruitment

Hey, we deploy every day!

Page 8: How to deploy to production 10 times per day v2 for Levi9

echo alias deploy=’mocha && git push heroku master‘ >> ~/.bash_profile

Let’s setup super simple CD

Page 9: How to deploy to production 10 times per day v2 for Levi9

How about confilcts with other guys?

Page 10: How to deploy to production 10 times per day v2 for Levi9

Centralized Workflow

Page 11: How to deploy to production 10 times per day v2 for Levi9

Feature Branch Workflow

Page 12: How to deploy to production 10 times per day v2 for Levi9

Manual testing(before) Prod

Staging

Page 13: How to deploy to production 10 times per day v2 for Levi9

Manual testing(after) Prod

Staging-feature-1

feature-branch-1

Staging-feature-2

feature-branch-2

Staging-feature-3

feature-branch-3

Page 14: How to deploy to production 10 times per day v2 for Levi9

When we can release that?

PO/Manager(before) (after)

Is it in production?

Page 15: How to deploy to production 10 times per day v2 for Levi9

Contious integration server

1.Trigger rules 2.Build steps

Checks VCS

by userdeploy

TeamCityJenkinsShippableTravis

run tests

Web hooks

Page 16: How to deploy to production 10 times per day v2 for Levi9

Safe merge to master and deploy

Production

CI server

Write your feature

Push your feature to branch ready/feature1

delete ready/feature1 branch

deploy master

pulls master locally

merge ready/feature1 to master locally

run tests

push to origin/master

Page 17: How to deploy to production 10 times per day v2 for Levi9

Create branch and pull requst

Usage: prod ‘valid-branch-name’

Page 18: How to deploy to production 10 times per day v2 for Levi9

tcmerge (client-side)

Creating ready branch

https://github.com/debitoor/tcmerge

# find current branch namecurrentBranch=`git rev-parse --abbrev-ref HEAD`

#push current branch toreadyBranch = ready/$currentbranch/$timestampgit push origin $currentBranch:$readyBranch

Page 19: How to deploy to production 10 times per day v2 for Levi9

teamcity-merge - TeamCity side

Page 20: How to deploy to production 10 times per day v2 for Levi9

Demo

Page 21: How to deploy to production 10 times per day v2 for Levi9

- Split big tasks to fit 1-2 days release cycle

- Split application to services

Page 22: How to deploy to production 10 times per day v2 for Levi9

Don’t plan and estimate

Page 23: How to deploy to production 10 times per day v2 for Levi9

Remember about monitoring