Upload
others
View
17
Download
0
Embed Size (px)
Citation preview
©2015Clou
dBees,Inc.A
llRightsReserved Con$nuousDeliveryPipelineswithJenkins
Workflow
DevOpsDCJan12,2016
©2015Clou
dBees,Inc.A
llRightsReserved
About Me
HarshalDharia
SoluDonsArchitect
DevOps,ConDnuousDelivery,FasterSoGwareDelivery
©2015Clou
dBees,Inc.A
llRightsReserved
Tonight’s Topics
3
• CI, CD, Jenkins, and the CloudBees Jenkins Platform
• CD Pipelines with Workflow
• CD-as-Code (pipeline-as-code)
• What next: Near-term CB-provided enhancements!
©2015Clou
dBees,Inc.A
llRightsReserved
4
“Software is eating the world.”
“Every business is in the software business.”
“It’s an application economy.”
©2015Clou
dBees,Inc.A
llRightsReserved
How Do You Deliver Better Software Faster?
Development Produc$on
©2015Clou
dBees,Inc.A
llRightsReserved
Continuous Delivery and Automation are Key
Development Produc$on
Commit Build Test Stage Deploy
FeedbackLoop
$TheBusiness
©2015Clou
dBees,Inc.A
llRightsReserved
Continuous Delivery Needs an Automation Engine
ComplexDeliveryPipelines
DeliveryofAppandConfig
RobustandHighlyAvailable
ResultsReport
SOURCECODECONTROLSYSTEM
CodeCommit
</> Development Produc$on
Con$nuousIntegra$on/Delivery
Commit Build Test Stage Deploy
PPP
©2015Clou
dBees,Inc.A
llRightsReserved
Jenkins is the Hub of the CD/DevOps Ecosystem Over
1000JenkinsPlugins
Integra$onwithover100DevOpsTools
Orchestra$onoftheDevOps
Toolchain
End-to-EndCDPipelineManagement
Code&Commit Build&Config Scan&Test Release Deploy
©2015Clou
dBees,Inc.A
llRightsReserved
What is the CloudBees Jenkins Platform (CJP)?
9
Build Commit Test Stage Deploy
Management,Monitoring&
AlerDng
ClusterMgmt,Plug-inMgmtAnalyDcs
SharedResourcesDashboards
CDPipelineOrchestraDon&ExecuDonJenkinsWorkflowwithCheckPoint,StageView,branchingandrestarts
OpenSourceJenkinsPlugins
OSSJenkinsCoreUser
Management
RBAC/SSO/SecurityTeamMgmt
OrganizaDonMgmt
ExpertTechnicalSupport
PlaDnum,Gold
TSMCustomerSuccess
Jenkins Platform
NextGeneraDonInfrastructureSupportDocker,AWS,PivotalCloudFoundry,Azure,RHOpenShiG
AdvancedJenkinsPerformanceHighAvailability,Security,OpDmizedPerformance
CerDfiedJenkins&PluginsLongTermSupportofcerDfiedJenkinscore&plugins
©2015Clou
dBees,Inc.A
llRightsReserved
Top 10 Features (Not in OSS)
HighAvailability
Templates RoleBasedAccessControl
SharedBuildNodes
AnalyDcs
NextGenInfrastructure
Support
UpdateCenter
EnterpriseSupport
ClusterOperaDons
SingleSignOn
©2015Clou
dBees,Inc.A
llRightsReserved
Tonight’s Topics
11
• CI, CD, Jenkins, and the CJP
• CD Pipelines with Workflow
• CD-as-Code (pipeline-as-code)
• What next: Near-term CB-provided enhancements!
©2015Clou
dBees,Inc.A
llRightsReserved
Jenkins Powered CD Pipelines: Jenkins Workflow
Development Produc$on
Commit Build Stage Deploy
? ?
PipelinesNeed:P Branching
P Looping
P Restarts
P Checkpoints
P Manual Input
SonarTest
SeleniumTest
PerfTest
Jenkins Workflow
©2015Clou
dBees,Inc.A
llRightsReserved
Workflow until today
13
• Many atomic jobs • Hard to share variables/state
between jobs • Limited logic • Mix build triggers, parameterized
build … • Job chaining
©2015Clou
dBees,Inc.A
llRightsReserved
14
BUILDING CD PIPLINES IN JENKINS
CIRCA 2013
©2015Clou
dBees,Inc.A
llRightsReserved
Key Features of Workflow
GroovyBased
Development Produc$on
Commit Build Test Stage Deploy
Jenkins Workflow
Auto-ResumeJobs
DedicateJobstoaNode
Resumeajobfroma
checkpoint
HumanInputintegratedintoflow
IntegraDonwithDocker
©2015Clou
dBees,Inc.A
llRightsReserved
CloudBees Jenkins Workflow Stage View
JenkinsWorkflowStageView
SOURCECODECONTROLSYSTEM
CodeCommit
</>
Development Produc$onJenkins Workflow
©2015Clou
dBees,Inc.A
llRightsReserved
©2015Clou
dBees,Inc.A
llRightsReserved
Workflow Demo
17
©2015Clou
dBees,Inc.A
llRightsReserved
Tonight’s Topics
18
• CI, CD, Jenkins, and the CJP
• CD Pipelines with Workflow
• CD-as-Code (pipeline-as-code)
• What next: Near-term CB-provided enhancements!
©2015Clou
dBees,Inc.A
llRightsReserved
Pipeline-as-code – MultiBranch Workflow
19
Master
FeatureBranch1
FeatureBranch2
MasterPipelineJob
FB1PipelineJob
FB2PipelineJob
©2015Clou
dBees,Inc.A
llRightsReserved
Pipeline-as-code – Organization Folders
©2015Clou
dBees,Inc.A
llRightsReserved
Pipeline-as-code - Jenkinsfile • Central glue for pipeline-as-code • Must be placed in the root of the repository
– Groovy Based – Essentially your workflow script
21
Reference:hdp://jenkins-ci.org/content/pipeline-code-mulDbranch-workflows-jenkins
FolderComputaDonAnalyzeEachRepository
withinFolder
CreateaJenkinsWorkflowJobforEach
RepositorywithJenkinsfile
©2015Clou
dBees,Inc.A
llRightsReserved
©2015Clou
dBees,Inc.A
llRightsReserved
Pipeline-as-code – Demo
22
©2015Clou
dBees,Inc.A
llRightsReserved
Tonight’s Topics
23
• CI, CD, Jenkins, and the CJP
• CD Pipelines with Workflow
• CD-as-Code (pipeline-as-code)
©2015Clou
dBees,Inc.A
llRightsReserved
Announcements
24
• Jenkins 2.0 – Get involved - https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+2.0
• PaaS Jenkins • Newsletter
– Subscribe to Jenkins newsletter “Continuous Information” here: https://www.cloudbees.com/jenkins/newsletter
We’re Hiring!!!
©2015Clou
dBees,Inc.A
llRightsReserved
Resources • Jenkins workflow refcard
– Email [email protected]
• Official Docker image – $ docker pull jenkins
• Dockerized Workflow Demo– $ docker run -p 8080:8080 -p 8081:8081 -p 8022:22 -
ti jenkinsci/workflow-demo
– https://github.com/jenkinsci/workflow-plugin#demo
©2015Clou
dBees,Inc.A
llRightsReserved
Future Topics
26
• Reduce Friction within DevOps with Docker & Jenkins
– Workflow with Docker
– Build and publish Docker images
– Docker Shared Build Nodes with AWS ECS or Docker Swarm