SlideShare una empresa de Scribd logo
1 de 15
Add some Chef to your
         Capistrano
Moving towards automated server configuration with a small team




        @leonid_shevtsov for @RubyGarage, Sep 2012
About me

•   I’m Leonid Shevtsov, http://l-s.me

•   I code Ruby and Javascript at Railsware http://railsware.com

•   I’ve configured and deployed tens of applications.

•   (though no 100-server ones).
Why bother with CM tools?



•   You have to manage hundreds of servers
Why bother with CM tools?



•   You have to manage hundreds of servers
Why bother with CM tools?


•   Make implicit knowledge explicit.

•   Turn configuration into code.

•   Test on a virtual machine, not the live server.
Make implicit knowledge explicit

•   All configuration in one place;

•   Indicate what options are customized/important;

•   What if the sysadmin (or the “server guy”) gets sick (or fired)?

•   Discourages (though doesn’t prohibit) shotgun debugging;
Turn configuration into code
•   People grok code.

•   Code can be diffed

•   Code can be merged

•   You can collaborate on code

•   You can share code between projects

•   You can refactor code
Stop developing on live servers


•   No more Vim via SSH to production;

•   Really identical staging environment;

•   Test entire stack on a virtual machine;
Automated server configuration is
          the future
                              (IMO)
Practice
Push vs Pull
•   “Pull” configuration - suitable for major web sites

    •   Servers update configuration automatically based on central node

    •   Requires infrastructure

•   “Push” configuration - suitable for “less than major” sites

    •   You update configuration manually on demand

    •   Natural next step from Capistrano
Cuoco


•   Capistrano can connect to and run commands on your server;

•   Chef Solo can configure your server if it’s already there;

•   Let’s use them together!



                                     https://github.com/leonid-shevtsov/cuoco
How to add Chef to Capistrano

•   Capistrano should already have servers and roles

•   Add Cuoco to your project

•   Add a config/chef directory

•   Start cooking!

•   To run Chef, run cap cuoco:run_chef
•   To bootstrap & run Chef, run cap cuoco:update_configuration

•   Works with capistrano multistage!

•   Works with host & role filters!

•   Servers pick up roles from Capistrano configuration
Questions? Comments?

           leonid@shevtsov.me
 Thanks to RailsWare http://railsware.com

Más contenido relacionado

Destacado

Debbug Rails Application For Dummies
Debbug Rails Application For DummiesDebbug Rails Application For Dummies
Debbug Rails Application For Dummies
Andrey Subbota
 
развертывание среды Rails (антон веснин, Locum Ru)
развертывание среды Rails (антон веснин, Locum Ru)развертывание среды Rails (антон веснин, Locum Ru)
развертывание среды Rails (антон веснин, Locum Ru)
guest40e031
 
Alexander Dymo - RubyConf 2014 - Ruby Performance Secrets and How to Uncover ...
Alexander Dymo - RubyConf 2014 - Ruby Performance Secrets and How to Uncover ...Alexander Dymo - RubyConf 2014 - Ruby Performance Secrets and How to Uncover ...
Alexander Dymo - RubyConf 2014 - Ruby Performance Secrets and How to Uncover ...
Alexander Dymo
 
Секретный доклад о React Router - OdessaJS 2014
Секретный доклад о React Router - OdessaJS 2014Секретный доклад о React Router - OdessaJS 2014
Секретный доклад о React Router - OdessaJS 2014
Andrey Listochkin
 
Refactorings with RubyMine
Refactorings with RubyMineRefactorings with RubyMine
Refactorings with RubyMine
avokin
 
Системное тестирование приложений на Ruby on Rails с применением Rspec и Cap...
Системное тестирование  приложений на Ruby on Rails с применением Rspec и Cap...Системное тестирование  приложений на Ruby on Rails с применением Rspec и Cap...
Системное тестирование приложений на Ruby on Rails с применением Rspec и Cap...
lshevtsov
 
Errbit - агрегатор сбоев в продакшене
Errbit - агрегатор сбоев в продакшенеErrbit - агрегатор сбоев в продакшене
Errbit - агрегатор сбоев в продакшене
Andrey Subbota
 
Отладка и эксплуатация Rails-приложений
Отладка и эксплуатация Rails-приложенийОтладка и эксплуатация Rails-приложений
Отладка и эксплуатация Rails-приложений
Egor Baranov
 
Разрушаем негативные мифы Ruby, Rails.
Разрушаем негативные мифы Ruby, Rails.Разрушаем негативные мифы Ruby, Rails.
Разрушаем негативные мифы Ruby, Rails.
Ravil Bayramgalin
 

Destacado (20)

Ruby on Rails for noobs
Ruby on Rails for noobsRuby on Rails for noobs
Ruby on Rails for noobs
 
Assets Pipeline
Assets PipelineAssets Pipeline
Assets Pipeline
 
Debbug Rails Application For Dummies
Debbug Rails Application For DummiesDebbug Rails Application For Dummies
Debbug Rails Application For Dummies
 
развертывание среды Rails (антон веснин, Locum Ru)
развертывание среды Rails (антон веснин, Locum Ru)развертывание среды Rails (антон веснин, Locum Ru)
развертывание среды Rails (антон веснин, Locum Ru)
 
Фронтенд для рубиста
Фронтенд для рубистаФронтенд для рубиста
Фронтенд для рубиста
 
Deploy.rb, Ilya Zykin, Rails club2016
Deploy.rb, Ilya Zykin, Rails club2016Deploy.rb, Ilya Zykin, Rails club2016
Deploy.rb, Ilya Zykin, Rails club2016
 
R18n
R18nR18n
R18n
 
Rails Concerns
Rails ConcernsRails Concerns
Rails Concerns
 
Александр Тищенко - "Антикризисная презентация"
Александр Тищенко - "Антикризисная презентация"Александр Тищенко - "Антикризисная презентация"
Александр Тищенко - "Антикризисная презентация"
 
RSpec. Part 1
RSpec. Part 1RSpec. Part 1
RSpec. Part 1
 
Alexander Dymo - RubyConf 2014 - Ruby Performance Secrets and How to Uncover ...
Alexander Dymo - RubyConf 2014 - Ruby Performance Secrets and How to Uncover ...Alexander Dymo - RubyConf 2014 - Ruby Performance Secrets and How to Uncover ...
Alexander Dymo - RubyConf 2014 - Ruby Performance Secrets and How to Uncover ...
 
Секретный доклад о React Router - OdessaJS 2014
Секретный доклад о React Router - OdessaJS 2014Секретный доклад о React Router - OdessaJS 2014
Секретный доклад о React Router - OdessaJS 2014
 
Why does code style matter?
Why does code style matter?Why does code style matter?
Why does code style matter?
 
Refactorings with RubyMine
Refactorings with RubyMineRefactorings with RubyMine
Refactorings with RubyMine
 
Immutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWSImmutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWS
 
Системное тестирование приложений на Ruby on Rails с применением Rspec и Cap...
Системное тестирование  приложений на Ruby on Rails с применением Rspec и Cap...Системное тестирование  приложений на Ruby on Rails с применением Rspec и Cap...
Системное тестирование приложений на Ruby on Rails с применением Rspec и Cap...
 
Rails for dummies
Rails for dummiesRails for dummies
Rails for dummies
 
Errbit - агрегатор сбоев в продакшене
Errbit - агрегатор сбоев в продакшенеErrbit - агрегатор сбоев в продакшене
Errbit - агрегатор сбоев в продакшене
 
Отладка и эксплуатация Rails-приложений
Отладка и эксплуатация Rails-приложенийОтладка и эксплуатация Rails-приложений
Отладка и эксплуатация Rails-приложений
 
Разрушаем негативные мифы Ruby, Rails.
Разрушаем негативные мифы Ruby, Rails.Разрушаем негативные мифы Ruby, Rails.
Разрушаем негативные мифы Ruby, Rails.
 

Último

Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 

Último (20)

Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 

Moving towards automated server configuration with a small team

  • 1. Add some Chef to your Capistrano Moving towards automated server configuration with a small team @leonid_shevtsov for @RubyGarage, Sep 2012
  • 2. About me • I’m Leonid Shevtsov, http://l-s.me • I code Ruby and Javascript at Railsware http://railsware.com • I’ve configured and deployed tens of applications. • (though no 100-server ones).
  • 3. Why bother with CM tools? • You have to manage hundreds of servers
  • 4. Why bother with CM tools? • You have to manage hundreds of servers
  • 5. Why bother with CM tools? • Make implicit knowledge explicit. • Turn configuration into code. • Test on a virtual machine, not the live server.
  • 6. Make implicit knowledge explicit • All configuration in one place; • Indicate what options are customized/important; • What if the sysadmin (or the “server guy”) gets sick (or fired)? • Discourages (though doesn’t prohibit) shotgun debugging;
  • 7. Turn configuration into code • People grok code. • Code can be diffed • Code can be merged • You can collaborate on code • You can share code between projects • You can refactor code
  • 8. Stop developing on live servers • No more Vim via SSH to production; • Really identical staging environment; • Test entire stack on a virtual machine;
  • 9. Automated server configuration is the future (IMO)
  • 11. Push vs Pull • “Pull” configuration - suitable for major web sites • Servers update configuration automatically based on central node • Requires infrastructure • “Push” configuration - suitable for “less than major” sites • You update configuration manually on demand • Natural next step from Capistrano
  • 12. Cuoco • Capistrano can connect to and run commands on your server; • Chef Solo can configure your server if it’s already there; • Let’s use them together! https://github.com/leonid-shevtsov/cuoco
  • 13. How to add Chef to Capistrano • Capistrano should already have servers and roles • Add Cuoco to your project • Add a config/chef directory • Start cooking! • To run Chef, run cap cuoco:run_chef
  • 14. To bootstrap & run Chef, run cap cuoco:update_configuration • Works with capistrano multistage! • Works with host & role filters! • Servers pick up roles from Capistrano configuration
  • 15. Questions? Comments? leonid@shevtsov.me Thanks to RailsWare http://railsware.com

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n