SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
Two-Step Deployment for Rails
Doug Smith
http://daveramsey.com
Classic Capistrano One-Step Process
Export code from Github
Asset Precompile
etc., etc.
Staging Production
Export code from Github
Asset Precompile
etc., etc.
$ cap deploy
Problems With Classic Approach
• Staging and Production might run different code
• Production requires extra dependencies
Two-Step Process
1. Build deployable “package”
2. Deploy same package to all environments
Why Two Steps?
• Consistent code package deployed
• Fewer dependencies on production
Build Process
Export code from Github
Run Entire Test Suite
Asset Precompile
bundle install --deployment
$ cap build deploy
Deploy Built Package To Servers
Build
Staging Production
Deploy Process
RSync built app to server
Graceful Unicorn restart
$ cap staging deploy -s release_name="20130430172348"
RSync Task: production environments
namespace :deploy do
desc <<-DESC
Update all servers with the latest release of the source code.
Since production servers do not have access to SCM, we use
rsync to push to code to the servers.
DESC
task :update_code, :roles => [:app, :web] do
on_rollback { run "rm -rf #{release_path}; true" }
username = user || ENV['USER']
run <<-CMD
rsync -avz -e ssh '#{Dir.pwd}/' 
'#{username}@$CAPISTRANO:HOST$:#{release_path}' 
--exclude 'log' 
--exclude 'tmp'
--exclude 'public/assets' 
--exclude 'public/files' 
--exclude 'public/system'
CMD
https://gist.github.com/dugsmith/5109521
Summary
1. Build once
2. Deploy same package everywhere
Follow-up
• http://slidesha.re/Ylgipm
• doug.smith@daveramsey.com
• @arogos
• http://developwithpurpose.com

Weitere ähnliche Inhalte

Was ist angesagt?

(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...Amazon Web Services
 
Dennis Benkert - The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
Dennis Benkert -  The Dog Ate My Deployment - Symfony Usergroup Berlin March ...Dennis Benkert -  The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
Dennis Benkert - The Dog Ate My Deployment - Symfony Usergroup Berlin March ...D
 
Docker on Windows and Linux - Red Shirt Dev Tour
Docker on Windows and Linux - Red Shirt Dev TourDocker on Windows and Linux - Red Shirt Dev Tour
Docker on Windows and Linux - Red Shirt Dev TourElton Stoneman
 
The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013
The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013
The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013D
 
The Dog Ate My Deployment - PHP Uncoference September 2013
The Dog Ate My Deployment - PHP Uncoference September 2013The Dog Ate My Deployment - PHP Uncoference September 2013
The Dog Ate My Deployment - PHP Uncoference September 2013D
 
Continuous integration in games development
Continuous integration in games developmentContinuous integration in games development
Continuous integration in games developmentNebojsa Brindic
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)Ritesh Angural
 
CodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniter
CodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniterCodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniter
CodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniterWeerayut Hongsa
 
Continuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsContinuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsCamilo Ribeiro
 
Developer South Coast 2018: Modernizing .NET Apps with Docker
Developer South Coast 2018: Modernizing .NET Apps with DockerDeveloper South Coast 2018: Modernizing .NET Apps with Docker
Developer South Coast 2018: Modernizing .NET Apps with DockerElton Stoneman
 
How application performance requirements impacted the (r)evolution of the Doc...
How application performance requirements impacted the (r)evolution of the Doc...How application performance requirements impacted the (r)evolution of the Doc...
How application performance requirements impacted the (r)evolution of the Doc...Renno Reinurm
 
Testing as a container
Testing as a containerTesting as a container
Testing as a containerIrfan Ahmad
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CDHenry Huang
 
Developer South Coast 2018: Docker on Windows - The Beginner's Guide
Developer South Coast 2018: Docker on Windows - The Beginner's GuideDeveloper South Coast 2018: Docker on Windows - The Beginner's Guide
Developer South Coast 2018: Docker on Windows - The Beginner's GuideElton Stoneman
 
Get started with docker &amp; dev ops
Get started with docker &amp; dev opsGet started with docker &amp; dev ops
Get started with docker &amp; dev opsAsya Dudnik
 
CloudExpo 2018: Docker - Power Your Move to the Cloud
CloudExpo 2018: Docker - Power Your Move to the CloudCloudExpo 2018: Docker - Power Your Move to the Cloud
CloudExpo 2018: Docker - Power Your Move to the CloudElton Stoneman
 
Performance testing as part of Agile - Continius Delivery solution
Performance testing as part of Agile - Continius Delivery solutionPerformance testing as part of Agile - Continius Delivery solution
Performance testing as part of Agile - Continius Delivery solutionSergey Radov
 
Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Robert Reiz
 

Was ist angesagt? (20)

(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
(GAM404) Gaming DevOps: Scopely's Continuous Deployment Pipeline | AWS re:Inv...
 
Dennis Benkert - The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
Dennis Benkert -  The Dog Ate My Deployment - Symfony Usergroup Berlin March ...Dennis Benkert -  The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
Dennis Benkert - The Dog Ate My Deployment - Symfony Usergroup Berlin March ...
 
Docker on Windows and Linux - Red Shirt Dev Tour
Docker on Windows and Linux - Red Shirt Dev TourDocker on Windows and Linux - Red Shirt Dev Tour
Docker on Windows and Linux - Red Shirt Dev Tour
 
The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013
The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013
The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013
 
The Dog Ate My Deployment - PHP Uncoference September 2013
The Dog Ate My Deployment - PHP Uncoference September 2013The Dog Ate My Deployment - PHP Uncoference September 2013
The Dog Ate My Deployment - PHP Uncoference September 2013
 
Continuous integration in games development
Continuous integration in games developmentContinuous integration in games development
Continuous integration in games development
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)
 
CodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniter
CodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniterCodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniter
CodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniter
 
Continuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsContinuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and Jenkins
 
Zalenium - SeleniumConf Austin 2017
Zalenium - SeleniumConf Austin 2017Zalenium - SeleniumConf Austin 2017
Zalenium - SeleniumConf Austin 2017
 
Developer South Coast 2018: Modernizing .NET Apps with Docker
Developer South Coast 2018: Modernizing .NET Apps with DockerDeveloper South Coast 2018: Modernizing .NET Apps with Docker
Developer South Coast 2018: Modernizing .NET Apps with Docker
 
How application performance requirements impacted the (r)evolution of the Doc...
How application performance requirements impacted the (r)evolution of the Doc...How application performance requirements impacted the (r)evolution of the Doc...
How application performance requirements impacted the (r)evolution of the Doc...
 
Testing as a container
Testing as a containerTesting as a container
Testing as a container
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CD
 
Capistrano - Deployment Tool
Capistrano - Deployment ToolCapistrano - Deployment Tool
Capistrano - Deployment Tool
 
Developer South Coast 2018: Docker on Windows - The Beginner's Guide
Developer South Coast 2018: Docker on Windows - The Beginner's GuideDeveloper South Coast 2018: Docker on Windows - The Beginner's Guide
Developer South Coast 2018: Docker on Windows - The Beginner's Guide
 
Get started with docker &amp; dev ops
Get started with docker &amp; dev opsGet started with docker &amp; dev ops
Get started with docker &amp; dev ops
 
CloudExpo 2018: Docker - Power Your Move to the Cloud
CloudExpo 2018: Docker - Power Your Move to the CloudCloudExpo 2018: Docker - Power Your Move to the Cloud
CloudExpo 2018: Docker - Power Your Move to the Cloud
 
Performance testing as part of Agile - Continius Delivery solution
Performance testing as part of Agile - Continius Delivery solutionPerformance testing as part of Agile - Continius Delivery solution
Performance testing as part of Agile - Continius Delivery solution
 
Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014
 

Andere mochten auch

Presentation media
Presentation mediaPresentation media
Presentation mediaJordanField
 
Fish hub cfn_20130309
Fish hub cfn_20130309Fish hub cfn_20130309
Fish hub cfn_20130309barbielucio
 
Retailers and brands must work together on experience
Retailers and brands must work together on experienceRetailers and brands must work together on experience
Retailers and brands must work together on experienceRPM
 
Social Media and Employment
Social Media and EmploymentSocial Media and Employment
Social Media and EmploymentMalcolm Sheppard
 
Slaidi ettekanne mäng ja loovus
Slaidi ettekanne  mäng ja loovusSlaidi ettekanne  mäng ja loovus
Slaidi ettekanne mäng ja loovusPille Lehtemaa
 
CCFT_CDP_Presentation
CCFT_CDP_PresentationCCFT_CDP_Presentation
CCFT_CDP_Presentationbarbielucio
 
Catalogo integratori sportivi Inkospor 2015 - integratori alimentari per lo s...
Catalogo integratori sportivi Inkospor 2015 - integratori alimentari per lo s...Catalogo integratori sportivi Inkospor 2015 - integratori alimentari per lo s...
Catalogo integratori sportivi Inkospor 2015 - integratori alimentari per lo s...Inkospor
 
iLetsLPM presentation at the launch event @60HopeStreet
iLetsLPM presentation at the launch event @60HopeStreetiLetsLPM presentation at the launch event @60HopeStreet
iLetsLPM presentation at the launch event @60HopeStreetiLets LPM ltd
 
Managing a Quota Leasing Program
Managing a Quota Leasing ProgramManaging a Quota Leasing Program
Managing a Quota Leasing Programbarbielucio
 
MANOJ PS-Welding Engineer Resume
MANOJ PS-Welding Engineer ResumeMANOJ PS-Welding Engineer Resume
MANOJ PS-Welding Engineer ResumeManoj Ps
 

Andere mochten auch (13)

Presentation media
Presentation mediaPresentation media
Presentation media
 
Fish hub cfn_20130309
Fish hub cfn_20130309Fish hub cfn_20130309
Fish hub cfn_20130309
 
Retailers and brands must work together on experience
Retailers and brands must work together on experienceRetailers and brands must work together on experience
Retailers and brands must work together on experience
 
Social Media and Employment
Social Media and EmploymentSocial Media and Employment
Social Media and Employment
 
Sevanna Gilpin, CID
Sevanna Gilpin, CIDSevanna Gilpin, CID
Sevanna Gilpin, CID
 
Slaidi ettekanne mäng ja loovus
Slaidi ettekanne  mäng ja loovusSlaidi ettekanne  mäng ja loovus
Slaidi ettekanne mäng ja loovus
 
CCFT_CDP_Presentation
CCFT_CDP_PresentationCCFT_CDP_Presentation
CCFT_CDP_Presentation
 
Catalogo integratori sportivi Inkospor 2015 - integratori alimentari per lo s...
Catalogo integratori sportivi Inkospor 2015 - integratori alimentari per lo s...Catalogo integratori sportivi Inkospor 2015 - integratori alimentari per lo s...
Catalogo integratori sportivi Inkospor 2015 - integratori alimentari per lo s...
 
20x20
20x2020x20
20x20
 
iLetsLPM presentation at the launch event @60HopeStreet
iLetsLPM presentation at the launch event @60HopeStreetiLetsLPM presentation at the launch event @60HopeStreet
iLetsLPM presentation at the launch event @60HopeStreet
 
Smartphone apps
Smartphone appsSmartphone apps
Smartphone apps
 
Managing a Quota Leasing Program
Managing a Quota Leasing ProgramManaging a Quota Leasing Program
Managing a Quota Leasing Program
 
MANOJ PS-Welding Engineer Resume
MANOJ PS-Welding Engineer ResumeMANOJ PS-Welding Engineer Resume
MANOJ PS-Welding Engineer Resume
 

Ähnlich wie Two-Step Deployment with Rails

UGent Django Infrastructure
UGent Django InfrastructureUGent Django Infrastructure
UGent Django Infrastructurekevinvw
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Саша Белецкий "Continuous Delivery в продуктовой разработке"
Саша Белецкий "Continuous Delivery в продуктовой разработке"Саша Белецкий "Continuous Delivery в продуктовой разработке"
Саша Белецкий "Continuous Delivery в продуктовой разработке"Agile Base Camp
 
DevOps Practices @Pipedrive
DevOps Practices @PipedriveDevOps Practices @Pipedrive
DevOps Practices @PipedriveRenno Reinurm
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient waySylvain Rayé
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containersinside-BigData.com
 
Continuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL ServerContinuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL ServerChris Adkin
 
Ruby on Rails Kickstart 101 & 102
Ruby on Rails Kickstart 101 & 102Ruby on Rails Kickstart 101 & 102
Ruby on Rails Kickstart 101 & 102Heng-Yi Wu
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzSteve Hoffman
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and LingvokotLingvokot
 
Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Akhmad Fathonih
 
Continuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabContinuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabAyush Sharma
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
Infrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateInfrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateMatt Ray
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"Fwdays
 

Ähnlich wie Two-Step Deployment with Rails (20)

UGent Django Infrastructure
UGent Django InfrastructureUGent Django Infrastructure
UGent Django Infrastructure
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
 
Саша Белецкий "Continuous Delivery в продуктовой разработке"
Саша Белецкий "Continuous Delivery в продуктовой разработке"Саша Белецкий "Continuous Delivery в продуктовой разработке"
Саша Белецкий "Continuous Delivery в продуктовой разработке"
 
DevOps Practices @Pipedrive
DevOps Practices @PipedriveDevOps Practices @Pipedrive
DevOps Practices @Pipedrive
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containers
 
Continuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL ServerContinuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL Server
 
Ruby on Rails Kickstart 101 & 102
Ruby on Rails Kickstart 101 & 102Ruby on Rails Kickstart 101 & 102
Ruby on Rails Kickstart 101 & 102
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 
Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)
 
Continuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabContinuous Integration & Development with Gitlab
Continuous Integration & Development with Gitlab
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Infrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateInfrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef Automate
 
Capistrano Overview
Capistrano OverviewCapistrano Overview
Capistrano Overview
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Capistrano
CapistranoCapistrano
Capistrano
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"
 

Kürzlich hochgeladen

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Kürzlich hochgeladen (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Two-Step Deployment with Rails

  • 1. Two-Step Deployment for Rails Doug Smith http://daveramsey.com
  • 2. Classic Capistrano One-Step Process Export code from Github Asset Precompile etc., etc. Staging Production Export code from Github Asset Precompile etc., etc. $ cap deploy
  • 3. Problems With Classic Approach • Staging and Production might run different code • Production requires extra dependencies
  • 4. Two-Step Process 1. Build deployable “package” 2. Deploy same package to all environments
  • 5. Why Two Steps? • Consistent code package deployed • Fewer dependencies on production
  • 6. Build Process Export code from Github Run Entire Test Suite Asset Precompile bundle install --deployment $ cap build deploy
  • 7. Deploy Built Package To Servers Build Staging Production
  • 8. Deploy Process RSync built app to server Graceful Unicorn restart $ cap staging deploy -s release_name="20130430172348"
  • 9. RSync Task: production environments namespace :deploy do desc <<-DESC Update all servers with the latest release of the source code. Since production servers do not have access to SCM, we use rsync to push to code to the servers. DESC task :update_code, :roles => [:app, :web] do on_rollback { run "rm -rf #{release_path}; true" } username = user || ENV['USER'] run <<-CMD rsync -avz -e ssh '#{Dir.pwd}/' '#{username}@$CAPISTRANO:HOST$:#{release_path}' --exclude 'log' --exclude 'tmp' --exclude 'public/assets' --exclude 'public/files' --exclude 'public/system' CMD https://gist.github.com/dugsmith/5109521
  • 10. Summary 1. Build once 2. Deploy same package everywhere