Merge pull request #2097 from Random-Liu/vendor-cri-plugin

Vendor cri plugin into containerd.
This commit is contained in:
Derek McGowan
2018-02-23 13:55:13 -08:00
committed by GitHub
701 changed files with 226382 additions and 3 deletions

44
script/setup/install-cni Executable file
View File

@@ -0,0 +1,44 @@
#!/usr/bin/env bash
#
# Builds and installs cni plugins to /opt/cni/bin,
# and create basic cni config in /etc/cni/net.d.
# The commit defined in vendor.conf
#
set -eu -o pipefail
CNI_COMMIT=$(grep containernetworking/plugins ${GOPATH}/src/github.com/containerd/containerd/vendor.conf | cut -d " " -f 2)
CNI_DIR=/opt/cni
CNI_CONFIG_DIR=/etc/cni/net.d
go get -d github.com/containernetworking/plugins/...
cd $GOPATH/src/github.com/containernetworking/plugins
git checkout $CNI_COMMIT
FASTBUILD=true ./build.sh
mkdir -p $CNI_DIR
cp -r ./bin $CNI_DIR
mkdir -p $CNI_CONFIG_DIR
bash -c 'cat >'$CNI_CONFIG_DIR'/10-containerd-net.conflist <<EOF
{
"cniVersion": "0.3.1",
"name": "containerd-net",
"plugins": [
{
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.88.0.0/16",
"routes": [
{ "dst": "0.0.0.0/0" }
]
}
},
{
"type": "portmap",
"capabilities": {"portMappings": true}
}
]
}
EOF'

13
script/setup/install-critools Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
#
# Builds and installs critools including critest and crictl
# to /usr/local/bin.
#
set -eu -o pipefail
CRITEST_COMMIT=240a840375cdabb5860c75c99e8b0d0a776006b4
go get -d github.com/kubernetes-incubator/cri-tools/...
cd $GOPATH/src/github.com/kubernetes-incubator/cri-tools
git checkout $CRITEST_COMMIT
make
make install

View File

@@ -23,7 +23,7 @@ set -eu -o pipefail
RUNC_COMMIT=$(grep opencontainers/runc ${GOPATH}/src/github.com/containerd/containerd/vendor.conf | cut -d " " -f 2)
go get -u github.com/opencontainers/runc
go get -d github.com/opencontainers/runc
cd $GOPATH/src/github.com/opencontainers/runc
git checkout $RUNC_COMMIT
make BUILDTAGS="apparmor seccomp" runc install