把 init 内容分开
This commit is contained in:
parent
d5b1a1abe8
commit
80497e8a1a
@ -8,6 +8,13 @@ if [ $(id -u) != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 部署之前先分发 init 内容
|
||||
scp -r init/ root@${MASTER1}:/tmp/
|
||||
scp -r init/ root@${MASTER2}:/tmp/
|
||||
scp -r init/ root@${MASTER3}:/tmp/
|
||||
ssh root@${MASTER1} "cd /tmp/init/ && ./init.sh"
|
||||
ssh root@${MASTER2} "cd /tmp/init/ && ./init.sh"
|
||||
ssh root@${MASTER3} "cd /tmp/init/ && ./init.sh"
|
||||
|
||||
# 生成keepalived配置文件
|
||||
git checkout keepalived/*.conf
|
||||
|
@ -27,8 +27,5 @@ swapoff -a
|
||||
sed -i 's/.*swap.*/#&/' /etc/fstab
|
||||
|
||||
yum install -y ./*.rpm
|
||||
|
||||
cd ../docker && bash ./install.sh && cd -
|
||||
cd ../kubeadm && bash ./install.sh && cd -
|
||||
cd ../flannel && bash install.sh
|
||||
yum install -y ./git-2.31.1/*.rpm
|
||||
|
||||
|
@ -3,5 +3,9 @@ set -euo pipefail
|
||||
|
||||
yum install -y ./*.rpm
|
||||
ls *.tar | xargs -I {} docker load -i {}
|
||||
|
||||
cd ../docker && bash ./install.sh && cd -
|
||||
cd ../flannel && bash install.sh
|
||||
|
||||
systemctl enable --now kubelet
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user