Fabric and why it makes me happier to work on side projects

Tonight I set out for two goals, to start an app for tracking my progress in preparation for a Century Ride in the next few months, and to organize my fabfile.py to be more generic. I’ve started the app, though all it does is let you log into the admin section of the site (using django-admin) which is some success. But the real technical success tonight is my fabfile and how far it has come.

I had a monolithic fabfile that I have been copying between projects and just search and replacing in, it could (potentially) do a full install of an app, at a push of a button. Really those steps are things that are done (for me at least) once a blue moon. The more valuable part is push button releases. So I reworked it to only include the things I need for development and releases this is the result: Century fabfile.py

The lower the bar, the better for releasing new version of a site I am working on. In the past I had found myself editing python on the live server, then committing back to github as things work. This is poor practice for many reasons… Now, I can finish a feature, close a bug, or clean up code and easily deploy it to the live server with a simple `git push && fab deploy` The only reason the git push isn’t part of the deploy is that sometimes I unpushed code that is not ready for live, and I’d like to be able to deploy without having to worry about that.

I highly recommend that you guys check out Fabric, it is really simple to use and will make your life better in many ways.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s