Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Jenkins 2 @ ParisJUG 2016

Introduction to Jenkins 2 @ ParisJUG 2016

Why Jenkins 2?
What is Jenkins 2?
Road beyond 2…

With many demos based on projects available here: https://github.com/jenkins-demo

Arnaud Heritier

June 07, 2016
Tweet

More Decks by Arnaud Heritier

Other Decks in Technology

Transcript

  1. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Jenkins 2
    ParisJUG – 2015-06-07

    View full-size slide

  2. © 2016 CloudBees, Inc. All Rights Reserved
    About Jenkins
    An extensible automation server built on the
    JVM with hundreds of plugins to support nearly
    every continuous integration, delivery and
    deployment pipeline imaginable
    2

    View full-size slide

  3. © 2016 CloudBees, Inc. All Rights Reserved
    About me
    Arnaud Héritier
    • Long time Jenkins user and community member
    – August 2007 : My first discussion on the mailing list and my first
    ticket about Jenkins born Hudson 1.131
    • Contributor on various plugins:
    – Maven, Xcode, Appaloosa, …
    • Member of the Jenkins infra team
    – I love to reboot confluence J
    • Support Team Manager at CloudBees, Inc
    – I help our customers to get the best from Jenkins
    3
    @aheritier
    aheritier

    View full-size slide

  4. © 2016 CloudBees, Inc. All Rights Reserved
    4
    https://groups.google.com/d/msg/jenkinsci-dev/vbXK7JJekFw/BlEvO0UxBgAJ

    View full-size slide

  5. © 2016 CloudBees, Inc. All Rights Reserved
    Developers community reaction to the announce
    5
    https://www.flickr.com/photos/kilgarron/9151943045

    View full-size slide

  6. © 2016 CloudBees, Inc. All Rights Reserved
    My reaction as a Jenkins user
    6
    https://pixabay.com/en/fear-fright-danger-horror-scared-1172372/

    View full-size slide

  7. © 2016 CloudBees, Inc. All Rights Reserved
    Let’s discuss
    • Why Jenkins 2?
    • What is Jenkins 2?
    • Road beyond 2…
    7

    View full-size slide

  8. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Why Jenkins 2?

    View full-size slide

  9. © 2016 CloudBees, Inc. All Rights Reserved
    • 1.x line is now 11 years old. No, really.
    • Lots of great stuff has gone into Jenkins in the last couple
    years but users don’t know about them!
    • Oh, and some fairly big changes!
    Why 2.x?
    9
    ~/Code/jenkinsci/jenkins/war (git:master %)$ mvn dependency:list
    ...
    [INFO] org.acegisecurity:acegi-security:jar:1.0.7:compile
    ...
    [INFO] org.springframework:spring-core:jar:2.5.6.SEC03:compile
    ...
    [INFO] com.google.guava:guava:jar:11.0.1:compile
    ...
    [INFO] org.codehaus.groovy:groovy-all:jar:1.8.9:compile
    ...

    View full-size slide

  10. © 2016 CloudBees, Inc. All Rights Reserved
    Overwhelmed
    by Jenkins? Me
    too.
    Dear Mr Jenkins,
    There are too many
    plugins these days. Please
    eliminate three hundred.
    P.S. I am not a crackpot.
    10

    View full-size slide

  11. © 2016 CloudBees, Inc. All Rights Reserved
    Initial Experience is Complicated
    • Installing Jenkins? That’s easy.
    – But then there’s finding the right plugins…
    – And setting up security…
    – And eighty other things you probably forgot about…
    •That should be easier !!
    11

    View full-size slide

  12. © 2016 CloudBees, Inc. All Rights Reserved
    Continuous Delivery of All the Things
    • Continuous Delivery is eating the software that is eating the
    world.
    • More shops moving in this direction.
    • Jenkins is a key part of how they get there.
    • New use cases need new user interfaces - one size doesn’t
    always fit all.
    • How can we make adopting Jenkins for CD smoother without
    limiting the power Jenkins has for other use cases?
    12

    View full-size slide

  13. © 2016 CloudBees, Inc. All Rights Reserved
    How do I…where do I…what do I…
    • Documentation
    – jenkins-ci.org site was 6 years old
    o Old tooling.
    o Awkward content discovery.
    o Not a great way to share documentation and guides.
    – wiki.jenkins-ci.org is there too, but it’s not easy to navigate.
    • Brand
    – jenkins-ci.org ! CI ?!?
    o Jenkins isn’t only a CI.
    13

    View full-size slide

  14. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Meet Jenkins 2.x
    jenkins.io/2.0

    View full-size slide

  15. © 2016 CloudBees, Inc. All Rights Reserved
    2.0 Themes New Jenkins Website
    Improved “out of the box”
    user experience
    User interface
    improvements
    Pipeline as code
    jenkins.io/content/jenkins-20-proposals/
    15

    View full-size slide

  16. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    New Jenkins Website
    16

    View full-size slide

  17. © 2016 CloudBees, Inc. All Rights Reserved
    • Wait, why is this part of the 2.0 release? Can’t you just
    update the website whenever?
    • Sure, but like we said, the changes we’re making to the
    website are to address a lot of the things 2.0 proper is
    addressing:
    – On-boarding
    – Plugin discovery
    – Documentation
    – Examples and resources
    Website as part of release?
    17
    17

    View full-size slide

  18. © 2016 CloudBees, Inc. All Rights Reserved
    New website: the guts
    • Previous website
    – Drupal
    – Dynamically generated
    – Hard to contribute to - gotta get an account, submit a blog
    post, etc…
    • Current website
    – Static site generation
    – Awestruct and Asciidoc
    – Contributing? Just submit a pull request to
    https://github.com/jenkins-infra/jenkins.io and tada!
    18

    View full-size slide

  19. © 2016 CloudBees, Inc. All Rights Reserved
    Better home for documentation and reference
    • What we’re calling “Solutions Pages”
    – Landing pages for collections of docs, blog posts, reference
    material and advice for specific Jenkins use cases.
    – i.e., a Ruby solution page, a Docker solution page, etc
    • A one-stop-shop for finding what you *need* to know for your
    Jenkins usage.
    • ASAP: The Jenkins definitive guide, a real browsable end-user
    documentation
    19

    View full-size slide

  20. © 2016 CloudBees, Inc. All Rights Reserved
    http://jenkins-ci.org
    20

    View full-size slide

  21. © 2016 CloudBees, Inc. All Rights Reserved
    https://jenkins.io
    21

    View full-size slide

  22. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Better Out-of-the-box UX

    View full-size slide

  23. © 2016 CloudBees, Inc. All Rights Reserved
    Out of the Box User Experience
    • New setup wizard!
    • Security configuration is part of the setup wizard!
    – …because we all forget to configure security sometimes.
    • A better, broader set of plugins included by default!
    – Less need to go hunting through 1100+ plugins.
    23

    View full-size slide

  24. © 2016 CloudBees, Inc. All Rights Reserved
    Security - Unlock jenkins
    24

    View full-size slide

  25. © 2016 CloudBees, Inc. All Rights Reserved
    Plugins installation wizard
    25

    View full-size slide

  26. © 2016 CloudBees, Inc. All Rights Reserved
    Plugins installation wizard
    26

    View full-size slide

  27. © 2016 CloudBees, Inc. All Rights Reserved
    Plugins installation wizard
    27

    View full-size slide

  28. © 2016 CloudBees, Inc. All Rights Reserved
    Security – Create 1st administrator account
    28

    View full-size slide

  29. © 2016 CloudBees, Inc. All Rights Reserved
    Let’s go
    29

    View full-size slide

  30. © 2016 CloudBees, Inc. All Rights Reserved
    Configure Global Security – Secured by default!
    30

    View full-size slide

  31. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    User Interface Improvements
    31

    View full-size slide

  32. © 2016 CloudBees, Inc. All Rights Reserved
    User Interface Improvements
    • Improved “New Item” page
    • Jobs configuration pages are going to be less messy!
    – Tabs for everyone!
    • New Global Tool Configuration page
    • More consistent terminology (exemple: agent vs node vs
    slave)
    32

    View full-size slide

  33. © 2016 CloudBees, Inc. All Rights Reserved
    New item page
    33

    View full-size slide

  34. © 2016 CloudBees, Inc. All Rights Reserved
    New configuration tabs
    34

    View full-size slide

  35. © 2016 CloudBees, Inc. All Rights Reserved
    Global Tool Configuration
    35

    View full-size slide

  36. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline as Code
    36

    View full-size slide

  37. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline as Code
    • Introduce “pipeline” as a new type in Jenkins
    • Codify an implicit series of stages/steps directly in your job
    definition or into an explicit Jenkinsfile in your/a source
    repository
    • Built-in global library to share Pipeline scripts, functions,
    variables across jobs on your master.
    • Extend the DSL with your own steps.
    • Durable tasks keep running while the Jenkins master restarts.
    37

    View full-size slide

  38. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline as Code
    • Execute arbitrary build steps in parallel easily.
    • Have jobs wait for input from users before continuing to the next
    step.
    • No more need to glue multiple jobs together to do one
    connected pipeline across multiple nodes or repos!
    • Run part of the job on one node, then switch to another node!
    • Check out multiple SCM repositories into one job!
    • Resumability from checkpoints (CloudBees Jenkins Platform only)
    38

    View full-size slide

  39. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline sample
    node('docker') {
    checkout scm
    /* Grab the abbreviated SHA1 of our pipeline’s commit.
    */
    sh 'git rev-parse HEAD > GIT_COMMIT'
    def shortCommit = readFile('GIT_COMMIT').take(6)
    stage 'Build'
    def image = docker.build("jenkinsciinfra/bind:build-${shortCommit}")
    stage 'Deploy'
    image.push()
    }
    39
    github.com/jenkinsci/pipeline-examples

    View full-size slide

  40. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline configuration
    40

    View full-size slide

  41. © 2016 CloudBees, Inc. All Rights Reserved
    Jenkinsfile
    41
    github.com/jenkins-demo

    View full-size slide

  42. © 2016 CloudBees, Inc. All Rights Reserved
    Snippet Generator
    42

    View full-size slide

  43. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline Stage View
    43

    View full-size slide

  44. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline Stage View
    44

    View full-size slide

  45. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline Stage View
    45

    View full-size slide

  46. © 2016 CloudBees, Inc. All Rights Reserved
    • Multi-Branch Pipeline Plugin
    – Job configuration only contains reference to the
    SCM (Git/GitHub, BitBucket, …)
    – Jenkins takes Pipeline from Jenkinsfile in SCM
    – Jenkins creates separate subtasks for branches, builds and
    reports results separately
    – Pull-request builds
    • Organization Folder Plugin (Same thing for GitHub and
    BitBucketorgs)
    – 1 single spec in Jenkins for the many projects
    – Jenkins creates separate multi-branch folders for each
    repository
    Pipeline Features. Multi-Branch
    46

    View full-size slide

  47. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline Multi-Branch
    47

    View full-size slide

  48. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline Multi-Branch
    48

    View full-size slide

  49. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline Organization Folder
    49
    github.com/jenkins-demo

    View full-size slide

  50. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline Organization Folder
    50
    github.com/jenkins-demo

    View full-size slide

  51. © 2016 CloudBees, Inc. All Rights Reserved
    Pipeline Organization Folder
    51
    github.com/jenkins-demo

    View full-size slide

  52. © 2016 CloudBees, Inc. All Rights Reserved
    • More plugin integrations
    • Pipeline syntax highlighting and docs in IDE
    • Graphical editor of Jenkins pipelines
    Pipeline - Coming soon…
    52

    View full-size slide

  53. © 2016 CloudBees, Inc. All Rights Reserved
    Graphical Pipeline Editor
    53
    https://github.com/jenkinsci/pipeline-editor-plugin

    View full-size slide

  54. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    2.x Timeline / Roadmap
    54

    View full-size slide

  55. © 2016 CloudBees, Inc. All Rights Reserved
    55

    View full-size slide

  56. © 2016 CloudBees, Inc. All Rights Reserved
    2.x Timeline / Roadmap
    •April 21st:
    – Jenkins 2.0 was tagged and released
    •April 25th:
    – Jenkins 2.0 is announced
    •This summer (~July)
    – The first LTS based on 2.x will be released
    – 1.x maintenance will be stopped
    56

    View full-size slide

  57. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Road Beyond 2.0

    View full-size slide

  58. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    2.0 Retrospective
    58

    View full-size slide

  59. © 2016 CloudBees, Inc. All Rights Reserved
    2.0 Retrospective
    • Discussing “2.0” started conversations about much bigger and
    involved changes
    • The “weekly incremental release” model has left big
    challenges unaddressed
    • Aging user interface layer is difficult to substantially improve
    59
    https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+2.0

    View full-size slide

  60. © 2016 CloudBees, Inc. All Rights Reserved
    ten·ta·tive (tĕn′tə-tĭv)
    adj. Not fully worked out, concluded, or agreed upon; provisional
    60

    View full-size slide

  61. © 2016 CloudBees, Inc. All Rights Reserved
    Themes
    Continuous Delivery
    Scalability & Availability
    User Experience
    61

    View full-size slide

  62. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Continuous Delivery
    62

    View full-size slide

  63. © 2016 CloudBees, Inc. All Rights Reserved
    Continuous Delivery
    • Model “Application” and “Environments” in Jenkins
    • Inform Jenkins of what happens with them
    – synchronous: build owns the deployment
    – asynchronous: external reporters/deployment tools notify
    Jenkins upon completion
    • Expose what’s “in” Environments
    – Differences between deployments, e.g. commits, tickets, etc
    63

    View full-size slide

  64. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Scalability & Availability
    64

    View full-size slide

  65. © 2016 CloudBees, Inc. All Rights Reserved
    Storage & Availability
    • Configurations, build records, logs, fingerprints and artifacts
    all currently live on master node
    • Reduce local disk dependency on master node
    • Storage backend pluggability
    – BYODB (bring your own data backend)
    65

    View full-size slide

  66. © 2016 CloudBees, Inc. All Rights Reserved
    Storage & Availability: Clustering
    • Break a single-JVM master node into a conceptual
    “master” across multiple JVMs
    • Prevent need for “hard downtime” to modify, etc
    • Must still run as a single instance
    • Evaluate multi-tenancy via:
    – Access controls
    – Per-folder configuration separation
    – ?
    66

    View full-size slide

  67. © 2016 CloudBees, Inc. All Rights Reserved
    Storage & Availability: Clustering
    • Defer more “master” work out to separate JVMs
    • Develop more “stateless” components which can scale
    horizontally
    67

    View full-size slide

  68. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    More UI improvements …
    68

    View full-size slide

  69. © 2016 CloudBees, Inc. All Rights Reserved
    Plugin Manager…
    69

    View full-size slide

  70. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean
    A new user experience for Jenkins
    70
    https://jenkins.io/projects/blueocean/

    View full-size slide

  71. © 2016 CloudBees, Inc. All Rights Reserved
    • Modern JavaScript toolchain
    – ES6, React, NPM
    – js-modules
    • Client side Extension points
    – Blue Ocean libraries are built on ES6 and React.js and provide
    an extensible client side component model
    • Server Sent Events
    – UI update in real time
    Modern Technologies
    71

    View full-size slide

  72. © 2016 CloudBees, Inc. All Rights Reserved
    Jenkins Design “Language”
    72

    View full-size slide

  73. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean – Dashboard

    View full-size slide

  74. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean – Pipeline Job - Activity

    View full-size slide

  75. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean – Pipeline Job - Branches

    View full-size slide

  76. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean – Pipeline Job – Pull requests

    View full-size slide

  77. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean – Pipeline Build - KO

    View full-size slide

  78. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean – Pipeline Build - OK

    View full-size slide

  79. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean - Notifications

    View full-size slide

  80. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean - Notifications

    View full-size slide

  81. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean - Notifications

    View full-size slide

  82. © 2016 CloudBees, Inc. All Rights Reserved
    Blue Ocean - Personalized view

    View full-size slide

  83. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Conclusion

    View full-size slide

  84. © 2016 CloudBees, Inc. All Rights Reserved
    • Jenkins 2.0 is a new start for the community.
    • But 2.0 is just a drop-in replacement for 1.x
    – With the exception of the servlet 3.1 (Java EE 7) container pre-
    requisite (Apache Tomcat 8, Wildfly 8, Glassfish 4, Websphere
    9...) and the removal of the AJP connector from the embedded
    Winstone-Jetty container
    • All the technical evolutions (like javascript modularization) are in
    place to revolution Jenkins in a near future.
    • The usage of major versions is a good change which will enforce to
    identify and accept breaking changes to
    – define a clearer roadmap for users ( 3.x, 4.x, …. )
    – organize this middle/long term work within the team
    Conclusion
    84

    View full-size slide

  85. © 2016 CloudBees, Inc. All Rights Reserved
    Try out Jenkins 2.x now!
    • Jenkins 2 is here !!
    • Downloadand discover it from
    – jenkins.io / jenkins.io/2.0
    • Give a try to weekly releases and share your feedback with
    the community
    [email protected]
    – #jenkins IRC channel on Freenode
    85

    View full-size slide

  86. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    Questions and (perhaps) Answers

    View full-size slide

  87. © 2016 CloudBees, Inc. All Rights Reserved
    • Jenkins project
    – Website: https://jenkins.io
    – GitHub: https://github.com/jenkinsci/
    • Demo
    – Samples: https://github.com/jenkins-demo
    • CloudBees
    – Website: https://www.cloudbees.com
    – CloudBees Jenkins Platform
    o https://www.cloudbees.com/products/cloudbees-jenkins-
    platform
    Useful links
    87

    View full-size slide

  88. © 2016 CloudBees, Inc. All Rights Reserved
    Greatings
    •Thanks to R. Tyler Croy, Oleg Nenashev, James
    Dumay for all the inputs to create this
    presentation
    88

    View full-size slide

  89. © 2016 CloudBees, Inc. All Rights Reserved
    © 2016 CloudBees, Inc. All Rights Reserved
    89

    View full-size slide