Code Monkey home page Code Monkey logo

chef-deploy's Introduction

chef-deploy

A gem that provides resources and providers for deploying ruby web apps from chef recipes

Uses the same directory layout as capistrano and steals the git remote cached deploy strategy from cap and adapts it to work without cap and under chef. Not all options are required but they are all shown here as an example.

deploy "/data/myrackapp" do
  repo "git://github.com/engineyard/rack-app.git"
  branch "HEAD"
  user "ez"
  role "app_master"
  enable_submodules true
  migrate true
  migration_command "rake db:migrate"
  environment "production"
  shallow_clone true
  revision '0xbeadbeef'
  restart_command "touch tmp/restart.txt" # "monit restart all -g foo", etc.
  action :deploy # or :rollback
end

Chef-deploy is backwards compatible with capistrano in the fact that it uses the same exact filesystem layout. You can deploy with cap on top of a chef-deploy system and visca-versca(sic?).

Chef-deploy hooks:

If you create a APP_ROOT/deploy directory in your app you can place named hook files in there that will be triggered at the appropriate times during the deploy. the hooks are defined as follows:

APP_ROOT/

deploy/
  before_migrate.rb
  before_symlink.rb
  before_restart.rb
  after_restart.rb

These scripts will be called with two command line params in ARGV:

ruby before_migrate.rb production app_master

Where ARGV is the RAILS_ENV, MERB_ENV or RACK_ENV and ARGV is the role passed in to the deploy resource, this can be used to identify certain servers as database, application, cache, etc roles so you can act accordingly

chef-deploy's People

Contributors

jcrosby avatar zpinter avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.