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.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.7.0.tar.gz
.
File metadata
- Download URL: fabtools-0.7.0.tar.gz
- Upload date:
- Size: 39.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1707e7a26c1255109da518171cb04a97c7de3dbe3aa3f8587c9d1e22da920bfc |
|
MD5 | eee31fced3a9d071fb0a44615f897d3a |
|
BLAKE2b-256 | 1f46b7b51f0b787af7e9670f7084080689f9a68e10646a842c5f7a6af85e65d7 |