Tools for writing awesome Fabric files
Project description
About
fabtools includes useful functions to help you write your Fabric files.
fabtools makes it easier to manage system users, packages, databases, etc.
fabtools includes a number of low-level actions, as well as a higher level interface called fabtools.require.
Using fabtools.require allows you to use a more declarative style, similar to Chef or Puppet.
Installing
To install the latest release from PyPI
$ pip install fabtools
To install the latest development version from GitHub
$ pip install git+git://github.com/ronnix/fabtools.git
Example
Here is an example fabfile.py using fabtools
from fabric.api import *
from fabtools import require
import fabtools
@task
def setup():
# Require some Debian/Ubuntu packages
require.deb.packages([
'imagemagick',
'libxml2-dev',
])
# Require a Python package
with fabtools.python.virtualenv('/home/myuser/env'):
require.python.package('pyramid')
# Require an email server
require.postfix.server('example.com')
# Require a PostgreSQL server
require.postgres.server()
require.postgres.user('myuser', 's3cr3tp4ssw0rd')
require.postgres.database('myappsdb', 'myuser')
# Require a supervisor process for our app
require.supervisor.process('myapp',
command='/home/myuser/env/bin/gunicorn_paster /home/myuser/env/myapp/production.ini',
directory='/home/myuser/env/myapp',
user='myuser'
)
# Require an nginx server proxying to our app
require.nginx.proxied_site('example.com',
docroot='/home/myuser/env/myapp/myapp/public',
proxy_url='http://127.0.0.1:8888'
)
# Setup a daily cron task
fabtools.cron.add_daily('maintenance', 'myuser', 'my_script.py')
Supported targets
fabtools currently supports the following target operating systems:
Ubuntu 10.04 (lucid)
Ubuntu 12.04 (precise)
Debian 6.0 (squeeze)
Contributions to help support other Linux distributions are welcome!
Changelog
Version 0.9.4 (2013-01-10)
Add files missing in 0.9.3 (thanks to Stéfane Fermigier)
Version 0.9.3 (2013-01-08)
Fix bugs in user creation (thanks pahaz and Stéphane Klein)
Add support for group creation
Version 0.9.2 (2013-01-05)
Add syntax highlighting in README (thanks to Artur Dryomov)
Version 0.9.1 (2013-01-04)
Fix documentation formatting issues
Version 0.9.0 (2013-01-04)
Improve user creation and modification
Add support for BSD / OS X to files.owner, files.group, files.mode and files.md5sum (thanks to Troy J. Farrell)
Improve PostgreSQL user creation (thanks to Troy J. Farrell and Axel Haustant)
Add reload and force_reload operations to the service module (thanks to Axel Haustant)
Fix missing import in require.redis (thanks to svevang and Sébastien Béal)
Add clear option to Python virtualenv (thanks to pahaz)
Upgrade default Redis version to 2.6.7
Upgrade default Node.js version to 0.8.16
Decrease verbosity of some operations
Speed up functional tests
Version 0.8.1 (2012-10-26)
Really fix pip version parsing issue
Upgrade default pip version to 1.2.1
Version 0.8.0 (2012-10-26)
Improve user module (thanks to Gaël Pasgrimaud)
Fix locale support on Debian (thanks to Olivier Kautz)
Fix version number in documentation (thanks to Guillaume Ayoub)
Fix potential issue with pip version parsing
Version 0.7.0 (2012-10-13)
Fix changed directory owner requirement (thanks to Troy J. Farrell)
Add functions to get a file’s owner, group and mode
Version 0.6.0 (2012-10-13)
Add support for Node.js (thanks to Frank Rousseau)
Fix dependency on Fabric >= 1.4.0 (thanks to Laurent Bachelier)
Version 0.5.1 (2012-09-21)
Documentation and packaging fixes
Version 0.5 (2012-09-21)
The watch context manager now allows you to either provide a callback or do an explicit check afterwards (warning: this change is not backwards compatible, please update your fabfiles)
- Add support for some network-related operations:
get the IPV4 address assigned to an interface
get the list of name server IP addresses
The services module now supports both upstart and traditional SysV-style /etc/init.d scripts (thanks to Selwin Ong)
The virtualenv context manager can now also be used with local() (thanks to khorn)
The supervisor module now uses update instead of reload to avoid unnecessary restarts (thanks to Dan Fairs)
Add support for OpenVZ containers (requires a kernel with OpenVZ patches)
pip can now use a download cache
Upgrade Redis version to 2.4.17
Misc bug fixes and improvements
Support for Ubuntu 12.04 LTS and Debian 6.0
Documentation improvements
Version 0.4 (2012-05-30)
Added support for requiring an arbitrary APT source
Added support for adding APT signing keys
Added support for requiring a user with a home directory
Added vagrant helpers
Fixed Python virtualenv context manager
Version 0.3.2 (2012-03-19)
Fixed README formatting
Version 0.3.1 (2012-03-19)
Fixed bug in functional tests runner
Version 0.3 (2012-03-19)
Added support for Shorewall (Shoreline Firewall)
Fixed Python 2.5 compatibility
Refactored tests
Version 0.2.1 (2012-03-09)
Packaging fixes
Version 0.2 (2012-03-09)
Added support for hostname and sysctl (kernel parameters)
Added support for Redis
Simplified API for supervisor processes
Version 0.1.1 (2012-02-19)
Packaging fixes
Version 0.1 (2012-02-19)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file fabtools-0.9.4.tar.gz
.
File metadata
- Download URL: fabtools-0.9.4.tar.gz
- Upload date:
- Size: 43.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df8035a1cc943b4382f2e4bd4b6d917bcc42901a2049c286738249e2aa91c9c6 |
|
MD5 | 4d676d41175c774691dde0a96b0a56cd |
|
BLAKE2b-256 | ca7daf341dd982475b420c3c7a8fb3a24d2845ec5fa3120dd8ebebbeea08ac8c |