Commit Graph

9 Commits

Author SHA1 Message Date
vass c80b593fb6 Rename install-docker to ensure-docker for consistency
The old role will be kept and include ensure-docker for backwards compatability.

Change-Id: Icb76a954b04631c405b09eb54343fd852a511b83
2020-04-04 15:41:29 -04:00
Sorin Sbarnea cce6535468 install-docker: allow removal of conflicting packages
Allow us to define which packages need to be removed before installing
the desired ones.

Fixes use of role on systems where it was desired to install upstream
docker but the system one was already installed.

Change-Id: Ib6ae0a8fba937901b29565e2d36486eccf4f67bb
2020-03-30 16:00:23 +01:00
Mohammed Naser ae05322a85 install-docker: add option to use buildset registry
At the moment, the build registry is not used inside Kubernetes jobs
and it is required to override the entire pre.yaml just to enable it.

This patch adds an option of using docker_use_buildset_registry inside
install-docker which can be used in order to install Docker and letting
it use the buildset registry simply by adjusting the job.vars

Change-Id: I1b42eac6accbf7c350aee76d18a823ba6327548d
2020-03-14 18:30:39 -04:00
Mohammed Naser 839a179048 install-docker: option to install docker-compose
The install-docker role currently takes care of setting up Docker
however it lacks the ability to install docker-compose at the moment
which is quite useful.

This adds a variable which defaults to false that allows you to use the
role to install docker-compose.  It was decided to be put within the
install-docker role because that role already manages the repository
configuration and therefore provide consistency with the repository that
is used to install docker-compose.

Change-Id: Ia6f4ed88b4baf53bd671c7a7b48a1564ff2c866d
2020-02-16 17:04:58 +00:00
Kevin Carter ab2d368b17
Add variable to set the docker download url
The docker mirror URL can now be set using the following options,
`docker_download_fqdn` and `docker_mirror_base_url`. These
variables will allow folks to use this role with custom mirrors.

To accomodate this change, the repo files have been moved into
templates and now use the jinja2 extension.

Not all supported distros have the ability to install docker
using the upstream mirrors. To ensure a high degree of success
a new sanity check has been added to validate the mirror url
content when upstream installation has been enabled.

Change-Id: Ib9d50581d0df89e36d47dd523efd1adc95fdf4ac
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-11 11:12:18 -05:00
Kevin Carter f1f609e09c
Add multi-distro support to install-docker
This change adds the ability for the zuul provided role for docker
installation to support multiple distros automatically. With this
change the role will dynamically load variables based on the
target operating system.

While the default to install from upstream reamains unchanged, the
role will now fall back to installing using the distro packages
in the event there's is a fault with the upstream tasks or if an
upstream task file has not been implemented.

> stubbs for upstream implementation task files have been created.

With this change the role will now support, debian (and family),
opensuse, and red hat (and family). The upstream installation process
is using the documented steps from upstream docker, as found here
[0].

The default "ubuntu_gpg_key" as renamed to "docker_gpg_key" as its
now used for more than one distro.

The daemon.json.j2 template has been removed. This template was
stored here but unused by this role.

[0] https://docs.docker.com/install/linux/docker-ce/fedora/

Change-Id: Ie52444f8c62d6e2f86ce9ba1c17795dd9a6471d2
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-11 10:04:28 -05:00
Sorin Sbarnea 58cf603ce7 Make install-docker compatible with centos
Allow custom docker_group which is needed on CentOS when
use_upstream_docker: false as is value is 'dockeroot'.

Assures that docker service is started, which is not always true
with all distributions.

Validates that we can talk with docker at the end.

Change-Id: I993c4ac35055a2a18b5b0fb32c8b230e04b7eb87
2019-02-04 15:21:46 +00:00
Monty Taylor a744403918
Put ubuntu_gpg_key into defaults instead of vars
vars/default.yaml didn't really work like one might have expected, in as
much as it didn't work at all:

  http://logs.openstack.org/32/582732/2/check/pbrx-build-container-images/4a8b668/job-output.txt.gz#_2018-07-16_20_07_19_502822

Move it to defaults. This also allows it to be overridden should someone
want to.

Needed-By: https://review.openstack.org/582732
Needed-By: https://review.openstack.org/582544
Needed-By: https://review.openstack.org/580160
Change-Id: Ib469d0bacc8ce8e894ef16645a4fbf3a3748cd19
2018-07-16 16:17:04 -05:00
Monty Taylor 899bd89833
Add role for installing docker and configuring registry mirror
There are two different ways to install docker - from upstream repos or
from distro. At the moment each of these carries with it the need for a
different caching proxy setup.

Add a role that will install docker from upstream by default, but which
also supports installing directly from distros. The role also sets up
the registry proxy appropriately for each.

This role at the moment only works on ubuntu. It should obviously be
updated to work on centos and fedora as well.

Needed-By: https://review.openstack.org/580160
Change-Id: I7d6bac68a2c0fecf13a8bd9535a3fdeb85e7d999
2018-07-15 13:06:36 -05:00