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/raw/tip/src/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

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 (2016-01-03)

  • Fix Debian supervisor’s pid file attribute.

  • Update supervisor to 3.2.

1.1.0a12 (2015-11-24)

  • Fix curl initial bootstrap.

  • Allow to set the contact group of the Supervisor service check from the environment:

    [component:supervisor]
    check_contact_groups = group1, group2

1.1.0a11 (2015-11-24)

  • Allow to set the contact group of the Supervisor service check.

1.1.0a10 (2015-11-11)

  • Sort logfiles for logrotate to avoid superfluous reloading.

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

This version

1.1

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.zip (114.2 kB view details)

Uploaded Source

File details

Details for the file batou-1.1.zip.

File metadata

  • Download URL: batou-1.1.zip
  • Upload date:
  • Size: 114.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for batou-1.1.zip
Algorithm Hash digest
SHA256 4666b0e6e53834620de0a0221b24fa07fcb899b55578a20b5ca6219fb047ca59
MD5 181662017a7f9eacb685c9b26b4ec4b8
BLAKE2b-256 87cd8cbfa13ee0885306c424703d21bd192ef2cdbad4ba3c9cbc445419bddebd

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