-
Notifications
You must be signed in to change notification settings - Fork 61
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
pre-install: Setup nydus-snapshotter #251
pre-install: Setup nydus-snapshotter #251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from this, we need to actually get that exposed to the CRD, and make sure the users can set there the snapshotter they want to use / have configured.
Let me take a look here and then I will provide you some pointers.
set -o nounset | ||
|
||
script_dir=$(dirname "$(readlink -f "$0")") | ||
snapshotter_type=${snapshotter_type:-"nydus"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call this "SNAPSHOTTER", instead, just to follow the "all caps" pattern we're following in Kata Containers, and already using as part of the operator as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'm thinking this should be part of the script we already have, instead of its own script.
The reason for that is because in the script we have we're already handling what we need to do with the operator.
The current script has to be modified, though, so you can build your patch atop of those changes.
I've written some quick POC here, not tested, but please, take a look at the last 2 patches in this branch here: https://github.com/fidencio/cc-operator/commits/topic/use-latest-containerd-instead-of-our-own-fork
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call this "SNAPSHOTTER", instead, just to follow the "all caps" pattern we're following in Kata Containers, and already using as part of the operator as well.
Done.
Actually, I think we can pass the snapshotter as an env var here. |
47483bf
to
5c073df
Compare
8580f08
to
006bacd
Compare
Done. I have followed your implementation. |
006bacd
to
ee45611
Compare
ee45611
to
912a07a
Compare
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host with dm-verity. 2)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host with dm-verity. 2)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host with dm-verity. 2)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host without dm-verity. 2)image sharing on the host with dm-verity. 3)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host without dm-verity. 2)image sharing on the host with dm-verity. 3)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
9ee6f19
to
9d12f47
Compare
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host without dm-verity. 2)image sharing on the host with dm-verity. 3)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host without dm-verity. 2)image sharing on the host with dm-verity. 3)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host without dm-verity. 2)image sharing on the host with dm-verity. 3)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host without dm-verity. 2)image sharing on the host with dm-verity. 3)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
Additional tests are necessary to verify new feature that pulling image without forked containerd in CoCo. 1)image sharing on the host with dm-verity. 2)image pulling in the guest with nydus-snapshotter. Fixes kata-containers#5763 Depends-on:github.com/kata-containers/kata-containers/pull/7676 Depends-on:github.com/confidential-containers/operator#251 Signed-off-by: ChengyuZhu6 <[email protected]>
df9d87e
to
5d688cb
Compare
Simply doing ...
=> CACHED [nydus-binary-downloader 2/4] RUN mkdir -p /opt/confidential-containers-pre-install-artifacts/opt/confidential-containers/bin && apk add --no-cache ca-certificates build-base git curl && git clone https://github.com/containerd/nydus-snapshotter -b main /nydus-snapshotter && make -C /nydus-snapshotter && chmod +x /nydus-snapshotter/bin/containe 0.0s
=> ERROR [nydus-binary-downloader 3/4] RUN [ "s390x" != "s390x" ] && curl -fOL --progress-bar https://github.com/dragonflyoss/image-service/releases/download/v2.2.3/nydus-static-v2.2.3-linux-s390x.tgz && tar xvzpf nydus-static-v2.2.3-linux-s390x.tgz -C / && chmod +x /nydus-static/nydus-image && mv /nydus-static/nydus-image /opt/confidential-containers-p 0.2s
------
> [nydus-binary-downloader 3/4] RUN [ "s390x" != "s390x" ] && curl -fOL --progress-bar https://github.com/dragonflyoss/image-service/releases/download/v2.2.3/nydus-static-v2.2.3-linux-s390x.tgz && tar xvzpf nydus-static-v2.2.3-linux-s390x.tgz -C / && chmod +x /nydus-static/nydus-image && mv /nydus-static/nydus-image /opt/confidential-containers-pre-install-artifacts/opt/confidential-containers/bin && rm -rf /nydus-static /nydus-static-v2.2.3-linux-s390x.tgz:
------
Dockerfile:80
--------------------
79 |
80 | >>> RUN [ "${ARCH}" != "s390x" ] && \
81 | >>> curl -fOL --progress-bar ${NYDUS_REPO}/releases/download/${NYDUS_VERSION}/nydus-static-${NYDUS_VERSION}-linux-${ARCH}.tgz && \
82 | >>> tar xvzpf nydus-static-${NYDUS_VERSION}-linux-${ARCH}.tgz -C / && \
83 | >>> chmod +x /nydus-static/nydus-image && \
84 | >>> mv /nydus-static/nydus-image ${NODE_DESTINATION}/bin && \
85 | >>> rm -rf /nydus-static /nydus-static-${NYDUS_VERSION}-linux-${ARCH}.tgz
86 |
--------------------
ERROR: failed to solve: process "/dev/.buildkit_qemu_emulator /bin/sh -c [ \"${ARCH}\" != \"s390x\" ] && curl -fOL --progress-bar ${NYDUS_REPO}/releases/download/${NYDUS_VERSION}/nydus-static-${NYDUS_VERSION}-linux-${ARCH}.tgz && tar xvzpf nydus-static-${NYDUS_VERSION}-linux-${ARCH}.tgz -C / && chmod +x /nydus-static/nydus-image && mv /nydus-static/nydus-image ${NODE_DESTINATION}/bin && rm -rf /nydus-static /nydus-static-${NYDUS_VERSION}-linux-${ARCH}.tgz" did not complete successfully: exit code: 1
make: *** [Makefile:10: reqs-image] Error 1 Here are the commands that I ran: export registry=quay.io/surajd/reqs-payload
pushd install/pre-install-payload
make reqs-image Do I need anything else I should be doing? |
ed069de
to
315116f
Compare
Thanks for your information. Let me take a look. |
ae59de3
to
04a1ef5
Compare
That's the error in downloading nydus and I have fixed it. Please try again. Thanks. |
@ChengyuZhu6 yes the build worked fine, I will try to deploy this now. |
I was able to do the regular operator installation with this. |
c6a919c
to
b40adfd
Compare
nydus-snapshotter / nydus will be used to get rid of the containerd fork we have, allowing us to do both the image pulling on the host side and inside the guest. NOTE: This PR should NOT be merged as it's, as it breaks s390x payload build. Signed-off-by: ChengyuZhu6 <[email protected]> Signed-off-by: Fabiano Fidêncio <[email protected]>
b40adfd
to
b0d409c
Compare
@ChengyuZhu6, I'm closing this one as your commit was part of #267 |
This is a patch to setup remote snapshotter instead forked containerd in CoCo. As discussed in kata-containers/kata-containers#7658, operator is responsible to set up the snapshotter.