From 12ada59bf1289ea1543a56d7f711194251fb8a95 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Mon, 26 Jul 2021 19:28:36 +0100 Subject: [PATCH] Update to containerd v1.5.4 Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- Makefile | 2 +- cloud-config.txt | 4 ++-- docs/DEV.md | 10 +++++----- docs/bootstrap/cloud-config.tpl | 4 ++-- docs/bootstrap/digitalocean-terraform/cloud-config.tpl | 4 ++-- hack/build-containerd-armhf.sh | 4 ++-- hack/build-containerd.sh | 4 ++-- hack/install.sh | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 6efeffc..4bd0143 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ hashgen: .PHONY: prepare-test prepare-test: curl -sLSf https://github.com/containerd/containerd/releases/download/v$(CONTAINERD_VER)/containerd-$(CONTAINERD_VER).linux-amd64.tar.gz > /tmp/containerd.tar.gz && sudo tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 - curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.3.2/containerd.service | sudo tee /etc/systemd/system/containerd.service + curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.5.4/containerd.service | sudo tee /etc/systemd/system/containerd.service sudo systemctl daemon-reload && sudo systemctl start containerd sudo /sbin/sysctl -w net.ipv4.conf.all.forwarding=1 sudo mkdir -p /opt/cni/bin diff --git a/cloud-config.txt b/cloud-config.txt index 6643589..88c2006 100644 --- a/cloud-config.txt +++ b/cloud-config.txt @@ -10,8 +10,8 @@ packages: - git runcmd: -- curl -sLSf https://github.com/containerd/containerd/releases/download/v1.3.5/containerd-1.3.5-linux-amd64.tar.gz > /tmp/containerd.tar.gz && tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 -- curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.3.5/containerd.service | tee /etc/systemd/system/containerd.service +- curl -sLSf https://github.com/containerd/containerd/releases/download/v1.5.4/containerd-1.5.4-linux-amd64.tar.gz > /tmp/containerd.tar.gz && tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 +- curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.5.4/containerd.service | tee /etc/systemd/system/containerd.service - systemctl daemon-reload && systemctl start containerd - systemctl enable containerd - /sbin/sysctl -w net.ipv4.conf.all.forwarding=1 diff --git a/docs/DEV.md b/docs/DEV.md index bc9c53d..09fb023 100644 --- a/docs/DEV.md +++ b/docs/DEV.md @@ -16,7 +16,7 @@ For Windows users, install [Git Bash](https://git-scm.com/downloads) along with multipass or vagrant. You can also use WSL1 or WSL2 which provides a Linux environment. - You will also need [containerd v1.3.5](https://github.com/containerd/containerd) and the [CNI plugins v0.8.5](https://github.com/containernetworking/plugins) + You will also need [containerd v1.5.4](https://github.com/containerd/containerd) and the [CNI plugins v0.8.5](https://github.com/containernetworking/plugins) [faas-cli](https://github.com/openfaas/faas-cli) is optional, but recommended. @@ -84,7 +84,7 @@ You have three options - binaries for PC, binaries for armhf, or build from sour * Install containerd `x86_64` only ```bash -export VER=1.3.5 +export VER=1.5.4 curl -sSL https://github.com/containerd/containerd/releases/download/v$VER/containerd-$VER-linux-amd64.tar.gz > /tmp/containerd.tar.gz \ && sudo tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 @@ -96,7 +96,7 @@ containerd -version Building `containerd` on armhf is extremely slow, so I've provided binaries for you. ```bash - curl -sSL https://github.com/alexellis/containerd-armhf/releases/download/v1.3.5/containerd.tgz | sudo tar -xvz --strip-components=2 -C /usr/local/bin/ + curl -sSL https://github.com/alexellis/containerd-armhf/releases/download/v1.5.4/containerd.tgz | sudo tar -xvz --strip-components=2 -C /usr/local/bin/ ``` * Or clone / build / install [containerd](https://github.com/containerd/containerd) from source: @@ -108,7 +108,7 @@ containerd -version git clone https://github.com/containerd/containerd cd containerd git fetch origin --tags - git checkout v1.3.5 + git checkout v1.5.4 make sudo make install @@ -119,7 +119,7 @@ containerd -version #### Ensure containerd is running ```bash -curl -sLS https://raw.githubusercontent.com/containerd/containerd/v1.3.5/containerd.service > /tmp/containerd.service +curl -sLS https://raw.githubusercontent.com/containerd/containerd/v1.5.4/containerd.service > /tmp/containerd.service # Extend the timeouts for low-performance VMs echo "[Manager]" | tee -a /tmp/containerd.service diff --git a/docs/bootstrap/cloud-config.tpl b/docs/bootstrap/cloud-config.tpl index f7684c0..b1f2d41 100644 --- a/docs/bootstrap/cloud-config.tpl +++ b/docs/bootstrap/cloud-config.tpl @@ -10,8 +10,8 @@ packages: - git runcmd: -- curl -sLSf https://github.com/containerd/containerd/releases/download/v1.3.5/containerd-1.3.5-linux-amd64.tar.gz > /tmp/containerd.tar.gz && tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 -- curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.3.5/containerd.service | tee /etc/systemd/system/containerd.service +- curl -sLSf https://github.com/containerd/containerd/releases/download/v1.5.4/containerd-1.5.4-linux-amd64.tar.gz > /tmp/containerd.tar.gz && tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 +- curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.5.4/containerd.service | tee /etc/systemd/system/containerd.service - systemctl daemon-reload && systemctl start containerd - /sbin/sysctl -w net.ipv4.conf.all.forwarding=1 - mkdir -p /opt/cni/bin diff --git a/docs/bootstrap/digitalocean-terraform/cloud-config.tpl b/docs/bootstrap/digitalocean-terraform/cloud-config.tpl index 043f24d..fa9f315 100644 --- a/docs/bootstrap/digitalocean-terraform/cloud-config.tpl +++ b/docs/bootstrap/digitalocean-terraform/cloud-config.tpl @@ -31,8 +31,8 @@ packages: - runc runcmd: -- curl -sLSf https://github.com/containerd/containerd/releases/download/v1.3.5/containerd-1.3.5-linux-amd64.tar.gz > /tmp/containerd.tar.gz && tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 -- curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.3.5/containerd.service | tee /etc/systemd/system/containerd.service +- curl -sLSf https://github.com/containerd/containerd/releases/download/v1.5.4/containerd-1.5.4-linux-amd64.tar.gz > /tmp/containerd.tar.gz && tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 +- curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.5.4/containerd.service | tee /etc/systemd/system/containerd.service - systemctl daemon-reload && systemctl start containerd - /sbin/sysctl -w net.ipv4.conf.all.forwarding=1 - mkdir -p /opt/cni/bin diff --git a/hack/build-containerd-armhf.sh b/hack/build-containerd-armhf.sh index 508296f..15151c5 100755 --- a/hack/build-containerd-armhf.sh +++ b/hack/build-containerd-armhf.sh @@ -3,7 +3,7 @@ export ARCH="armv6l" echo "Downloading Go" -curl -SLsf https://dl.google.com/go/go1.13.15.linux-$ARCH.tar.gz --output /tmp/go.tgz +curl -SLsf https://golang.org/dl/go1.16.6.linux-$ARCH.tar.gz --output /tmp/go.tgz sudo rm -rf /usr/local/go/ sudo mkdir -p /usr/local/go/ sudo tar -xvf /tmp/go.tgz -C /usr/local/go/ --strip-components=1 @@ -21,7 +21,7 @@ git clone https://github.com/containerd/containerd cd containerd git fetch origin --tags -git checkout v1.3.2 +git checkout v1.5.4 make sudo make install diff --git a/hack/build-containerd.sh b/hack/build-containerd.sh index 6528718..9a11732 100644 --- a/hack/build-containerd.sh +++ b/hack/build-containerd.sh @@ -3,7 +3,7 @@ export ARCH="amd64" echo "Downloading Go" -curl -SLsf https://dl.google.com/go/go1.12.14.linux-$ARCH.tar.gz --output /tmp/go.tgz +curl -SLsf https://golang.org/dl/go1.16.6.linux-$ARCH.tar.gz --output /tmp/go.tgz sudo rm -rf /usr/local/go/ sudo mkdir -p /usr/local/go/ sudo tar -xvf /tmp/go.tgz -C /usr/local/go/ --strip-components=1 @@ -21,7 +21,7 @@ git clone https://github.com/containerd/containerd cd containerd git fetch origin --tags -git checkout v1.3.2 +git checkout v1.5.4 make sudo make install diff --git a/hack/install.sh b/hack/install.sh index 9a08b93..5030e26 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -79,13 +79,13 @@ install_containerd() { arch=$(uname -m) case $arch in x86_64 | amd64) - curl -sLSf https://github.com/containerd/containerd/releases/download/v1.3.7/containerd-1.3.7-linux-amd64.tar.gz | $SUDO tar -xvz --strip-components=1 -C /usr/local/bin/ + curl -sLSf https://github.com/containerd/containerd/releases/download/v1.5.4/containerd-1.5.4-linux-amd64.tar.gz | $SUDO tar -xvz --strip-components=1 -C /usr/local/bin/ ;; armv7l) - curl -sSL https://github.com/alexellis/containerd-arm/releases/download/v1.3.5/containerd-1.3.5-linux-armhf.tar.gz | $SUDO tar -xvz --strip-components=1 -C /usr/local/bin/ + curl -sSL https://github.com/alexellis/containerd-arm/releases/download/v1.5.4/containerd-1.5.4-linux-armhf.tar.gz | $SUDO tar -xvz --strip-components=1 -C /usr/local/bin/ ;; aarch64) - curl -sSL https://github.com/alexellis/containerd-arm/releases/download/v1.3.5/containerd-1.3.5-linux-arm64.tar.gz | $SUDO tar -xvz --strip-components=1 -C /usr/local/bin/ + curl -sSL https://github.com/alexellis/containerd-arm/releases/download/v1.5.4/containerd-1.5.4-linux-arm64.tar.gz | $SUDO tar -xvz --strip-components=1 -C /usr/local/bin/ ;; *) fatal "Unsupported architecture $arch" @@ -93,7 +93,7 @@ install_containerd() { esac $SUDO systemctl unmask containerd || : - $SUDO curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.3.5/containerd.service --output /etc/systemd/system/containerd.service + $SUDO curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.5.4/containerd.service --output /etc/systemd/system/containerd.service $SUDO systemctl enable containerd $SUDO systemctl start containerd