garethr/garethr-docker

Support new Docker Community Edition, with Stable & Edge channels on RHEL

Closed this issue · 5 comments

Starting with Docker 17.03, Docker changed how they distribute Docker packages, and introduced the concept of Docker Enterprise Edition (Docker EE) and Docker Community Edition (Docker CE). It would be great if the garethr/docker module could support the new Docker CE repositories, including both the Docker CE Stable and Edge channels.

Docker CE now has two repositories, and provides both Quarterly 'stable' releases and Monthly 'edge' releases. These quarterly/monthly channels are provided via different repositories, according to https://docs.docker.com/engine/installation/linux/centos/ .

As part of the CE/EE quarterly/monthly split, Docker changed their installation procedure. The new repo file is named /etc/yum.repos.d/docker-ce.repo, and includes multiple repository channels. The stable repo is enabled by default, but the edge repo can be easily enabled for folks who want it.

Currently, garethr-docker points us to the older upstream repositories at https://yum.dockerproject.org/repo/main/centos/ which are deprecated. If I continue to use this module unmodified, my systems will end up with the Docker 17.0.4 , which I believe is the latest monthly Edge release. The latest Docker version in the Stable channel is 17.03.1 , according to https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ .

The monthly Edge release cycle might be too unstable for many admins.

dol commented

@stefanlasiewski Thank you for the very important hint.

I was able to change the Repo source with the following Hiera settings:

docker::package_name: docker-ce
docker::package_key_source: https://download.docker.com/linux/centos/gpg
docker::package_source_location: https://download.docker.com/linux/centos/7/$basearch/stable
docker::package_key: 060A61C51B558A7F742B77AAC52FEB6B621E9F35

Docker version output:

 docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:05:44 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:05:44 2017
 OS/Arch:      linux/amd64
 Experimental: false

yum list installed output:

yum list installed|fgrep docker
docker-ce.x86_64                  17.03.1.ce-1.el7.centos            @docker    
docker-ce-selinux.noarch          17.03.1.ce-1.el7.centos            @docker
dol commented

I downloaded the Repo-File from https://download.docker.com/linux/centos/docker-ce.repo and used it for the hiera values.

curl https://download.docker.com/linux/centos/docker-ce.repo

Note that for Ubuntu/Debian you have to override a couple more hieras:

docker::package_name: docker-ce
docker::package_key_source: https://download.docker.com/linux/ubuntu/gpg
docker::package_source_location: https://download.docker.com/linux/ubuntu
docker::package_key: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
docker::package_repos: stable
docker::package_release: trusty

garethr-docker has been migrated to puppetlabs/docker . I'm closing this ticket in favor of puppetlabs/puppetlabs-docker#11 .