docker_compose

pdk
Docker_compose is a module for simple patterns of docker container management and orchestration.

Roman Chukov

arrnorets

475 downloads

475 latest version

3.1 quality score

Version information

  • 0.1.0 (latest)
released Jan 1st 2021
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Fedora

Start using this module

Documentation

arrnorets/docker_compose — version 0.1.0 Jan 1st 2021

Table of contents

  1. Common purpose
  2. Compatibility
  3. Installation
  4. Config example in Hiera and result files

1. Common purpose

Docker_compose is a module for simple patterns of docker container management ansd orchestration. See here

2. Compatibility

This module was tested on CentOS 7. It also should work on Fedora 19 and higher and RHEL 7, but no tests were performed.

3. Installation

mod 'docker_compose',
    :git => 'https://github.com/arrnorets/puppet-docker_compose.git',
    :ref => 'main'

4. Config example in Hiera and result files

This module follows the concept of so called "XaaH in Puppet". The principles are described here and here.

Here is the example of config in Hiera:

docker_compose:
  docker_compose_pkg_version: "1.8.0-2"
  docker_pkg_version: "5:19.03.12~3-0~raspbian-stretch"

  docker_username: "pi"

  enable: true

  config:
    home_resources:
      version: '2'
      services:
        memcached:
          image: alpine_memcached:1.0
          container_name: memcached

It will produce file /opt/docker-compose/home_resources/docker-compose.yml:

---
version: '2'
services:
  memcached:
    image: alpine_memcached:1.0
    container_name: memcached

also the corresponding docker-composee@home_resources.service will be enabled.