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

Fix CI create multi node cluster failures by nerdctl #3534

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions .github/workflows/nerdctl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ jobs:
env:
JOB_NAME: "nerdctl-${{ matrix.deployment }}-${{ matrix.ipFamily }}"
IP_FAMILY: ${{ matrix.ipFamily }}
NERDCTL_VERSION: "1.7.3"
CONTAINERD_VERSION: "1.7.13"
CNI_PLUGINS_VERSION: "1.3.0"
NERDCTL_VERSION: "1.7.4"
KIND_EXPERIMENTAL_PROVIDER: "nerdctl"
steps:
- name: Check out code into the Go module directory
Expand All @@ -52,17 +50,18 @@ jobs:

- name: Install nerdctl
run: |
# Remove Docker and Podman
sudo systemctl is-active --quiet docker.service || systemctl stop docker.service
sudo apt-get remove -y docker-ce docker-ce-cli docker-buildx-plugin podman
# Install Containerd
sudo curl -sSL https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz|sudo tar -xvz -C /usr
sudo systemctl restart containerd.service
sudo apt-get remove -y docker-ce docker-ce-cli podman containerd.io
sudo rm -rf /etc/systemd/system/containerd.service # clean up the cotnainerd systemd file
# Install nerdctl full package
sudo curl -sSL https://github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-full-${NERDCTL_VERSION}-linux-amd64.tar.gz | sudo tar -xvz -C /usr/local
# Start Containerd
sudo systemctl daemon-reload
sudo systemctl enable --now containerd
# Show Versions
sudo ctr version
# Install CNI
Copy link
Contributor

Choose a reason for hiding this comment

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

why are these no longer required?

Copy link
Member Author

@yankay yankay Mar 3, 2024

Choose a reason for hiding this comment

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

HI @aojea

Because the nerdctl-full contains the CNI dependency, it also includes:

# nerdctl (full distribution)
- nerdctl: v1.7.4
- containerd: v1.7.13
- runc: v1.1.12
- CNI plugins: v1.4.0
- BuildKit: v0.12.5
- Stargz Snapshotter: v0.15.1
- imgcrypt: v1.1.9
- RootlessKit: v2.0.1
- slirp4netns: v1.2.2
- bypass4netns: v0.4.0
- fuse-overlayfs: v1.13
- containerd-fuse-overlayfs: v1.0.8
- Kubo (IPFS): v0.26.0
- Tini: v0.19.0
- buildg: v0.4.1

ref to: https://github.com/containerd/nerdctl/releases/tag/v1.7.4

Using the nerdctl-full instead of Minimal Package can make the CI easy to maintaince, because the nerdctl manage the dependency version mapping.

sudo mkdir -p /opt/cni/bin
sudo curl -sSL https://github.com/containernetworking/plugins/releases/download/v${CNI_PLUGINS_VERSION}/cni-plugins-linux-amd64-v${CNI_PLUGINS_VERSION}.tgz |sudo tar -xvz -C /opt/cni/bin
# Install nerdctl
sudo curl -sSL https://github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz|sudo tar -xvz -C /usr/local/bin
sudo nerdctl version

- name: Create single node cluster
if: ${{ matrix.deployment == 'singleNode' }}
Expand Down
Loading