Top Commentators

OnTheRoad

  • Two guys and a Beer - Episode 85
  • Jam Session 2
  • Two guys and a Beer - Episode 84

Fabric for remote deployment

I recently came across a piece of software called “Fabric”. It has been made in python and its purpose is to help simplifying the process of deploying software to remote machines.

The really cool thing I like about it is that it’s much faster than, say, an ant script because it actually reuses the SSH connections it opens. This means that, if you copy a file to a remote host (using the ‘put’ operation), do some local copying, and after that perform a remote command (like starting a server, for instance), this latter operation will not need to open another SSH connection to run the command.

I managed to cut by a factor of 5 the deployment speed of some java services running on jboss just by replacing ant’s sshexec by fabric’s ‘put’ method and its siblings :)

But there’s a lot more to it: It allows you to configure multiple target environments and hosts (think about deployment to multiple nodes of equal functionality), perform remote commands with ‘sudo’ and, since the configuration file is basically a python script, you can use all the pythonic sugar of your liking :D

More information about Fabric can be found here. You can get the latest (stable) version in their github page, and here is a reference of the available operations.

UPDATE: I didn’t notice, but someone posted an article on YCombinator news about exactly the same subject before I did. I really should read the list before posting :)

Related:

  1. JIRA issues reporting with Python I recently took interest in knowing how one of the...
  2. SSH login without password (authorized_keys) I know that a lot of people covered this in...

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>