Git Product home page Git Product logo

puppetlabs-docker_ddc's Introduction

Puppet Forge Build Status

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with docker_ddc
  4. Usage - Configuration options and additional functionality
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Overview

The Docker Data Center (DDC) module helps with setting up a Univeral Control plane (UCP) and Docker Trusted Registry (DTR) clusters.

Module Description

This module provides 2 classes, docker_ddc and docker_ddc::dtr, which uses the official docker/ucp or docker/dtr containers to bootstrap a UCP/DTR controller, or join a node to at existing UCP/DTR.

Setup

The module assumes Docker is already installed on the host. If you would like to do that with Puppet look at the Docker module.

You can install the module using the Puppet module tool like so:

puppet module install puppetlabs/docker_ddc

Usage

The included class has two modes of operation:

Installing a Controller

class { 'docker_ddc':
  controller => true,
}

This will install a UCP controller using Docker, with the default admin/orca username and password. Remember to login and change the password once UCP is up and running.

The class takes a number of parameters, depending on your specific setup. Consult the UCP documentation for details of this options.

class { 'docker_ddc':
  controller                => true,
  host_address              => ::ipaddress_eth1,
  version                   => '1.0.0',
  usage                     => false,
  tracking                  => false,
  subject_alternative_names => ::ipaddress_eth1,
  external_ca               => false,
  swarm_scheduler           => 'binpack',
  swarm_port                => 19001,
  controller_port           => 19002,
  preserve_certs            => true,
  docker_socket_path        => '/var/run/docker.sock',
  license_file              => '/etc/docker/subscription.lic',
}

Note that license_file option will only work with versions of UCP later than 0.8.0.

Joining a Node to UCP

Version =< 1

You can use the same class on another node to join it to an existing UCP.

class { 'docker_ddc':
  ucp_url     => 'https://ucp-controller.example.com',
  fingerprint => 'the-ucp-fingerprint-for-your-install',
}

The default username and password are used, so it's likely that you'll need to provide those in parameters. The class also takes a number of other parameters useful for joininng. Again these should map to the options in the official UCP documetation.

class { 'docker_ddc':
  ucp_url                   => 'https://ucp-controller.example.com',
  fingerprint               => 'the-ucp-fingerprint-for-your-install',
  username                  => 'admin',
  password                  => 'orca',
  host_address              => ::ipaddress_eth1,
  subject_alternative_names => ::ipaddress_eth1,
  replica                   => true,
  version                   => '0.8.0',
  usage                     => false,
  tracking                  => false,
}

Version 2 and above

In UCP version 2 Docker has changed the underlying cluster scheduler from Swarm legacy to Swarm mode, because of that change the join flags have also changed. To join to a v2 manager (formally a controller in v1) please use the following:

class { 'docker_ddc':
  version => '2.1.0',
  token => 'Your join token here',
  listen_address => '192.168.1.2',
  advertise_address => '192.168.1.2',
  ucp_manager => '192.168.1.1',
}

Installing a Docker Trusted Registry

To install a Docker trusted registry (DTR) on to your UCP cluster, please see the following example.

docker_ddc::dtr {'Dtr install':
  install => true,
  dtr_version => 'latest',
  dtr_external_url => 'https://172.17.10.104',
  ucp_node => 'ucp-04',
  ucp_username => 'admin',
  ucp_password => 'orca4307',
  ucp_insecure_tls => true,
  dtr_ucp_url => 'https://172.17.10.101',
  require => Class['docker_ucp'] 
  }

In this example we are setting the install => true this tells Puppet we want to configure a new registry. We set the dtr_version, this can be any version of the registry that is compatible with your UCP cluster. The dtr_external_url is the URL you will use to hit the registry, ucp_node is the node in the cluster that the registry will run on, user name and password are self explanatory. ucp_insecure_tls => true allows the use of self signed SSL certs, this should be set to false in a production environment. dtr_ucp_url is the URL that the registry will use to contact the UCP cluster.

Joining a replica to your Docker Trusted Registry Cluster

To join a replica to your DTR cluster please see the following example.

docker_ddc::dtr {'Dtr install':
  join => true,
  dtr_version => 'latest',
  ucp_node => 'ucp-03',
  ucp_username => 'admin',
  ucp_password => 'orca4307',
  ucp_insecure_tls => true,
  dtr_ucp_url => 'https://172.17.10.101',
  require => [ Class['docker_ucp'] 
  }

In this example we set mostly the same flags as installing the initial install. The main difference is that we have used the join flag not the install flag. Please note you can not use install and join in the same block of Puppet code.

To remove your Docker Trusted Registry.

To remove the DTR from your UCP cluster you need to pass some flags, the flags are the same as the install flags, except we are setting ensure => 'absent'

docker_ddc::dtr {'Dtr install':
    ensure => 'absent',
    dtr_version => 'latest',
    dtr_external_url => 'https://172.17.10.104',
    ucp_node => 'ucp-04',
    ucp_username => 'admin',
    ucp_password => 'orca4307',
    ucp_insecure_tls => true,
    dtr_ucp_url => 'https://172.17.10.101',
    }

Limitations

This module only supports UCP version 1.9 and above. UCP only supports RHEL 7.0, 7.1, 7.2, Ubuntu 14.04, 16.04 and CentOS 7.1

Maintainers

This module is maintained by:

The cloud and containers team.

puppetlabs-docker_ddc's People

Contributors

davejrt avatar gregohardy avatar markfuller avatar scotty-c avatar sheenaajay avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.