diff --git a/contrib/gce/configure.sh b/contrib/gce/configure.sh index ca990ea8a..346f9ed2d 100755 --- a/contrib/gce/configure.sh +++ b/contrib/gce/configure.sh @@ -61,7 +61,7 @@ curl -f --ipv4 -Lo "${TARBALL}" --connect-timeout 20 --max-time 300 --retry 6 -- tar xvf "${TARBALL}" # Copy crictl config. -cp "${CRI_CONTAINERD_HOME}/etc/crictl.yaml" /etc +cp "${CONTAINERD_HOME}/etc/crictl.yaml" /etc echo "export PATH=${CONTAINERD_HOME}/usr/local/bin/:${CONTAINERD_HOME}/usr/local/sbin/:\$PATH" > \ /etc/profile.d/containerd_env.sh diff --git a/contrib/gce/env b/contrib/gce/env index 203f714c2..5c7c40428 100644 --- a/contrib/gce/env +++ b/contrib/gce/env @@ -3,12 +3,11 @@ GCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # TODO(random-liu): Upload release tarball to user's own GCS, and use it. We should # not let all nodes of all users download tarball from cri-containerd-release. -if [ -z "${CRI_CONTAINERD_VERSION:-}" ]; then - CRI_CONTAINERD_VERSION=$(curl -f --ipv4 --retry 6 --retry-delay 3 --silent --show-error \ - https://storage.googleapis.com/cri-containerd-release/latest) +version_file=${GCE_DIR}/../version +if [ ! -f "${version_file}" ]; then + echo "version file does not exist" + exit 1 fi -version_file=$(mktemp /tmp/version.XXXX) -echo "${CRI_CONTAINERD_VERSION}" > "$version_file" export KUBE_MASTER_EXTRA_METADATA="user-data=${GCE_DIR}/cloud-init/master.yaml,containerd-configure-sh=${GCE_DIR}/configure.sh,version=${version_file}" export KUBE_NODE_EXTRA_METADATA="user-data=${GCE_DIR}/cloud-init/node.yaml,containerd-configure-sh=${GCE_DIR}/configure.sh,version=${version_file}" export KUBE_CONTAINER_RUNTIME="remote"