ah, you'll also need to set the verbosity of the logger, which
defaults to "silent as death".
logger.level = 3
- Jamis
On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
> Jamis,
>
> I have to admit I'm a *little*, just a little :) lost. How do I for
> example call the different tasks while using the capistrano-ext/
> multistage? Right now I'm just trying to do an "uptime" but getting no
> output from output.string
>
> Thank you!
> Matt
>
> On Jul 26, 12:24 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> > Something like this, maybe (wholly untested):
> >
> > require 'capistrano/configuration'
> > require 'stringio'
> >
> > output = StringIO.new
> > config = Capistrano::Configuration.new
> > config.logger = Capistrano::Logger.new(:output => output)
> >
> > config.load "/path/to/Capfile"
> > config.set :user, "user_to_deploy_as"
> >
> > config.deploy
> > puts output.string
> >
> > - Jamis
> >
> > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hi Jamis,
> >
> > > You mean, I can execute capistrano from ruby (rails) and have it
> > > execute as the correct user?! How do you do that? Can you show me an
> > > example, I do know Rails and I can easily get it setup on the server.
> >
> > > Matt
> >
> > > On Jul 26, 11:25 am, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> > > > Well...you could implement your web UI in Ruby and then just require
> > > > capistrano and invoke the tasks directly. :)
> >
> > > > - Jamis
> >
> > > > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
> >
> > > > > Thanks Jamis.
> >
> > > > > Unfortunately I can't do that. User output is essential. I'm
> > > > > experimenting with issuing the command using su. By doing something
> > > > > like:
> >
> > > > > echo 'MyPassWord' | su - deployer -c 'cd project; cap deploy;'
> >
> > > > > I realize there are security issues there, but the server has only a
> > > > > few users. And I'd make it so only apache could read that script
> > > > > file. Also, the file is NOT in the web root. Bad idea?
> >
> > > > > Any other ideas? :-)
> >
> > > > > Matt
> >
> > > > > On Jul 26, 9:47 am, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> > > > > > You could try doing it async--have the request add a record to a
> > > > > > queue
> > > > > > somewhere. Then (via cron or some other external process) you
> > > > > > periodically read from the queue and fire off the deploy command
> > > > > > that
> > > > > > way.
> >
> > > > > > It does mean you won't be able to capture the output and feed it
> > > > > > back
> > > > > > to the user in real time, though.
> >
> > > > > > - Jamis
> >
> > > > > > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
> >
> > > > > > > Hi,
> >
> > > > > > > I need to find a way to trigger a cap deploy from a web
> > > > > > > application/
> > > > > > > form. I'm using PHP as the scripting language and I know I can
> > > > > > > just
> > > > > > > issue an exec('cd /my-app; cap deploy'). But the problem is
> > > > > > > permissions. I have a specific user setup for the project and I
> > > > > > > can't
> > > > > > > have apache executing "cap deploy" directly. Does anyone know how
> > > > > > > to
> > > > > > > do this correctly?
> >
> > > > > > > Thanks,
> > > > > > > Matt
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---