Fix buildset-registry test on focal
Fix ensure-kubernetes role for focal As focal doesn't exist for project atomic ppa [1] Install is performed from opensuse repository only As cri-o package 1.15 for ubuntu focal doesn't exist, update to 1.16 [1] http://ppa.launchpad.net/projectatomic/ppa/ubuntu/dists/ [2] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/ Change-Id: I7f02b7337a5f51a86be1a2332f2305b0ae722934
This commit is contained in:
parent
b517747623
commit
911fe88a9f
27
roles/ensure-kubernetes/tasks/crio-Ubuntu-20.04.yaml
Normal file
27
roles/ensure-kubernetes/tasks/crio-Ubuntu-20.04.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
- name: Add all repositories
|
||||
include_role:
|
||||
name: ensure-package-repositories
|
||||
vars:
|
||||
repositories_keys:
|
||||
- url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/Release.key"
|
||||
- url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.16/xUbuntu_{{ ansible_distribution_version }}/Release.key"
|
||||
repositories_list:
|
||||
- repo: "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/ /"
|
||||
- repo: "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.16/xUbuntu_{{ ansible_distribution_version }}/ /"
|
||||
- name: Install packages
|
||||
package:
|
||||
name:
|
||||
- cri-o-1.16
|
||||
- containernetworking-plugins
|
||||
- podman
|
||||
- cri-tools
|
||||
state: present
|
||||
become: true
|
||||
- name: Set crio cgroup driver
|
||||
ini_file:
|
||||
path: /etc/crio/crio.conf
|
||||
section: crio.runtime
|
||||
option: cgroup_manager
|
||||
value: '"cgroupfs"'
|
||||
mode: 0644
|
||||
become: true
|
@ -14,9 +14,16 @@
|
||||
include_role:
|
||||
name: ensure-docker
|
||||
|
||||
# Ubuntu focal doesn't have cri-o-1.15 packages, per distro tasks is
|
||||
# required to install crio
|
||||
- name: Install crio
|
||||
when: kubernetes_runtime == 'cri-o'
|
||||
include_tasks: crio.yaml
|
||||
include_tasks: "{{ zj_distro_os }}"
|
||||
with_first_found:
|
||||
- "crio-{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
||||
- "crio-default.yaml"
|
||||
loop_control:
|
||||
loop_var: zj_distro_os
|
||||
|
||||
- name: Create .kube directory
|
||||
file:
|
||||
|
@ -1,17 +1,9 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- name: ensure-package-repositories
|
||||
repositories_list:
|
||||
- repo: ppa:projectatomic/ppa
|
||||
- ensure-docker
|
||||
- ensure-skopeo
|
||||
|
||||
tasks:
|
||||
- name: Install packages
|
||||
become: true
|
||||
package:
|
||||
name:
|
||||
- skopeo
|
||||
state: present
|
||||
|
||||
# This happens in the pre-playbook of the
|
||||
# opendev-buildset-registry job. Since we're testing these roles
|
||||
# in opendev, and we're running a second buildset registry, we
|
||||
|
Loading…
Reference in New Issue
Block a user