cleaned up remaining bugs/typos
This commit is contained in:
parent
99b305ab32
commit
368d9ee28f
@ -1,4 +1,4 @@
|
|||||||
cupid1
|
cupid1
|
||||||
cupid2
|
cupid2
|
||||||
cupid3
|
cupid3
|
||||||
cupid4
|
cupid4
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#! /usr/local/env bash
|
||||||
|
|
||||||
PATH_ROOT=~/infra/kubes/ingress
|
PATH_ROOT=~/infra/kubes/ingress
|
||||||
|
|
||||||
cd $PATH_ROOT || exit
|
cd $PATH_ROOT || exit
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
cd || exit
|
cd ~/infra || exit
|
||||||
|
|
||||||
# Parse command-line arguments
|
# Parse command-line arguments
|
||||||
while getopts "n:r:t:" opt; do
|
while getopts "n:r:t:" opt; do
|
||||||
@ -16,20 +16,25 @@ if [ -z $JTOKEN ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
parallel -a ./infra/groups/workers ./scripts/setup/kube_worker.sh -n {} -r worker -t $JTOKEN
|
parallel -a 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
|
parallel -a groups/compute ./scripts/setup/kube_worker.sh -n {} -r compute -t $JTOKEN
|
||||||
|
|
||||||
kubectl apply -f infra/kubes/dns/flannel.yaml
|
echo "Waiting for 30s for the new pods to settle"
|
||||||
kubectl apply -f infra/kubes/dns/kube-dns.yaml
|
sleep 10
|
||||||
|
echo "20s remaining..."
|
||||||
|
sleep 10
|
||||||
|
echo "10s remaining..."
|
||||||
|
sleep 10
|
||||||
|
|
||||||
./infra/kubes/cni/install.sh
|
kubectl apply -f kubes/dns/flannel.yaml
|
||||||
|
kubectl apply -f kubes/dns/kube-dns.yaml
|
||||||
|
|
||||||
kubectl patch deployment coredns -n kube-system --type json --patch "$(cat infra/kubes/dns/coredns-tolerations.json)"
|
./kubes/cni/install.sh
|
||||||
kubectl patch deployment calico-kube-controllers -n kube-system --type json --patch "$(cat infra/kubes/dns/coredns-tolerations.json)"
|
|
||||||
|
|
||||||
./infra/kubes/metallb/install.sh
|
kubectl patch deployment coredns -n kube-system --type json --patch "$(cat kubes/dns/coredns-tolerations.json)"
|
||||||
|
kubectl patch deployment calico-kube-controllers -n kube-system --type json --patch "$(cat kubes/dns/coredns-tolerations.json)"
|
||||||
|
|
||||||
./infra/kubes/ingress/install.sh
|
./kubes/metallb/install.sh
|
||||||
|
|
||||||
|
./kubes/ingress/install.sh
|
||||||
|
|
||||||
kubectl apply -f infra/kubes/proofofconcept/poc-deployment.yaml
|
|
||||||
./infra/kubes/proofofconcept/create-registry-secret.sh
|
|
||||||
|
|||||||
32
scripts/setup/output_svc_records.sh
Executable file
32
scripts/setup/output_svc_records.sh
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
kubectl taint nodes cupid1 worker-
|
||||||
|
echo =========== Create an ubuntu pod ==================
|
||||||
|
kubectl run ubuntu --image=ubuntu -- bash -c "while true; do echo hello; sleep 10;done"
|
||||||
|
|
||||||
|
# Wait for the pod "ubuntu" to contain the status condition of type "Ready"
|
||||||
|
kubectl wait --for=condition=Ready pod/ubuntu
|
||||||
|
|
||||||
|
# Save a sorted list of IPs of all of the k8s SVCs:
|
||||||
|
kubectl get svc -A|egrep -v 'CLUSTER-IP|None'|awk '{print $4}'|sort -V > ips
|
||||||
|
|
||||||
|
# Copy the ip list to owr Ubuntu pod:
|
||||||
|
kubectl cp ips ubuntu:/
|
||||||
|
|
||||||
|
echo =========== Installing dig tool into the pod ===============
|
||||||
|
kubectl exec -it ubuntu -- apt-get update
|
||||||
|
kubectl exec -it ubuntu -- apt install -y dnsutils
|
||||||
|
|
||||||
|
# Print 7 blank lines
|
||||||
|
yes '' | sed 7q
|
||||||
|
echo =========== Print all k8s SVC DNS records ====================
|
||||||
|
for ip in $(cat ips); do echo -n "$ip "; kubectl exec -it ubuntu -- dig -x $ip +short; done
|
||||||
|
echo ====== End of list =====================
|
||||||
|
|
||||||
|
echo ========= Cleanup ===============
|
||||||
|
kubectl delete po ubuntu
|
||||||
|
rm ips
|
||||||
|
|
||||||
|
kubectl taint nodes cupid1 worker=:NoSchedule
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
17
scripts/setup/reapply.sh
Executable file
17
scripts/setup/reapply.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
cd ~/infra || exit
|
||||||
|
|
||||||
|
kubectl apply -f kubes/dns/flannel.yaml
|
||||||
|
kubectl apply -f kubes/dns/kube-dns.yaml
|
||||||
|
|
||||||
|
./kubes/cni/install.sh
|
||||||
|
|
||||||
|
kubectl patch deployment coredns -n kube-system --type json --patch "$(cat kubes/dns/coredns-tolerations.json)"
|
||||||
|
kubectl patch deployment calico-kube-controllers -n kube-system --type json --patch "$(cat kubes/dns/coredns-tolerations.json)"
|
||||||
|
|
||||||
|
./kubes/metallb/install.sh
|
||||||
|
|
||||||
|
./kubes/ingress/install.sh
|
||||||
|
|
||||||
@ -3,5 +3,8 @@
|
|||||||
ssh ares "sudo efibootmgr --bootnext 000B > /dev/null"
|
ssh ares "sudo efibootmgr --bootnext 000B > /dev/null"
|
||||||
ssh ares "sudo shutdown -r now"
|
ssh ares "sudo shutdown -r now"
|
||||||
|
|
||||||
#ssh artemis "sudo efibootmgr --bootnext 000B > /dev/null"
|
ssh -t artemis "sudo kubeadm reset && sudo rm -rf /etc/cni/net.d"
|
||||||
#ssh artemis "sudo shutdown -r now"
|
ssh -t cupid1 "sudo kubeadm reset && sudo rm -rf /etc/cni/net.d"
|
||||||
|
ssh -t cupid2 "sudo kubeadm reset && sudo rm -rf /etc/cni/net.d"
|
||||||
|
ssh -t cupid3 "sudo kubeadm reset && sudo rm -rf /etc/cni/net.d"
|
||||||
|
ssh -t cupid4 "sudo kubeadm reset && sudo rm -rf /etc/cni/net.d"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user