Transcript
Page 1: Ruby CI with Jenkins

• cowboyd@github

• cowboyd@twitter

Ruby CI with Jenkins

1Monday, March 5, 2012

Page 2: Ruby CI with Jenkins

Your Development Process Needs CI

2Monday, March 5, 2012

Page 3: Ruby CI with Jenkins

Not for code quality*

* this is still very important3Monday, March 5, 2012

Page 4: Ruby CI with Jenkins

For deployment

4Monday, March 5, 2012

Page 5: Ruby CI with Jenkins

You Need CI.CI is crucial to

application distribution

5Monday, March 5, 2012

Page 6: Ruby CI with Jenkins

Ruby deploys suck

6Monday, March 5, 2012

Page 7: Ruby CI with Jenkins

Typical Deploy

• check out from source control

• bundle gems

• generate assets (rails/sprockets)

• and then more stuff...

7Monday, March 5, 2012

Page 8: Ruby CI with Jenkins

Deploying from SCM sucks

8Monday, March 5, 2012

Page 9: Ruby CI with Jenkins

Deploying from SCM sucks

• If Github is getting DDOS’d should that mean you can’t deploy?

• Branches and tags can be moving targets

• server affinity for a particular branch

9Monday, March 5, 2012

Page 10: Ruby CI with Jenkins

Bundling gems at deploy-time sucks

10Monday, March 5, 2012

Page 11: Ruby CI with Jenkins

Bundling gems at deploy-time sucks

• Why should my deploy depend on rubygems.org?

• My app is about to go live. Is now really the best time to be compiling C extensions?

11Monday, March 5, 2012

Page 12: Ruby CI with Jenkins

Asset generation on deploy sucks

12Monday, March 5, 2012

Page 13: Ruby CI with Jenkins

Asset generation on deploy sucks

• time consuming

• not tested anywhere else until go-time

13Monday, March 5, 2012

Page 14: Ruby CI with Jenkins

If you’re going to deploy, then deploy.

14Monday, March 5, 2012

Page 15: Ruby CI with Jenkins

This is what we do

1. unpack application archive

2. restart server processes

15Monday, March 5, 2012

Page 16: Ruby CI with Jenkins

This is how we do it

16Monday, March 5, 2012

Page 17: Ruby CI with Jenkins

CI should verify a fully assembled application,

not just its source code

17Monday, March 5, 2012

Page 18: Ruby CI with Jenkins

Deploy a verified, fully assembled application.

18Monday, March 5, 2012

Page 19: Ruby CI with Jenkins

Deploy the output of your CI

19Monday, March 5, 2012

Page 20: Ruby CI with Jenkins

What we assemble

• Source Code

• Gem Bundle

• Static Assets (rails 3.1/Sprockets)

• Passenger

• Ruby

20Monday, March 5, 2012

Page 21: Ruby CI with Jenkins

Deployable

Discard

Pass

Fail

21Monday, March 5, 2012

Page 22: Ruby CI with Jenkins

Winning

• No (or very few) network dependencies

• No (or very few) host dependencies

• Fast!

• Idempotent deploys

22Monday, March 5, 2012

Page 23: Ruby CI with Jenkins

Ruby deploys suck because they grew up

with out CI

23Monday, March 5, 2012

Page 24: Ruby CI with Jenkins

Why Jenkins?

24Monday, March 5, 2012

Page 25: Ruby CI with Jenkins

Zero-Config Installapt-get install jenkinsyum install jenkinschef, puppet and friends

25Monday, March 5, 2012

Page 26: Ruby CI with Jenkins

Open Source

26Monday, March 5, 2012

Page 27: Ruby CI with Jenkins

Extensible400+ plugins to date

27Monday, March 5, 2012

Page 28: Ruby CI with Jenkins

Ruby Tools!Command Line

Plugin SDK

28Monday, March 5, 2012

Page 29: Ruby CI with Jenkins

Ruby CLI

29Monday, March 5, 2012

Page 30: Ruby CI with Jenkins

Ruby PluginsLive Coding!!!

30Monday, March 5, 2012

Page 31: Ruby CI with Jenkins

• cowboyd@github

• cowboyd@twitter

Ruby CI with Jenkins

31Monday, March 5, 2012


Top Related