Browse Source

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 5 years ago
committed by Kubernetes Prow Robot
parent
commit
12c6b5c3eb
8 changed files with 16 additions and 9 deletions
  1. 2
      Vagrantfile
  2. 2
      docs/opensuse.md
  3. 4
      inventory/sample/group_vars/all/docker.yml
  4. 5
      roles/bootstrap-os/tasks/bootstrap-opensuse.yml
  5. 2
      roles/bootstrap-os/tasks/main.yml
  6. 4
      roles/container-engine/docker/tasks/main.yml
  7. 2
      roles/container-engine/docker/vars/suse.yml
  8. 4
      roles/kubespray-defaults/defaults/main.yaml

2
Vagrantfile

@ -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"},
}

2
docs/opensuse.md

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

4
inventory/sample/group_vars/all/docker.yml

@ -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

5
roles/bootstrap-os/tasks/bootstrap-opensuse.yml

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

2
roles/bootstrap-os/tasks/main.yml

@ -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'

4
roles/container-engine/docker/tasks/main.yml

@ -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

2
roles/container-engine/docker/vars/suse.yml

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

4
roles/kubespray-defaults/defaults/main.yaml

@ -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

Loading…
Cancel
Save