@@ -28,16 +28,16 @@ containerd_config="/etc/containerd/config.toml"
2828containerd_config_backup=" /tmp/containerd.config.toml"
2929
3030# test image for container
31- IMAGE=" ${IMAGE:- ghcr.io/ dragonflyoss/ image-service/ alpine: nydus-latest } "
31+ IMAGE=" ${IMAGE:- ghcr.io/ dragonflyoss/ image-service/ alpine: nydus-nightly-v6 } "
3232
3333if [ " $KATA_HYPERVISOR " != " qemu" ] && [ " $KATA_HYPERVISOR " != " cloud-hypervisor" ] && [ " $KATA_HYPERVISOR " != " dragonball" ]; then
3434 echo " Skip nydus test for $KATA_HYPERVISOR , it only works for QEMU/CLH/DB now."
3535 exit 0
3636fi
3737
3838arch=" $( uname -m) "
39- if [ " $arch " != " x86_64" ]; then
40- echo " Skip nydus test for $arch , it only works for x86_64 now. See https://github.com/kata-containers/tests/issues/4445"
39+ if [ " $arch " != " x86_64" -a " $arch " != " aarch64 " ]; then
40+ echo " Skip nydus test for $arch , it only works for x86_64 and aarch64 now. See https://github.com/kata-containers/tests/issues/4445"
4141 exit 0
4242fi
4343
@@ -58,12 +58,46 @@ function install_from_tarball() {
5858 curl -Ls " $tarball_url " | sudo tar xfz - -C /usr/local/bin --strip-components=1
5959}
6060
61- function setup_nydus() {
62- # install nydus
63- install_from_tarball " nydus" " nydus-static"
61+ function install_from_source() {
62+ [ -z $( command -v cargo) ] && " ${dir_path} /../../.ci/install_rust.sh" && source " $HOME /.cargo/env"
63+ [ -z $( command -v cmake) ] && apt install cmake -y
64+ local src_dir=$( mktemp -d)
65+
66+ pushd ${src_dir}
67+ git clone https://github.com/dragonflyoss/image-service.git
68+
69+ pushd image-service
70+ # install nydusd nydus-image
71+ make && make install
72+ [ -f " /usr/bin/nydusd" ] && ln -s /usr/bin/nydusd /usr/local/bin/nydusd
73+ [ -f " /usr/bin/nydus-image" ] && ln -s /usr/bin/nydus-image /usr/local/bin/nydus-image
74+ # install nydusify
75+ make -C contrib/nydusify/ && install -m 755 contrib/nydusify/cmd/nydusify /usr/bin
76+ popd
6477
6578 # install nydus-snapshotter
66- install_from_tarball " nydus-snapshotter" " nydus-snapshotter"
79+ git clone https://github.com/containerd/nydus-snapshotter.git
80+ pushd nydus-snapshotter
81+ make && make install
82+ popd
83+
84+ popd
85+
86+ # clean up temp dir
87+ rm -rf ${src_dir}
88+ }
89+
90+ function setup_nydus() {
91+
92+ if [ " ${arch} " == " x86_64" ]; then
93+ # install nydus
94+ install_from_tarball " nydus" " nydus-static"
95+
96+ # install nydus-snapshotter
97+ install_from_tarball " nydus-snapshotter" " nydus-snapshotter"
98+ else
99+ install_from_source
100+ fi
67101
68102 # Config nydus snapshotter
69103 sudo -E cp " $dir_path /nydusd-config.json" /etc/
0 commit comments