fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] deploy to loadbalancer and application server


From: Benoit Caron
Subject: Re: [Fab-user] deploy to loadbalancer and application server
Date: Wed, 15 Sep 2010 10:37:36 -0400

On Wed, Sep 15, 2010 at 10:33 AM, Jeff Forcier <address@hidden> wrote:
> On Wed, Sep 15, 2010 at 10:28 AM, Eric Buckley <address@hidden> wrote:
>> Thanks for getting back to me, to be more specific I'd like to create a task
>> called 'deploy' which is responsible for invoking a series of other methods
>> (e.g. pull(), checkout(), requirements(), restart(), etc.).
>
> You should check out the use docs on the execution model:
>
>    http://docs.fabfile.org/0.9.2/usage/execution.html
>
> Specifically the bit on how connections are set up:
>
>    http://docs.fabfile.org/0.9.2/usage/execution.html#connections
>
> The gist is that right now, the decorators only apply to "top level"
> tasks as invoked via the command line -- subroutines are 100% literal
> Python function calls and can't be detected or otherwise modified by
> the main execution loop.
>
> You can get the desired behavior by ensuring that env.host_string is
> updated for your subroutines as desired, something along the lines of
> "for host in [list, of, host, strings]: with
> settings(host_string=host): subroutine()". (You can of course also do
> something like "for host in env.roledefs['rolename']:".)
>
> In future versions we'll have a helper for this, and eventually the
> exec model will get more fleshed out in general.
>

Personnally, I "work-around" that by using Fab as an API ; a bit more
work, but a lot more control



reply via email to

[Prev in Thread] Current Thread [Next in Thread]