Browse Source

Match docker-cli version with docker-engine version (when available) (#6163)

pull/6190/head
Florian Ruynat 4 years ago
committed by GitHub
parent
commit
e9ce7243b8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 40 additions and 4 deletions
  1. 6
      .gitlab-ci/packet.yml
  2. 1
      roles/container-engine/docker/defaults/main.yml
  3. 7
      roles/container-engine/docker/vars/debian.yml
  4. 7
      roles/container-engine/docker/vars/fedora.yml
  5. 9
      roles/container-engine/docker/vars/redhat.yml
  6. 7
      roles/container-engine/docker/vars/ubuntu-amd64.yml
  7. 7
      roles/container-engine/docker/vars/ubuntu-arm64.yml

6
.gitlab-ci/packet.yml

@ -173,7 +173,7 @@ packet_fedora30-cilium-containerd:
packet_centos7-weave-upgrade-ha:
stage: deploy-part3
extends: .packet
when: on_success
when: manual
variables:
UPGRADE_TEST: basic
MITOGEN_ENABLE: "false"
@ -181,7 +181,7 @@ packet_centos7-weave-upgrade-ha:
packet_debian9-calico-upgrade:
stage: deploy-part3
extends: .packet
when: on_success
when: manual
variables:
UPGRADE_TEST: graceful
MITOGEN_ENABLE: "false"
@ -189,7 +189,7 @@ packet_debian9-calico-upgrade:
packet_debian9-calico-upgrade-once:
stage: deploy-part3
extends: .packet
when: on_success
when: manual
variables:
UPGRADE_TEST: graceful
MITOGEN_ENABLE: "false"

1
roles/container-engine/docker/defaults/main.yml

@ -1,5 +1,6 @@
---
docker_version: '18.09'
docker_cli_version: "{{ 'latest' if docker_version != 'latest' and docker_version is version('18.09', '<') else docker_version }}"
docker_selinux_version: '17.03'
docker_package_info:

7
roles/container-engine/docker/vars/debian.yml

@ -16,9 +16,16 @@ docker_versioned_pkg:
'stable': docker-ce=5:18.09.7~3-0~debian-{{ ansible_distribution_release|lower }}
'edge': docker-ce=5:19.03.7~3-0~debian-{{ ansible_distribution_release|lower }}
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli=5:18.09.9~3-0~debian-{{ ansible_distribution_release|lower }}
'19.03': docker-ce-cli=5:19.03.9~3-0~debian-{{ ansible_distribution_release|lower }}
docker_package_info:
pkg_mgr: apt
pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
force: yes
- name: "{{ docker_versioned_pkg[docker_version | string] }}"
force: yes

7
roles/container-engine/docker/vars/fedora.yml

@ -11,10 +11,17 @@ docker_versioned_pkg:
'18.09': docker-ce-18.09.7-3.fc{{ ansible_distribution_major_version }}
'19.03': docker-ce-19.03.8-3.fc{{ ansible_distribution_major_version }}
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli-19.03.8-3.fc{{ ansible_distribution_major_version }}
'19.03': docker-ce-cli-19.03.9-3.fc{{ ansible_distribution_major_version }}
# Fedora 30/31 don't provide packages for docker 18.0x ...
docker_version: "19.03"
docker_cli_version: "19.03"
docker_package_info:
pkg_mgr: dnf
pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
- name: "{{ docker_versioned_pkg[docker_version | string] }}"

9
roles/container-engine/docker/vars/redhat.yml

@ -16,6 +16,11 @@ docker_versioned_pkg:
'stable': docker-ce-18.09.9-3.el7
'edge': docker-ce-19.03.8-3.el7
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli-18.09.9-3.el7
'19.03': docker-ce-cli-19.03.9-3.el7
docker_selinux_versioned_pkg:
'latest': docker-ce-selinux-17.03.3.ce-1.el7
'17.03': docker-ce-selinux-17.03.3.ce-1.el7
@ -30,13 +35,15 @@ docker_pkgs_use_docker_ce:
yum_conf: "{{ docker_yum_conf }}"
docker_pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
yum_conf: "{{ docker_yum_conf }}"
- name: "{{ docker_versioned_pkg[docker_version | string] }}"
yum_conf: "{{ docker_yum_conf }}"
docker_package_info:
pkg_mgr: yum
pkgs: |-
{%- if docker_version is version('17.04', '<') -%}
{%- if docker_version != "latest" and docker_version is version('17.04', '<') -%}
{{ docker_pkgs_use_docker_ce }}
{%- else -%}
{{ docker_pkgs }}

7
roles/container-engine/docker/vars/ubuntu-amd64.yml

@ -16,9 +16,16 @@ docker_versioned_pkg:
'stable': docker-ce=5:18.09.7~3-0~ubuntu-{{ ansible_distribution_release|lower }}
'edge': docker-ce=5:19.03.7~3-0~ubuntu-{{ ansible_distribution_release|lower }}
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli=5:18.09.9~3-0~ubuntu-{{ ansible_distribution_release|lower }}
'19.03': docker-ce-cli=5:19.03.9~3-0~ubuntu-{{ ansible_distribution_release|lower }}
docker_package_info:
pkg_mgr: apt
pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
force: yes
- name: "{{ docker_versioned_pkg[docker_version | string] }}"
force: yes

7
roles/container-engine/docker/vars/ubuntu-arm64.yml

@ -12,9 +12,16 @@ docker_versioned_pkg:
'stable': docker-ce=5:18.09.7~3-0~ubuntu-{{ ansible_distribution_release|lower }}
'edge': docker-ce=5:19.03.7~3-0~ubuntu-{{ ansible_distribution_release|lower }}
docker_cli_versioned_pkg:
'latest': docker-ce-cli
'18.09': docker-ce-cli=5:18.09.9~3-0~ubuntu-{{ ansible_distribution_release|lower }}
'19.03': docker-ce-cli=5:19.03.9~3-0~ubuntu-{{ ansible_distribution_release|lower }}
docker_package_info:
pkg_mgr: apt
pkgs:
- name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}"
force: yes
- name: "{{ docker_versioned_pkg[docker_version | string] }}"
force: yes

Loading…
Cancel
Save