fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] A few questions about fabric


From: Jeff Forcier
Subject: Re: [Fab-user] A few questions about fabric
Date: Wed, 22 Sep 2010 12:21:14 -0400

On Wed, Sep 22, 2010 at 11:33 AM, Yungwei Chen <address@hidden> wrote:

> 1. When loading a sql dump into a mysql server on a remote machine using 
> fabric, will I be prompted to enter a password on my local console? If not, 
> how do you usually deal with this situation?

With Fabric 0.9.x (the current stable releases) this isn't possible,
so you'll have to find a noninteractive solution such as using a
~/.my.cnf on the remote end (obviously the exact tactic used varies
from program to program).

Fabric 1.0 will have full interactivity so that you'll be able to
enter data into remote prompts relatively easily; we're hoping to get
it out to the public relatively soon.


> 2. If multiple remote machines are involved in a given task, do I have to 
> divide a big fabric script into multiple parts and then run them separately 
> on different remote machines? Or maybe I don't have to so long as required 
> ssh connections are established properly?

It depends on exactly what you're doing, but you can definitely have
multiple connections active at the same time in a single Fabric
session. Right now, each task invoked on the CLI runs on its own host
list, so you could for example define task1 with a hosts decorator of
@hosts('hostA'), and define a task2 running on @hosts('hostB'), and
call "fab task1 task2". This would run task1 on hostA, then run task2
on hostB.

You can get more granular than this if you modify env.host_string,
which is the key setting determining what a given run/sudo/put/get/etc
call does, network-wise. See docs.fabfile.org => usage docs =>
execution => connections for more info.


Best,
Jeff

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby developer
http://bitprophet.org



reply via email to

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