[Top][All Lists]

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

[Fab-user] Passing host IP addresses to Fabric tasks from other Python c

From: Samuli Seppänen
Subject: [Fab-user] Passing host IP addresses to Fabric tasks from other Python classes
Date: Tue, 27 Sep 2011 22:46:41 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20110831 Thunderbird/3.1.13

Hi all,

I've been successfully using Fabric 0.9.3 on Ubuntu 11.04 to manage
several hosts using a static, tag-based host list and it works pretty well:


However, I've been so far unable to dynamically pass on a host's
IP-address from an external Python class to the class/file containing
the actual Fabric tasks. So, essentially, I'd need to generate env.hosts
for Fabric on the fly, while keeping the Fabric tasks neatly isolated
from supporting Python code. As you can guess, my deployment scenario is
rather funky:

- hosts are generated on the fly
- each host get dynamic IPs (which rules out static host lists)
- some hosts will be ready sooner than others
- when a host becomes available, it needs to be configured with Fabric
as soon as possible
- Each Fabric instance is wrapped into a thread (so, in theory, each
instance could have env.hosts containing only one entry)

The underlying idea is to allow use of Fabric to configure a very large
number of identical hosts with dynamic IPs in a very short time. Any


PS. If you're interested, the tool I wrote is available here:


It's still rough around the edges, but except for Fabric integration it
works ok.

reply via email to

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