36 lines
1.1 KiB
Bash
Executable File
36 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -xe
|
|
|
|
cd || exit
|
|
|
|
# Parse command-line arguments
|
|
while getopts "n:r:t:" opt; do
|
|
case $opt in
|
|
t) JTOKEN="$OPTARG" ;;
|
|
*) usage ;;
|
|
esac
|
|
done
|
|
|
|
if [ -z $JTOKEN ]; then
|
|
echo "Please provide the join token with -t i.e. script.sh -t sha256:63acb4dee8a6d0870f2a3312fd9091fabf443712cd2a9de74c3cf13ed33124b6"
|
|
exit
|
|
fi
|
|
|
|
parallel -a ./infra/groups/workers ./scripts/setup/kube_worker.sh -n {} -r worker -t $JTOKEN
|
|
parallel -a ./infra/groups/compute ./scripts/setup/kube_worker.sh -n {} -r compute -t $JTOKEN
|
|
|
|
kubectl apply -f infra/kubes/dns/flannel.yaml
|
|
kubectl apply -f infra/kubes/dns/kube-dns.yaml
|
|
|
|
./infra/kubes/cni/install.sh
|
|
|
|
kubectl patch deployment coredns -n kube-system --type json --patch "$(cat infra/kubes/dns/coredns-tolerations.json)"
|
|
kubectl patch deployment calico-kube-controllers -n kube-system --type json --patch "$(cat infra/kubes/dns/coredns-tolerations.json)"
|
|
|
|
./infra/kubes/metallb/install.sh
|
|
|
|
./infra/kubes/ingress/install.sh
|
|
|
|
kubectl apply -f infra/kubes/proofofconcept/poc-deployment.yaml
|
|
./infra/kubes/proofofconcept/create-registry-secret.sh
|