Slide 1

Slide 1 text

Why / How / When Do I need CONTINUOS DELIVERY?

Slide 2

Slide 2 text

Product Developer, E-conomic (Ciklum) Trainer, XP Injection beletsky.net @alexbeletsky github.com/alexanderbeletsky

Slide 3

Slide 3 text

Why How When

Slide 4

Slide 4 text

The story of one project  Very simple GTD web application  .NET technological stack based  VPS hosted  Nothing fancy, seriously

Slide 5

Slide 5 text

• Prepare release branch and merge all required changes there • Update version in uppercut.config • Commit changes to SCM • Run build.bat • FTP package to deployment server • RDP to deployment server • Unpackage .zip content to temp folder • Manually backup staging database • Stop Stage Web site in IIS manager • Run migration scripts for staging database • Run deployment scripts for staging environment • Run Stage Web site in IIS manager • Test manually that on staging server, that build works fine • If something missed (note it is 60% of all cases) go to 1 • Manually backup production database • Stop Production Web site in IIS manager • Run migration scripts for production database • Run deployment scripts for production environment • Run Production Web site in IIS manager • Test manually that on production server, that build works fine Delivery Script ...

Slide 6

Slide 6 text

If it FAILS in a MIDDLE — REPEAT Lucky day: 0.5 h Bad day: 2 h

Slide 7

Slide 7 text

Read those figures as: My customers suffer for 2 hours once in 2 weeks, just becase I do update

Slide 8

Slide 8 text

And by the way...  It's just takes too much developers time  It's boring  Sooner or later you start to hate deployments

Slide 9

Slide 9 text

For bussiness people and managers  “Time-to-Market” factor is very low  Feedback cycle is very long  Customer dissatisfaction is very high

Slide 10

Slide 10 text

Why How When

Slide 11

Slide 11 text

Let's define our TERMINOLOGY

Slide 12

Slide 12 text

Deployment != Delivery Deployment: product IS availble Delivery: product IS availble for users

Slide 13

Slide 13 text

Deployment first Delivery after

Slide 14

Slide 14 text

All you have to know, the secret formula of Continuous Deployment

Slide 15

Slide 15 text

(Integration + Deployment) * Continuous = Continuous Deployment

Slide 16

Slide 16 text

Integration is for: fetching latest sources build all product configuration items run unit tests run functional tests generate documentation package all artifacts Deployment is for: update test servers

Slide 17

Slide 17 text

1. Build and deploy locally with one click 2. Define SCM model based 3. Run it continuosly Recipe of Success:

Slide 18

Slide 18 text

 Build and tests execution  Binaries versioning  SCM labeling  Database migration  Web application deployment Step 1 - Build and Deploy

Slide 19

Slide 19 text

 Build and tests execution  Binaries versioning  SCM labeling  Database migration  Web application deployment Step 1 - Build and Deploy Solved by Chuck Norris tools

Slide 20

Slide 20 text

UppercuT batch build framework RoundhousE database migrations DropicK application deployment Meet Chuck Norris Tools

Slide 21

Slide 21 text

UppercuT Easy to use Configurable by XML Supports config for different environment RoundhousE Easy to use Supports MS SQL, MySQL, Postgress Migration by SQL Scripts DropkicK Deployment script as C# code Support for services and sites Different plans

Slide 22

Slide 22 text

Available on a Github

Slide 23

Slide 23 text

> deploy.bat LOCAL > deploy.bat STAGING > deploy.bat PRODUCTION Step 1 - Build and Deploy ACCOMPLISHED

Slide 24

Slide 24 text

 DVCS are simply rule (Git, HG)  TRUNK is production ready  Keep interations in branches  Keep features in branches Step 2 - Define SCM model

Slide 25

Slide 25 text

Ideal branches count = 2 master develop Typical branches count >= 2 master develop release hotfix

Slide 26

Slide 26 text

Branch per Environment Layout

Slide 27

Slide 27 text

Step 2 - Define SCM model ACCOMPLISHED > git checkout develop > git merge --no-ff myfeature > git branch -d myfeature > git push origin develop

Slide 28

Slide 28 text

 Availability of Build Server  SCM build triggering  Automatically run deployment script  Roll out application to production Step 3 - Run it continuously

Slide 29

Slide 29 text

 Fork of famous Hudson project  Open source  Java based  Easy start, easy go  Tons of available plugins Say 'Hello' to Jenkins

Slide 30

Slide 30 text

All configuration could be done in UI

Slide 31

Slide 31 text

Jenkins Instance is deployed for each environment

Slide 32

Slide 32 text

Build/Deployment continuosly triggered by SCM

Slide 33

Slide 33 text

As soon as Staging “Looks Alright”, deploy to production

Slide 34

Slide 34 text

> git checkout master > git merge develop > git tag -a 1.2 > git push origin master Deployment is nothing more as pushing changes to origin/master

Slide 35

Slide 35 text

Step 3 - Run it continuosly ACCOMPLISHED Changes are picked up, built, tested and deployed automatically

Slide 36

Slide 36 text

Why How When

Slide 37

Slide 37 text

As sooner as better

Slide 38

Slide 38 text

And?

Slide 39

Slide 39 text

Results:  Going live time improved 45x  Site down time reduced 300x  No more iterations, Kanban  Staging is updating with every push  Setup and forget

Slide 40

Slide 40 text

THANK YOU! beletsky.net @alexbeletsky github.com/alexanderbeletsky