Improve gce bootstrapping in various ways.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-04-17 07:40:20 +00:00
parent 77a33b10a9
commit b2ebb735e7
15 changed files with 177 additions and 203 deletions

View File

@@ -56,7 +56,9 @@ cp ${ROOT}/contrib/systemd-units/* ${destdir}/etc/systemd/system/
mkdir -p ${destdir}/opt/containerd
cp -r ${ROOT}/cluster ${destdir}/opt/containerd
# Write a version file into the release tarball.
echo ${VERSION} > ${destdir}/opt/containerd/cluster/version
cat > ${destdir}/opt/containerd/cluster/version <<EOF
CONTAINERD_VERSION: $(yaml-quote ${VERSION})
EOF
# Create release tar
tarball=${BUILD_DIR}/${TARBALL}

View File

@@ -95,3 +95,10 @@ from-vendor() {
fi
eval $setvars
}
# yaml-quote quotes something appropriate for a yaml string.
# This is the same with:
# https://github.com/kubernetes/kubernetes/blob/v1.10.1/cluster/gce/util.sh#L471.
yaml-quote() {
echo "'$(echo "${@:-}" | sed -e "s/'/''/g")'"
}