forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Centos, debian and fedora CRI-O repo (kubernetes-sigs#6008)
* replace removed repo with kubic repository for centos 7 * add crio configuration for centos8 * add crio configurations for debian * use correct crio version for fedora * simplify calulation of required crio version - gives possibility to overwrite * change default path for runc * change default for seccomp path * change default for conmon
- Loading branch information
Showing
13 changed files
with
121 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
--- | ||
crio_rhel_repo_base_url: 'https://cbs.centos.org/repos/paas7-crio-114-candidate/x86_64/os/' | ||
|
||
crio_seccomp_profile: "/etc/crio/seccomp.json" | ||
|
||
crio_cgroup_manager: "{{ kubelet_cgroup_driver | default('cgroupfs') }}" | ||
|
||
crio_runc_path: "/usr/sbin/runc" | ||
crio_seccomp_profile: "" | ||
crio_runc_path: "/usr/bin/runc" | ||
crio_conmon: "/usr/bin/conmon" | ||
|
||
crio_required_version: "{{ kube_version | regex_replace('^v(?P<major>\\d+).(?P<minor>\\d+).(?P<patch>\\d+)$', '\\g<major>.\\g<minor>') }}" | ||
|
||
crio_kubernetes_version_matrix: | ||
"1.18": "1.17" | ||
"1.17": "1.17" | ||
"1.16": "1.16" | ||
|
||
crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.17') }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,60 @@ | ||
--- | ||
|
||
- name: CRI-O kubic repo name for debian os family | ||
set_fact: | ||
crio_kubic_debian_repo_name: "{{ ((ansible_distribution == 'Ubuntu') | ternary('x','')) ~ ansible_distribution ~ '_' ~ ansible_distribution_version }}" | ||
when: ansible_os_family == "Debian" | ||
|
||
- name: Add CRI-O kubic repo key | ||
apt_key: | ||
url: "https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x{{ ansible_distribution }}_{{ ansible_distribution_version }}/Release.key" | ||
url: "https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/{{ crio_kubic_debian_repo_name }}/Release.key" | ||
state: present | ||
when: ansible_distribution in ["Ubuntu"] | ||
when: crio_kubic_debian_repo_name is defined | ||
|
||
- name: Add CRI-O kubic repo | ||
apt_repository: | ||
repo: "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x{{ ansible_distribution }}_{{ ansible_distribution_version }}/ /" | ||
repo: "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{ crio_kubic_debian_repo_name }}/ /" | ||
state: present | ||
filename: devel:kubic:libcontainers:stable | ||
when: ansible_distribution in ["Ubuntu"] | ||
when: crio_kubic_debian_repo_name is defined | ||
|
||
- name: Add CRI-O OpenShift Origin repository | ||
- name: Add CRI-O kubic repo | ||
yum_repository: | ||
name: origin | ||
description: OpenShift Origin Repo | ||
baseurl: "{{ crio_rhel_repo_base_url }}" | ||
gpgcheck: no | ||
when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_ostree | ||
name: devel_kubic_libcontainers_stable | ||
description: Stable Releases of Upstream github.com/containers packages (CentOS_$releasever) | ||
baseurl: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_$releasever/ | ||
gpgcheck: yes | ||
gpgkey: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_$releasever/repodata/repomd.xml.key | ||
when: ansible_distribution in ["CentOS"] | ||
|
||
- name: Enable modular repos for crio | ||
- name: Add CRI-O kubic repo | ||
yum_repository: | ||
name: "devel_kubic_libcontainers_stable_cri-o_{{ crio_version }}" | ||
description: 1.17 (CentOS_$releasever) | ||
baseurl: "http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ crio_version }}/CentOS_$releasever/" | ||
gpgcheck: yes | ||
gpgkey: "http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ crio_version }}/CentOS_$releasever/repodata/repomd.xml.key" | ||
when: ansible_distribution in ["CentOS"] | ||
|
||
- name: Enable modular repos for CRI-O | ||
ini_file: | ||
path: "/etc/yum.repos.d/{{ item }}.repo" | ||
section: "{{ item }}" | ||
option: enabled | ||
value: 1 | ||
become: true | ||
when: ansible_distribution in ["Fedora"] | ||
when: is_ostree | ||
loop: | ||
- "fedora-updates-modular" | ||
- "fedora-modular" | ||
|
||
- name: Enable CRI-O module | ||
command: "dnf -y module enable cri-o:{{ crio_version }}" | ||
args: | ||
warn: False | ||
register: crio_dnf_result | ||
changed_when: "'Enabling' in crio_dnf_result.stdout" | ||
become: true | ||
when: | ||
- ansible_distribution in ["Fedora"] | ||
- not is_ostree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
crio_packages: | ||
- cri-o | ||
- oci-systemd-hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
crio_packages: | ||
- cri-o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
crio_packages: | ||
- "cri-o-{{ crio_version }}" | ||
- runc | ||
|
||
crio_runc_path: /usr/sbin/runc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ crio_packages: | |
- oci-systemd-hook | ||
|
||
crio_conmon: /usr/libexec/crio/conmon | ||
crio_runc_path: /usr/bin/runc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
--- | ||
crio_kubic_versions: | ||
"1.18": "1.17" | ||
"1.17": "1.17" | ||
"1.16": "1.16" | ||
|
||
crio_packages: | ||
- "cri-o-{{ crio_kubic_versions[ kube_version | regex_replace('^v(?P<major>\\d+).(?P<minor>\\d+).(?P<patch>\\d+)$', '\\g<major>.\\g<minor>') ] | default('1.17') }}" | ||
- "cri-o-{{ crio_version }}" | ||
|
||
crio_conmon: /usr/bin/conmon | ||
crio_seccomp_profile: "" | ||
crio_runc_path: /usr/lib/cri-o-runc/sbin/runc |