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
This commit is contained in:
parent
ffe0738f60
commit
ae05322a85
@ -18,6 +18,13 @@ An ansible role to install docker and configure it to use mirrors if available.
|
||||
By default this role adds repositories to install docker from upstream
|
||||
docker. Set this to False to use the docker that comes with the distro.
|
||||
|
||||
.. zuul:rolevar:: docker_use_buildset_registry
|
||||
:default: False
|
||||
|
||||
This role does not enable the usage of the buildset registry by default,
|
||||
this variable allows enabling the usage of the buildset registry after
|
||||
installing Docker.
|
||||
|
||||
.. zuul:rolevar:: docker_compose_install
|
||||
:default: False
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
use_upstream_docker: True
|
||||
docker_group: docker
|
||||
docker_use_buildset_registry: false
|
||||
# NOTE(cloudnull): Packages are loaded through distro specific variables.
|
||||
# The default option will return an empty list which
|
||||
# allows folks to override these lists as they see fit.
|
||||
|
@ -80,3 +80,11 @@
|
||||
- name: Dump installed docker details
|
||||
debug:
|
||||
msg: '{{ docker_installed_version }}'
|
||||
|
||||
- name: Use buildset registry
|
||||
include_role:
|
||||
name: use-buildset-registry
|
||||
vars:
|
||||
buildset_registry_docker_user: root
|
||||
when:
|
||||
- docker_use_buildset_registry | bool
|
@ -2,8 +2,7 @@
|
||||
roles:
|
||||
- role: clear-firewall
|
||||
- role: install-kubernetes
|
||||
- role: use-buildset-registry
|
||||
buildset_registry_docker_user: root
|
||||
docker_use_buildset_registry: true
|
||||
tasks:
|
||||
- name: Wait for cluster to come up
|
||||
command: kubectl cluster-info
|
||||
|
Loading…
Reference in New Issue
Block a user