garethr-docker
garethr-docker copied to clipboard
Support for docker-latest package RHEL7
Right now Redhat is providing docker and docker-latest packages, it would be great If we can handle this through this module. https://access.redhat.com/articles/2317361
actually, using the provided parameters for repository configuration and package_name, you can already do this. :-)
class {'::docker':
manage_package => true,
package_name => 'docker-latest',
service_name => 'docker-latest',
use_upstream_package_source => false,
require => Yumrepo[$rhel_repo_with_docker_latest]
}
Just make sure you have a repository with docker-latest package also available (note the require). You can use the builtin yumrepo resource for this. Usually, various orgs have different urls for where that redhat repo is available from.
Yeah, it installs the package but it doesn't use same config files as docker package. To make other setting work we need to add docker-latest config files, as well as it uses different systemd directory
/etc/systemd/system/docker-latest.service.d.
yeah, it sets all that too though.
The docker run template refers statically to docker.service:
https://github.com/garethr/garethr-docker/blob/master/templates/etc/systemd/system/docker-run.erb#L2 https://github.com/garethr/garethr-docker/blob/master/templates/etc/systemd/system/docker-run.erb#L7
Service overriding is also static:
https://github.com/garethr/garethr-docker/blob/master/manifests/service.pp#L150 https://github.com/garethr/garethr-docker/blob/master/manifests/service.pp#L155 https://github.com/garethr/garethr-docker/blob/master/templates/etc/systemd/system/docker.service.d/service-overrides-rhel.conf.erb#L2
Thats related to my pull request #681