capistrano

How is Capistrano related to Rake?

I'm starting to read up on Capistrano after using Rake tasks to deploy apps for a long time. It's really striking how similar it is to Rake. A lot of parallel commands (like cap -T) and a lot of identical concepts (namespaces, tasks). Does anyone know the history behind that? Is Capistrano an extension of Rake, or built on top of it? ...

Questions about default deploy Task in Capistrano for PHP project and config.php

Hello All, I'm having a full day understanding the use of Capistarno. Is really a nice tool that will save me lots of time. I'm actually wanting to use it to deploy one of my many php apps :) If I have a config.php with an $env="development" variable. Is there any way to make Capistrano change this variable for me to "production" inste...

Capistrano and git checkout

Hi I am getting the following error when I do a cap deploy, which checks out of a git master repository: Could anyone please help me? Thanks in advance /var/lib/gems/1.8/gems/capistrano-2.5.8/lib/capistrano/configuration/servers.rb:78:in `role_list_from': unknown role `app' (ArgumentError) from /var/lib/gems/1.8/gems/capistrano-2...

What exactly is a "role" in Capistrano?

What is the purpose and function of "roles" in a Capistrano recipe? When I look at sample recipes, I often see something like this: role :app, 'somedomain.com' role :web, 'somedomain.com' role :db, 'somedomain.com', :primary => true So it looks like a role is basically a server where Capistrano executes commands. If that's the case, ...

How can I specify separate app and DB servers for Capistrano?

I'm trying to deploy a Rails app to a CentOS server running Passenger. The SVN repository and MySQL database are each hosted on separate machines. (In other words, there's a total of three separate hosts involved.) Here is my deploy.rb file (taken from the Passenger docs): set :application, 'myapp' set :repository, 'svn+ssh://user@svn...

Rollback code in Capistrano.. for a PHP Project

Hello, I'm looking for an easy way to go back to the previous release if something goes wrong with the last realease in Capistrano Is there any command like "cap goback" to undo the last deploy? (thus updating the current symlink to it's old location) Is this built-in or I just have to make a task myself? Here's my recipe: set :user...

Why keep a copy of an app on the DB host?

A lot of Capistrano example recipes include a :db role. By default the deploy task exports the app code to all hosts in all roles. So that suggests that it's typical for people to keep a copy of their app on the DB host. Also, in Capistrano's distributed deploy.rb recipe, :deploy:migrate looks like this: task :migrate, :roles => :db, :o...

Automated Deployment in Rails

I'm working on my first rails app and am struggling trying to find an efficient and clean solution for doing automated checkouts and deployments. So far I've looked at both CruiseControl.rb (having been familiar with CruiseControl.NET) and Capistrano. Unfortunately, unless I'm missing something, each one of them only does about half of...

Deploying Thinking Sphinx through Capistrano yeilds 'Column number 6 has no name'

I'm not exactly sure where the problem I'm running into is occurring. When I run the deploy task the rake thinking_sphinx:configure works fine, but then when it tries to index it this error occurs: ERROR: index 'board_core': column 6 has no name. ERROR: index 'board_delta': column 6 has no name. ...and so on for all of my indexes and ...

git, capistrano and windows please help

hi I am trying to deploy my app to my server using capistrano I am in a Git Bash and have commited everything and setup deloy.rb file and remote repo on Github. Now when i try and cap command even cap -h from Git bash i get error : sh.exe": cap: command not found I am in the correct dir. It seems Git Bash is not linked to capistran...

capistrano problem an windows please help

hi all i am having a problem with deploying my application to my server. i have msysgit, github and capistrano installed and working. i have successfully pushed my app to github and can successfully run cap deploy:setup to setup on my server from my local machine. BUT.. when i run cap deploy:cold it asks me for my passphrase to conn...

capistrano problem

Hi all I am having a problem with deploying my application to my server. I have msysgit, github and capistrano installed and working. I have successfully pushed my app to github and can successfully run cap deploy:setup to setup on my server from my local machine. BUT.. When I run cap deploy:cold it asks me for my passphrase t...

CruiseControl.rb: running cruise rake task with current revision as parameter

Hi, when CruiseControl.rb wants to perform an integration test it looks for a rake task called "cruise" within the project and executes it. Is there a way to hand over the current revision number to that task? I'm deploying an app using capistrano on a remote machine after integration tests. Because capistrano will deploy the HEAD rev...

Automating svn update

I'm frequently sshing into a server, switching to a specific directory and running svn-update I'm thinking that there's probably a very easy way to automate this, so I can simple specific a subdirectory when I run the script and it'll login via SSH, cd to the right directory and run svn-update. Is this a job for capistrano or could a s...

Keep log of capistrano deployments

Is there a way to keep a log (either local or stored on a remote server) of every time a deployment is done via capistrano? It would be very useful to keep a record of what revision was running at any given time in the past. I know that the deployment process leaves behind the deployed files for the last 10 deployments in the releases ...

Is it safe to use Capistrano?

I have a Gallery-style app that has been already deployed. My local version has many photos that I use only for local testing, and I absolutely do NOT want them to overwrite my real photos which are online. I also have a git repository which only tracks my code and ignore photos. When I type cap deploy:migrations does it use my git re...

Capistrano: Unable to chdir or not a git archive

It is the first time that I try to deploy a Rails app with Capistrano. Here what happens when I call deploy:migrations: $ cap deploy:migrations * executing `deploy:migrations' * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote [email protected]:/home/colli...

Capistrano's Failure

It is the first time I use Capistrano and the application had been already published without it. When I type cap deploy:migrations I get the following error after some successful commands: * executing "cd /home/collimarco/foto-fiori.com/releases/20090818111104; rake RAILS_ENV=production db:migrate" servers: ["foto-fiori.com"] ...

Run all Namespace Tasks with Capistrano

I have a namespace with different tasks: namespace :mytest do task :setup do; ... end; task :task1 do; ... end; task :task2 do; ... end; end When I run cap mytest I get the task `backup' does not exist. How do I create a command which calls all tasks? ...

db:schema:load vs db:migrate with capistrano

Hi, I have a rails app that I'm moving to another server and I figure I should use db:schema:load to create the mysql database because it's recommended. My problem is that I'm using capistrano to deploy and it seems to be defaulting to rake db:migrate instead. Is there a way to change this or is capistrano using db:migrate for a good re...