Package: fabtools-python
DisclaimerThis is a Fork from Ronnix’s originalFabtoolswork.This fork was made in order to provide both python2 and python3 compatibility usingFabric3forkAboutfabtoolsincludes useful functions to help you write yourFabricfiles.fabtoolsmakes it easier to manage system users, packages, databases, etc.fabtoolsincludes a number of low-level actions, as well as a higher level interface calledfabtools.require.Usingfabtools.requireallows you to use a more declarative style, similar to Chef or Puppet.InstallingTo install the latest release fromPyPI$pipinstallfabtools-pythonTo install the latest development version fromGitHub$pipinstallgit+git://github.com/n0n0x/fabtools-python.gitExampleHere is an examplefabfile.pyusingfabtoolsfromfabric.apiimport*fromfabtoolsimportrequireimportfabtools@taskdefsetup():# Require some Debian/Ubuntu packagesrequire.deb.packages(['imagemagick','libxml2-dev',])# Require a Python packagewithfabtools.python.virtualenv('/home/myuser/env'):require.python.package('pyramid')# Require an email serverrequire.postfix.server('example.com')# Require a PostgreSQL serverrequire.postgres.server()require.postgres.user('myuser','s3cr3tp4ssw0rd')require.postgres.database('myappsdb','myuser')# Require a supervisor process for our apprequire.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 apprequire.nginx.proxied_site('example.com',docroot='/home/myuser/env/myapp/myapp/public',proxy_url='http://127.0.0.1:8888')# Setup a daily cron taskfabtools.cron.add_daily('maintenance','myuser','my_script.py')Supported targetsfabtoolscurrently supports the following target operating systems:full support:Debian family:Debian 6 (squeeze), 7 (wheezy), 8 (jessie)Ubuntu 10.04 (lucid), 12.04 (precise), 14.04 (trusty)partial support:RedHat family:RHEL 5/6CentOS 5/6Scientific Linux 5/6FedoraArch Linux, Manjaro LinuxGentooSmartOS (Joyent)Contributions to help improve existing support and extend it to other
Unix/Linux distributions are welcome!ChangelogVersion 0.20.0 (unreleased)Fix Apache support on Ubuntu 14.04 and Debian 8.0Version 0.19.0 (2014-07-05)Python improvements:use new official download URLs forsetuptoolsandpip(Arnaud Vazard)fixvirtualenvwhen thelocalflag is passed (Troy J. Farrell)Node.js improvements:fixpackage_versionwhen no package is installed (Alexandre Patry)add acheckinstallflasg to build and install a distribution package
when installing from source (Fabien Meghazi)Arch Linux improvements:add support for the ManjaroLinux variant (Gaëtan Lamothe)fixsupport forsetuptools(Robin Lambertz)fix support forsupervisor(Robin Lambertz)recognize all known distribution IDs and normalize them toArchDebian/Ubuntu improvements:add support for the Elementary OS variant (Arnaud Vazard)Version 0.18.0 (2014-05-02)This release requires Fabric >= 1.7.0 and drops support for Python 2.5.Adddrop_useranddrop_databaseinpostgresmoduleAdd LinuxMint to the Debian family list (Frank Rousseau)Add support for git remotes (Bryan Folliot)Add support for Tomcat (Jan Kowalski)Add support for Gentoo / portage (Travis Shirk)Add support for Mercurial (Travis Shirk)Add support for GVM (Groovy environment manager) (Bryan Folliot)Documentation fixes and updatesMySQL improvements:do not require a password when a specific user is specifiedexposemysql.queryin the public APIPython improvements:Switch to pip 1.5 (warning: you will need to use theallow_externaland/orallow_unverifiedoptions to install
packages not hosted on PyPI)Update GitHub download URL for pip installer (Guillaume Andreu Sabater)Retry when trying to download pip/setuptools installersAdd support for pip’s--exists-actionoptionImproved OS support indistrib_family()and newUnsupportedFamilyexceptionMake sure to installcurlbefore using it (ponty)Vagrant improvements:Add function to get the Vagrant versionAdd function to get the status of a Vagrant machineAdd function to get the list of Vagrant machinesAdd function to get the list of Vagrant base boxesFiles improvements:Addtemp_dirparameter torequire.file(default istmp)Addrequire.files.temporary_directoryAddfiles.umaskto get the user’s umaskFixrequire.fileownership and permissions when usingsudoAdd helpers to copy, move, symlink or remove filesFixrequire.deb.uptodate_indexUserpminstead ofyumto check if an RPM package is installedUpdate JDK install to match changes to the Oracle web siteFixcron.add_task(thanks to Dan Fairs and Ikuya Yamada)Version 0.17.0 (2013-12-06)Vagrant improvements:Fix support for Vagrant >= 1.3.0Fix duplicate function invagrantmodule documentation
(Dean Malmgren)Package management improvements:Ubuntu PPA fixes (Anthony Scalisi)Add support foropkgpackage manager (ponty)Add conditional APT index updates, based on the time of the
last update (ponty)Updatefiles.upload_templateto match Fabric parameters
(thanks to Adam Patterson)PostgreSQL improvements:Fix: useruninstead ofsudoin_run_as_pg(iiie)Improve SmartOS and locale support (Andreas Kaiser)Support tags in addition to branches inrequire.git.working_copy(Andreas Kaiser)Services management improvements:Improve upstart support inservice.is_running(John MacKenzie)Add support forsystemdinservice.is_running(Adrien Raffin)Improve support for Arch Linux innodejs,serviceandsupervisormodules (Steeve Chailloux)Allow customnginxpackage names (Laurent Meunier)Add module management for Apache (Eugene Leonovich)Fix test environment for Python 2.5Use the new Read the Docs theme if available when
building the docs locallyFix bug with user/group creation with int UID/GIDVersion 0.16.0 (2013-10-26)Redis improvementsMake bind and port arguments explicitImprove documentationUpgrade default version to 2.6.16Python improvementsImprove support for using specific Python interpreters (warning:
API changes)Expose low-level virtualenv operationsImprove pip installationSwitch from distribute to setuptools 0.7+ after project merge
(warning: API changes)Do not installcurlandpython-devpackages when setuptools
is already installed (ponty)Make package names case-insensitive in python.is_installed
(ponty)Fix pip version parsing when usingpythonbrew switchFixrequire.system.localeswhen a prefix is setFix require.system.locale() on fresh Ubuntu systemsAdd optional environment variables in crontabFix crontab permissionsAllow special characters in MySQL password (Régis Behmo)Fix bug with some services not starting correctly (Chris Marinos)Addgetdevice_by_uuidto the disk module (Bruno Adele)Fix implicit directory name ingit.working_copy(iiie)Makerequire.sysctlrobust to procps start failureVersion 0.15.0 (2013-07-25)Fix missing import inuser.local_home_directory()(Sebastien Beal)Improved Arch Linux support:Fix locale support in Arch Linux (Bruno Adele)Add support for yaourt package manager in Arch Linux (Bruno Adele)Improvements to theredismodule:Fix Redis startup after reboot (Victor Perron)Upgrade default Redis version to 2.6.14Improvements to thegitmodule:Add optional force parameter to git pull and checkout (Sebastien Beal)Improvements to thepythonmodule:Add parameter to use a specific Python interpreter (Bruno Adele)Stop using PyPI mirrors now that it has a CDN (Dominique Lederer)Debian/Ubuntu improvements:Add optional version parameter to deb.install() (Anthony Scalisi)Improved support for installing APT public keys (Santiago Mola)SmartOS improvements (Andreas Kaiser):Fix md5sum on recent SmartOSFix bug in pkg.is_installed with certain package namesAdd support for SmartOS in remote system identificationAdd support for SmartOS in require.git.command()RedHat improvements:Fix broken rpm.install() (Sho Shimauchi)Oracle JDK improvements:Upgrade default version to 7u25-b15 (Sebastien Beal)Fix Oracle JDK version parsing when OpenJDK is installedFix Oracle JDK installation on Debian squeeze (Stéphane Klein)Better tests documentation (thanks to Stéphane Klein)Add require.directories() (Edouard de Labareyre)Add support for Apache web server (Stéphane Klein)Upgrade default Node.js version to 0.10.13Version 0.14.0 (2013-05-22)Note: Fabtools now requires Fabric >= 1.6.0Upgrade default pip version to 1.3.1Improved vagrant support:Add support for Vagrant 1.1 providers in functional testsAlso setenv.userandenv.hostsinvagrantcontext managerAddfabtools.system.cpusto get the host’s CPU countLess verbose outputMove OS detection functions tofabtools.systemBetter support for Red Hat based systemsImprovements to theusermodule:Fix home dir default behaviour inrequire.userAdd support for SSH authorized keys (Kamil Chmielewski)Add support for SSH known hosts public keysAddnon_uniqueargument to user functions (Zhang Erning)Get absolute path to the local user’s home dir (Sebastien Beal)UseSHOW DATABASESto test existence of MySQL (Zhang Erning)Improvements to thegitmoduleExpose lower levelfetchoperation (Andreas Kaiser)Fix missing import inrequiremodule (Muraoka Yusuke)Requiregitcommand line toolUseifconfigas root innetworkmoduleUpdate OpenVZ guest context manager for Fabric 1.6.0Improvements to thepythonmodule:Improved detection of distributeAdd support for virtualenv--promptoption (Artem Nezvigin)Allow relative path invirtualenvcontext managerImprovements to theoracle_jdkmodule:Upgrade default Oracle JDK version to 7u21-b11 (Kamil Chmielewski)Add support for Oracle JDK version 6 (Sebastien Beal)Fix brokenfabtools.deb.upgradeAdd support for Arch Linux packages (Bruno Adele)Add support for Linux disk partitions (Bruno Adele)Add OpenSSH server hardening (Adam Patterson)Addsystemdmodule (Jakub Stasiak)Improvements to theredismodule:Fix broken Redis configuration (Victor Perron)Upgrade default Redis version to 2.6.13Abort on nginx configuration errorsUpgrade default Node.js version to 0.10.7Version 0.13.0 (2013-03-15)Add support for managing remote git repositories (Andreas Kaiser)Add intersphinx to docs (Andreas Kaiser)Add HTTP proxy support to speed up functional testsUpgrade default Node.js version to 0.10.0Upgrade default Redis version to 2.6.11Upgrade default Oracle JDK version to 7u17-b02Fix vagrant support (thanks to Dominique Lederer and anentropic)Version 0.12.0 (2013-03-04)Do not create home directory for system usersFixpkg.is_installedon SmartOS (thanks to Anthony Scalisi)Fixsystem.get_arch(thanks to Kamil Chmielewski)Add support for installing Oracle JDK (thanks to Kamil Chmielewski)Add support for creating Postgres schemas (thanks to Michael Bommarito)Fixmysql.user_exists(thanks to Serge Travin)Version 0.11.0 (2013-02-15)Fix requiring an existing user (thanks to Jonathan Peel)Upgrade default Redis version to 2.6.10Upgrade default Node.js version to 0.8.19Better support for remote hosts where sudo is not installedVersion 0.10.0 (2013-02-12)Enable/disable nginx sites (thanks to Sébastien Béal)Add support for SmartOS (thanks to Anthony Scalisi)Add support for RHEL/CentOS/SL (thanks to Anthony Scalisi)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 creationVersion 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 issuesVersion 0.9.0 (2013-01-04)Improve user creation and modificationAdd support for BSD / OS X tofiles.owner,files.group,files.modeandfiles.md5sum(thanks to Troy J. Farrell)Improve PostgreSQL user creation (thanks to Troy J. Farrell
and Axel Haustant)Addreloadandforce_reloadoperations to theservicemodule (thanks to Axel Haustant)Fix missing import inrequire.redis(thanks to svevang
and Sébastien Béal)Addclearoption to Python virtualenv (thanks to pahaz)Upgrade default Redis version to 2.6.7Upgrade default Node.js version to 0.8.16Decrease verbosity of some operationsSpeed up functional testsVersion 0.8.1 (2012-10-26)Really fix pip version parsing issueUpgrade default pip version to 1.2.1Version 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 parsingVersion 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 modeVersion 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 fixesVersion 0.5 (2012-09-21)Thewatchcontext 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 interfaceget the list of name server IP addressesTheservicesmodule now supports both upstart and traditional
SysV-style/etc/init.dscripts (thanks to Selwin Ong)Thevirtualenvcontext manager can now also be used withlocal()(thanks to khorn)Thesupervisormodule now usesupdateinstead ofreloadto avoid unnecessary restarts (thanks to Dan Fairs)Add support for OpenVZ containers (requires a kernel with OpenVZ patches)pipcan now use a download cacheUpgrade Redis version to 2.4.17Misc bug fixes and improvementsSupport for Ubuntu 12.04 LTS and Debian 6.0Documentation improvementsVersion 0.4 (2012-05-30)Added support for requiring an arbitrary APT sourceAdded support for adding APT signing keysAdded support for requiring a user with a home directoryAdded vagrant helpersFixed Python virtualenv context managerVersion 0.3.2 (2012-03-19)Fixed README formattingVersion 0.3.1 (2012-03-19)Fixed bug in functional tests runnerVersion 0.3 (2012-03-19)Added support for Shorewall (Shoreline Firewall)Fixed Python 2.5 compatibilityRefactored testsVersion 0.2.1 (2012-03-09)Packaging fixesVersion 0.2 (2012-03-09)Added support for hostname and sysctl (kernel parameters)Added support for RedisSimplified API for supervisor processesVersion 0.1.1 (2012-02-19)Packaging fixesVersion 0.1 (2012-02-19)Initial release