coins-demo/contrib/firstboot.sh
2020-07-31 16:44:43 +02:00

26 lines
486 B
Bash
Executable file

#!/bin/bash
bootflag='/.manufactured'
groot='/opt/coins-demo'
k8sDemoWA () {
reset
echo 'Disabling swap space...'
sync && swapoff -a && sed -i '/ swap / s/^/#/' /etc/fstab
}
k8sDeploy () {
echo 'Installing K8s...'
cd ${groot}/contrib/ansible && \
ansible-playbook bootstrap-node.yml && \
ansible-playbook init-cluster.yml
}
InstallIngress () {
}
if [ ! -f ${bootflag} ]; then
touch ${bootflag}
k8sDemoWA;
k8sDeploy;
sync;
reboot;
fi