Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deploying Perl with Fabric and Carton

Anthony
September 25, 2012

Deploying Perl with Fabric and Carton

Lightning talk on Fabric and Carton

Anthony

September 25, 2012
Tweet

More Decks by Anthony

Other Decks in Programming

Transcript

  1. Deploying Files Check files out from VCS For git snapshot

    `git checkout-index` Rsync files with Fabric
  2. Fabric Python SSH wrapper framework Exposes script functions as commands

    Handles file and shell operations, rsync Parallelized execution
  3. @task def deploy(): cmd = 'git checkout-index -f -a --prefix=/tmp/foobar'

    with lcd('/path/project'): local(cmd) rsync_project('/path/site', '/tmp/foobar') with localenv(): with cd('/path/site'): run('carton install') @task def bootstrap(): run('cpanm -L /path/env App::local::lib::helper') run('cpanm -L /path/env Carton') @contextmanager def localenv(): with settings(shell='/path/env/bin/localenv /bin/sh -c'): yield (horrible, incomplete example)