From 08bd485d281a6b02708e6256dcd1298ee4c9e19c Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Thu, 15 Feb 2018 17:15:18 -0600 Subject: [PATCH] ci: install cri-containerd deps. Install needed dependencies to build cri-containerd Signed-off-by: Jose Carlos Venegas Munoz --- .ci/install_cri-containerd.sh | 35 +++++++++++++++++++++++++++++++++++ .ci/setup.sh | 3 +++ .ci/setup_env_fedora.sh | 3 +++ .ci/setup_env_ubuntu.sh | 3 +++ 4 files changed, 44 insertions(+) create mode 100755 .ci/install_cri-containerd.sh diff --git a/.ci/install_cri-containerd.sh b/.ci/install_cri-containerd.sh new file mode 100755 index 000000000..6ffd76943 --- /dev/null +++ b/.ci/install_cri-containerd.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Copyright (c) 2018 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + +cidir=$(dirname "$0") +source "${cidir}/lib.sh" +get_cc_versions +# Fixme add a version to use in versions.txt file +cri_containerd_version="master" + +echo "Get cri-containerd sources" +repo="github.com/containerd/cri-containerd" +go get -d "$repo" || true +pushd "${GOPATH}/src/${repo}" +git fetch +git checkout "${cri_containerd_version}" +git pull +echo "Installing cri-containerd" +make install.deps +make +sudo -E PATH=$PATH make install diff --git a/.ci/setup.sh b/.ci/setup.sh index 2615c65c5..142df18d4 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -60,6 +60,9 @@ bash -f ${cidir}/install_cni_plugins.sh echo "Install CRI-O" bash -f ${cidir}/install_crio.sh +echo "Install cri-containerd" +bash -f ${cidir}/install_cri-containerd.sh + bash -f "${cidir}/install_kubernetes.sh" bash -f "${cidir}/openshift_setup.sh" diff --git a/.ci/setup_env_fedora.sh b/.ci/setup_env_fedora.sh index 4f29a3fa7..37092a27a 100755 --- a/.ci/setup_env_fedora.sh +++ b/.ci/setup_env_fedora.sh @@ -50,6 +50,9 @@ chronic sudo -E dnf -y install btrfs-progs-devel device-mapper-devel \ libgpg-error-devel libseccomp-devel libselinux-devel ostree-devel \ pkgconfig go-md2man +echo "Install cri-containerd dependencies" +chronic sudo -E dnf -y install libseccomp-devel btrfs-progs-devel libseccomp-static + echo "Install bison binary" chronic sudo -E dnf -y install bison diff --git a/.ci/setup_env_ubuntu.sh b/.ci/setup_env_ubuntu.sh index b8b458684..4f2e2082f 100755 --- a/.ci/setup_env_ubuntu.sh +++ b/.ci/setup_env_ubuntu.sh @@ -58,6 +58,9 @@ sudo -E apt install -y build-essential python pkg-config zlib1g-dev echo -e "Install CRI-O dependencies available for Ubuntu $VERSION_ID" sudo -E apt install -y libdevmapper-dev btrfs-tools util-linux +echo -e "Install cri-containerd dependencies available for Ubuntu $VERSION_ID" +sudo -E apt install -y libseccomp-dev libapparmor-dev btrfs-tools + if [ "$VERSION_ID" == "16.04" ]; then echo "Install os-tree" sudo -E add-apt-repository ppa:alexlarsson/flatpak -y