Alternative to fabric

921 views
Skip to first unread message

Andreas Kuhne

unread,
Nov 17, 2014, 6:29:05 AM11/17/14
to django...@googlegroups.com
Hi all,

We are just about ready to release our newly rewritten website. It is based on Django 1.6 and Python 3. 

We have worked through all of the problems with using python 3 (migrated some plugins ourselves, other plugins were updated during the course of the project). The only problem we have left is a good deployment plugin, so that we easily can deploy new versions of our site.

We previously used fabric, but that doesn't work with python 3. So I was wondering if anyone has any python 3 compatible fabric alternative that they are using?

Regards,

Andréas

René Fleschenberg

unread,
Nov 17, 2014, 10:38:35 AM11/17/14
to django...@googlegroups.com
Hi Andreas,

If you like fabric, why not just use Python 3 for your project and Python 2
for fabric? You can easily have multiple Python interpreters installed. Just
install Python 2 to a path like ~/local and give fabric its own virtualenv.

Best regards,
René

Andreas Kuhne

unread,
Nov 17, 2014, 11:01:07 AM11/17/14
to django...@googlegroups.com
Hi René,

I saw that kind of solution. The only thing is I really didn't like having to setup 2 environments, but perhaps that is the way to go. I will however be looking into ansible, to see if that is an alternative (I know that it runs python 2 as well, but I liked the format of it).

Regards,

Andréas Kühne
Software Development Manager
Suitopia Scandinavia AB

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2926866.uvUyIk0gGl%40rex.
For more options, visit https://groups.google.com/d/optout.

Cal Leeming [iops.io]

unread,
Nov 17, 2014, 11:07:43 AM11/17/14
to django...@googlegroups.com
There isn't really such a thing as a "deployment plugin", there are many aspects to deployment workflow that should be considered.

It really depends on how you are intending on deploying your application, if you are dockerizing it then your CI system should be building the images and pushing to a repository of your choice (docker hub, S3 etc). If you are snapshotting on the hosting provider, then you can use packer.io and a bunch of shell scripts. Pushing code to a single server via SSH isn't really a scalable way to do deployment, and if this is what you are doing then you might as well run a tmux/screen session on the server instead.

Sadly other than Amazon Beanstalk and Heroku, both of which are horrifically expensive, there isn't much in the way of choices. You can look at dokku and deis, both of which are not considered stable for production but use the same build pack idea as Heroku.

If you want to go super ghetto, you should use a shell script which SSHs into your "single use" box, issue a "docker pull" then restart the running container. All of these things require a lot of plumbing work.

Another approach would be to install python 2.6 in a venv (assuming you have the relevant system libs) and run Fabric with that instead... In fact putting fabric in its own venv is probably better because having fabric inside your application space anyway would be considered cross contamination (e.g. deployment tooling mixed in with application code). This may feel weird at first, but once you get into the concept of separating plumbing from application code, it feels more normal. If you do this, use virtualenvwrapper to save headaches.

If you're a JS guy, there's also a bunch of SSH tooling for node too, but I can't give any personal recommendation on those.

Cal



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Brian Schott

unread,
Nov 17, 2014, 11:24:27 AM11/17/14
to django...@googlegroups.com
Ansible is a good choice.

Sent from my iPhone

Brad Pitcher

unread,
Nov 17, 2014, 12:42:47 PM11/17/14
to django...@googlegroups.com
I agree Ansible is a good fit for your situation. Since Ansible works from yaml files, you don't have to write any Python 2.x compatible code as you would with Fabric.

René Fleschenberg

unread,
Nov 17, 2014, 2:27:52 PM11/17/14
to django...@googlegroups.com
Hi,

On Monday 17 November 2014 17:42:22 Brad Pitcher wrote:
> I agree Ansible is a good fit for your situation. Since Ansible works from
> yaml files, you don't have to write any Python 2.x compatible code as you
> would with Fabric.

I agree that Ansible is a nice tool, but AFAIK, it is not Python 3 compatible.

http://docs.ansible.com/intro_installation.html

Best regards,
René


Ezequiel Bertti

unread,
Nov 17, 2014, 2:30:58 PM11/17/14
to django...@googlegroups.com
Ansible +1

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.



--
Ezequiel Bertti
E-Mail: ebe...@gmail.com
Cel: (21) 99188-4860

Matt Gushee

unread,
Nov 17, 2014, 2:38:23 PM11/17/14
to django...@googlegroups.com
Hi--

On Mon, Nov 17, 2014 at 12:27 PM, René Fleschenberg
<re...@fleschenberg.net> wrote:

> On Monday 17 November 2014 17:42:22 Brad Pitcher wrote:
>> I agree Ansible is a good fit for your situation. Since Ansible works from
>> yaml files, you don't have to write any Python 2.x compatible code as you
>> would with Fabric.

That's true.

> I agree that Ansible is a nice tool, but AFAIK, it is not Python 3 compatible.

That's also true.

In other words, you don't have to write Python 2 (or any Python) code
to use Ansible, but you do have to have Python 2 installed on your
target hosts, which I believe was the OP's objection.

The question of transitioning to Python 3 has been discussed in the
Ansible community; apparently the devs feel that moving to Python 3 at
this time would not deliver any great benefits, and would risk
alienating a large enterprise user base that is mostly using Python
2.x.

I was also looking at other alternatives, and it doesn't seem like
there are any good CM/deployment tools that currently support Python
3. It did look like Fabric is at least planning for a transition (I
think I saw something about it in the docs ... or maybe they had a
Python 3 development branch ... it was a few weeks ago, so I don't
remember exactly).

--
Matt Gushee

Andreas Kuhne

unread,
Nov 17, 2014, 2:51:39 PM11/17/14
to django...@googlegroups.com
Thanks all for your answers.

I have been looking for alternatives today, and all I have seen have not been python 3 compatible. What I can see however is that fabric (using a separate python 2 environment) or ansible both only use ssh and should not require installing anything on the servers. I suppose it'll have to be ok to use one of them with python 2, instead of using python 3 completely. I do think it's a shame that the community hasn't embraced python 3 more. It's a pity that developers don't make sure that the code is python 3 compatible so that we can easily make the transition.

Oh well....

Regards,

Andréas

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages