Mais conteúdo relacionado Semelhante a Java / Opening Open Source the Jenkins Way - Nicolas de Loof, CloudBees (20) Mais de Paris Open Source Summit (20) Java / Opening Open Source the Jenkins Way - Nicolas de Loof, CloudBees2. Nicolas De loof
• Java-Boy
• DevOps at
• (ex-)Committer Maven
• JUG-Leader
©2011 CloudBees, Inc. All Rights Reserved 2
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 4
5. Hudson / Jenkins : the fork
Jenkins
Here
we
are
Jenkins
defines
it’s
own
process
Hudson
moved
to
GitHub
and
proposed
to
Eclipse
FoundaKon
Sonatype
join
Oracle
Hudson
Vote
to
rename
the
project
and
move
to
GitHub
Oracle
uses
trademark
as
a
weapon
Issues
with
java.net
infrastructure
Oracle
register
«
Hudson
»
trademark
Oracle
aquire
SUN
Hudson
is
adopted
world
wide
KK
create
Hudson
as
a
Hobby
©2011 CloudBees, Inc. All Rights Reserved 5
6. User choosed Jenkins
• 13 000 downloads / week
• 1 500 member on jenkins-users
• 4 000 followers @jenkinsci
©2011 CloudBees, Inc. All Rights Reserved 6
7. … as Developers did
• 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)
©2011 CloudBees, Inc. All Rights Reserved 7
9. Standard OSS model « meritocratic »
• Voice committer
• Committer
• Contributor
• Supporting User
• User
©2011 CloudBees, Inc. All Rights Reserved 9
10. How to become a Committer …
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
©2011 CloudBees, Inc. All Rights Reserved 10
11. In practice…
• 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 ?
©2011 CloudBees, Inc. All Rights Reserved 11
16. Hey, this is SCM role after all !
• Discover a regression :
revert
• Test harness to the rescue
(still much to do there)
Possible if there is few changes between
releases !
©2011 CloudBees, Inc. All Rights Reserved 16
18. Jenkins releases
• 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
©2011 CloudBees, Inc. All Rights Reserved 18
20. WTF ?
• Contributor may ask for code review
• Contribution may require few changes
before beeing applied
• We don’t want to discourage contributors
©2011 CloudBees, Inc. All Rights Reserved 20
21. Diff format (SVN patch)
• 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?
> + }
©2011 CloudBees, Inc. All Rights Reserved 21
23. The Jenkins-way
• Rule #3 : Tools matter, use the right ones
patch
Pull
request
+
Commit
paTern
©2011 CloudBees, Inc. All Rights Reserved 23
24. Jenkins at GitHub
• Origin of the Hudson/Jenkins fork
(java.net outage)
• 200 forks on Jenkins GitHub repo !
• 170 pull requests
©2011 CloudBees, Inc. All Rights Reserved 24
26. What is a CLA for ?
• Constrain contributors to transfer
Intellectual Property
• … but not to ensure they have
• License is not a guarantee of freedom
• This is a lawyers artifact
©2011 CloudBees, Inc. All Rights Reserved 26
29. Modular design
• 250 plugins !
(maven plugin is the only one in core)
• Even growing ecosystem
• Contributor can focus on some plugin
that bring them value daily
©2011 CloudBees, Inc. All Rights Reserved 29
30. Extensibility
• 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
©2011 CloudBees, Inc. All Rights Reserved 30
31. The Jenkins way
• Rule #5 : design for extensibility
Multiple technical solutions (incl. @Inject)
©2011 CloudBees, Inc. All Rights Reserved 31
34. WTF ?
• Need for private discussion when it could
hurt someone
invitation for new Committers
… but we don’t have to « filter » committers
anymore
©2011 CloudBees, Inc. All Rights Reserved 34
35. transparency
• 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
©2011 CloudBees, Inc. All Rights Reserved 35
36. Multiple level of participation
• 24/7 on #jenkins
• Active reader on mailing lists
• Join the bi-weekly #irc meeting
• Read the meeting minutes
©2011 CloudBees, Inc. All Rights Reserved 36
38. e-Mail avalanche syndrom
• Multiple levels of commitment
24/7 eMail addict
filter mails by subject
discuss major themes on bi-weekly meeting
read meeting notes
©2011 CloudBees, Inc. All Rights Reserved 38
40. Lead
• 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
©2011 CloudBees, Inc. All Rights Reserved 40
41. A Lead
• … but not a despot !
« Benevolent Dictator For Life »-syndrom
©2011 CloudBees, Inc. All Rights Reserved 41
42. Lead must be …
• Highly active contributor
• Good knowledge of project history
• Good technical skills
• Visionary
• Newbie-compliant
• Not egocentric
©2011 CloudBees, Inc. All Rights Reserved 42
43. Lead-commitee is safer
• Kohsuke Kawaguchi
• Andrew Bayer
• Dean Yu
(all from distinct companies)
And discuss in public !
©2011 CloudBees, Inc. All Rights Reserved 43
44. The Jenkins way
• Rule #7 : choose a good Lead model
focus first on building a community
©2011 CloudBees, Inc. All Rights Reserved 44
48. CloudBees in 5 words
• Nectar : enhanced & supported Jenkins
• DEV@Cloud : hosted software factory
• RUN@Cloud : Java PaaS
• Public : hosted by Amazon
• Private : on your own virtualized infra
©2011 CloudBees, Inc. All Rights Reserved 48
49. CloudBees vs OpenSource
• KK is a CloudBees employee
… but CloudBees engaged to never
interfere with Jenkins Lead committee
• DEV@Cloud is awesome thanks to
active opensource ecosystem !
©2011 CloudBees, Inc. All Rights Reserved 49
51. Nectar value for entreprises
• 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 …
©2011 CloudBees, Inc. All Rights Reserved 51
52. DEV@Cloud Private Edition
• Jenkins cluster
• Multi-tenant masters
• Pool of slaves
• Automatic provisionning
– On phisical or virtual machines
• Centralised management
(plugins, upgrades, default config…)
©2011 CloudBees, Inc. All Rights Reserved 52
53. All thoses features are Plugins !
• 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
©2011 CloudBees, Inc. All Rights Reserved 53
56. Does Jenkins model apply elsewhere ?
• I’m trying to for GWT-maven-plugin
©2011 CloudBees, Inc. All Rights Reserved 56
57. Applying rules
• 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
©2011 CloudBees, Inc. All Rights Reserved 57
58. Does it work ?
• 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
©2011 CloudBees, Inc. All Rights Reserved 58