What are the pros and cons of using Chef for web application deployment, versus tools like Fabric or Capistrano?
-
Would using Chef (or Puppet) for deployment of web applications (typically Ruby or Python) be appropriate or overkill, versus using "simpler" tools like Fabric (Python) or Capistrano (Ruby)?
-
Answer:
Chef and puppet are better for continuous deployment because they use a pull model, vs fabric and cap doing push. Also, fab and cap rely on a single point of failure, the laptop or computer you're running the deploy on. If you are just starting out with automating deployments use fab or cap, then graduate to chef or puppet when it seems necessary or more valuable for your system or development process. FYI, I find fabric much more flexible than cap for deployments. It's much easier to deploy any app written in any language with fabric. At ign we deploy ruby, php, and even build java projects with fabric now. We'll move these to chef in time.
Tony Ford at Quora Visit the source
Other answers
Brian -- we pin our releases to a specific deploy SHA, giving us precision that the machine's full state and the app version are in sync. We also set a long cycle time on the nodes (hours instead of minutes), so we can do a rolling knifeclusterkickknifeclusterkickknife cluster kick on single or groups of machines to prevent thundering herds/simultaneous outages. Here's brilliant deploy strategy I learned from Peter N at Knewton: * Let's call the current deployed version "v1". * Deploy new machines having the newest rev, but with their feature flags all set to the v1 world. Let's call these the "v2(1)" machines. Now you have two pools of machines, both of which should function identically. * Switch all inbound dependencies to point to "v2(1)". Nothing should change. * Flip the flags on the new machines -- "v2(2)" should now include all the expected awesomeness of the new version. * knock out the v1 machines at your leisure. If you're on EC2, 'stop'ped (rather than terminated) instances cost virtually nothing, and will come back to life just as you left them. Basically, it's the capistrano pattern writ large, with the improvement that cross-version contamination becomes significantly less likely. An orchestration tool such as Juju, Ironfan, RunDeck or the like makes this straightforward to automate. (I wouldn't attempt it without one.)
Flip Kromer
Tony, how do you deal with the fact that in a continuous deployment model systems check into the puppetmaster (or equivelant term in Chef) and varied times. This could mean that if you want to upgrade an app each app could check in update their code and restart the app at the same time... I like to use puppet for configuration management and fabric for overall environment orchistration. For instance if I need to do a rolling upgrade of an app I can make sure app server A has finished and is in a working state before app server B attempts its upgrade. I don't use Chef so maybe some of that functionality is built into Chef...
Brian Carpio
Related Q & A:
- What are the pros and cons of donating blood?Best solution by Quora
- What are the pros and cons of xenotransplantation?Best solution by Yahoo! Answers
- What are pros and cons of using expansionary and contractionary fiscal and monetary policy tools?Best solution by Yahoo! Answers
- What are the pros and cons of buying a house using an FHA loan?Best solution by Personal Finance and Money
- What Are some Pros And Cons of Being A Chef?Best solution by wiki.answers.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.