install cri-docker from pre-built binaries

pull/14725/head
Steven Powell 2022-08-03 13:28:50 -07:00
parent a0d7457e36
commit 1941855573
4 changed files with 30 additions and 39 deletions

View File

@ -513,18 +513,15 @@ jobs:
sudo apt-get update -qq
sudo apt-get -qq -y install conntrack
sudo apt-get -qq -y install socat
CRI_DOCKER_VERSION="0737013d3c48992724283d151e8a2a767a1839e9"
git clone -n https://github.com/Mirantis/cri-dockerd
cd cri-dockerd
git checkout "$CRI_DOCKER_VERSION"
env CGO_ENABLED=0 go build -ldflags '-X github.com/Mirantis/cri-dockerd/version.GitCommit=${CRI_DOCKER_VERSION:0:7}' -o cri-dockerd
cd ..
sudo cp cri-dockerd/cri-dockerd /usr/bin/cri-dockerd
sudo cp cri-dockerd/packaging/systemd/cri-docker.service /usr/lib/systemd/system/cri-docker.service
sudo cp cri-dockerd/packaging/systemd/cri-docker.socket /usr/lib/systemd/system/cri-docker.socket
VERSION="v1.17.0"
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-${VERSION}-linux-amd64.tar.gz --output crictl-${VERSION}-linux-amd64.tar.gz
sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin
CRI_DOCKERD_VERSION="0737013d3c48992724283d151e8a2a767a1839e9"
CRI_DOCKERD_BASE_URL="https://storage.googleapis.com/kicbase-artifacts/cri-dockerd/${CRI_DOCKERD_VERSION}"
curl -L "${CRI_DOCKERD_BASE_URL}/amd64/cri-dockerd" -o /usr/bin/cri-dockerd
curl -L "${CRI_DOCKERD_BASE_URL}/cri-docker.socket" -o /usr/lib/systemd/system/cri-docker.socket
curl -L "${CRI_DOCKERD_BASE_URL}/cri-docker.service" -o /usr/lib/systemd/system/cri-docker.service
chmod +x /usr/bin/cri-dockerd
CRICTL_VERSION="v1.17.0"
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz --output crictl-${CRICTL_VERSION}-linux-amd64.tar.gz
sudo tar zxvf crictl-$CRICTL_VERSION-linux-amd64.tar.gz -C /usr/local/bin
- name: Install gopogh
shell: bash

View File

@ -514,18 +514,15 @@ jobs:
sudo apt-get update -qq
sudo apt-get -qq -y install conntrack
sudo apt-get -qq -y install socat
CRI_DOCKER_VERSION="0737013d3c48992724283d151e8a2a767a1839e9"
git clone -n https://github.com/Mirantis/cri-dockerd
cd cri-dockerd
git checkout "$CRI_DOCKER_VERSION"
env CGO_ENABLED=0 go build -ldflags '-X github.com/Mirantis/cri-dockerd/version.GitCommit=${CRI_DOCKER_VERSION:0:7}' -o cri-dockerd
cd ..
sudo cp cri-dockerd/cri-dockerd /usr/bin/cri-dockerd
sudo cp cri-dockerd/packaging/systemd/cri-docker.service /usr/lib/systemd/system/cri-docker.service
sudo cp cri-dockerd/packaging/systemd/cri-docker.socket /usr/lib/systemd/system/cri-docker.socket
VERSION="v1.17.0"
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-${VERSION}-linux-amd64.tar.gz --output crictl-${VERSION}-linux-amd64.tar.gz
sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin
CRI_DOCKERD_VERSION="0737013d3c48992724283d151e8a2a767a1839e9"
CRI_DOCKERD_BASE_URL="https://storage.googleapis.com/kicbase-artifacts/cri-dockerd/${CRI_DOCKERD_VERSION}"
curl -L "${CRI_DOCKERD_BASE_URL}/amd64/cri-dockerd" -o /usr/bin/cri-dockerd
curl -L "${CRI_DOCKERD_BASE_URL}/cri-docker.socket" -o /usr/lib/systemd/system/cri-docker.socket
curl -L "${CRI_DOCKERD_BASE_URL}/cri-docker.service" -o /usr/lib/systemd/system/cri-docker.service
chmod +x /usr/bin/cri-dockerd
CRICTL_VERSION="v1.17.0"
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz --output crictl-${CRICTL_VERSION}-linux-amd64.tar.gz
sudo tar zxvf crictl-$CRICTL_VERSION-linux-amd64.tar.gz -C /usr/local/bin
- name: Install gopogh
shell: bash

View File

@ -72,23 +72,20 @@ fi
# cri-dockerd is required for Kubernetes 1.24 and higher for none driver
if ! cri-dockerd --version &>/dev/null; then
echo "WARNING: cri-dockerd is not installed. will try to install."
CRI_DOCKER_VERSION="0737013d3c48992724283d151e8a2a767a1839e9"
git clone -n https://github.com/Mirantis/cri-dockerd
cd cri-dockerd
git checkout "$CRI_DOCKER_VERSION"
env CGO_ENABLED=0 go build -ldflags '-X github.com/Mirantis/cri-dockerd/version.GitCommit=${CRI_DOCKER_VERSION:0:7}' -o cri-dockerd
cd ..
sudo cp cri-dockerd/cri-dockerd /usr/bin/cri-dockerd
sudo cp cri-dockerd/packaging/systemd/cri-docker.service /usr/lib/systemd/system/cri-docker.service
sudo cp cri-dockerd/packaging/systemd/cri-docker.socket /usr/lib/systemd/system/cri-docker.socket
CRI_DOCKERD_VERSION="0737013d3c48992724283d151e8a2a767a1839e9"
CRI_DOCKERD_BASE_URL="https://storage.googleapis.com/kicbase-artifacts/cri-dockerd/${CRI_DOCKERD_VERSION}"
curl -L "${CRI_DOCKERD_BASE_URL}/amd64/cri-dockerd" -o /usr/bin/cri-dockerd
curl -L "${CRI_DOCKERD_BASE_URL}/cri-docker.socket" -o /usr/lib/systemd/system/cri-docker.socket
curl -L "${CRI_DOCKERD_BASE_URL}/cri-docker.service" -o /usr/lib/systemd/system/cri-docker.service
chmod +x /usr/bin/cri-dockerd
fi
# crictl is required for Kubernetes 1.24 and higher for none driver
if ! crictl &>/dev/null; then
echo "WARNING: crictl is not installed. will try to install."
VERSION="v1.17.0"
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-${VERSION}-linux-amd64.tar.gz --output crictl-${VERSION}-linux-amd64.tar.gz
sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin
CRICTL_VERSION="v1.17.0"
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz --output crictl-${CRICTL_VERSION}-linux-amd64.tar.gz
sudo tar zxvf crictl-$CRICTL_VERSION-linux-amd64.tar.gz -C /usr/local/bin
fi
# We need this for reasons now

View File

@ -29,17 +29,17 @@ var (
schema = map[string]update.Item{
".github/workflows/master.yml": {
Replace: map[string]string{
`CRI_DOCKER_VERSION=".*"`: `CRI_DOCKER_VERSION="{{.FullCommit}}"`,
`CRI_DOCKERD_VERSION=".*"`: `CRI_DOCKERD_VERSION="{{.FullCommit}}"`,
},
},
".github/workflows/pr.yml": {
Replace: map[string]string{
`CRI_DOCKER_VERSION=".*"`: `CRI_DOCKER_VERSION="{{.FullCommit}}"`,
`CRI_DOCKERD_VERSION=".*"`: `CRI_DOCKERD_VERSION="{{.FullCommit}}"`,
},
},
"hack/jenkins/linux_integration_tests_none.sh": {
Replace: map[string]string{
`CRI_DOCKER_VERSION=".*"`: `CRI_DOCKER_VERSION="{{.FullCommit}}"`,
`CRI_DOCKERD_VERSION=".*"`: `CRI_DOCKERD_VERSION="{{.FullCommit}}"`,
},
},
"deploy/iso/minikube-iso/arch/aarch64/package/cri-dockerd-aarch64/cri-dockerd.mk": {