[Top][All Lists]

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

Re: [Fab-user] Shell Command?

From: Jorge Vargas
Subject: Re: [Fab-user] Shell Command?
Date: Mon, 25 May 2009 21:53:53 -0400

On Mon, May 25, 2009 at 8:03 PM, Jeff Forcier <address@hidden> wrote:
> On Mon, May 25, 2009 at 7:32 PM, Jorge Vargas <address@hidden> wrote:
>> oh really? so there is no threaded model yet? For some reason I though
>> that was the default. it was in 0.1?
> Per-host threading never actually worked; Christian had some code
> towards that goal but as far as I'm aware it was never fully
> operational.
> The main difference between 0.1 and friends, and 0.9, was that Fabric
> ran your fabfile function once only, with run() and sudo() iterating
> over the host list each time they were called. Nowadays the entire
> function runs once per host in the host list (and thus run/sudo/etc
> run on a single host at a time), which allows a more natural
> construction of the code in your fabfile.
ahh right, thanks for the clarification.

> We do plan on solving the parallelism problem at some point, however,
> whether that's with actual threads, or some other concurrency solution
> like Twisted, Kamaelia or whatnot. In such a scenario, your functions
> are still run once per host, but instead of iterating serially over
> the host list when doing so, they'd all run at the same time.
>> well I don't know a lot of paramiko, so I really don't know I guess I
>> could experiment with it a little.
> Honestly I think the best way to do a Fabric shell would simply be to
> just use IPython, which is quite possible right now, and probably some
> extra code to make managing hosts and so forth a little easier.
> Here's me using Fabric interactively right now (without any
> aforementioned shell-specific extras, as they don't exist yet :D):
errr I was actually thinking of something along the lines of

from fabric.api import run

def bash():

def python():

def ipython():

that is run the interperter or shell on the Target machine rather than
local. And it will somehow give you back the input/output buffers.

> As you can see, I called run() once (with warn-only turned on) and was
> able to continue executing as normal. With warn_only not turned on,
> SystemExit is raised (though IPython actually has builtin options such
> that you are NOT kicked out of the interpreter when this happens,
> which is nice.)
this is also nice. but not as good as you will have to do run() around
each command.

> So any "shell" functionality is, I'd imagine, simply going to be
> streamlining that experience. Again, however, this is not set in
> stone, and I'll be soliciting use cases when I get around to
> implementing anything.
> -Jeff
>>> Best,
>>> Jeff
>>> On Mon, May 25, 2009 at 7:01 PM, Jorge Vargas <address@hidden> wrote:
>>>> Hello,
>>>> Are they any plans (or is it even possible) to provide a interactive
>>>> shell over paramiko?
>>>> I'm interested in two use cases
>>>> 1- fallback to shell if the command fails
>>>> 2- automate half of a process, let the user poke around, and possibly
>>>> run another set of automatic commands.
>>>> And example of the second will be "get me a psql command line on my
>>>> database server X"
>>>> I'm not sure how this will work with multiple hosts, I guess it could
>>>> be turned off or simply pile them up.
>>>> _______________________________________________
>>>> Fab-user mailing list
>>>> address@hidden
>>>> http://lists.nongnu.org/mailman/listinfo/fab-user

reply via email to

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