Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
test nydus on aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
jongwu committed Feb 23, 2023
1 parent 339affb commit 4ef67fb
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions integration/nydus/nydus_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ if [ "$KATA_HYPERVISOR" != "qemu" ] && [ "$KATA_HYPERVISOR" != "cloud-hypervisor
fi

arch="$(uname -m)"
if [ "$arch" != "x86_64" ]; then
echo "Skip nydus test for $arch, it only works for x86_64 now. See https://github.com/kata-containers/tests/issues/4445"
if [ "$arch" != "x86_64" && "$arch" != "aarch64" ]; then
echo "Skip nydus test for $arch, it only works for x86_64 and aarch64 now. See https://github.com/kata-containers/tests/issues/4445"
exit 0
fi

Expand All @@ -58,12 +58,44 @@ function install_from_tarball() {
curl -Ls "$tarball_url" | sudo tar xfz - -C /usr/local/bin --strip-components=1
}

function setup_nydus() {
# install nydus
install_from_tarball "nydus" "nydus-static"
function install_from_source() {
[ -z $(command -v cargo) ] && ./"${dir_path}/../../.ci/install_rust.sh"

local src_dir=$(mktemp -d)

pushd ${src_dir}
git clone https://github.com/dragonflyoss/image-service.git

pushd image-service
# install nydusd nydus-image nydusctl
make && make install
# install nydusify
make -C contrib/nydusify/ && install -m 755 contrib/nydusify/cmd/nydusify /usr/bin
popd

# install nydus-snapshotter
install_from_tarball "nydus-snapshotter" "nydus-snapshotter"
git clone https://github.com/containerd/nydus-snapshotter.git
pushd nydus-snapshotter
make && make install
popd

popd

# clean up temp dir
rm -rf ${src_dir}
}

function setup_nydus() {

if [ "${arch}" == "x86_64" ]; then
# install nydus
install_from_tarball "nydus" "nydus-static"

# install nydus-snapshotter
install_from_tarball "nydus-snapshotter" "nydus-snapshotter"
else
install_from_source
fi

# Config nydus snapshotter
sudo -E cp "$dir_path/nydusd-config.json" /etc/
Expand Down

0 comments on commit 4ef67fb

Please sign in to comment.