A utility for automating multi-host, multi-environment software builds and deployments.
Batou is a tool to deploy services consisting of interacting components for development and production environments.
Working with batou consists of two steps:
- defining services
- deploying services
Defining a service
Services are defined by describing the components they are made up of as Python code that will be run during a deployment and by specifying the environments in which the components will be deployed.
Batou gives you a structure for arranging your components and a library that makes it easy to write components.
Components are pieces of software whose configuration depends on the environment and host their are configured on as well as the configuration of other components.
Here’s a component that touches a file:
class Touch(Component): @step(1) def touch(self): self.cmd('touch /tmp/asdf')
Environments provide configuration to components and select which components should be installed on which hosts.
Here’s an environment definition that would be suitable for development:
[hosts] localhost = touch
Deploying a service
You can deploy any configuration locally that you want. In the most simple case you select your devel
The sizing of a component depends on two factors: coherence and distribution. If some software is always build together and/or shares a lot of build code, it should be a single component or depend on a shared component. If software needs to be run on different hosts independently it should be split in multiple components or make use “features” to control partial configurations with shared code.
- deployment into service user
- code push/bouncing
- check in multiple development environments (per developer)
- run a production deployment locally for debugging
- use secrets management
- use templating (inline, files)
- use base components
- use hooks
- use features
- make stuff convergent
- host name normalization
- cross-environment protection
- component API
- config helpers
- address objects
- netloc objects
|Current change log:|
Change log for batou
- Leave umask alone. If it must be set for service deployment, we’d better resort to .bashrc or similar.
- Improve EXEC_PREFIX detection code to work with both Python 2 and Python 3 target versions.
- self.config_attr(‘attribute’, ‘list’) syntax for list-valued types in configuration files.
- Call setlocale at batou-local startup to initialize locale settings throughout component execution.
- Add support for global find-links in Buildout. If a secret [buildout]find-links is found, it will be put in component.find_links.
- Packaging fix: include test fixtures to enable running tests on installed eggs.
- Correct packaging bugs: missing .txt files etc.
- Unify license to state ‘ZPL’ consistently in all places. We used to have a mix of ZPL/BSD license statements.