[Capistrano] Accessing server variable in parallel helper

2008-12-10 Thread Olivier
Hi everyone, I've read in capistrano 2.5 release notes that you can use this syntax in parallel helper : session.when server.host =~ /app/, /command/to/execute I'd would like it it's possible to access the server variable in the second string specifying the command to run. I'd like to do

[Capistrano] Re: Accessing server variable in parallel helper

2008-12-10 Thread Jamis Buck
The best you can do is substitute the name of the host the command is being executed on: command_to_execute $CAPISTRANO:HOST$ - Jamis On Wed, Dec 10, 2008 at 8:59 AM, Olivier [EMAIL PROTECTED] wrote: Hi everyone, I've read in capistrano 2.5 release notes that you can use this syntax in

[Capistrano] hooking the svn tag task

2008-12-10 Thread Gregory Seidman
When I cap deploy a project, it creates a tag in svn for that deployment. This is awesome, but I'd like to hook into that task (i.e. after ... do) to also tag and reset some svn:external'd plugins. Unless someone wants to share a recipe that already does something like that (or some pointers on

[Capistrano] Re: Accessing server variable in parallel helper

2008-12-10 Thread Olivier
Ok thanks for your fast reply. I think I'll put a script on each host with hardcoded custom parameters in it. On Dec 10, 5:13 pm, Jamis Buck [EMAIL PROTECTED] wrote: The best you can do is substitute the name of the host the command is being executed on:    command_to_execute

[Capistrano] Re: hooking the svn tag task

2008-12-10 Thread Jamis Buck
Capistrano itself does not create tags (in subversion or any other SCM). If your deployment system is doing that, then there is a custom task somewhere that's doing it, and you'll want to hook into whatever custom task that is. - Jamis On Wed, Dec 10, 2008 at 9:24 AM, Gregory Seidman [EMAIL

[Capistrano] git deploy

2008-12-10 Thread ara howard
maybe people are already doing this, but it seems that doing a git deploy could simply *always* deploy from the deployment user's current directory. has this been written already? a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being

[Capistrano] Re: git deploy

2008-12-10 Thread Ezra Zygmuntowicz
On Dec 10, 2008, at 9:41 AM, ara howard wrote: maybe people are already doing this, but it seems that doing a git deploy could simply *always* deploy from the deployment user's current directory. has this been written already? set :deploy_via, :copy Cheers- Ezra

[Capistrano] Re: git deploy

2008-12-10 Thread ara.t.howard
On Dec 10, 2008, at 10:47 AM, Ezra Zygmuntowicz wrote: set :deploy_via, :copy and that's zero network dep? a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama

[Capistrano] Re: git deploy

2008-12-10 Thread Jamis Buck
You'll also want to: set :repository, . Then, the deploy will basically checkout a copy of your current directory, tar/gz it, push it to the remote servers, and unpack it in the right location. The only network dependency is the move of the tar/gz archive from your current host to the remote

[Capistrano] Re: git deploy

2008-12-10 Thread ara.t.howard
On Dec 10, 2008, at 10:51 AM, Jamis Buck wrote: You'll also want to: set :repository, . Then, the deploy will basically checkout a copy of your current directory, tar/gz it, push it to the remote servers, and unpack it in the right location. The only network dependency is the move of

[Capistrano] Re: git deploy

2008-12-10 Thread Ezra Zygmuntowicz
On Dec 10, 2008, at 9:49 AM, ara.t.howard wrote: On Dec 10, 2008, at 10:47 AM, Ezra Zygmuntowicz wrote: set :deploy_via, :copy and that's zero network dep? Well it makes a tarball of your local app dir and then uses net-sftp to upload it to your server instead of ever

[Capistrano] Re: Accessing server variable in parallel helper

2008-12-10 Thread Lee Hambley
I approached this slightly differently, I have local configs, as part of my application (it isn't rails) - they reside in scm alongside my actual files, and at runtime, I run a command like this: - http://pastie.org/335918 The key part is the `hostname` part, which substitutes in the name of

[Capistrano] sudo, mongrel_cluster, runner, and EACCESS/bind error

2008-12-10 Thread jfrankov
This may actually be a question about some nuance of sudo, but maybe someone out there knows anyway. I'm trying to restart my mongrel_cluster, using cap 2.5.0 (via webistrano) but I'm getting an error. Here's the relevant part of my config: set :user, foobar set :use_sudo, true set

[Capistrano] Re: git deploy

2008-12-10 Thread ara.t.howard
On Dec 10, 2008, at 10:53 AM, Ezra Zygmuntowicz wrote: Well it makes a tarball of your local app dir and then uses net-sftp to upload it to your server instead of ever bothering with version control(i think?). You may have to experiment. that is definitely *not* what i'm trying to do.

[Capistrano] Re: sudo, mongrel_cluster, runner, and EACCESS/bind error

2008-12-10 Thread Jamis Buck
Calling sudo without -u defaults to running as root. So, logging as foobar and doing sudo runs the command as root, which works because only root can bind to ports less than 1024 (or thereabouts). On the other hand, logging in as you and running sudo -u foobar runs the command as foobar, and

[Capistrano] Re: git deploy

2008-12-10 Thread Jamis Buck
set :repository, . set :deploy_via, :copy Does exactly what you're describing, Ara. It'll do a local clone of your current repo, tar it up, and ship it off to the servers. - Jamis On Wed, Dec 10, 2008 at 11:15 AM, ara.t.howard [EMAIL PROTECTED] wrote: On Dec 10, 2008, at 10:53 AM, Ezra

[Capistrano] Re: git deploy

2008-12-10 Thread Ezra Zygmuntowicz
On Dec 10, 2008, at 10:21 AM, Jamis Buck wrote: set :repository, . set :deploy_via, :copy Does exactly what you're describing, Ara. It'll do a local clone of your current repo, tar it up, and ship it off to the servers. - Jamis On Wed, Dec 10, 2008 at 11:15 AM, ara.t.howard [EMAIL

[Capistrano] Re: git deploy

2008-12-10 Thread ara.t.howard
On Dec 10, 2008, at 11:21 AM, Jamis Buck wrote: set :repository, . set :deploy_via, :copy Does exactly what you're describing, Ara. It'll do a local clone of your current repo, tar it up, and ship it off to the servers. - Jamis thanks for the answer jamis, and also for your tireless

[Capistrano] Re: git deploy

2008-12-10 Thread Mislav Marohnić
On Wed, Dec 10, 2008 at 19:21, Jamis Buck [EMAIL PROTECTED] wrote: Does exactly what you're describing, Ara. It'll do a local clone of your current repo, tar it up, and ship it off to the servers. ... which is rather expensive if your project is big (with lots of image and other assets). Why

[Capistrano] Re: git deploy

2008-12-10 Thread Jamis Buck
That's a really neat approach, Mislav. Definitely worth looking into if you're deploy to a single remote host, and are using git. - Jamis On Wed, Dec 10, 2008 at 12:10 PM, Mislav Marohnić [EMAIL PROTECTED] wrote: On Wed, Dec 10, 2008 at 19:21, Jamis Buck [EMAIL PROTECTED] wrote: Does exactly

[Capistrano] Re: hooking the svn tag task

2008-12-10 Thread Gregory Seidman
Okay, I feel silly. Checked the capistrano config we're using, found the task, did an svn blame on it... and it turns out I wrote it. Whoops! Thanks, though. --Greg On Wed, Dec 10, 2008 at 10:07:06AM -0700, Jamis Buck wrote: Capistrano itself does not create tags (in subversion or any other

[Capistrano] Re: sudo, mongrel_cluster, runner, and EACCESS/bind error

2008-12-10 Thread jfrankov
That does make sense. I think I was getting confused by the fact that sudo was invoking the command as foobar, which somehow made me think foobar was executing the command with sudo privileges. Bzzt. I fixed this with an override of the deploy:restart task that removes the -u from the sudo