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

Post on 13-Aug-2015

148 views 0 download

Transcript of 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

eagleeyeeagleeye_seagleeyes91@gmail.com

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

Why to do Continuos deployment?

less queues

no waiting till next scheduled release

more tasks get done

Speed

Developer satisfaction

code with feauture is isolated

less planings

less stress

Quality

Bugs can be found faster

Bugs can be fixed faster

More concentrated testing

Less risks

Recruitment

Hey, we deploy every day!

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

Let’s setup super simple CD

How about confilcts with other guys?

Centralized Workflow

Feature Branch Workflow

Manual testing(before) Prod

Staging

Manual testing(after) Prod

Staging-feature-1

feature-branch-1

Staging-feature-2

feature-branch-2

Staging-feature-3

feature-branch-3

When we can release that?

PO/Manager(before) (after)

Is it in production?

Contious integration server

1.Trigger rules 2.Build steps

Checks VCS

by userdeploy

TeamCityJenkinsShippableTravis

run tests

Web hooks

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

Create branch and pull requst

Usage: prod ‘valid-branch-name’

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

teamcity-merge - TeamCity side

Demo

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

- Split application to services

Don’t plan and estimate

Remember about monitoring

Useful links

https://github.com/progrium/dokkuhttps://github.com/debitoor/tcmergehttps://github.com/debitoor/teamcity-mergehttps://waffle.iohttps://travis-ci.orghttps://hub.github.com/

eagleeyeeagleeye_seagleeyes91@gmail.com