Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Jenkins Evolutions - JEEConf 2012
Search
Anton Arhipov
May 31, 2012
Programming
0
76
Jenkins Evolutions - JEEConf 2012
Anton Arhipov
May 31, 2012
Tweet
Share
More Decks by Anton Arhipov
See All by Anton Arhipov
Devoxx Belgium 2024 - Kotlin 2.0 and beyond
antonarhipov
1
69
Data Analysis with Kotlin Notebook, DataFrame, and Kandy
antonarhipov
1
12
Kotlin 2.0 and Beyond
antonarhipov
2
160
Kotlin Standard Library Gems
antonarhipov
2
440
Ktor Workshop
antonarhipov
1
75
Everybody is a Marketer
antonarhipov
0
110
Idiomatic Kotlin, v2023.05
antonarhipov
2
130
Kotlin DSL in under an hour, DevoxxUK 2023
antonarhipov
2
120
Idiomatic Kotlin - KotlinConf Global, Vietnam
antonarhipov
1
97
Other Decks in Programming
See All in Programming
Cohesion in Modeling and Design
mploed
3
200
実務未経験からいち早く戦力化するための新人エンジニア育成術 ~ 具体的な方法と育成する側の心得 ~
juri_matsuda
0
110
Modern Functional Fluent CFML REST by Luis Majano
ortus24
0
140
Removing Corepack
yosuke_furukawa
PRO
9
1.2k
Jakarta EE as Seen Trough the Lens of the ASF
ivargrimstad
0
140
Progressive Web Apps for Rails developers
siaw23
2
550
4年間変わらなかった YOUTRUSTのアーキテクチャ
daiki1003
1
620
[PHPカンファレンス沖縄2024]「無理なくできるだけ安全に」テストもないレガシーコードをリファクタリングするテクニック
ikezoemakoto
3
130
Cloud Adoption Framework にみる組織とクラウド導入戦略
tomokusaba
2
510
App Router 悲喜交々
quramy
7
380
C#および.NETに対する誤解をひも解く
ymd65536
0
280
(Deep|Web) Link support with expo-router
mrtry
0
170
Featured
See All Featured
Web Components: a chance to create the future
zenorocha
310
42k
Designing for Performance
lara
604
68k
Gamification - CAS2011
davidbonilla
80
5k
Fireside Chat
paigeccino
32
3k
Scaling GitHub
holman
458
140k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
7
580
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Typedesign – Prime Four
hannesfritz
39
2.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
4
120
The World Runs on Bad Software
bkeepers
PRO
65
11k
Transcript
Jenkins Evolu-ons Anton Arhipov ZeroTurnaround JRebel
@antonarhipov h/p://arhipov.blogspot.com
Why Evolu-ons?
Why Evolu-ons? test automa-on
Why Evolu-ons? con-nuous integra-on
Why Evolu-ons? con-nuous deployment
Why Evolu-ons? cron on steroids
Agenda ! Background ! Stories • Func-onal
tests • Servlet tests • Scaling ! Random stuff
Background -‐ 2008 ! First installa-on ! Clicked
“Run” when wanted to test stuff
Background 2012 ! 54 215 324 jobs
! 2 5 8 dedicated machines ! Amazon ~7000 instance-‐hour per month ! 3 in house plugin developed ! Custom dashboard (50 x 300 grid)
None
h6ps://github.com/
jenkinsci/ jenkins-‐scripts
Custom Dashboard
story of func-onal tests
JRebel Func-onal JDK Tests
JRebel Func-onal JDK Tests
JRebel Func-onal JDK Tests ! Per JDK •
Per func-onal test • Compile couple of classes • Run some methods and assert • Recompile couple of classes • Run some methods and assert • …
JRebel Func-onal JDK Tests ! Per JDK •
Per func-onal test • Compile couple of classes • Run some methods and assert • Recompile couple of classes • Run some methods and assert • …
JRebel Func-onal JDK Tests ! Per JDK •
Per func-onal test • Compile couple of classes • Run some methods and assert • Recompile couple of classes • Run some methods and assert • …
JRebel Func-onal JDK Tests ! Per JDK •
Per func-onal test • Compile couple of classes • Run some methods and assert • Recompile couple of classes • Run some methods and assert • …
JRebel Func-onal JDK Tests ! Per JDK …
! Which Jenkins feature is the best here?
JRebel Func-onal JDK Tests ! Configura-on matrix FTW!
JRebel Func-onal JDK Tests ! Executed with a
Groovy script
JRebel Func-onal JDK Tests
JRebel Func-onal JDK Tests ! How to get
results? Jenkins feature…
JRebel Func-onal JDK Tests ! Output JUnit XML!
JRebel Func-onal JDK Tests
JRebel Func-onal JDK Tests ! Creates ~ 10 000
new files ! Compile ~ 1700 java classes ! Invoke the JVM ~ 550 -mes
JRebel Func-onal JDK Tests Sloooooooow!
JRebel Func-onal JDK Tests ! I/O ! CPU
! Memory
JRebel Func-onal JDK Tests
JRebel Func-onal JDK Tests ! Bare metal !
Cloud ! Bare metal (+ cloud)
JRebel Func-onal JDK Tests ! Cloud • 1
small instance per JDK • Manual update of AMIs • Slow • Scales!
JRebel Func-onal JDK Tests ! Which Jenkins plugin
to use?
JRebel Func-onal JDK Tests ! Amazon EC plugin
JRebel Func-onal JDK Tests ! Bare metal •
8 core & 16GB RAM gaming machines • Recycled developer machines • Marke-ng demo machines (iMac) • Developer machines, ad-‐hoc (?)
Jenkins Master
Jenkins Master Windows Windows Windows
*nix *nix *nix *nix *nix
Jenkins Master Windows Windows Windows
*nix *nix *nix *nix *nix
Jenkins Master Windows Windows Windows
*nix *nix *nix *nix *nix My Laptop iMac
Adding new machines ! How to manage the
configura-ons? ! How to automate the setup?
Adding new machines ! Chef, Puppet
Taming I/O ! SSD: ~30% performance gain
story of servlet tests
Servlet Tests ! Start a container version •
WebSphere, Weblogic, JBoss, etc ! Deploy applica-ons ! Test results, reload changes, test results, …
Custom Dashboard
Servlet Tests ! How to start a server?
Servlet Tests ! Duh! With a startup script!
Servlet Tests ! Problem: 1 app server, 2
jobs. Which plugin to use?
Servlet Tests ! Thro/le Concurrent Builds plugin
Servlet Tests
Servlet Tests ! How do you deploy an
applica-on?
Servlet Tests ! Start Tomcat ! Copy WAR
files to webapps/ ! GET /some-‐url ! Assert ! Update applica-on ! GET /some-‐url ! Assert
Servlet Tests Sloooooooow!
Servlet Tests ! I/O ! CPU !
Memory
Tes-ng Mul-ple Containers ! Cloud • 1 small
instance per container • Need to update AMIs • Slow • Isola-on
Tes-ng Mul-ple Containers ! Single machine • Port
hell • Memory limits • Fast(er)!
story of DVCS
Story of DVCS ! Problem • Many servers
• Many containers • Many tests • Many JDKs ! Slow feedback cycle
Story of DVCS DEV N tests on N
servers (30 minutes) STABLE M tests on M servers (3 hours) Tests green? Push to branch/repository
Story of DVCS
Story of DVCS
scalability
Story of Scaling ! Problem • Exponen-al growths
of tests • (containers) X (configurations) X (tests) + const! • Fight for executors
Story of Scaling ! Add more machines? !
Spin up more cloud instances? ! A/ach developer machines at night? ! Cut tests scope?
Story of Scaling ! Jenkins helps with elas-city!
Story of Scaling ! Jenkins helps with elas-city!
WIN!
random stuff
Random Stuff ! There’s an app plugin for
that!
Some Cool Plugins ! Mercurial plugin ! Thro/le
Concurrent Builds plugin ! Matrix Configura-on plugin ! Matrix Reloaded plugin ! SSH slaves plugin ! Publish over SSH plugin ! Copy Ar-fact plugin ! Copy to slave plugin
Some Cool Plugins: Con-nuous Deployment !
Build Pipeline plugin ! Parametrized Trigger plugin ! Downstream Buildview plugin ! Fingerprints h6p://zeroturnaround.com/blog/how-‐to-‐use-‐jenkins-‐for-‐job-‐chaining-‐and-‐visualizaQons/
Some Cool Plugins ! Chuck Norris plugin BUILD
SUCCESSFUL
Some Cool Plugins ! Chuck Norris plugin BUILD
FAILED
Build-‐it-‐all! JRebel
Build-‐it-‐all! JRebel
Build-‐it-‐all! IntelliJ NetBeans Eclipse Installer
JRebel
Build-‐it-‐all! IntelliJ NetBeans Eclipse Installer
JRebel
Build-‐it-‐all! IntelliJ NetBeans Eclipse Installer
JRebel Tests
UI
None
None
None
None
QuesQons?