High-velocity organizations deliver change to their customers quickly in a repeatable and predictable way. This talk will explore some pre-requisites and best practices that will help your team move to safe, continuous delivery of your Rails applications. We will demonstrate the path from code commit, to packaged application, to an updated production environment. All of the necessary steps along the way will be fully automated using Chef Delivery. You will leave with some new ideas, practices, and techniques your team can adopt, continuously delivering value to your customers.
3. Robb Kidd
• Developer, Community Engineering at Chef
• @robbkidd | robb@chef.io
Nathan Smith
• Developer, Core Engineering at Chef
• @nlsmith | smith@chef.io
5. Challenges
Manual processes
Weeks to setup new systems or software
Legacy systems and tools
Inflexible,hard-to-change hardware and software
Organizational silos
Unwieldy divisions of responsibility
Infrequent, large releases
Fear of deployment due to risk to SLAs
Regulatory burdens
Compliance bottleneck at the end of a project
6. Idea Value
Manual processes
Weeks to setup new systems or software
Legacy systems and tools
Inflexible,hard-to-change hardware and software
Organizational silos
Unwieldy divisions of responsibility
Regulatory burdens
Compliance bottleneck at the end of a project
Infrequent, large releases
Fear of deployment due to risk to SLAs
Automation
New systems and software updates deployed in minutes
Solutions to the challenges
7. Idea Value
Manual processes
Weeks to setup new systems or software
Legacy systems and tools
Inflexible,hard-to-change hardware and software
Organizational silos
Unwieldy divisions of responsibility
Regulatory burdens
Compliance bottleneck at the end of a project
Infrequent, large releases
Fear of deployment due to risk to SLAs
Dynamic infrastructure
Easy migration to on-demand, cloud-based infrastructure and
management of heterogeneous networks
Automation
New systems and software updates deployed in minutes
Solutions to the challenges
8. Idea Value
Manual processes
Weeks to setup new systems or software
Legacy systems and tools
Inflexible,hard-to-change hardware and software
Organizational silos
Unwieldy divisions of responsibility
Regulatory burdens
Compliance bottleneck at the end of a project
Infrequent, large releases
Fear of deployment due to risk to SLAs
Increased cooperation and trust
Teams are aligned towards common goals
Dynamic infrastructure
Easy migration to on-demand, cloud-based infrastructure and
management of heterogeneous networks
Automation
New systems and software updates deployed in minutes
Solutions to the challenges
9. Idea Value
Manual processes
Weeks to setup new systems or software
Legacy systems and tools
Inflexible,hard-to-change hardware and software
Organizational silos
Unwieldy divisions of responsibility
Regulatory burdens
Compliance bottleneck at the end of a project
Infrequent, large releases
Fear of deployment due to risk to SLAs
Increased cooperation and trust
Teams are aligned towards common goals
Dynamic infrastructure
Easy migration to on-demand, cloud-based infrastructure and
management of heterogeneous networks
Automation
New systems and software updates deployed in minutes
Solutions to the challenges
Continuous delivery of infrastructure and
applications
Safe,rapid delivery of incremental value
10. Idea Value
Manual processes
Weeks to setup new systems or software
Legacy systems and tools
Inflexible,hard-to-change hardware and software
Organizational silos
Unwieldy divisions of responsibility
Regulatory burdens
Compliance bottleneck at the end of a project
Infrequent, large releases
Fear of deployment due to risk to SLAs
Compliance at velocity
Integration of compliance into the workflow using automated
tests
Increased cooperation and trust
Teams are aligned towards common goals
Dynamic infrastructure
Easy migration to on-demand, cloud-based infrastructure and
management of heterogeneous networks
Automation
New systems and software updates deployed in minutes
Continuous delivery of infrastructure and
applications
Safe,rapid delivery of incremental value
Solutions to the challenges
11. The game changer: rapid time to value
Innovation
Quality/
Compliance
Dynamic
Infrastructure
Infrastructure as Code
Automate the Stack
DevOps
+ +
12. DEVOPS
A cultural and professional movement,
focused on how we build and operate
high velocity organizations, born from
the experiences of its practitioners.
18. The rewards?*
*source: Dr. Nicole Forsgren research on DevOps
More deployments
Ship faster
Faster MTTR after issues
More profits, market share, and productivity
Market cap goes up
19.
20.
21. MANAGE RISK
• Small batches, near term hypothesis
• Validation comes from customers
• Introduce near-term volatility to gain decreased
long-term risk
22. CONTINUOUS INTEGRATION
• Always integrate branches to master
• They should be short lived, iterative branches
• Fix the build when it goes red
24. WRITE TESTS
• Unit test (a single function)
• Integration tests (multiple classes/units)
• Functional tests (user-oriented, high-level, full
stack)
• Smoke tests (quickly determine if the system is
“working”)
25. ONE PATH FOR CHANGE
• The way change moves through your
organization is fixed
• Designed to re-enforce your principles and aid
flow
• Flexible at the level of execution
30. Testing a Rails app – Quality?
Maintain a Baseline measure with …
Code Climate?
Flay/Flog?
31. Chef Provides a Proven Approach to DevOps
...
...
...
Targets/Workloads
Collaborative Dev Production
Chef Server
Chef Server
Chef Supermarket
Assessment
Chef Compliance
Search
Audit
Discover
Deploy
Chef Delivery
Local Dev
Model
Build
Test
Chef DK
Chef Client & Cookbooks
32. Chef Provides a Proven Approach to DevOps
Collaborative DevAssessment
Deploy
Chef Delivery
Local Dev
33. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Submit
Change
34. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Submit
Change
35. Rails App - Lint
execute 'bundle exec rubocop' do
cwd delivery_workspace_repo
environment({
"PATH" => '/usr/local/bin:/usr/bin:/bin',
"GEM_HOME" => node[’fronty']['gem_cache']
})
user node['delivery']['workspace']['build_user']
end
36. Rails App - Unit
execute 'bundle exec rake spec' do
cwd delivery_workspace_repo
environment({
"PATH" => '/usr/local/bin:/usr/bin:/bin',
"GEM_HOME" => node[’fronty']['gem_cache']
})
user node['delivery']['workspace']['build_user']
end
37. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Submit
Change
Does this
code change
look good?
38. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Security
Quality
Publish
Lint
Syntax
Unit
Submit
Change
Does this
code change
look good?
39. Delivering a Rails app – Publish?
Build a release artifact that is
as complete as possible.
40. Delivering a Rails app – Publish?
bundle package
rake assets:precompile } tar czvf app_version.tar.gz
41. Delivering a Rails app – Publish?
app_version.tar.gz
Heroku source API
Heroku build API
Heroku slug
43. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Security
Quality
Publish
Lint
Syntax
Unit
Provision
Deploy
Smoke
Functional
Submit
Change
Does this
code change
look good?
45. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Security
Quality
Publish
Lint
Syntax
Unit
Provision
Deploy
Smoke
Functional
Submit
Change
Does this
code change
look good?
Do we want
to ship this?
46. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Security
Quality
Publish
Lint
Syntax
Unit
Provision
Deploy
Smoke
Functional
Provision
Deploy
Smoke
Functional
Submit
Change
Does this
code change
look good?
Do we want
to ship this?
47. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Security
Quality
Publish
Lint
Syntax
Unit
Provision
Deploy
Smoke
Functional
Provision
Deploy
Smoke
Functional
Provision
Deploy
Smoke
Functional
Submit
Change
Does this
code change
look good?
Do we want
to ship this?
48. Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Security
Quality
Publish
Lint
Syntax
Unit
Provision
Deploy
Smoke
Functional
Provision
Deploy
Smoke
Functional
Provision
Deploy
Smoke
Functional
Provision
Deploy
Smoke
Functional
Submit
Change
Does this
code change
look good?
Do we want
to ship this?
50. 1500 Attendees! 55+ Speakers! Registration Open! Community Celebration!CHEFCONF 2016 AT A GLANCE
Workshops & Chef Training
Community Summit
Partner Summit
Welcome Reception
Keynotes
Technical Sessions
Happy Hour
Keynotes
Technical Sessions
Awesome Chef Awards
Community Celebration
DAY 1 // JULY 11 DAY 2 // JULY 12 DAY 3 // JULY 13
THREE DAYS OF OPPORTUNITY TO ENGAGE THE CHEF CUSTOMERS AND PARTNER ECOSYSTEM
chefconf.chef.io
DAY 1 // JULY 11
« Workshops & ChefTraining
« Community Summit
« Partner Summit
« Welcome Reception
DAY 2 // JULY 12
« Keynotes
« Technical Sessions
« Happy Hour
DAY 3 // JULY 13
« Keynotes
« Technical Sessions
« Awesome Chef Awards
« Community Celebration
THREE DAYS OF OPPORTUNITY TO ENGAGE THE CHEF CUSTOMERS AND PARTNER ECOSYSTEM
51. Robb Kidd
• Developer, Community Engineering at Chef
• @robbkidd | robb@chef.io
Nathan Smith
• Developer, Core Engineering at Chef
• @nlsmith | smith@chef.io