Skip to main content

Sugar-coated declarative deployment recipes built on top of Fabric and Cuisine

Project description

Sugar-coated declarative deployment recipes built on top of Fabric and Cuisine.

With Fabric’s low-level remote ssh orchestration and Cuisine’s generic recipes; the goal is to build a collection of wrappers capturing various, usually opinionated, system deployment styles.

At the heart of cuisine_sweet is the collection of ensure modules. These modules encapsulate what is being checked/deployed (declarative), without specifying the how and the where parts (imperative). An ensure is both an assertion check + action-if-needed in the form: ensure.object.state(params).

Sample Usage

cuisine_sweet is to be used in tandem with fabric.

To illustrate usage, see the sample fabfile.py below:

from fabric.api import task, env
from cuisine_sweet import ensure

env.hosts = [ 'myproject@server1.example.com', 'myproject@server2.example.com' ]

@task
def initial():
    ensure.yum.package_installed('gcc')
    ensure.yum.package_installed('make')
    ensure.yum.package_installed('git')
    ensure.yum.package_installed('python')
    ensure.yum.package_installed('python-devel')
    ensure.supervisord.installed()

@task
def deploy():
    ensure.local_git.up_to_date(against='origin/master')
    ensure.local_git.clean()
    ensure.git.rsync('git@ourgit.example.com:myproject.git', 'myproject', refspec='master', base_dir='git')
    ensure.user_crontab.loaded('git/myproject/user.cron')
    ensure.supervisord.running('git/myproject/supervisord.conf', '/tmp/myproject.supervisord.pid')
    ensure.supervisord.updated_with_latest_config('git/myproject/supervisord.conf')

References

Copyright © 2012, Dexter B. Tad-y

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuisine_sweet-0.1.18.tar.gz (11.3 kB view details)

Uploaded Source

File details

Details for the file cuisine_sweet-0.1.18.tar.gz.

File metadata

File hashes

Hashes for cuisine_sweet-0.1.18.tar.gz
Algorithm Hash digest
SHA256 b98d0db3fa023beaa1dcdd97d62ad3447c40f460b4e2e072bef47970a6595622
MD5 a3a00365e57e120c3f8a2779125ec293
BLAKE2b-256 cb7cd0da1fd4db90db0eea860d7e4d5b434df4a28bc2515d55270120be207bbe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page