Skip to main content

A utility for automating multi-host, multi-environment software builds and deployments.

Project description

batou

batou helps you to automate your application deployments:

  • You create a model of your deployment using a simple but powerful Python API.

  • You configure how the model applies to hosts in different environments.

  • You verify and run the deployment with the batou utility.

Getting started with a new project is easy:

$ mkdir myproject
$ cd myproject
$ curl https://bitbucket.org/flyingcircus/batou/.../bootstrap-template -o batou
$ chmod +x batou
$ ./batou

Here’s a minimal application model:

$ mkdir -p components/myapp
$ cat > components/myapp/component.py
from batou.component import Component
from batou.lib.python import VirtualEnv, Package
from batou.lib.supervisor import Program

class MyApp(Component):

    def configure(self):
        venv = VirtualEnv('2.7')
        self += venv
        venv += Package('myapp')
        self += Program('myapp',
            command='bin/myapp')

And here’s a minimal environment:

$ mkdir environments
$ cat > environments/dev.cfg
[environment]
mode = local

[hosts]
localhost = myapp

To deploy this, you run:

$ ./batou deploy dev

Check the detailed documentation to get going with a more ambitious project.

Features

  • Separate your application model from environments

  • Supports idempotent operation for incremental deployments

  • Deploy to multiple hosts simultaneously

  • Automated dependency resolution for multi-host scenarios

  • No runtime requirements on your application

  • Encrypted secrets with multiple access levels: store your SSL certificates, SSH keys, service secrets and more to get true 1-button deployments.

  • Deploy to local machines, Vagrant, or any SSH host

  • Broad SSH feature support by using OpenSSH through execnet

  • Only few dependencies required on the remote host

  • Ships with a library of components for regularly needed tasks

  • self-bootstrapping and self-updating - no additional scripting needed

Contribute

  • Issue Tracker: plan.flyingcircus.io/projects/batou

  • Source Code: bitbucket.org/flyingcircus/batou

Support

If you are having issues, please let us know. We’re around on IRC in #batou on freenode.

License

The project is licensed under the 2-clause BSD license.

Changelog

1.1.0a9 (2015-10-14)

  • Do not implicitly perform attribute conversions when applying overrides. Due to the behaviour of hasattr this shadowed conversion exceptions and also performed unnecessary computation or network access (e.g. DNS).

1.1.0a8 (2015-10-05)

  • Fix default pip arguments for installing packages. This stops rebuilds of python/buildout components on each run.

  • Change default virtualenv download URL to https and use the current FCIO mirror.

1.1.0a7 (2015-09-18)

  • Support Git < 2.0

  • Add support for managing Python 3.5 environments.

  • Update virtualenv to newest version for Python 2.7+ and all Python 3 versions.

  • Drop support for Python 3.1.

  • Update supervisor: 3.0 -> 3.1.3

    Includes updated dependencies.

  • Make socketpath in supervisor configurable.

  • Fix broken Python compatibility tests.

1.1.0a6 (2015-09-17)

  • Adjust Git repositories to correctly perform fast-forward merges.

  • Fix Mercurial repository tests that broke without noticing.

  • Add end-to-end test for our new error reporting which got a regression (#17617)

1.1.0a5 (2015-09-09)

  • Fix Mercurial repositories after refactorings for Git broke it.

1.1.0a4 (2015-09-06)

  • Actually get pull-based Git repositories to work. Still experimental, though.

1.1.0a3 (2015-09-05)

  • Initial support for managing batou projects with git. Git repositories support pull-based and bundle-based shipping.

  • Add backwards compatibility for batou remote to help users migrate their fingers.

1.1.0a2 (2015-09-03)

  • Fix updating from Batou 1.0

1.1.0a1 (2015-09-03)

  • Do request an update for packages installed from requirements.txt within the batou environment to help update VCS checkouts that are pinned.

  • Clear PYTHONPATH for bootstrapping to avoid accidental interaction with unclean Python environments.

  • Provide ‘–fast’ mode: do not perform bootstrapping.

    This is a first step to improve bootstrapping times. The switch is rather dumb but allows us to work a) offline in some cases and b) develop faster.

  • Fix unicode encoding/decoding in File handling. See #14944. (Ported from 1.0)

  • Fold the runner invocation for local and remote into a single deploy command:

    $ ./batou deploy <environment>

    To force a local or remote invocation use –local and –remote. By default batou will assume a remote environment. To configure an environment’s deployment mode use the mode attribute in the environment section:

    [environment]
    mode = local

    To specify a manual override on the commandline you can provide the –local or –remote arguments to the run command.

  • Improve bootstrapping to give developers a better way to get started without installing batou system-wide or in a temporary virtualenv.

  • Revamp README and documentation.

  • Rework error handling and output management.

    batou will now show more errors at once, suppress unnecessary internal tracebacks and try to prioritize different errors to make complex failure situations easier to ingest.

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

batou-1.1.0a9.zip (114.3 kB view hashes)

Uploaded Source

Supported by

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