-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworker_init.sh
More file actions
executable file
·55 lines (41 loc) · 1.03 KB
/
worker_init.sh
File metadata and controls
executable file
·55 lines (41 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
echo "worker_init" $1
logdir=$1
# disable Firewall for Lab systems
echo "Disable Firewall "
systemctl disable firewalld
systemctl stop firewalld
systemctl status firewalld
echo "Enable Docker "
sysctl --system
systemctl enable docker
systemctl start docker
echo "Enable kubelet"
systemctl daemon-reload
systemctl enable kubelet
systemctl restart kubelet
echo "Docker ..."
systemctl status docker
echo "Kubelet"
systemctl status kubelet
echo "Loading IP Virtual Server modules "
modprobe ip_vs
modprobe ip_vs_rr
modprobe ip_vs_wrr
modprobe ip_vs_sh
modprobe nf_conntrack_ipv4
# Do the iSCSI portion only.
OST=`grep "ID=" /etc/os-release | grep -v VERSION | awk -F= '{ print $2 }' | sed 's/\"//g'`
echo $OST
if [ $OST == "ubuntu" ]; then
$logdir/iscsi-ubuntu.sh
fi
if [ $OST == "centos" ]; then
$logdir/iscsi-centos.sh
fi
echo "Making sure swap is turned off "
swapoff -a
# kubeadm join needs it
read -p "Press enter to kick off to RESET k8s"
kubeadm reset -f
echo "Please enter the command from the master for kubeadm join ..... "