fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] RFC: using vellum build scripts as source of fabric tasks


From: Christian Vest Hansen
Subject: Re: [Fab-user] RFC: using vellum build scripts as source of fabric tasks/environments
Date: Tue, 12 Aug 2008 15:26:26 +0200

Stuff like put(), sudo() and set() are kept in the OPERATIONS map,
which will be primed with the built-in stuff when you import the
fabric module.

Appart from that, look at how main() (near the end of fabric.py) is
implemented. You'll probably want to _load_default_settings() as
normal. Then you'll need to do what load() does, if you want to be
able to inject user-defined commands, and then you will want to make
Vellum do what _execute_commands() does.

That's the put-stuff-into-fabric approach anyway. A better approach,
depending on how Vellum likes its dinner served, would be to read
whatever is in OPERATIONS and COMMANDS and make them available as
Vellum counterparts.

But, but, but... when I talk about backwards compatibility in fabric,
I'm talking about the interface/operations that are made available to
fabfiles and *not* the interface of fabric-as-a-module. So, you will
probably want to be very specific to your users, about which versions
of your fab/vellum things that works with which versions of fabric
(and/or Vellum).

On Tue, Aug 12, 2008 at 1:47 PM, Ronny Pfannschmidt
<address@hidden> wrote:
> Am Dienstag, den 12.08.2008, 13:08 +0200 schrieb Christian Vest Hansen:
>> I don't really know anything about Vellum except that it is a Zed Shaw
>> project, and I hear that he usually gets it right.
>>
>> I'm certainly not against people trying stuff out, but I don't feel
>> like I have anything constructive to add in this case.
>>
>> Would you be using Fabric as a sort of library and let Vellum handle
>> the command invocation?
>
> That's the plan.
> It would help getting deployment
> and the rest of building into the same thing.
>
> Along with IDE integration in PIDA for free.
>
> Any pointers on where to start?
> I didn't yet dig into fabric's core.
>
>>
>> On Mon, Aug 11, 2008 at 11:22 PM, Ronny Pfannschmidt
>> <address@hidden> wrote:
>> > Hi,
>> >
>> > i worked with vellum and fabric and what they do in regard to "tasks"
>> > looks similar so i made up an integration idea.
>> >
>> > A translation of the "complex" example.
>> >
>> >        def test():
>> >            set(fab_hosts = ['localhost'])
>> >
>> >        def staging():
>> >            set(fab_hosts = ['n1.stg.python.org', 'n2.stg.python.org'])
>> >
>> >        def production():
>> >            set(fab_hosts = ['n1.python.org', 'n2.python.org'])
>> >
>> >        def deploy():
>> >            'Deploy the app to the target environment'
>> >            local("make dist")
>> >            put("bin/bundle.zip", "bundle.zip")
>> >            sudo("./install.sh bundle.zip")
>> >
>> > *could* look like the following in using vellum:
>> >
>> >        options(
>> >          name 'Test'
>> >        )
>> >
>> >        imports[
>> >           module(from 'fabric.vellum')
>> >        ]
>> >
>> >        depends(
>> >           deploy ['dist']
>> >        )
>> >
>> >        targets(
>> >           test
>> >              set(fab_hosts ['localhost'])
>> >           staging
>> >              set(fab_hosts ['n1.stg.python.org' 'n2.stg.python.org'])
>> >           production
>> >              set(fab_hosts ['n1.python.org' 'n2.python.org'])
>> >
>> >           dist $ make dist
>> >
>> >           deploy [
>> >                put(from 'bin/bundle.zip' to 'bundle.zip')
>> >                sudo $./install.sh bundle.zip
>> >           ]
>> >        )
>> >
>> > Im hoping for some comments before trying to make the tools suitable for 
>> > that kind of integration.
>> >
>> > Regards Ronny
>> >
>> >
>> >
>> > _______________________________________________
>> > Fab-user mailing list
>> > address@hidden
>> > http://lists.nongnu.org/mailman/listinfo/fab-user
>> >
>>
>>
>>
>
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>



-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.




reply via email to

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