forked from kata-containers/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_kata.sh
executable file
·76 lines (65 loc) · 1.7 KB
/
install_kata.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
#
# Copyright (c) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
set -o errexit
set -o nounset
set -o pipefail
cidir=$(dirname "$0")
tag="${1:-""}"
source /etc/os-release || source /usr/lib/os-release
source "${cidir}/lib.sh"
KATA_HYPERVISOR="${KATA_HYPERVISOR:-qemu}"
experimental_qemu="${experimental_qemu:-false}"
TEST_RUST_AGENT="${TEST_RUST_AGENT:-false}"
TEST_CGROUPSV2="${TEST_CGROUPSV2:-false}"
if [ "${TEST_RUST_AGENT}" == true ]; then
echo "Install rust agent image"
"${cidir}/install_kata_image_rust.sh"
else
echo "Install kata-containers image"
"${cidir}/install_kata_image.sh" "${tag}"
fi
echo "Install Kata Containers Kernel"
"${cidir}/install_kata_kernel.sh" "${tag}"
install_qemu(){
echo "Installing qemu"
if [ "$experimental_qemu" == "true" ]; then
echo "Install experimental Qemu"
"${cidir}/install_qemu_experimental.sh"
else
"${cidir}/install_qemu.sh"
fi
}
echo "Install shim"
"${cidir}/install_shim.sh" "${tag}"
echo "Install proxy"
"${cidir}/install_proxy.sh" "${tag}"
echo "Install runtime"
"${cidir}/install_runtime.sh" "${tag}"
case "${KATA_HYPERVISOR}" in
"cloud-hypervisor")
"${cidir}/install_cloud_hypervisor.sh"
echo "Installing experimental_qemu to install virtiofsd"
export experimental_qemu=true
install_qemu
;;
"firecracker")
"${cidir}/install_firecracker.sh"
;;
"qemu")
install_qemu
;;
*)
die "${KATA_HYPERVISOR} not supported for CI install"
;;
esac
if [ "${TEST_CGROUPSV2}" == "true" ]; then
echo "Configure podman with kata"
"${cidir}/configure_podman_for_kata.sh"
fi
# Check system supports running Kata Containers
kata_runtime_path=$(command -v kata-runtime)
sudo -E PATH=$PATH "$kata_runtime_path" kata-check