©2015CloudBees,Inc.AllRightsReserved
1
©2015CloudBees,Inc.AllRightsReserved
Workflow, Containers, &
Beyond
Kohsuke Kawaguchi
Creator of Jenkins
@kohsukekawa
©2015CloudBees,Inc.AllRightsReserved
2
© 2015 CloudBees, Inc. All Rights Reserved
2
©2015CloudBees,Inc.AllRightsReserved
3
©2015CloudBees,Inc.AllRightsReserved
4
©2015CloudBees,Inc.AllRightsReserved
5
©2015CloudBees,Inc.AllRightsReserved
6
©2015CloudBees,Inc.AllRightsReserved
7
node(“linux”) {
git ‘https://github.com/foo/bar.git’
sh “mvn install”
parallel(
{ sh “./regression-test.sh” },
{ sh “./performance-test.sh” }
)
…
}
©2015CloudBees,Inc.AllRightsReserved
8
Key Features
• Pipeline as Code
• Parallel, other interesting control flow
• Allocate slave nodes and workspaces
–As many as you like, whenever and wherever
• Standard project concepts
–SCM, artifacts, test reports, …
©2015CloudBees,Inc.AllRightsReserved
9
Build #153Build #153
©2015CloudBees,Inc.AllRightsReserved
10
1.10
©2015CloudBees,Inc.AllRightsReserved
11
Reusing Workflow
©2015CloudBees,Inc.AllRightsReserved
12
node(“linux”) {
git ‘https://github.com/foo/bar.git’
sh “mvn install”
parallel(
{ sh “./regression-test.sh” },
{ sh “./performance-test.sh” }
)
…
}
©2015CloudBees,Inc.AllRightsReserved
13
acme_service “bar”
©2015CloudBees,Inc.AllRightsReserved
14
Custom DSLs & Push
©2015CloudBees,Inc.AllRightsReserved
15
vars/acme_service.groovy
def call(name) {
node(“linux”) {
git “https://github.com/foo/${name}.git”
sh “mvn install”
parallel(
{ sh “./regression-test.sh” },
{ sh “./performance-test.sh” }
)
…
}
}
©2015CloudBees,Inc.AllRightsReserved
16
Use Cases
• I have lots of repos that are built, tested, &
deployed the same way (e.g., micro-services)
• I want to maintain centralized control of the
build process
• My product developers aren’t Jenkins experts
©2015CloudBees,Inc.AllRightsReserved
17
Using Workflow is as easy as 1, 2, 3
1. Create “Jenkinsfile” in repo
2. Create job in Jenkins
3. Specify SCM URL
©2015CloudBees,Inc.AllRightsReserved
18
To keep it simple …
©2015CloudBees,Inc.AllRightsReserved
19
©2015CloudBees,Inc.AllRightsReserved
20
© 2015 CloudBees, Inc. All Rights Reserved
20
©2015CloudBees,Inc.AllRightsReserved
21
©2015CloudBees,Inc.AllRightsReserved
22
Containerized apps
©2015CloudBees,Inc.AllRightsReserved
23
Docker Commons Plugin
©2015CloudBees,Inc.AllRightsReserved
24
Transforming container
©2015CloudBees,Inc.AllRightsReserved
25
Docker Hub Notification
Trigger plugin
©2015CloudBees,Inc.AllRightsReserved
26
Validation of containers
©2015CloudBees,Inc.AllRightsReserved
27
Promotion of containers
©2015CloudBees,Inc.AllRightsReserved
28
©2015CloudBees,Inc.AllRightsReserved
29
Too many image problems
• Image names change all the time
• ‘latest’ changes what it points to
• Image gets transformed all the time
©2015CloudBees,Inc.AllRightsReserved
30
©2015CloudBees,Inc.AllRightsReserved
31
Docker Traceability Plugin
©2015CloudBees,Inc.AllRightsReserved
33
Demo Scenario
base
image
app
image
app src
base
src
©2015CloudBees,Inc.AllRightsReserved
34
©2015CloudBees,Inc.AllRightsReserved
35
© 2015 CloudBees, Inc. All Rights Reserved
35
©2015CloudBees,Inc.AllRightsReserved
36
Title goes here
36
©2015CloudBees,Inc.AllRightsReserved
37
©2015CloudBees,Inc.AllRightsReserved
38
Title goes here
38
©2015CloudBees,Inc.AllRightsReserved
39
Installation growth y/y
©2015CloudBees,Inc.AllRightsReserved
40
Next 10 years
©2015CloudBees,Inc.AllRightsReserved
41
©2015CloudBees,Inc.AllRightsReserved
42
Jenkins needs to adjust to this change
• Our pitch on website hasn’t changed
• We still bundle CVS & Subversion plugins
• Lots of new stuff being done, but requires
hand-assembly
©2015CloudBees,Inc.AllRightsReserved
43
Jenkins
2.0
©2015CloudBees,Inc.AllRightsReserved
44
Goals
• Claim Continuous Delivery space
–We have lots of pieces, but we are not
communicating any of them very well
• Revisit out-of-the-box experience of Jenkins
–Things people use everyday has been stale
• Keep the ecosystem that makes Jenkins great
2.0 sends a clear signal that we are moving
forward
©2015CloudBees,Inc.AllRightsReserved
45
Aspirational Timeline
• Announce intention publicly (now)
• Discuss and nail the details of 2.0 (Sep-Oct)
• Execution (Oct-Dec)
–Periodic alpha/beta releases & feedbacks
–PR activities
–RC
• Work on plugin “2.0 readiness” (Jan)
–Ensure key plugins are compatible
• Release (end-Jan)
• Drop 1.x development
©2015CloudBees,Inc.AllRightsReserved
46
Pitfalls to avoid
Developers
not getting
it
©2015CloudBees,Inc.AllRightsReserved
47
Pitfalls to avoid
Scope
creep
©2015CloudBees,Inc.AllRightsReserved
48
Pitfalls to avoid
Disruptive 2.0
©2015CloudBees,Inc.AllRightsReserved
49
Pitfalls to avoid
Breaking
plugins
©2015CloudBees,Inc.AllRightsReserved
50
Pitfalls to avoid
Data
incompatibilit
y
©2015CloudBees,Inc.AllRightsReserved
51
Pitfalls to avoid
Massive
Internal
Changes
©2015CloudBees,Inc.AllRightsReserved
52
Pitfalls to avoid
Focusing too
much on
internals
©2015CloudBees,Inc.AllRightsReserved
53
That means …
• Jenkins 2.0 needs to be limited-scope
“evolutionary improvements” exercise
• Not “let’s start from scratch” kind of 2.0
©2015CloudBees,Inc.AllRightsReserved
54
Three Pillars
1. Messaging changes
2. Out of the box experience that
caters to CD needs
3. Targeted internal plumbing
changes
©2015CloudBees,Inc.AllRightsReserved
55
Messaging
•jenkins-ci.org → jenkins.cd
•More up-to-date feature list page
•Authoritative & curated getting
started guide
•Easier-to-contribute blog
•Room for future growth
–Better plugin directory
©2015CloudBees,Inc.AllRightsReserved
56
Messaging Infra
•Infra that enables
–Drupal → static site generation
–Confluence retirement (?)
©2015CloudBees,Inc.AllRightsReserved
57
OOTB Experience
•Initial setup wizard
–Recommend initial set of plugins
•UX refresh
©2015CloudBees,Inc.AllRightsReserved
58
OOTB Experience for CD
•Deliver modern functionalities,
OOTB
–Workflow
–Pipeline as Code
–Folders
•CloudBees is open-sourcing
workflow stage view
©2015CloudBees,Inc.AllRightsReserved
59
Internals
• Policy for removing deprecated APIs
• Brand-new frontend development method
• Selected library upgrades
–Limited to “should be compatible” kinds
• Java 8 & Servlet 3.0
©2015CloudBees,Inc.AllRightsReserved
60
©2015CloudBees,Inc.AllRightsReserved
61
© 2015 CloudBees, Inc. All Rights Reserved
61
©2015CloudBees,Inc.AllRightsReserved
62
©2015CloudBees,Inc.AllRightsReserved
©2015CloudBees,Inc.AllRightsReserved
63
Integration/consumption of containers
ircbot: 51
jira: 7
wiki: 13
©2015CloudBees,Inc.AllRightsReserved
64

Workflow, container, and beyond

Editor's Notes

  • #6 assembly a complex CD workflow today is like a LEGO model assembly
  • #7 Workflow does this in one job
  • #8 and in text / not just calling other jobs, but do stuff within itself
  • #10 Tolerate loss of master & slaves
  • #13 and in text / not just calling other jobs, but do stuff within itself
  • #14 and in text / not just calling other jobs, but do stuff within itself
  • #15 As an architect of the CD pipeline, you can define them as code in one place. Then product teams get to reuse them
  • #22 Docker is driving changes in software development, and Jenkins is no exception. I want to discuss the continuous delivery in the world of containers
  • #23 Let’s start with the simplest use case, containerizing app / how hard can it be? / Even simple things like this can be made simpler / Credentials management
  • #24 Common credential across all the docker plugins
  • #25 Your container building often depends on another container.
  • #27 trigger plugin is also useful / ex. JIRA + LDAP
  • #28 If a test pass, what do you do? You want to publish images to another repository / tag.
  • #29 You’ve got stuff coming in, test it, reject it, test it, accept it / the same problem with these guys /
  • #30 Not a new problem, the same with files / but Docker is worse
  • #31 We need our own tracking tags
  • #32 Tags get scanned everywhere / find where it is / And what we released so far is just a starter. We are going to expand it
  • #33 for example, know what went into that container / important view point because it lets you focus on how things are flowing through the system
  • #38 I did first handful of plugins myself
  • #47 We know how to assemble LEGO / our pain points are often different.
  • #48 Need to have enough to justify 2.0 but not everything for everyone / direction setting
  • #49 We know how to assemble LEGO / our pain points are often different.
  • #50 We know how to assemble LEGO / our pain points are often different.
  • #51 We know how to assemble LEGO / our pain points are often different.
  • #52 We know how to assemble LEGO / our pain points are often different.
  • #53 We know how to assemble LEGO / our pain points are often different.
  • #64 References to images get baked somewhere / these ideally live in a VCS / trigger activities in Jenkins
  • #65 And then you start putting things together / the whole thing starts to look eerily similar. Artifacts are different, languages are different, but they all follow the same paradigm.