Jenkins Evolutions - JEEConf 2012

13,316 views
14,396 views

Published on

Published in: Technology, Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
13,316
On SlideShare
0
From Embeds
0
Number of Embeds
10,880
Actions
Shares
0
Downloads
26
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Jenkins Evolutions - JEEConf 2012

  1. 1. Jenkins EvolutionsAnton ArhipovZeroTurnaroundJRebel @antonarhipov http://arhipov.blogspot.com
  2. 2. Why Evolutions?
  3. 3. Why Evolutions?test automation
  4. 4. Why Evolutions? continuous integration
  5. 5. Why Evolutions? continuous deployment
  6. 6. Why Evolutions?cron on steroids
  7. 7. AgendaBackgroundStories• Functional tests• Servlet tests• ScalingRandom stuff
  8. 8. Background - 2008First installationClicked “Run” when wanted to teststuff
  9. 9. Background 201254 215 324 jobs2 5 8 dedicated machinesAmazon ~7000 instance-hour per month3 in house plugin developedCustom dashboard (50 x 300 grid)
  10. 10. https://github.com/ jenkinsci/ jenkins-scripts
  11. 11. Custom Dashboard
  12. 12. story offunctional tests
  13. 13. JRebel Functional JDK Tests
  14. 14. JRebel Functional JDK Tests
  15. 15. JRebel Functional JDK TestsPer JDK• Per functional test • Compile couple of classes • Run some methods and assert • Recompile couple of classes • Run some methods and assert • …
  16. 16. JRebel Functional JDK TestsPer JDK• Per functional test • Compile couple of classes • Run some methods and assert • Recompile couple of classes • Run some methods and assert • …
  17. 17. JRebel Functional JDK TestsPer JDK• Per functional test • Compile couple of classes • Run some methods and assert • Recompile couple of classes • Run some methods and assert • …
  18. 18. JRebel Functional JDK TestsPer JDK• Per functional test • Compile couple of classes • Run some methods and assert • Recompile couple of classes • Run some methods and assert • …
  19. 19. JRebel Functional JDK TestsPer JDK …Which Jenkins feature is thebest here?
  20. 20. JRebel Functional JDK TestsConfiguration matrix FTW!
  21. 21. JRebel Functional JDK TestsExecuted with a Groovy script
  22. 22. JRebel Functional JDK Tests
  23. 23. JRebel Functional JDK Tests How to get results? Jenkinsfeature…
  24. 24. JRebel Functional JDK TestsOutput JUnit XML!
  25. 25. JRebel Functional JDK Tests
  26. 26. JRebel Functional JDK TestsCreates ~ 10 000 new filesCompile ~ 1700 java classesInvoke the JVM ~ 550 times
  27. 27. JRebel Functional JDK Tests Sloooooooow!
  28. 28. JRebel Functional JDK TestsI/OCPUMemory
  29. 29. JRebel Functional JDK Tests
  30. 30. JRebel Functional JDK TestsBare metalCloudBare metal (+ cloud)
  31. 31. JRebel Functional JDK TestsCloud• 1 small instance per JDK• Manual update of AMIs• Slow• Scales!
  32. 32. JRebel Functional JDK TestsWhich Jenkins plugin to use?
  33. 33. JRebel Functional JDK TestsAmazon EC plugin
  34. 34. JRebel Functional JDK TestsBare metal• 8 core & 16GB RAM gaming machines• Recycled developer machines• Marketing demo machines (iMac)• Developer machines, ad-hoc (?)
  35. 35. JenkinsMaster
  36. 36. *nix *nix *nix *nix *nixJenkinsMaster Windows Windows Windows
  37. 37. *nix *nix *nix *nix *nixJenkinsMaster Windows Windows Windows
  38. 38. *nix *nix *nix *nix *nix Jenkins Master Windows Windows Windows iMac MyLaptop
  39. 39. Adding new machinesHow to manage theconfigurations?How to automate the setup?
  40. 40. Adding new machinesChef, Puppet
  41. 41. Taming I/OSSD: ~30% performance gain
  42. 42. story ofservlet tests
  43. 43. Servlet TestsStart a container version• WebSphere, Weblogic, JBoss, etcDeploy applicationsTest results, reload changes, testresults, …
  44. 44. Custom Dashboard
  45. 45. Servlet TestsHow to start a server?
  46. 46. Servlet TestsDuh! With a startup script!
  47. 47. Servlet TestsProblem: 1 app server, 2 jobs.Which plugin to use?
  48. 48. Servlet TestsThrottle Concurrent Buildsplugin
  49. 49. Servlet Tests
  50. 50. Servlet TestsHow do you deploy anapplication?
  51. 51. Servlet TestsStart TomcatCopy WAR files to webapps/GET /some-urlAssertUpdate applicationGET /some-urlAssert
  52. 52. Servlet Tests Sloooooooow!
  53. 53. Servlet TestsI/OCPUMemory
  54. 54. Testing Multiple ContainersCloud• 1 small instance per container• Need to update AMIs• Slow• Isolation
  55. 55. Testing Multiple ContainersSingle machine• Port hell• Memory limits• Fast(er)!
  56. 56. story of DVCS
  57. 57. Story of DVCSProblem• Many servers• Many containers• Many tests• Many JDKsSlow feedback cycle
  58. 58. Story of DVCS Tests green? Push to branch/repository DEV STABLEN tests on N servers M tests on M servers (30 minutes) (3 hours)
  59. 59. Story of DVCS
  60. 60. Story of DVCS
  61. 61. scalability
  62. 62. Story of ScalingProblem• Exponential growths of tests • (containers) X (configurations) X (tests) + const• Fight for executors
  63. 63. Story of ScalingAdd more machines?Spin up more cloud instances?Attach developer machines atnight?Cut tests scope?
  64. 64. Story of ScalingJenkins helps with elasticity!
  65. 65. Story of ScalingJenkins helps with elasticity! WIN!
  66. 66. random stuff
  67. 67. Random StuffThere’s an app plugin for that!
  68. 68. Some Cool PluginsMercurial pluginThrottle Concurrent Builds pluginMatrix Configuration pluginMatrix Reloaded pluginSSH slaves pluginPublish over SSH pluginCopy Artifact pluginCopy to slave plugin
  69. 69. Some Cool Plugins: Continuous Deployment Build Pipeline plugin Parametrized Trigger plugin Downstream Buildview plugin Fingerprintshttp://zeroturnaround.com/blog/how-to-use-jenkins-for-job-chaining-and-visualizations/
  70. 70. Some Cool Plugins Chuck Norris pluginBUILDSUCCESSFUL
  71. 71. Some Cool PluginsChuck Norris plugin BUILD FAILED
  72. 72. Build-it-all! JRebel
  73. 73. Build-it-all! JRebel
  74. 74. Build-it-all! IntelliJ NetBeans JRebel Eclipse Installer
  75. 75. Build-it-all! IntelliJ NetBeans JRebel Eclipse Installer
  76. 76. Build-it-all! IntelliJ NetBeans JRebel Eclipse Installer Tests
  77. 77. UI
  78. 78. Questions?

×