Upload
open-world-forum
View
2.699
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Jenkins (formerly known as Hudson) is one of the most used tool in Java (non exclusive) to support continuous integration. Created as a hobby project, it quickly became a strategic tool for most development teams. Designed for extensibility, it also choosed from beginning an incremental development model, applying literally the 'release early, release often' principle. It focussed on building a large, active community, with the lowest contribution barrier I ever seen on opensource project and a complete transparency on project management, making Jenkins something uncommon in opensource world. During this session, I'll explain the Jenkins management & technical model, how it promotes contribution and how it allow CloudBees to both support the opensource community-driven project and deliver business value with proprietary extensions.
Citation preview
Opening Opensource the Jenkins Way
BreizhCamp 17 juin 2011
©2011 Cloud Bees, Inc. All Rights Reserved
2 ©2011 CloudBees, Inc. All Rights Reserved
Nicolas De loof
• Java-Boy • DevOps at • (ex-)Committer Maven
• JUG-Leader
©2011 CloudBees, Inc. All Rights Reserved
4
• de facto continuous integration Server in Java ecosystem (non exclusive)
• Basis for Software Factory automation o Q&A Code inspection o Release management o Continuous deployment o Business Intelligence …
©2011 CloudBees, Inc. All Rights Reserved
5
Hudson / Jenkins : the fork
©2011 CloudBees, Inc. All Rights Reserved
KK create Hudson as a Hobby
Hudson is adopted world wide
Oracle aquire SUN
Oracle register « Hudson » trademark
Issues with java.net infrastructure
Oracle uses trademark as a weapon
Vote to rename the project and move to GitHub
Jenkins defines it’s own process
Here we are
Sonatype join Oracle Hudson
Jenkins
moved to GitHub and proposed to Eclipse FoundaKon Hudson
6 ©2011 CloudBees, Inc. All Rights Reserved
• 13 000 downloads / week • 1 500 member on jenkins-users • 4 000 followers @jenkinsci
User choosed Jenkins
7
• 900 members on jenkins-dev • 48 active contributors, 94 publicized • 170 Pull-requests from occasional
contributors • 11,3 changes per release
(6,7 before the fork)
… as Developers did
©2011 CloudBees, Inc. All Rights Reserved
©2011 CloudBees, Inc. All Rights Reserved
9
• Voice committer • Committer • Contributor • Supporting User • User
Standard OSS model « meritocratic »
©2011 CloudBees, Inc. All Rights Reserved
10
1. Use the tool 2. Contribute to user-forum 3. Get familiar with the code 4. Contribute to dev-forum 5. Fix bugs and post patches 6. Be nice with everybody 7. Do some lobbying
How to become a Committer …
©2011 CloudBees, Inc. All Rights Reserved
11
• Difficult to get into the code • Difficult to get spare time • Difficult to fix bug or add new features • Laborious to create and maintain patches • Frustrating to wait for approval
How many talentuous guys do we loose here ?
In practice…
©2011 CloudBees, Inc. All Rights Reserved
12
My personal experience
©2011 CloudBees, Inc. All Rights Reserved
MoKvaKon (# of contribuKons)
(never occurred)
13
• Rule #1 : lower the contribution barrier
The Jenkins-way
©2011 CloudBees, Inc. All Rights Reserved
14
Want to contribute ?
©2011 CloudBees, Inc. All Rights Reserved
Ask for commit
15
« With great power, comes great responsibility »
Self-censored contributors
©2011 CloudBees, Inc. All Rights Reserved
16
• Discover a regression : revert
• Test harness to the rescue (still much to do there)
Possible if there is few changes between releases !
Hey, this is SCM role after all !
©2011 CloudBees, Inc. All Rights Reserved
17
• Rule #2 : Release often (even more)
The Jenkins-way
©2011 CloudBees, Inc. All Rights Reserved
18
• One release per week • Few changes between releases • Easy to rollback when something is
broken
• + « stable but older » branch (3 month) with Critical bug fixes only
Jenkins releases
©2011 CloudBees, Inc. All Rights Reserved
©2011 CloudBees, Inc. All Rights Reserved
20
• Contributor may ask for code review • Contribution may require few changes
before beeing applied • We don’t want to discourage contributors
WTF ?
©2011 CloudBees, Inc. All Rights Reserved
21
• Diff format is definitly not a sexy format for humans
> +@Deprecated > +public class Base64 > +{ > + public Base64() > + { > + super();
Does it really need to call Object.super(). Can we not leave it with the default constructor as Plexus' original has?
> + }
Diff format (SVN patch)
©2011 CloudBees, Inc. All Rights Reserved
22
GitHub pull request
©2011 CloudBees, Inc. All Rights Reserved
23
• Rule #3 : Tools matter, use the right ones
The Jenkins-way
©2011 CloudBees, Inc. All Rights Reserved
patch
Pull request + Commit paTern
24
• Origin of the Hudson/Jenkins fork (java.net outage)
• 200 forks on Jenkins GitHub repo ! • 170 pull requests
Jenkins at GitHub
©2011 CloudBees, Inc. All Rights Reserved
25
What about CLA ?
©2011 CloudBees, Inc. All Rights Reserved
26
• Constrain contributors to transfer Intellectual Property
• … but not to ensure they have • License is not a guarantee of freedom
• This is a lawyers artifact
What is a CLA for ?
©2011 CloudBees, Inc. All Rights Reserved
27
• Rule #4 : We are developers, not lawyers
The Jenkins-way
©2011 CloudBees, Inc. All Rights Reserved
©2011 CloudBees, Inc. All Rights Reserved
29
• 250 plugins ! (maven plugin is the only one in core)
• Even growing ecosystem • Contributor can focus on some plugin
that bring them value daily
Modular design
©2011 CloudBees, Inc. All Rights Reserved
30
• Extension point with runtime discovery • Need to plug somewhere in Jenkins ? add a new extension point
• Some idea for a new plugin ? add for a repo on github/jenkins-ci
Extensibility
©2011 CloudBees, Inc. All Rights Reserved
31
• Rule #5 : design for extensibility
Multiple technical solutions (incl. @Inject)
The Jenkins way
©2011 CloudBees, Inc. All Rights Reserved
©2011 CloudBees, Inc. All Rights Reserved
33
• User forum
• Dev forum
• Private forum
• (+ lobbying)
Multiple discussion levels
©2011 CloudBees, Inc. All Rights Reserved
34
• Need for private discussion when it could hurt someone
invitation for new Committers
… but we don’t have to « filter » committers anymore
WTF ?
©2011 CloudBees, Inc. All Rights Reserved
35
• All discussions are public – On jenkins-dev – On irc #jenkinsci
• Meeting bi-weekly on irc – Logged by irc-bot for later availability
http://meetings.jenkins-ci.org/jenkins
transparency
©2011 CloudBees, Inc. All Rights Reserved
36
• 24/7 on #jenkins • Active reader on mailing lists • Join the bi-weekly #irc meeting • Read the meeting minutes
Multiple level of participation
©2011 CloudBees, Inc. All Rights Reserved
37
Rule #6 : Make things transparent
The Jenkins way
©2011 CloudBees, Inc. All Rights Reserved
38
• Multiple levels of commitment 24/7 eMail addict filter mails by subject discuss major themes on bi-weekly meeting read meeting notes
e-Mail avalanche syndrom
©2011 CloudBees, Inc. All Rights Reserved
©2011 CloudBees, Inc. All Rights Reserved
40
• Many contributor involved • Everyone can commit (with care) • No need for long debates thanks to small
release cycles and transparency
• But… project still needs some sort of lead
Lead
©2011 CloudBees, Inc. All Rights Reserved
41
• … but not a despot !
« Benevolent Dictator For Life »-syndrom
A Lead
©2011 CloudBees, Inc. All Rights Reserved
42
• Highly active contributor • Good knowledge of project history • Good technical skills • Visionary • Newbie-compliant • Not egocentric
Lead must be …
©2011 CloudBees, Inc. All Rights Reserved
43
• Kohsuke Kawaguchi • Andrew Bayer • Dean Yu
(all from distinct companies) And discuss in public !
Lead-commitee is safer
©2011 CloudBees, Inc. All Rights Reserved
44
• Rule #7 : choose a good Lead model
focus first on building a community
The Jenkins way
©2011 CloudBees, Inc. All Rights Reserved
45
« all from distinct companies » ?
Opensource (x)or Business
©2011 CloudBees, Inc. All Rights Reserved
46
( ©2011 CloudBees, Inc. All Rights Reserved
©2011 CloudBees, Inc. All Rights Reserved
48
• Nectar : enhanced & supported Jenkins • DEV@Cloud : hosted software factory • RUN@Cloud : Java PaaS
• Public : hosted by Amazon • Private : on your own virtualized infra
CloudBees in 5 words
©2011 CloudBees, Inc. All Rights Reserved
49
• KK is a CloudBees employee
… but CloudBees engaged to never interfere with Jenkins Lead committee
• DEV@Cloud is awesome thanks to active opensource ecosystem !
CloudBees vs OpenSource
©2011 CloudBees, Inc. All Rights Reserved
50
• CloudBees contributes bugfixes to OSS
CloudBees vs OpenSource
©2011 CloudBees, Inc. All Rights Reserved
51
• Q&A, stabilised + supported • Some entreprise dedicated plugins
o Security (RBAC) o Virtualisation, auto-scaling,
hypervisor integration o Jobs classification (folders) o Advanced Backup o …
Nectar value for entreprises
©2011 CloudBees, Inc. All Rights Reserved
52
• Jenkins cluster • Multi-tenant masters • Pool of slaves • Automatic provisionning
– On phisical or virtual machines • Centralised management
(plugins, upgrades, default config…)
DEV@Cloud Private Edition
©2011 CloudBees, Inc. All Rights Reserved
53
• Thanks to flexible Jenkins model • Easiest maintenance • Easiest contributions to oss • All Jenkins improvements are good for
CloudBees • All time focused on Jenkins dev&support
is good for Jenkins
All thoses features are Plugins !
©2011 CloudBees, Inc. All Rights Reserved
54
) ©2011 CloudBees, Inc. All Rights Reserved
©2011 CloudBees, Inc. All Rights Reserved
56
• I’m trying to for GWT-maven-plugin
Does Jenkins model apply elsewhere ?
©2011 CloudBees, Inc. All Rights Reserved
57
• lower the contribution barrier just ask to join the team !
• release often one release per month
• tools matter moved from codehaus svn to GitHub
• make it transparent everything happens on googlegroups
• choose a good lead-model myself + Olivier Lamy, may change …
• design for extensibility more investigation required here
Applying rules
©2011 CloudBees, Inc. All Rights Reserved
58
• Future will say…
• Allready some contributors to join : o complaining about missing features, o encouraged to contribute, o added to team, o they fixed issues by themself !
• Salvador Diaz to analyse Pull Request • Pierre-Yves Ricau committed 5 fixes • .. an M2Eclipse configurator
Does it work ?
©2011 CloudBees, Inc. All Rights Reserved
59
Q&A
Thank you
©2011 CloudBees, Inc. All Rights Reserved