Do not include CNI binaries/configs in release tarball.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2017-09-25 23:43:32 +00:00
parent 529971a1dd
commit d1f0ac92c5
2 changed files with 37 additions and 29 deletions

View File

@ -44,6 +44,12 @@ if ${NOSUDO}; then
sudo="" sudo=""
fi fi
# INSTALL_CNI indicates whether to install CNI. CNI installation
# makes sense for local testing, but doesn't make sense for cluster
# setup, because CNI daemonset is usually used to deploy CNI binaries
# and configurations in cluster.
INSTALL_CNI=${INSTALL_CNI:-true}
CONTAINERD_DIR=${DESTDIR}/usr/local CONTAINERD_DIR=${DESTDIR}/usr/local
RUNC_DIR=${DESTDIR} RUNC_DIR=${DESTDIR}
CNI_DIR=${DESTDIR}/opt/cni CNI_DIR=${DESTDIR}/opt/cni
@ -88,6 +94,7 @@ make BUILDTAGS="$BUILDTAGS"
${sudo} make install -e DESTDIR=${RUNC_DIR} ${sudo} make install -e DESTDIR=${RUNC_DIR}
# Install cni # Install cni
if ${INSTALL_CNI}; then
checkout_repo ${CNI_PKG} ${CNI_VERSION} checkout_repo ${CNI_PKG} ${CNI_VERSION}
cd ${GOPATH}/src/${CNI_PKG} cd ${GOPATH}/src/${CNI_PKG}
./build.sh ./build.sh
@ -119,6 +126,7 @@ ${sudo} bash -c 'cat >'${CNI_CONFIG_DIR}'/10-containerd-net.conflist <<EOF
] ]
} }
EOF' EOF'
fi
# Install containerd # Install containerd
checkout_repo ${CONTAINERD_PKG} ${CONTAINERD_VERSION} checkout_repo ${CONTAINERD_PKG} ${CONTAINERD_VERSION}

View File

@ -29,7 +29,7 @@ TARBALL=${TARBALL:-"cri-containerd.tar.gz"}
destdir=${BUILD_DIR}/release-stage destdir=${BUILD_DIR}/release-stage
# Install dependencies into release stage. # Install dependencies into release stage.
NOSUDO=true DESTDIR=${destdir} ./hack/install-deps.sh NOSUDO=true INSTALL_CNI=false DESTDIR=${destdir} ./hack/install-deps.sh
# Install cri-containerd into release stage. # Install cri-containerd into release stage.
make install -e DESTDIR=${destdir} make install -e DESTDIR=${destdir}