[Top][All Lists]

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

Re: [Fab-user] A couple of questions

From: Tomasz Melcer
Subject: Re: [Fab-user] A couple of questions
Date: Mon, 19 Sep 2011 22:19:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110820 Icedove/3.1.12

Hash: SHA1

W dniu 19.09.2011 21:17, Jeff Forcier pisze:
> On Mon, Sep 19, 2011 at 11:46 AM, Tomasz Melcer <address@hidden> wrote:
>> 1. I often use chroot for testing. Are there any helpers planned to make
>> using chroot easier?
> Fabric executes a new shell session for each run/sudo -- thus
> "stateful" things like chroot have to be faked. For example, 'cd' is
> implemented as a context manager slapping an implicit "cd directory
> &&" in front of commands.
> If chroot can be supported in this way (and it seems it can, by
> 'chroot <command>'?) then we might accept a pull request to add a
> chroot context manager.

I was thinking of something different: to be able to use a chroot as a
host, instead of an ssh connection. This way I'd be able to use one task
for my test chroot and for my production server. For example:


@hosts(chroot("~/my-test-chroot"), "address@hidden")
def deploy():


I assume this would be a major change?

>> 2. Pipe from remote command to local file. Is it possible to reproduce this 
>> in fabric?
> That depends a lot on Paramiko's support for it; it could be
> impossible or very tricky. Sounds like the inverse of
> https://github.com/fabric/fabric/issues/289.

Yes, exactly. It doesn't seem very difficult to do, maybe I'll try later.

> With the current implementation, your best bet is probably to use a
> temporary on-disk file, or a ramdisk if that's worth the effort to
> avoid hitting disk.

Yes, that's what I'm doing now.

>> 3. Is any work done on [1] ("Make use of ssh_config where possible")? I
>> cannot find the branch mentioned in the last comment.
> That's probably https://github.com/goosemo/fabric/tree/3-ssh-config ,
> but Morgan can probably confirm/deny. That branch is likely a little
> out of date now too.
> Regardless, the ssh_config stuff is a moderately high priority so
> it'll probably be included in one of the upcoming (post-1.3) releases.
> Note from that ticket that Paramiko is a limiting factor here too --
> just because one can read in values from ssh_config doesn't mean all
> of ssh's functionality works yet, so some options may be no-ops in
> Fabric. That said, the basic stuff like host aliases and such is
> possible to support and would be a good first step.

I only keep ServerAliveInterval option and aliases there.

Tomasz Melcer
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


reply via email to

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