From 9f12577be2a248e048e831ae07461e8a62e6b2f2 Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Mon, 8 Apr 2019 11:00:05 -0500 Subject: [PATCH] install: Allow define kata branch. Kata OBS repositories provide multiple branch support. Let define a variable to allow users define kata branch to use. Fixes: #423 Signed-off-by: Jose Carlos Venegas Munoz --- install/centos-installation-guide.md | 3 ++- install/debian-installation-guide.md | 7 ++++--- install/fedora-installation-guide.md | 3 ++- install/opensuse-installation-guide.md | 3 ++- install/rhel-installation-guide.md | 3 ++- install/sles-installation-guide.md | 3 ++- install/ubuntu-installation-guide.md | 5 +++-- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/install/centos-installation-guide.md b/install/centos-installation-guide.md index 07611e8541..cece662c83 100644 --- a/install/centos-installation-guide.md +++ b/install/centos-installation-guide.md @@ -6,7 +6,8 @@ $ source /etc/os-release $ sudo yum -y install yum-utils $ ARCH=$(arch) - $ sudo -E yum-config-manager --add-repo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/CentOS_${VERSION_ID}/home:katacontainers:releases:${ARCH}:master.repo" + $ BRANCH="${BRANCH:-master}" + $ sudo -E yum-config-manager --add-repo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/CentOS_${VERSION_ID}/home:katacontainers:releases:${ARCH}:${BRANCH}.repo" $ sudo -E yum -y install kata-runtime kata-proxy kata-shim ``` diff --git a/install/debian-installation-guide.md b/install/debian-installation-guide.md index fe11d55668..6897d1d455 100644 --- a/install/debian-installation-guide.md +++ b/install/debian-installation-guide.md @@ -32,12 +32,13 @@ ```bash $ export DEBIAN_FRONTEND=noninteractive $ ARCH=$(arch) + $ BRANCH="${BRANCH:-master}" $ source /etc/os-release $ [ "$ID" = debian ] && [ -z "$VERSION_ID" ] && echo >&2 "ERROR: Debian unstable not supported. You can try stable packages here: - http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master" && exit 1 - $ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/Debian_${VERSION_ID}/ /' > /etc/apt/sources.list.d/kata-containers.list" - $ curl -sL http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/Debian_${VERSION_ID}/Release.key | sudo apt-key add - + http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}" && exit 1 + $ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/Debian_${VERSION_ID}/ /' > /etc/apt/sources.list.d/kata-containers.list" + $ curl -sL http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/Debian_${VERSION_ID}/Release.key | sudo apt-key add - $ sudo -E apt-get update $ sudo -E apt-get -y install kata-runtime kata-proxy kata-shim ``` diff --git a/install/fedora-installation-guide.md b/install/fedora-installation-guide.md index 2d022befd5..38a4f6eaa2 100644 --- a/install/fedora-installation-guide.md +++ b/install/fedora-installation-guide.md @@ -5,8 +5,9 @@ ```bash $ source /etc/os-release $ ARCH=$(arch) + $ BRANCH="${BRANCH:-master}" $ sudo dnf -y install dnf-plugins-core - $ sudo -E dnf config-manager --add-repo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/Fedora_${VERSION_ID}/home:katacontainers:releases:${ARCH}:master.repo" + $ sudo -E dnf config-manager --add-repo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/Fedora_${VERSION_ID}/home:katacontainers:releases:${ARCH}:${BRANCH}.repo" $ sudo -E dnf -y install kata-runtime kata-proxy kata-shim ``` diff --git a/install/opensuse-installation-guide.md b/install/opensuse-installation-guide.md index 5dfc6eaedf..7489f63da7 100644 --- a/install/opensuse-installation-guide.md +++ b/install/opensuse-installation-guide.md @@ -5,7 +5,8 @@ ```bash $ source /etc/os-release $ ARCH=$(arch) - $ sudo -E zypper addrepo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/openSUSE_Leap_${VERSION_ID}/home:katacontainers:releases:${ARCH}:master.repo" + $ BRANCH="${BRANCH:-master}" + $ sudo -E zypper addrepo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/openSUSE_Leap_${VERSION_ID}/home:katacontainers:releases:${ARCH}:${BRANCH}.repo" $ sudo -E zypper -n --no-gpg-checks install kata-runtime kata-proxy kata-shim ``` diff --git a/install/rhel-installation-guide.md b/install/rhel-installation-guide.md index 68b28c7b6f..19a6589036 100644 --- a/install/rhel-installation-guide.md +++ b/install/rhel-installation-guide.md @@ -13,7 +13,8 @@ ```bash $ source /etc/os-release $ ARCH=$(arch) - $ sudo -E yum-config-manager --add-repo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/RHEL_${VERSION_ID}/home:katacontainers:releases:${ARCH}:master.repo" + $ BRANCH="${BRANCH:-master}" + $ sudo -E yum-config-manager --add-repo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/RHEL_${VERSION_ID}/home:katacontainers:releases:${ARCH}:${BRANCH}.repo" $ sudo -E yum -y install kata-runtime kata-proxy kata-shim ``` diff --git a/install/sles-installation-guide.md b/install/sles-installation-guide.md index f0d16dcabb..96146c8227 100644 --- a/install/sles-installation-guide.md +++ b/install/sles-installation-guide.md @@ -12,7 +12,8 @@ ```bash $ ARCH=$(arch) - $ sudo -E zypper addrepo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/SLE_12_SP3/home:katacontainers:releases:${ARCH}:master.repo" + $ BRANCH="${BRANCH:-master}" + $ sudo -E zypper addrepo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/SLE_12_SP3/home:katacontainers:releases:${ARCH}:${BRANCH}.repo" $ sudo -E zypper -n --no-gpg-checks install kata-runtime kata-proxy kata-shim ``` diff --git a/install/ubuntu-installation-guide.md b/install/ubuntu-installation-guide.md index 6d6f1b4f8f..ba1fe37993 100644 --- a/install/ubuntu-installation-guide.md +++ b/install/ubuntu-installation-guide.md @@ -3,8 +3,9 @@ 1. Install the Kata Containers components with the following commands: ```bash $ ARCH=$(arch) - $ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/xUbuntu_$(lsb_release -rs)/ /' > /etc/apt/sources.list.d/kata-containers.list" - $ curl -sL http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/xUbuntu_$(lsb_release -rs)/Release.key | sudo apt-key add - + $ BRANCH="${BRANCH:-master}" + $ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/xUbuntu_$(lsb_release -rs)/ /' > /etc/apt/sources.list.d/kata-containers.list" + $ curl -sL http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/xUbuntu_$(lsb_release -rs)/Release.key | sudo apt-key add - $ sudo -E apt-get update $ sudo -E apt-get -y install kata-runtime kata-proxy kata-shim ```