Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debian packages versus Fabric deployment

What are the pros and cons of using Debian packages to deploy a web application as opposed to using Fabric? I have only ever used Debian packages.

I'm also interested in hearing about problems you've bumped into when using Fabric and you wished you had used Debian packages.

like image 334
wsdookadr Avatar asked Feb 28 '13 02:02

wsdookadr


1 Answers

Debian

It is a Package Manager. It allows user to manage packages through various programs like dpkg or apt on a system.

What it does for you :

  • builds package from source
  • handles package dependencies, package versions
  • installs, updates and removes programs on a system
  • works at low level, compiled binaries maybe system specific (i386, amd64)

Cons :

  • To deploy the application the configuration must be provided in your package, or some configuration has to be used as default
  • Different binaries for systems with different architecture

Fabric

It is a Python library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

What it does for you :

  • configure your system
  • execute commands on local/remote server (systems administration)
  • deploy your application, do rollbacks, mainly automate deployment through a script
  • works on a higher level, does not depend on system architecture but on OS and package manager

How do you use pip, virtualenv and Fabric to handle deployment?

Cons:

  • It cannot replace package manager on a system, it manages packages on top of it
  • You should know the system, commands folders specific to your package manager / OS

Update

I was already familiar with Debian when Fabric came. So Debian has stayed as my preferable tool. Why I use Fabric, it eases deployment of applications and is handy tool for developers. Here are some reasons why I would use Debian over Fabric:

  1. When I am not going into production, still developing and testing stuff. Debian is suitable most of the time, when code is being added/modified. Fabric just eases the transition from development to production.
  2. Sometimes if I deploy application on my machine only, Fabric seems overkill. If deployment does not involve many machines, requires several dependencies, I would stick to Debian.
  3. When rollback, or undoing is not an option. Fabric will simply execute your commands safe or not, if you are not adept at handling system errors/exceptions, try it somewhere before using Fabric. (Debian is part of system so have to use Debian and other system tools)
like image 109
user568109 Avatar answered Nov 02 '22 07:11

user568109