增加一键部署aio集群脚本

pull/955/head
gjmzj 2020-12-16 19:17:46 +08:00
parent 3a29c84138
commit 749baf5584
2 changed files with 33 additions and 1 deletions

View File

@ -68,7 +68,7 @@ sed -i 's/^INSTALL_SOURCE.*$/INSTALL_SOURCE: "offline"/g' /etc/ansible/roles/pre
docker exec -it kubeasz easzctl start-aio
```
- 多节点集群进入kubeasz 容器内 `kubectl exec -it kubeasz bash`参考https://github.com/easzlab/kubeasz/blob/master/docs/setup/00-planning_and_overall_intro.md 进行集群规划和设置后安装
- 多节点集群进入kubeasz 容器内 `docker exec -it kubeasz bash`参考https://github.com/easzlab/kubeasz/blob/master/docs/setup/00-planning_and_overall_intro.md 进行集群规划和设置后安装
```
#ansible-playbook 90.setup.yml

32
tools/start-aio 100755
View File

@ -0,0 +1,32 @@
#!/bin/bash
set -o nounset
set -o errexit
#set -o xtrace
function usage() {
cat <<EOF
Usage: start-aio <version> to start an all-in-one k8s cluster with a specific kubeasz version
EOF
}
[[ "$#" -eq 1 ]] || { usage >&2; exit 1; }
# tool
echo "[INFO] get the tool script: easzup"
if [[ -e /usr/bin/curl ]];then
curl -C- -fLO --retry 3 "https://github.com/easzlab/kubeasz/releases/download/$1/easzup" || exit 1
else
wget -c "https://github.com/easzlab/kubeasz/releases/download/$1/easzup" || exit 1
fi
# download
echo "[INFO] download everything with easzup"
chmod +x ./easzup
./easzup -D
#./easzup -P
# install
echo "[INFO] install k8s using a container 'kubeasz'"
./easzup -S
docker exec -it kubeasz easzctl start-aio