[Top][All Lists]

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

Re: [Fab-user] Persistent State?

From: Jeff Forcier
Subject: Re: [Fab-user] Persistent State?
Date: Fri, 15 May 2009 09:47:44 -0400

Hey Jorge,

Fabric is just Python, so while I don't think there's any need to bake
in any kind of Fab-specific persistence, you can easily hook into
absolutely anything in the Python world that you want. For what you
mentioned, I'm guessing some simple file-based database like SQLite or
BDB might work, for example.

If I'm missing some way in which this would need to be offered in
Fabric itself, do let me know :)


On Fri, May 15, 2009 at 9:22 AM, Jorge Vargas <address@hidden> wrote:
> Hello,
> I'm wondering if something like this is possible or more important
> doable with the current code base.
> My usecase is:
> I'm using fabric to install an application (actually several which
> almost the same deployment method) they all run on a specific port and
> the port is given to me by an external service (hosting provider API).
> What I want is a way to store these ports someone so my fabric
> environment is aware of those variables. As you can tell this is
> useful in many cases (for example user defined defaults or per server
> constants)
> seudo-python below:
> def create_app(appname):
>    result = api.create_app(appname)
>    if result.message == 'success':
>         environ[appname][port] = result.app.port
> def update_supervisor(appname):
>    cmd = '$VENV $INIFILE --port %s' % environ[appname][port]
>    fabric.files.append(,'supervisord.conf)
> Now of course this implied a run order, but most importantly I could
> run create_app today and the update_supervisor command 10 days from
> now. So that is why I want a persistent state. What do you guys think
> about it?
> _______________________________________________
> 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]