зеркало из https://github.com/Azure/acs-engine.git
Cleanup Packer directory after VHD build (#3964)
This commit is contained in:
Родитель
23d532b07d
Коммит
caa5c00c5b
|
@ -67,7 +67,7 @@
|
||||||
"inline": [
|
"inline": [
|
||||||
"sudo BUILD_NUMBER={{user `build_number`}} BUILD_ID={{user `build_id`}} COMMIT={{user `commit`}} /bin/bash -ux /home/packer/install-dependencies.sh",
|
"sudo BUILD_NUMBER={{user `build_number`}} BUILD_ID={{user `build_id`}} COMMIT={{user `commit`}} /bin/bash -ux /home/packer/install-dependencies.sh",
|
||||||
"sudo /bin/bash -eux /home/packer/cleanup-vhd.sh",
|
"sudo /bin/bash -eux /home/packer/cleanup-vhd.sh",
|
||||||
"rm /home/packer/*.sh"
|
"rm -rf /home/packer"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -26,6 +26,7 @@ fi
|
||||||
if [ -f /var/log/azure/golden-image-install.complete ]; then
|
if [ -f /var/log/azure/golden-image-install.complete ]; then
|
||||||
echo "detected golden image pre-install"
|
echo "detected golden image pre-install"
|
||||||
FULL_INSTALL_REQUIRED=false
|
FULL_INSTALL_REQUIRED=false
|
||||||
|
rm -rf /home/packer
|
||||||
else
|
else
|
||||||
FULL_INSTALL_REQUIRED=true
|
FULL_INSTALL_REQUIRED=true
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -195,12 +195,12 @@ function pullHyperkube() {
|
||||||
path=$(find /home/rootfs-${KUBERNETES_VERSION} -name "hyperkube")
|
path=$(find /home/rootfs-${KUBERNETES_VERSION} -name "hyperkube")
|
||||||
|
|
||||||
if [[ $OS == $COREOS_OS_NAME ]]; then
|
if [[ $OS == $COREOS_OS_NAME ]]; then
|
||||||
cp "$path" "/opt/kubelet"
|
mv "$path" "/opt/kubelet"
|
||||||
cp "$path" "/opt/kubectl"
|
mv "$path" "/opt/kubectl"
|
||||||
chmod a+x /opt/kubelet /opt/kubectl
|
chmod a+x /opt/kubelet /opt/kubectl
|
||||||
else
|
else
|
||||||
cp "$path" "/usr/local/bin/kubelet-${KUBERNETES_VERSION}"
|
mv "$path" "/usr/local/bin/kubelet-${KUBERNETES_VERSION}"
|
||||||
cp "$path" "/usr/local/bin/kubectl-${KUBERNETES_VERSION}"
|
mv "$path" "/usr/local/bin/kubectl-${KUBERNETES_VERSION}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,6 +213,7 @@ function extractHyperkube() {
|
||||||
mv "/usr/local/bin/kubectl-${KUBERNETES_VERSION}" "/usr/local/bin/kubectl"
|
mv "/usr/local/bin/kubectl-${KUBERNETES_VERSION}" "/usr/local/bin/kubectl"
|
||||||
chmod a+x /usr/local/bin/kubelet /usr/local/bin/kubectl
|
chmod a+x /usr/local/bin/kubelet /usr/local/bin/kubectl
|
||||||
rm -rf /usr/local/bin/kubelet-* /usr/local/bin/kubectl-*
|
rm -rf /usr/local/bin/kubelet-* /usr/local/bin/kubectl-*
|
||||||
|
rm -rf /home/rootfs-*
|
||||||
}
|
}
|
||||||
|
|
||||||
function pullContainerImage() {
|
function pullContainerImage() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче