Skip to content

Commit

Permalink
Install Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
BenHall committed May 10, 2019
1 parent 9e51ce5 commit 2930e32
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion environments/crunchydata-k8s-centos/master/build/1_k8s_master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ EOF
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
yum install -y docker kubelet kubeadm kubectl --disableexcludes=kubernetes

systemctl enable --now kubelet

Expand All @@ -37,6 +37,7 @@ cat <<EOF > /opt/launch-kubeadm.sh
#!/bin/sh
rm $HOME/.kube/config
kubeadm reset -f || true
systemctl start kubelet
mkdir -p /root/.kube
kubeadm init --kubernetes-version $(kubeadm version -o short) --token=96771a.f608976060d16396
mkdir -p $HOME/.kube
Expand Down Expand Up @@ -258,3 +259,17 @@ items:
type: RollingUpdate
EOF

cat <<EOF > /usr/local/bin/launch.sh
#!/bin/bash
echo Waiting for Kubernetes to start...
while [ ! -f /root/.kube/config ]
do
sleep 1
done
echo Kubernetes started
if [ -f /root/.kube/start ]; then
/root/.kube/start
fi
EOF

chmod +x /usr/local/bin/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ EOF
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
yum install -y docker kubelet kubeadm kubectl --disableexcludes=kubernetes

systemctl enable --now kubelet

Expand Down

0 comments on commit 2930e32

Please sign in to comment.