Installation
============

batou is installed in each of your projects to ensure that every project is run
with the correct version of batou and possibly other dependencies. Typically
this means you create a new deployment repository for every project.

Starting a new batou project
----------------------------

A new project is started by placing the batou master command into the project and adding that to your repository:

.. code-block:: console

    $ mkdir myproject
    $ cd myproject
    $ git init
    $ curl -sL https://raw.githubusercontent.com/flyingcircusio/batou/main/bootstrap | sh
    $ git commit -m "Start a batou project."

Local
-----

To run the batou command on your machine you will need to have the following
dependencies installed:

* Python 3.5+
* OpenSSH
* GPG *(optional, if you want to use encrypted secrets support)*
* Mercurial, git, or rsync *(you only need to have the one installed you actually use to transfer your repository)*

Remote
------

To deploy on a remote server, that server needs to have installed:

* Python 3.5+
* OpenSSH
* Mercurial, git or rsync *(you only need to have the one installed you actually use to transfer your repository)*

Supported Platforms
-------------------

batou is being tested to run on Linux and Mac OS X.

We do *not* support deploying from or to non-UNIX targets.

batou is written in Python and requires to be run with **Python 3.5+**.


Optional requirements
---------------------

Depending on the actual components you are going to install, you may need to have those packages installed on your remote machines:

* `git <http://git-scm.com/>`_ if using the :ref:`batou.lib.git.Clone
  <download-git>` component
* `make <http://www.gnu.org/software/make/>`_ if using the
  :ref:`batou.lib.cmmi.Build <cmmi-build>` component
* `nrpe
  <http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details>`_
  if using the ``batou.lib.nagios.NRPEHost`` component
* `rsync <http://rsync.samba.org/>`_ if using the :ref:`batou.lib.file.Directory
  <file-directory>` component
* `subversion <http://subversion.apache.org/>`_ if using the
  :ref:`batou.lib.svn.Checkout <download-subversion>` component
* `unzip <http://www.info-zip.org/UnZip.html>`_ and `tar
  <http://www.gnu.org/software/tar/tar.html>`_ if using the
  :ref:`batou.lib.archive.Extract <file-extract>` component

Distribution-specific installation instructions
-----------------------------------------------

.. toctree::
   :maxdepth: 1

   installation-deb
   installation-rpm
