[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] A couple of questions
From: |
Ronan Amicel |
Subject: |
Re: [Fab-user] A couple of questions |
Date: |
Mon, 19 Sep 2011 23:42:46 +0200 |
On 19 sept. 2011, at 22:19, Tomasz Melcer <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 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:
>
> #v+
>
> @hosts(chroot("~/my-test-chroot"), "address@hidden")
> @task
> def deploy():
> rsync_project(remote_dir="/var/www")
>
> #v-
>
> I assume this would be a major change?
You could try using a virtual machine for testing your deployment in a safe and
realistic environment.
I use Vagrant myself to easily spin up VirtualBox VMs for this purpose:
http://vagrantup.com/
>
--
Ronan Amicel
http://topixtream.com/