/prompose

Prometheus setup with Ansible and Docker-compose

Primary LanguageShellApache License 2.0Apache-2.0

Prompose

Overview

Why Prompose?

Usage guide

  • Firstly, you have to install ansible (>=2.4) in your management host. There are multiple ways to install ansible, but you simply use requirements.txt. You should have python-pip and python-dev as well.
$ sudo pip install -r requirements.txt
  • Create /etc/prompose directory and copy etc/prompose.yml config file. You can put config in whatever directory you want, but then when execute command, you have to use --configdir option to point to the directory.
$ sudo mkdir /etc/prompose
$ sudo cp etc/prompose.yml /etc/prompose/prompose.yml
  • Read the config file and ansible/group_vars/all.yml file (The options in this file can be overriden in prompose.yml') carefully, then do the change in config file you copied in previous step (by default it is )/etc/prompose/prompose.yml).

  • Prepare your inventory file - defines your hosts. Example file can be found here.

  • Run Prompose, point to inventory file with option --inventory|-i:

$ sudo ./tools/prompose -i ansible/inventory/all-in-one -h    
Usage: ./tools/prompose COMMAND [option]

Options:
    --inventory, -i <inventory_path> Specify path to ansible inventory file
    --configdir, -c <config_path>    Specify path to directory with prompose.yml
    --verbose, -v                    Increase verbosity of ansible-playbook
    --help, -h                       Show this usage information
    --images                         Remove images when this option is defined and command is remove
    --volumes                        Remove volumes when this option is defined and command is remove

Commands:
    installdocker                    Install docker & docker-compose in target hosts
    precheck                         Do pre-deployment checks for hosts
    deploy                           Deploy and start all prompose containers
    stop                             Stop all prompose containers
    pull                             Pull all images for containers (only pull, no running containers)
    remove                           Stop and remove all prompose containes (With --images - remove images and --volumes - remove volumes)
    restart                          Restart all prompose containers
  • Enjoy it!