summaryrefslogtreecommitdiffhomepage
path: root/test/shim/containerd-install.sh
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-05-05 22:00:14 -0700
committerAdin Scannell <ascannell@google.com>2020-07-09 17:39:47 -0700
commit2afff44403e046078301de39f0252bb57fc018c7 (patch)
treef944f66ffaab8f10029b451755bcb20a3ff40269 /test/shim/containerd-install.sh
parent2f24ab339736315659f26699ab50aa2982d7e890 (diff)
Update shim to build using bazel.
The go.mod dependency tree for the shim was somehow contradictory. After resolving these issues (e.g. explicitly imported k8s 1.14, pulling a specific dbus version), and adding all dependencies, the shim can now be build as part of the regular bazel tree. As part of this process, minor cleanup was done in all the source files: headers were standardized (and include "The gVisor Authors" in addition to the "The containerd Authors" if originally derived from containerd sources), and comments were cleaned up to meet coding standards. This change makes the containerd installation dynamic, so that multiple versions can be tested, and drops the static installer for the VM image itself. This change also updates test/root/crictl_test.go and related utilities, so that the containerd tests can be run on any version (and in cases where it applies, they can be run on both v1 and v2 as parameterized tests).
Diffstat (limited to 'test/shim/containerd-install.sh')
-rwxr-xr-xtest/shim/containerd-install.sh44
1 files changed, 0 insertions, 44 deletions
diff --git a/test/shim/containerd-install.sh b/test/shim/containerd-install.sh
deleted file mode 100755
index 400819245..000000000
--- a/test/shim/containerd-install.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-# A script to install containerd and CNI plugins for e2e testing
-
-wget -q --https-only \
- https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/containerd-${CONTAINERD_VERSION}.linux-amd64.tar.gz \
- https://github.com/containernetworking/plugins/releases/download/v0.7.0/cni-plugins-amd64-v0.7.0.tgz
-
-sudo mkdir -p /etc/containerd /etc/cni/net.d /opt/cni/bin
-sudo tar -xvf cni-plugins-amd64-v0.7.0.tgz -C /opt/cni/bin/
-sudo tar -xvf containerd-${CONTAINERD_VERSION}.linux-amd64.tar.gz -C /
-
-cat <<EOF | sudo tee /etc/containerd/config.toml
-disabled_plugins = ["restart"]
-# Set to avoid port overlap on older versions of containerd where default is 10010.
-[plugins.cri]
- stream_server_port = "10011"
-EOF
-
-cat <<EOF | sudo tee /etc/cni/net.d/10-bridge.conf
-{
- "cniVersion": "0.3.1",
- "name": "bridge",
- "type": "bridge",
- "bridge": "cnio0",
- "isGateway": true,
- "ipMasq": true,
- "ipam": {
- "type": "host-local",
- "ranges": [
- [{"subnet": "10.200.0.0/24"}]
- ],
- "routes": [{"dst": "0.0.0.0/0"}]
- }
-}
-EOF
-cat <<EOF | sudo tee /etc/cni/net.d/99-loopback.conf
-{
- "cniVersion": "0.3.1",
- "type": "loopback"
-}
-EOF
-
-sudo PATH=$PATH containerd -log-level debug &>/tmp/containerd-cri.log &