Coder Social home page Coder Social logo

dmitriy-kiriyenko / soprano Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 1.0 206 KB

My own set of capistrano recipes and rake tasks that helps me to deploy my apps.

Home Page: https://github.com/dmitriy-kiriyenko/soprano

License: MIT License

Ruby 100.00%

soprano's Introduction

Soprano

Code Climate

The Sopranos

Soprano is the set of Capistrano recipes that help me to deploy my applications.

Soprano by default uses Mongrel cluster (or Passenger) as an application server, nginx as a web server, MySQL as a database server and git as a SCM.

The latest version of Soprano was inspired by Rubaidh's Rubaidhstrano and some code has been borrowed from its sources.

Installation

For Rails 3 add to your Gemfile:

gem 'soprano', :require => false

Example usage

To start using Soprano you just need to add require "soprano" to your config/deploy.rb file and set some variables:

require "soprano"

set :application, "set your application name here"
set :repository,  "set your repository location here"
set :host,        "set your host here"

# See soprano/recipes/defaults.rb for defaults

Features

Remote

Sometimes we need to execute an arbitrary command or script on our server within the application. To aid with thin, Soprano offers a bunch of remote scripts. For example:

$ cap remote:command -s cmd="ls -l"
you'll even get the output here...

Similar tasks exist for rake, thor and runner. Try cap -T remote. Note: runner does not put to the STDOUT anything.

$ cap remote:rake -s cmd="db:drop" && echo "What have I done!"
$ cap remote:thor -s cmd="thor:task"
$ cap remote:runner -s cmd="1000**1000 while true" && echo "Computers should compute"

Don't forget to use -s option. Also wrap cmd= argument in quotes. Yeah, this is not comfortable, but it's intentional. Consider it a syntax vinegar. If you have a repeated task, write a Capistrano recipe for it. This remote calls are for really occasional tasks.

You also have cap remote:tail to tail the application log.

If all you need is just remotely run the rake tasks, you may also want to consider using Cape.

Other

Readme about other features in process...

Thanks

Copyright

Copyright (c) 2011 Dmitriy Kiriyenko. See LICENSE for details.

soprano's People

Contributors

denis avatar dmitriy-kiriyenko avatar aratak avatar

Stargazers

Anton Ilin avatar  avatar  avatar Wojtek Majewski avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

aratak

soprano's Issues

Something wrong with `daemon_strategy`

Just updated to lates verson, but got an error.

hotfixed by set :daemon_strategy, ""

aratak@masmodeus:~/projects/vecherka {master}$ cap deploy
    triggering load callbacks
/Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/configuration/variables.rb:82:in `fetch': `daemon_strategy' not found (IndexError)
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/configuration/variables.rb:110:in `protect'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/configuration/variables.rb:110:in `synchronize'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/configuration/variables.rb:110:in `protect'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/configuration/variables.rb:78:in `fetch'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/soprano-0.60/lib/../recipes/daemon_strategy.rb:2:in `load'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/callback.rb:25:in `call'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/callback.rb:25:in `call'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/configuration/callbacks.rb:123:in `trigger'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/configuration/callbacks.rb:123:in `each'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/configuration/callbacks.rb:123:in `trigger'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:33:in `execute!'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:14:in `execute'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/gems/capistrano-2.11.2/bin/cap:4
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/bin/cap:19:in `load'
    from /Users/aratak/.rvm/gems/ruby-1.8.7-p352@vecherka/bin/cap:19

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.