mirror of https://github.com/easzlab/kubeasz.git
fix: tools/easzup中kubeasz下载
parent
9f73d9392f
commit
11172c0f5b
|
@ -85,19 +85,18 @@ EOF
|
||||||
function get_kubeasz() {
|
function get_kubeasz() {
|
||||||
# check if kubeasz already existed
|
# check if kubeasz already existed
|
||||||
[[ -d "/etc/ansible/roles/kube-node" ]] && { echo "[WARN] kubeasz already existed"; return 0; }
|
[[ -d "/etc/ansible/roles/kube-node" ]] && { echo "[WARN] kubeasz already existed"; return 0; }
|
||||||
# temporarily move docker binaries
|
|
||||||
[[ -f "/etc/ansible/down/docker-${DOCKER_VER}.tgz" ]] && mv "/etc/ansible/down/docker-${DOCKER_VER}.tgz" /tmp
|
|
||||||
|
|
||||||
rm -rf /etc/ansible && \
|
|
||||||
echo -e "[INFO] \033[33mdownloading kubeasz\033[0m $KUBEASZ_VER" && \
|
echo -e "[INFO] \033[33mdownloading kubeasz\033[0m $KUBEASZ_VER" && \
|
||||||
docker pull easzlab/kubeasz:${KUBEASZ_VER} && \
|
docker pull easzlab/kubeasz:${KUBEASZ_VER} && \
|
||||||
echo "[INFO] run a temporary container" && \
|
echo "[INFO] run a temporary container" && \
|
||||||
docker run -d --name temp_easz easzlab/kubeasz:${KUBEASZ_VER} && \
|
docker run -d --name temp_easz easzlab/kubeasz:${KUBEASZ_VER} && \
|
||||||
|
mv "/etc/ansible/down/docker-${DOCKER_VER}.tgz" /tmp && \
|
||||||
|
rm -rf /etc/ansible && \
|
||||||
echo "[INFO] cp kubeasz code from the temporary container" && \
|
echo "[INFO] cp kubeasz code from the temporary container" && \
|
||||||
docker cp temp_easz:/etc/ansible /etc/ansible && \
|
docker cp temp_easz:/etc/ansible /etc/ansible && \
|
||||||
echo "[INFO] stop&remove temporary container" && \
|
echo "[INFO] stop&remove temporary container" && \
|
||||||
docker rm -f temp_easz && \
|
docker rm -f temp_easz && \
|
||||||
[[ -f "/tmp/docker-${DOCKER_VER}.tgz" ]] && mv "/tmp/docker-${DOCKER_VER}.tgz" /etc/ansible/down || true
|
mv "/tmp/docker-${DOCKER_VER}.tgz" /etc/ansible/down
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_k8s_bin() {
|
function get_k8s_bin() {
|
||||||
|
|
Loading…
Reference in New Issue