Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image-rs: add encrypted nydus image tests #469

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

ChengyuZhu6
Copy link
Member

Add encrypted nydus image tests.

@ChengyuZhu6 ChengyuZhu6 force-pushed the nydus-encrypted branch 3 times, most recently from 438df55 to c75da0c Compare February 6, 2024 03:31
@ChengyuZhu6 ChengyuZhu6 marked this pull request as draft February 6, 2024 03:40
@ChengyuZhu6 ChengyuZhu6 force-pushed the nydus-encrypted branch 7 times, most recently from 08bc2b7 to f201d46 Compare February 6, 2024 04:58
@ChengyuZhu6 ChengyuZhu6 marked this pull request as ready for review February 6, 2024 05:24
@ChengyuZhu6 ChengyuZhu6 force-pushed the nydus-encrypted branch 8 times, most recently from 5f6816b to 4faeaad Compare February 7, 2024 03:21
@@ -43,6 +43,8 @@ const OCICRYPT_CONFIG: &str = "test_data/ocicrypt_keyprovider_ttrpc.conf";
#[rstest::rstest]
#[case("ghcr.io/confidential-containers/test-container:unencrypted")]
#[case("ghcr.io/confidential-containers/test-container:encrypted")]
#[cfg_attr(not(feature = "nydus"), ignore)]
#[case("ghcr.io/chengyuzhu6/busybox:encrypted-nydus")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fitzthum can you help to copy this image to CoCo repo?

skopeo copy docker://ghcr.io/chengyuzhu6/busybox:encrypted-nydus docker://ghcr.io/confidential-containers/test-container-image-rs:busybox-encrypted-nydus

Copy link
Member

@fitzthum fitzthum Feb 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm skopeo complains when I run that command

FATA[0000] initializing image from source docker://ghcr.io/chengyuzhu6/busybox:encrypted-nydus: unsupported docker v2s2 media type: "application/vnd.oci.image.layer.nydus.blob.v1" 

I can take a deeper look at it tomorrow. Maybe I need to update skopeo or something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @fitzthum. To push a nydus image, we need to use special tools called nydusify and nydus-image. The following steps show how to push the nydus image:

  1. Get nydus-image and nydusify binaries from release, for example :
$ wget https://github.com/dragonflyoss/nydus/releases/download/v2.2.4/nydus-static-v2.2.4-linux-amd64.tgz
$ tar -xf nydus-static-v2.2.4-linux-amd64.tgz
  1. Push nydus image from source to target registry, for example :
cd nydus-static
./nydusify convert --source ghcr.io/chengyuzhu6/busybox:encrypted-nydus --target docker.io/zcy1234/busybox:encrypted-nydus --nydus-image ./nydus-image

I had successfully pushed the image to docker.io registry https://github.com/confidential-containers/guest-components/actions/runs/7825705239/job/21350313511?pr=473.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops I missed your comment. Thanks for the instructions. I pushed the image to ghcr.io/confidential-containers/busybox:nydus-encrypted. Slightly different than the name suggested but I think this is a bit more generic. Can change it if needed.

Let's make sure to add these instructions somewhere for users once the feature is supported.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member Author

@ChengyuZhu6 ChengyuZhu6 Feb 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fitzthum Would you kindly change the visibility of "ghcr.io/confidential-containers/busybox" to public? Currently, it is set to private, but CI need it to be public. https://github.com/confidential-containers/guest-components/actions/runs/7945843889/job/21692935674?pr=469#:~:text=failed%20to%20download,160

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. Should be public now.

Add encrypted nydus image tests.

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
Copy link
Member

@Xynnn007 Xynnn007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@arronwy arronwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ChengyuZhu6 LGTM!

@arronwy arronwy merged commit e0ab6e3 into confidential-containers:main Feb 20, 2024
5 checks passed
@ChengyuZhu6 ChengyuZhu6 deleted the nydus-encrypted branch February 20, 2024 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants