puppetconf 2016: continuous delivery and devops with jenkins and puppet enterprise – carl caum,...
TRANSCRIPT
Sound familiar?
5
“Why won’t Ops just make this change? It’s small”
“Don’t the developers know anything about logging?”
“Why does it take so long for Ops to deploy this code?”
“Why can’t the developers build packages?”
“The devs don’t care that this code doesn’t scale.”
“Ops won’t let us use the latest Ruby for some reason.”
…. except not really though
Product Delivery Process
Problem Statement
Problem Prioritization
Design / Development Deployment Monitoring
Engineering
Ops Product management DevOps? DevOps?
DevOps?
High-performing organizations are decisively outperforming their lower-performing peers in terms of throughput.
Because they address security at every stage, high-performing teams spend less time fixing security issues.
17
The DevOps Trinity
17
Upstream Downstream
People & Culture
Process & Practices
Tools & Technology
Agile, Scrum, Kanban PMBOK, ITIL, etc
Point Tools, Grassroots, Rapid Change
Move Fast, Innovate Maintain Quality Stability, Uptime
Enterprise class, Stable, Repeatable, traceable
Define Plan Code Build Integrate Test Release Deploy Operate
Culture of Experimentation and Learning Enforce a culture of continuous experimentation, risk taking, and
learning.
22
24
The DevOps Trinity and the Chasms
24
Upstream Downstream
People & Culture
Process & Practices
Tools & Technology
Agile, Scrum, Kanban PMBOK, ITIL, Waterfall etc
Point Tools, Grassroots, Rapid Change
Move Fast, Innovate Maintain Quality Stability, Uptime
Enterprise class, Corp procurement, Stable
Define Plan Code Build Integrate Test Release Deploy Operate
25
The Foundation
25
Upstream Downstream
People & Culture
Process & Practices
Tools & Technology
Agile, Scrum, Kanban PMBOK, ITIL, Waterfall etc
Point Tools, Grassroots, Rapid Change
Move Fast, Innovate Maintain Quality Stability, Uptime
Enterprise class, Corp procurement, Stable
Define Plan Code Build Integrate Test Release Deploy Operate
27
continuous deployment
continuous delivery continuous integration
DevOps → Cultural focus on shared objectives Reliable
Repeatable Fast
agile
CD and DevOps in Context
27
28
Software changes continuously deployed to live production
continuous deployment
Software changes continuously delivered to stakeholders in any environment
continuous delivery continuous integration
Automated commit, build and testing of code in the development environment
Feedback
Rapid Changes
Dis
cipl
ine
agile
An incremental approach to identifying, prioritizing, and coordinating feature development
Development Production / Prod-like Live Production
Env.
St
age
Release Deploy Monitor
Upstream (left) Downstream (right) Define Plan Code Commit Build Non-Func Test Scan Integrate Int. Test Package Deploy Acct. Test Load Test
Change Mgt.
Production
CD and DevOps in Context
28
DevOps → Cultural focus on shared objectives
Continuous delivery doesn’t mean every change is deployed to production ASAP
But with every change it is release ready
(which includes depoyable!)
32
Complex Delivery Pipelines
Delivery of App and Config
Robust and Highly Available
Results Report
SOURCE CODE
CONTROL SYSTEM
Code Commit
</> Development Production
Continuous Integration/Delivery
Commit Build Test Stage Deploy
P P P
Jenkins – #1 Automation Platform for CI àCD
33 33 © 2016 CloudBees, Inc. All Rights Reserved.
Code & Commit Build & Config Scan & Test Release Deploy
Over 1.2 Million Users 1200+ plugins cover every stage of delivery
Jenkins is the Hub of Continuous Delivery
Mission Possible: Make CD Accessible to All
Cross functional
Accessible
Simplified
Visual
Maintainable
41 41
Drive CD with Jenkins Pipeline
Development Production
Commit Build Stage Deploy
? ?
Pipelines Need: P Branching P Looping
P Restarts P Checkpoints P Manual Input
Sonar Test
Selenium Test
Perf Test
Jenkins Pipeline
Pipeline as Code
Introduce “pipeline” as a first class in Jenkins
Codify stages into an explicit Jenkinsfile in your source repository
Resumability/durability of the pipeline state
Extend the DSL with your own steps
github.com/jenkinsci/pipeline-examples
43
Pipeline DSL
node('docker'){checkoutscm/*GrabtheabbreviatedSHA1ofourpipeline’scommit.*/sh'gitrev-parseHEAD>GIT_COMMIT'defshortCommit=readFile('GIT_COMMIT').take(6)stage'Build'defimage=docker.build("jenkinsciinfra/bind:build-${shortCommit}")stage'Deploy'image.push()}
Tools & Technologies enable “crossing the chasm”
Normalized
✓ Language and practice agnostic
✓ Not Dev or Ops specific
✓ Distributed
Rich Integration Support
✓ Tools as microservices
✓ Modular
Automated
✓ Repeatability
✓ Reportability
✓ Flexibility
Confidence In Downstream Deliverables
✓ Support supply-chain
✓ Traceability
✓ Immutability
✓ Measure and report
Scale To Enterprise
✓ Cross-domain visibility metrics
✓ Security and governance
✓ Supported
49
The toolchain … across all technologies.
Version control Infrastructure automation Continuous Integration Deployment
automation Monitoring
and others …
and others …
and others …
Where to start
Infrastructure as Code
Collaboration Iteration Fast Feedback Visibility
Infrastructure Automation
Version Control & Peer Review
Continuous Integration &
Delivery
Automated Testing
Deployment Automation
Infrastructure as code and continuous delivery pipelines push
quality to the left, getting ever closer to the keyboard.
Push quality left
● Infrastructure code is portable ● Infrastructure code is repeatable ● Puppet is idempotent (same result
regardless of beginning state) ● Puppet is declarative (less DevOoops)
Example application App relies on multiple services that span infrastructure
Glass Fish F5 LB
App API
Kerberos
SSH
Log stash
WebSphere
App API
SSH
Log stash
F5 LB MS SQL
Database
HTTP
Example application Use Puppet language to model your application
WebSphere App API
SSH Log stash
F5 LB
MS SQL
● Services
● Relationships
● Dependencies
● Instances
– Dev, Staging, Production, etc.
Code management
● Know exactly when your Puppet code deployments are complete
● Control who can deploy code into what areas with built-in integration to Role-Based Access Control
Deploy code confidently with a new command line interface and API
Infrastructure Pipeline https://github.com/puppetlabs/jenkins-pipeline-puppet-enterprise-plugin/blob/master/examples/Jenkinsfile-infrastructure_pipeline
Application Deployments https://github.com/puppetlabs/jenkins-pipeline-puppet-enterprise-plugin/blob/master/examples/Jenkinsfile-application_service_pipeline
Canary Deployments https://github.com/puppetlabs/jenkins-pipeline-puppet-enterprise-plugin/blob/master/examples/Jenkinsfile-canary_deployments
Phased Deployments https://github.com/puppetlabs/jenkins-pipeline-puppet-enterprise-plugin/blob/master/examples/Jenkinsfile-canary_deployments