Skip to content

Commit

Permalink
[FLINK-32632][test] Downloads binaries for cri-dockerd to avoid build…
Browse files Browse the repository at this point in the history
…ing the binaries using Go

Signed-off-by: Matthias Pohl <[email protected]>
  • Loading branch information
XComp committed Jul 23, 2023
1 parent 17f1d2d commit bc964a1
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions flink-end-to-end-tests/test-scripts/common_kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,24 @@ function setup_kubernetes_for_linux {
rm -f ${crictl_archive}

# cri-dockerd is required to use Kubernetes 1.24+ and the none driver
local cri_dockerd_version
cri_dockerd_version="v0.2.3"
if [ -e cri-dockerd ];
then rm -r cri-dockerd
fi
git clone https://github.com/Mirantis/cri-dockerd.git
cd cri-dockerd
git checkout tags/${cri_dockerd_version} -b ${cri_dockerd_version}
mkdir bin
go get && go build -o bin/cri-dockerd
mkdir -p /usr/local/bin
sudo install -o root -g root -m 0755 bin/cri-dockerd /usr/local/bin/cri-dockerd
sudo cp -a packaging/systemd/* /etc/systemd/system
sudo sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service
local cri_dockerd_version cri_dockerd_archive cri_dockerd_binary
cri_dockerd_version="0.2.3"
cri_dockerd_archive="cri-dockerd-${cri_dockerd_version}.amd64.tgz"
cri_dockerd_binary="cri-dockerd"
wget -nv "https://github.com/Mirantis/cri-dockerd/releases/download/v${cri_dockerd_version}/${cri_dockerd_archive}"
tar xzvf $cri_dockerd_archive "cri-dockerd/${cri_dockerd_binary}" --strip-components=1
sudo install -o root -g root -m 0755 "${cri_dockerd_binary}" "/usr/local/bin/${cri_dockerd_binary}"
rm ${cri_dockerd_binary}

wget -nv https://raw.githubusercontent.com/Mirantis/cri-dockerd/v${cri_dockerd_version}/packaging/systemd/cri-docker.service
wget -nv https://raw.githubusercontent.com/Mirantis/cri-dockerd/v${cri_dockerd_version}/packaging/systemd/cri-docker.socket
sudo mv cri-docker.socket cri-docker.service /etc/systemd/system/
sudo sed -i -e "s,/usr/bin/${cri_dockerd_binary},/usr/local/bin/${cri_dockerd_binary}," /etc/systemd/system/cri-docker.service

sudo systemctl daemon-reload
sudo systemctl enable cri-docker.service
sudo systemctl enable --now cri-docker.socket

# required to resolve HOST_JUJU_LOCK_PERMISSION error of "minikube start --vm-driver=none"
sudo sysctl fs.protected_regular=0
}
Expand Down

0 comments on commit bc964a1

Please sign in to comment.