openSUSE: Use Leap 15.0 instead of 42.3 (#4442)

* Vagrantfile: Bump openSUSE to Leap 15.0

* roles: container-engine: Add 'containerd' package for openSUSE

The 'containerd' package contains the docker-containerd and
docker-containerd-shim binaries. We also need to ensure that the latest
version is installed since an older version may already be present (eg GCE
images)

* Remove docker log-opts for opensuse

* roles: bootstrap-os: Use lowercase 'o' for openSUSE

OpenSUSE is not a valid family name. The correct one is openSUSE

* roles: bootstrap-os: Update zypper cache before first installation

The zypper cache may be outdated so ensure that it's fully updated
before we try and install the bootstrap packages.
pull/4468/head
Markos Chandras 2019-04-09 08:17:05 +01:00 committed by Kubernetes Prow Robot
parent 35c0010876
commit 12c6b5c3eb
8 changed files with 16 additions and 9 deletions

2
Vagrantfile vendored
View File

@ -23,7 +23,7 @@ SUPPORTED_OS = {
"centos" => {box: "centos/7", user: "vagrant"},
"centos-bento" => {box: "bento/centos-7.5", user: "vagrant"},
"fedora" => {box: "fedora/28-cloud-base", user: "vagrant"},
"opensuse" => {box: "opensuse/openSUSE-42.3-x86_64", user: "vagrant"},
"opensuse" => {box: "opensuse/openSUSE-15.0-x86_64", user: "vagrant"},
"opensuse-tumbleweed" => {box: "opensuse/openSUSE-Tumbleweed-x86_64", user: "vagrant"},
}

View File

@ -1,4 +1,4 @@
openSUSE Leap 42.3 and Tumbleweed
openSUSE Leap 15.0 and Tumbleweed
===============
openSUSE Leap installation Notes:

View File

@ -59,9 +59,9 @@ docker_options: >-
{{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }}
{%- endif %}
{%- if docker_version != "latest" and docker_version is version('17.05', '<') %}
--graph={{ docker_daemon_graph }} {{ docker_log_opts }}
--graph={{ docker_daemon_graph }} {% if ansible_os_family not in ["openSUSE Leap", "openSUSE Tumbleweed", "Suse"] %}{{ docker_log_opts }}{% endif %}
{%- else %}
--data-root={{ docker_daemon_graph }} {{ docker_log_opts }}
--data-root={{ docker_daemon_graph }} {% if ansible_os_family not in ["openSUSE Leap", "openSUSE Tumbleweed", "Suse"] %}{{ docker_log_opts }}{% endif %}
{%- endif %}
{%- if ansible_architecture == "aarch64" and ansible_os_family == "RedHat" %}
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current

View File

@ -1,4 +1,9 @@
---
- name: Ensure zypper cache is updated (SUSE)
zypper_repository:
repo: "*"
runrefresh: yes
- name: Install required packages (SUSE)
package:
name: "{{ item }}"

View File

@ -23,7 +23,7 @@
when: '"CentOS" in os_release.stdout or "Red Hat Enterprise Linux" in os_release.stdout'
- include_tasks: bootstrap-opensuse.yml
when: '"OpenSUSE" in os_release.stdout'
when: '"openSUSE" in os_release.stdout'
- include_tasks: bootstrap-clearlinux.yml
when: '"Clear Linux OS" in os_release.stdout'

View File

@ -151,7 +151,7 @@
pkg: "{{item.name}}"
force: "{{item.force|default(omit)}}"
conf_file: "{{item.yum_conf|default(omit)}}"
state: present
state: "{{item.state | default('present')}}"
update_cache: "{{ omit if ansible_distribution == 'Fedora' else True }}"
register: docker_task_result
until: docker_task_result is succeeded
@ -166,7 +166,7 @@
action: "{{ docker_package_info.pkg_mgr }}"
args:
name: "{{ item.name }}"
state: present
state: "{{item.state | default('present')}}"
with_items: "{{ docker_package_info.pkgs }}"
register: docker_task_result
until: docker_task_result is succeeded

View File

@ -5,6 +5,8 @@ docker_package_info:
pkg_mgr: zypper
pkgs:
- name: docker
- name: containerd
state: latest
docker_repo_key_info:
pkg_key: ''

View File

@ -236,9 +236,9 @@ docker_options: >-
{{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }}
{%- endif %}
{%- if docker_version != "latest" and docker_version is version('17.05', '<') %}
--graph={{ docker_daemon_graph }} {{ docker_log_opts }}
--graph={{ docker_daemon_graph }} {% if ansible_os_family not in ["openSUSE Leap", "openSUSE Tumbleweed", "Suse"] %}{{ docker_log_opts }}{% endif %}
{%- else %}
--data-root={{ docker_daemon_graph }} {{ docker_log_opts }}
--data-root={{ docker_daemon_graph }} {% if ansible_os_family not in ["openSUSE Leap", "openSUSE Tumbleweed", "Suse"] %}{{ docker_log_opts }}{% endif %}
{%- endif %}
{%- if ansible_architecture == "aarch64" and ansible_os_family == "RedHat" %}
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current