Coder Social home page Coder Social logo

timy-life / fabtools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fabtools/fabtools

0.0 1.0 0.0 2.43 MB

Tools for writing awesome Fabric files

Home Page: http://fabtools.readthedocs.org/

License: BSD 2-Clause "Simplified" License

Python 100.00%

fabtools's Introduction

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:

  • 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/6
      • CentOS 5/6
      • Scientific Linux 5/6
      • Fedora
    • Arch Linux, Manjaro Linux
    • Gentoo
    • SmartOS (Joyent)

Contributions to help improve existing support and extend it to other Unix/Linux distributions are welcome!

fabtools's People

Contributors

ronnix avatar scalp42 avatar badele avatar kamilchm avatar disko avatar nicfit avatar laurentb avatar sebastibe avatar mjbommar avatar troyjfarrell avatar johnykov avatar wnp avatar erning avatar adamrt avatar frankrousseau avatar stephane-klein avatar pahaz avatar noirbizarre avatar return1 avatar rybakit avatar roblabla avatar vperron avatar iiie avatar restanrm avatar apatry avatar artnez avatar arturdryomov avatar cyberj avatar chrismarinos avatar amigrave avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.