5
0
Fork 0

commit by to_remotes 2023-10-02 10:42:26 +0200 from vmdevac

main
ag 2023-10-02 10:42:26 +02:00
parent cbb7886b89
commit 34e8dd8c1c
1 changed files with 27 additions and 3 deletions

28
init.sh
View File

@ -105,13 +105,37 @@ EOT
fi
if [ -z $WA_REPO/node_type.sh ]; then
echo " "
echo -n "init as master? type yes: "
read -r init_as_master
if [ "$init_as_master" == "yes" ]; then
echo "NODE_TYPE=master" > $WA_REPO/node_type.sh
else
echo "NODE_TYPE=worker" > $WA_REPO/node_type.sh
fi
fi
source $WA_REPO/node_type.sh
echo " "
echo -n "ready to set-up K8s? type yes: "
read -r ready_to_setup_k8s
if [ "$ready_to_setup_k8s" = "yes" ]; then
if [ "$NODE_TYPE" == "master" ]; then
echo "<=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=>"
echo "initializing K8s Set-Up"
source $WA_REPO/shared_resources_k8s/k8s/setup.sh
echo "initializing K8s Master Set-Up"
source $WA_REPO/shared_resources_k8s/k8s/setup_master.sh
else
echo "<=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=>"
echo "initializing K8s Worker Set-Up"
source $WA_REPO/shared_resources_k8s/k8s/setup_worker.sh
fi
else
echo "Aborting"