Welcome to PeopleDeploy

PeopleDeploy is a small framework for Ansible. It's purpose is to ensure that deployment of dependant projects is loosely coupled and testable. It is implemented as a wrapper for ansible commands.

Manifesto

The framework adheres to 3 principles:

  • Dev/prod parity: keep development, staging and production as similar as possible. The same deployment code should be used for any kind of environment. This allows developer to add features in branches of various repositories and test them all together.
  • Loose coupling: each software should provide its own deployment logic. If a patch changes the way a software should be deployed, then the patch should include changes to the deployment logic as well. There should be no "master repository" siloting all the deployment scripts for all softwares.
  • Fast feedback: deployment of a patch should be tested prior to merging. If a patch changes the way a software should be deployed, then it should be testable prior to merging. This statement is also valid for a patch which depends on other patches in other repositories: it should be possible to test deployment of arbitrary branches of softwares which depend on each other.

Overview

Each of project repository may have the following files, which the peopledeploy command will aggregate using ANSIBLE_* environment variables:

peopledeploy/
    playbooks/
        some_playbook.yaml
    roles/
        some_role/
    plugins/
        filter/
            some_filter_plugin.py

Environment directories can be like this:

peopledeploy/
    production/
        inventory
    staging/
        inventory
    test/
        inventory

See the test_workdir example in the peopledeploy repository for an example.

Usage

The framework allows to maintain and even to create an environment from scratch in 3 commands:

  • workdir: Setup a directory with arbitrary versions of your software with git.
  • boot: Setup an infrastructure of VMs or containers, by instanciating containers or VMs from an inventory file.
  • playbook: Execute a playbook from a repository version in the workdir on an inventory.

Install

Install ansible and the peopledeploy command with:

pip install -e git+https://github.com/ansible/ansible.git#egg=ansible
pip install -e git+https://github.com/novafloss/peopledeploy.git#egg=peopledeploy