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

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

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