SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Downloaden Sie, um offline zu lesen
Strong Practices for Rails
Applications Continuous Delivery
Robb Kidd | Developer, Community Engineering | robb@chef.io | @robbkidd
Nathan Smith | Developer, Core Engineering | smith@chef.io | @nlsmith
Robb Kidd
• Developer, Community Engineering at Chef
• @robbkidd | robb@chef.io
Nathan Smith
• Developer, Core Engineering at Chef
• @nlsmith | smith@chef.io
Quality and innovation, historically a tradeoffQUALITY/COMPLIANCE
RATE OF INNOVATION
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
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
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
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
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
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
The game changer: rapid time to value
Innovation
Quality/
Compliance
Dynamic
Infrastructure
Infrastructure as Code
Automate the Stack
DevOps
+ +
DEVOPS
A cultural and professional movement,
focused on how we build and operate
high velocity organizations, born from
the experiences of its practitioners.
PEOPLE
PRODUCTS
COMPANIES
DIVERSITY
WE ARE LEAN
• Eliminate non-value-added action (Waste/Muda)
• Pull over Push
• Kaizen (Continuous Improvement)
• Kaikaku (Disruptive Change)
• Small Batch + Experimentation
UBIQUITOUS
WORKFLOW
AUTOMATION
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
MANAGE RISK
• Small batches, near term hypothesis
• Validation comes from customers
• Introduce near-term volatility to gain decreased
long-term risk
CONTINUOUS INTEGRATION
• Always integrate branches to master
• They should be short lived, iterative branches
• Fix the build when it goes red
THE FOUR-EYE RULE
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”)
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
Testing a Rails app – Lint?
Rubocop
Testing a Rails app – Syntax?
Also, Rubocop
Testing a Rails app – Unit?
RSpec
Testing a Rails app – Security?
Bundler Audit & Brakeman
Testing a Rails app – Quality?
Maintain a Baseline measure with …
Code Climate?
Flay/Flog?
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
Chef Provides a Proven Approach to DevOps
Collaborative DevAssessment
Deploy
Chef Delivery
Local Dev
Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Submit
Change
Unified Pipeline Shape
The stages are fixed, and each stage has a fixed set of phases
APPROVE DELIVER
Lint
Syntax
Unit
Submit
Change
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
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
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?
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?
Delivering a Rails app – Publish?
Build a release artifact that is
as complete as possible.
Delivering a Rails app – Publish?
bundle package
rake assets:precompile } tar czvf app_version.tar.gz
Delivering a Rails app – Publish?
app_version.tar.gz
Heroku source API
Heroku build API
Heroku slug
Delivering a Rails app – Publish?
app_version.tar.gz
source_escrow = heroku.source.create(heroku_build_app)
escrow_upload = Excon.new(source_escrow['source_blob']['put_url'])
escrow_upload.put(body: open(tarball).read)
build = heroku.build.create(...)
build_result = heroku.build.info(heroku_build_app, build['id'])
heroku_slug_id = build_result['slug']['id']
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?
Delivering a Rails app – Provision & Deploy
Provision:
app_name = 'project_#{stage}'
heroku_app = heroku.app.create(
name: app_name,
region: 'us',
stack: 'cedar-14’
)
Deploy:
release = heroku.release.create(
heroku_app['name'],
slug: heroku_slug_id
)
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?
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?
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?
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?
What questions can we answer for you?
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
Robb Kidd
• Developer, Community Engineering at Chef
• @robbkidd | robb@chef.io
Nathan Smith
• Developer, Core Engineering at Chef
• @nlsmith | smith@chef.io

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Simplilearn
 
QA in DevOps: Transformation thru Automation via Jenkins
QA in DevOps:  Transformation thru Automation via JenkinsQA in DevOps:  Transformation thru Automation via Jenkins
QA in DevOps: Transformation thru Automation via Jenkins
Tatyana Kravtsov
 
From ci to cd - LavaJug 2012
From ci to cd  - LavaJug 2012From ci to cd  - LavaJug 2012
From ci to cd - LavaJug 2012
Henri Gomez
 

Was ist angesagt? (20)

Patterns and Practices of a Successful DevOps Transformation
Patterns and Practices of a Successful DevOps TransformationPatterns and Practices of a Successful DevOps Transformation
Patterns and Practices of a Successful DevOps Transformation
 
Dev ops continuousdeliveryforcloudproduct
Dev ops continuousdeliveryforcloudproductDev ops continuousdeliveryforcloudproduct
Dev ops continuousdeliveryforcloudproduct
 
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
 
The parallel universes of DevOps and cloud developers
The parallel universes of DevOps and cloud developersThe parallel universes of DevOps and cloud developers
The parallel universes of DevOps and cloud developers
 
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
 
DevOps Patterns Distilled: Implementing The Needed Practices In Practical Steps
DevOps Patterns Distilled: Implementing The Needed Practices In Practical StepsDevOps Patterns Distilled: Implementing The Needed Practices In Practical Steps
DevOps Patterns Distilled: Implementing The Needed Practices In Practical Steps
 
Introducing DevOps
Introducing DevOpsIntroducing DevOps
Introducing DevOps
 
Adopting DevOps for 2-Speed IT
Adopting DevOps for 2-Speed ITAdopting DevOps for 2-Speed IT
Adopting DevOps for 2-Speed IT
 
How to implement DevOps in your Organization
How to implement DevOps in your OrganizationHow to implement DevOps in your Organization
How to implement DevOps in your Organization
 
Sec devops 2.0 managing your robot army - final
Sec devops 2.0  managing your robot army - finalSec devops 2.0  managing your robot army - final
Sec devops 2.0 managing your robot army - final
 
UrbanCode Deploy and Docker Containers Connect the Dots
UrbanCode Deploy and Docker Containers Connect the DotsUrbanCode Deploy and Docker Containers Connect the Dots
UrbanCode Deploy and Docker Containers Connect the Dots
 
SoCal DevOps Meetup 1/26/2017 - Habitat by Chef
SoCal DevOps Meetup 1/26/2017 - Habitat by ChefSoCal DevOps Meetup 1/26/2017 - Habitat by Chef
SoCal DevOps Meetup 1/26/2017 - Habitat by Chef
 
DevOps and Cloud Tips and Techniques to Revolutionize Your SDLC
DevOps and Cloud Tips and Techniques to Revolutionize Your SDLCDevOps and Cloud Tips and Techniques to Revolutionize Your SDLC
DevOps and Cloud Tips and Techniques to Revolutionize Your SDLC
 
QA in DevOps: Transformation thru Automation via Jenkins
QA in DevOps:  Transformation thru Automation via JenkinsQA in DevOps:  Transformation thru Automation via Jenkins
QA in DevOps: Transformation thru Automation via Jenkins
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and Processes
 
Infrastructure as Code Maturity Model v1
Infrastructure as Code Maturity Model v1Infrastructure as Code Maturity Model v1
Infrastructure as Code Maturity Model v1
 
Scaling Your DevOps with Chef (December 15th 2016)
Scaling Your DevOps with Chef (December 15th 2016)Scaling Your DevOps with Chef (December 15th 2016)
Scaling Your DevOps with Chef (December 15th 2016)
 
From ci to cd - LavaJug 2012
From ci to cd  - LavaJug 2012From ci to cd  - LavaJug 2012
From ci to cd - LavaJug 2012
 
Testing a Microservices Architecture
Testing a Microservices ArchitectureTesting a Microservices Architecture
Testing a Microservices Architecture
 
Digital Disruption with DevOps - Reference Architecture Overview
Digital Disruption with DevOps - Reference Architecture OverviewDigital Disruption with DevOps - Reference Architecture Overview
Digital Disruption with DevOps - Reference Architecture Overview
 

Ähnlich wie Strong practices for rails applications continuous delivery

Fllow con 2014
Fllow con 2014 Fllow con 2014
Fllow con 2014
gbgruver
 

Ähnlich wie Strong practices for rails applications continuous delivery (20)

Infrastructure as Code with Chef
Infrastructure as Code with ChefInfrastructure as Code with Chef
Infrastructure as Code with Chef
 
Chef Workflow Demo
Chef Workflow DemoChef Workflow Demo
Chef Workflow Demo
 
A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything Chef
 
Innovate 2014 DevOps: Release and Deploy Keynote
Innovate 2014 DevOps: Release and Deploy KeynoteInnovate 2014 DevOps: Release and Deploy Keynote
Innovate 2014 DevOps: Release and Deploy Keynote
 
IP Expo Nordic: Successful Practices for Continuous Delivery
IP Expo Nordic: Successful Practices for Continuous DeliveryIP Expo Nordic: Successful Practices for Continuous Delivery
IP Expo Nordic: Successful Practices for Continuous Delivery
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?
 
Achieve Scale & Velocity with AWS OpsWorks for Chef Automate
Achieve Scale & Velocity with AWS OpsWorks for Chef AutomateAchieve Scale & Velocity with AWS OpsWorks for Chef Automate
Achieve Scale & Velocity with AWS OpsWorks for Chef Automate
 
Adopting DevOps at Scale on AWS with VirtusaPolaris
Adopting DevOps at Scale on AWS with VirtusaPolarisAdopting DevOps at Scale on AWS with VirtusaPolaris
Adopting DevOps at Scale on AWS with VirtusaPolaris
 
You Build It, You Secure It: Higher Velocity and Better Security with DevSecOps
You Build It, You Secure It: Higher Velocity and Better Security with DevSecOpsYou Build It, You Secure It: Higher Velocity and Better Security with DevSecOps
You Build It, You Secure It: Higher Velocity and Better Security with DevSecOps
 
Keys to continuous testing for faster delivery euro star webinar
Keys to continuous testing for faster delivery euro star webinar Keys to continuous testing for faster delivery euro star webinar
Keys to continuous testing for faster delivery euro star webinar
 
Functional Continuous Integration with Selenium and Hudson
Functional Continuous Integration with Selenium and HudsonFunctional Continuous Integration with Selenium and Hudson
Functional Continuous Integration with Selenium and Hudson
 
DevOps and Application Delivery for Hybrid Cloud - DevOpsSummit session
DevOps and Application Delivery for Hybrid Cloud  - DevOpsSummit sessionDevOps and Application Delivery for Hybrid Cloud  - DevOpsSummit session
DevOps and Application Delivery for Hybrid Cloud - DevOpsSummit session
 
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017
Building a DevOps Culture in Public Sector | AWS Public Sector Summit 2017
 
DTS-1778 Understanding DevOps - IBM InterConnect Session
DTS-1778 Understanding DevOps - IBM InterConnect SessionDTS-1778 Understanding DevOps - IBM InterConnect Session
DTS-1778 Understanding DevOps - IBM InterConnect Session
 
DevOps For Everyone: Bringing DevOps Success to Every App and Every Role in y...
DevOps For Everyone: Bringing DevOps Success to Every App and Every Role in y...DevOps For Everyone: Bringing DevOps Success to Every App and Every Role in y...
DevOps For Everyone: Bringing DevOps Success to Every App and Every Role in y...
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-Architect
 
How to implement continuous delivery with enterprise java middleware?
How to implement continuous delivery with enterprise java middleware?How to implement continuous delivery with enterprise java middleware?
How to implement continuous delivery with enterprise java middleware?
 
Implementing Continuous Delivery with Enterprise Middleware
Implementing Continuous Delivery with Enterprise MiddlewareImplementing Continuous Delivery with Enterprise Middleware
Implementing Continuous Delivery with Enterprise Middleware
 
Continuous Delivery in the Enterprise
Continuous Delivery in the EnterpriseContinuous Delivery in the Enterprise
Continuous Delivery in the Enterprise
 
Fllow con 2014
Fllow con 2014 Fllow con 2014
Fllow con 2014
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Strong practices for rails applications continuous delivery

  • 1. Strong Practices for Rails Applications Continuous Delivery
  • 2. Robb Kidd | Developer, Community Engineering | robb@chef.io | @robbkidd Nathan Smith | Developer, Core Engineering | smith@chef.io | @nlsmith
  • 3. Robb Kidd • Developer, Community Engineering at Chef • @robbkidd | robb@chef.io Nathan Smith • Developer, Core Engineering at Chef • @nlsmith | smith@chef.io
  • 4. Quality and innovation, historically a tradeoffQUALITY/COMPLIANCE RATE OF INNOVATION
  • 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.
  • 15. WE ARE LEAN • Eliminate non-value-added action (Waste/Muda) • Pull over Push • Kaizen (Continuous Improvement) • Kaikaku (Disruptive Change) • Small Batch + Experimentation
  • 16.
  • 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
  • 26. Testing a Rails app – Lint? Rubocop
  • 27. Testing a Rails app – Syntax? Also, Rubocop
  • 28. Testing a Rails app – Unit? RSpec
  • 29. Testing a Rails app – Security? Bundler Audit & Brakeman
  • 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
  • 42. Delivering a Rails app – Publish? app_version.tar.gz source_escrow = heroku.source.create(heroku_build_app) escrow_upload = Excon.new(source_escrow['source_blob']['put_url']) escrow_upload.put(body: open(tarball).read) build = heroku.build.create(...) build_result = heroku.build.info(heroku_build_app, build['id']) heroku_slug_id = build_result['slug']['id']
  • 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?
  • 44. Delivering a Rails app – Provision & Deploy Provision: app_name = 'project_#{stage}' heroku_app = heroku.app.create( name: app_name, region: 'us', stack: 'cedar-14’ ) Deploy: release = heroku.release.create( heroku_app['name'], slug: heroku_slug_id )
  • 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?
  • 49. What questions can we answer for you?
  • 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