Change repos from projectatomic to kubic OBS project.
Since projectatomic Ubuntu builds are deprecated, and advice was to consult upstream documentation[1], Kubernetes with cri-o now rely on Kubic project, which (among the others) provides packages for Ubuntu 20.04. Let us switch for those. [1] https://kubernetes.io/docs/setup/production-environment/container-runtimes/#cri-o Change-Id: Ib06753d22f8859eefedc031094851b052f4105b6
This commit is contained in:
parent
74bf39e6a6
commit
d4de1bb990
@ -40,14 +40,22 @@ function install_crio {
|
||||
|
||||
local lsb_dist=${os_VENDOR,,}
|
||||
local dist_version=${os_CODENAME}
|
||||
local arch
|
||||
arch=$(dpkg --print-architecture)
|
||||
local kubic_obs_project_key="2472d6d0d2f66af87aba8da34d64390375060aa4"
|
||||
local os="x${os_VENDOR}_${os_RELEASE}"
|
||||
if is_ubuntu; then
|
||||
apt_get install apt-transport-https ca-certificates software-properties-common
|
||||
sudo add-apt-repository -y ppa:projectatomic/ppa
|
||||
apt_get install apt-transport-https ca-certificates \
|
||||
software-properties-common
|
||||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \
|
||||
--recv ${kubic_obs_project_key}
|
||||
sudo apt-add-repository "deb https://download.opensuse.org/"`
|
||||
`"repositories/devel:/kubic:/libcontainers:/stable/${os}/ /"
|
||||
sudo apt-add-repository "deb http://download.opensuse.org/"`
|
||||
`"repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/"`
|
||||
`"${CRIO_VERSION}/${os}/ /"
|
||||
|
||||
# Installing podman and containerd will get us compatible versions of
|
||||
# cri-o and runc. And we need podman to manage container images anyway.
|
||||
apt_get install podman buildah
|
||||
apt_get install podman buildah cri-o-runc cri-o
|
||||
elif is_fedora; then
|
||||
if [[ "$lsb_dist" = "centos" ]]; then
|
||||
sudo yum-config-manager \
|
||||
@ -75,16 +83,6 @@ function configure_crio {
|
||||
iniset -sudo ${crio_conf} crio.runtime log_level \"info\"
|
||||
fi
|
||||
if is_ubuntu; then
|
||||
# In Ubuntu's a special vendored version of runc is installed with
|
||||
# cri-o. This means that it'll not work with the system's version of
|
||||
# runc. Moreover vendored runc is not placed into /usr/bin, where
|
||||
# crio.conf states that it will be. We fix that by linking the vendored
|
||||
# binary to /usr/bin.
|
||||
if [[ ! -e /usr/bin/runc ]]; then
|
||||
sudo ln -s /usr/lib/cri-o-runc/sbin/runc /usr/bin/runc
|
||||
sudo chmod +x /usr/bin/runc
|
||||
fi
|
||||
|
||||
# At least for 18.04 we need to set up /etc/containers/registries.conf
|
||||
# with some initial content. That's another bug with that PPA.
|
||||
local registries_conf
|
||||
|
@ -9,6 +9,7 @@ ENABLE_LIVE_RESTORE=${ENABLE_LIVE_RESTORE:-false}
|
||||
ENABLE_IPV6=${ENABLE_IPV6:-false}
|
||||
K8S_NETWORK_ADDON=${K8S_NETWORK_ADDON:-flannel}
|
||||
ENABLE_CONTAINERD_CRI=${ENABLE_CONTAINERD_CRI:-false}
|
||||
CRIO_VERSION=${CRIO_VERSION:-"1.18:/1.18.0"}
|
||||
|
||||
# Enable container services
|
||||
enable_service container
|
||||
|
Loading…
Reference in New Issue
Block a user