From fe3325754093cc02e7f7abe729efd68593b4d2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= <valtri@civ.zcu.cz> Date: Wed, 24 Jul 2024 17:38:17 +0000 Subject: [PATCH] Sync deploy.sh script --- cesnet-central/deploy.sh | 9 +++------ staging1/deploy.sh | 2 +- staging2/deploy.sh | 11 +++++++---- testing/deploy.sh | 4 +++- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/cesnet-central/deploy.sh b/cesnet-central/deploy.sh index 0511d9f..d5606cf 100755 --- a/cesnet-central/deploy.sh +++ b/cesnet-central/deploy.sh @@ -5,10 +5,8 @@ # (without terraform and ansible-inventory tools) # -INGRESS_HOSTNAME='eosc.zcu.cz' - ip4=78.128.247.56 -ip6=2001:718:ff05:205::56 +# ip6=2001:718:ff05:205::56 # wait ping while ! ping -c 1 "$ip4"; do sleep 5; done @@ -24,9 +22,8 @@ ansible -m shell -a 'while ! test -f /var/lib/cloud/instance/boot-finished; do s # kubernetes ansible-playbook playbooks/k8s.yaml - -# image repository -ansible-playbook playbooks/repository-nexus.yaml +ansible-playbook playbooks/squid.yaml +ansible-playbook playbooks/cvmfs.yaml # wait for finish while ansible -m command -a 'kubectl get pods --all-namespaces' master | tail -n +3 | grep -v ' Running '; do sleep 5; done diff --git a/staging1/deploy.sh b/staging1/deploy.sh index e8a7139..feba196 100755 --- a/staging1/deploy.sh +++ b/staging1/deploy.sh @@ -42,7 +42,7 @@ ansible -m command -a '/root/nfs-volume.sh' nfs ansible -m copy -a 'src=terraform/squid-volume.sh dest=/root/ mode=preserve' 'ingress[0]' ansible -m command -a '/root/squid-volume.sh' 'ingress[0]' -# k8s + notebooks +# kubernetes ansible-playbook playbooks/k8s.yaml while ansible -i ./inventory -m command -a 'kubectl get pods --all-namespaces' master | tail -n +3 | grep -v ' Running '; do sleep 5; done # docker runtime directory after Kubernetes deployment (problem with unmounts) diff --git a/staging2/deploy.sh b/staging2/deploy.sh index b871dc9..f31cfb5 100755 --- a/staging2/deploy.sh +++ b/staging2/deploy.sh @@ -20,7 +20,7 @@ ip="$(head -n 1 < terraform/fip.txt)" # curl -i -X GET -u "$auth" https://nsupdate.fedcloud.eu/nic/update?myip="$ip" # done # eval "$shellstate" -echo "Terraform finished. Continue? (CTRL-C to quit)" +echo "Terraform finished. Check terraform/docker-volume.sh. Continue? (CTRL-C to quit)" read -r _ # wait for ping and ssh @@ -42,11 +42,14 @@ ansible -m command -a '/root/nfs-volume.sh' nfs ansible -m copy -a 'src=terraform/squid-volume.sh dest=/root/ mode=preserve' 'ingress[0]' ansible -m command -a '/root/squid-volume.sh' 'ingress[0]' -# k8s + notebooks +# kubernetes ansible-playbook playbooks/k8s.yaml -# ansible-playbook playbooks/squid.yaml -# ansible-playbook playbooks/cvmfs.yaml while ansible -i ./inventory -m command -a 'kubectl get pods --all-namespaces' master | tail -n +3 | grep -v ' Running '; do sleep 5; done # docker runtime directory after Kubernetes deployment (problem with unmounts) ansible -m copy -a 'src=terraform/docker-volume.sh dest=/root/ mode=preserve' 'ingress nfs worker gpu' ansible -m command -a '/root/docker-volume.sh' 'ingress nfs worker gpu' +ansible-playbook playbooks/squid.yaml +ansible-playbook playbooks/cvmfs.yaml + +# wait for finish +while ansible -m command -a 'kubectl get pods --all-namespaces' master | tail -n +3 | grep -v ' Running '; do sleep 5; done diff --git a/testing/deploy.sh b/testing/deploy.sh index b44f552..4f42d6e 100755 --- a/testing/deploy.sh +++ b/testing/deploy.sh @@ -20,6 +20,8 @@ for auth in $FEDCLOUD_DYNAMIC_DNS; do curl -i -X GET -u "$auth" https://nsupdate.fedcloud.eu/nic/update?myip="$ip" done eval "$shellstate" +echo "Terraform finished. Check terraform/docker-volume.sh. Continue? (CTRL-C to quit)" +read -r _ # wait for ping and ssh for ip in $(cat terraform/hosts.txt) $(cat terraform/fip.txt); do @@ -42,7 +44,7 @@ ansible -m command -a '/root/squid-volume.sh' 'ingress[0]' ansible -m copy -a 'src=terraform/scratch-volume.sh dest=/root/ mode=preserve' 'ingress nfs worker gpu' ansible -m command -a '/root/scratch-volume.sh' 'ingress nfs worker gpu' -# k8s + notebooks +# kubernetes ansible-playbook playbooks/k8s.yaml while ansible -i ./inventory -m command -a 'kubectl get pods --all-namespaces' master | tail -n +3 | grep -v ' Running '; do sleep 5; done # docker runtime directory after Kubernetes deployment (problem with unmounts) -- GitLab