Skip to content
Snippets Groups Projects
Commit fe332575 authored by František Dvořák's avatar František Dvořák
Browse files

Sync deploy.sh script

parent d8e3a470
No related branches found
No related tags found
No related merge requests found
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
# (without terraform and ansible-inventory tools) # (without terraform and ansible-inventory tools)
# #
INGRESS_HOSTNAME='eosc.zcu.cz'
ip4=78.128.247.56 ip4=78.128.247.56
ip6=2001:718:ff05:205::56 # ip6=2001:718:ff05:205::56
# wait ping # wait ping
while ! ping -c 1 "$ip4"; do sleep 5; done 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 ...@@ -24,9 +22,8 @@ ansible -m shell -a 'while ! test -f /var/lib/cloud/instance/boot-finished; do s
# kubernetes # kubernetes
ansible-playbook playbooks/k8s.yaml ansible-playbook playbooks/k8s.yaml
ansible-playbook playbooks/squid.yaml
# image repository ansible-playbook playbooks/cvmfs.yaml
ansible-playbook playbooks/repository-nexus.yaml
# wait for finish # wait for finish
while ansible -m command -a 'kubectl get pods --all-namespaces' master | tail -n +3 | grep -v ' Running '; do sleep 5; done while ansible -m command -a 'kubectl get pods --all-namespaces' master | tail -n +3 | grep -v ' Running '; do sleep 5; done
...@@ -42,7 +42,7 @@ ansible -m command -a '/root/nfs-volume.sh' nfs ...@@ -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 copy -a 'src=terraform/squid-volume.sh dest=/root/ mode=preserve' 'ingress[0]'
ansible -m command -a '/root/squid-volume.sh' 'ingress[0]' ansible -m command -a '/root/squid-volume.sh' 'ingress[0]'
# k8s + notebooks # kubernetes
ansible-playbook playbooks/k8s.yaml 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 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) # docker runtime directory after Kubernetes deployment (problem with unmounts)
......
...@@ -20,7 +20,7 @@ ip="$(head -n 1 < terraform/fip.txt)" ...@@ -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" # curl -i -X GET -u "$auth" https://nsupdate.fedcloud.eu/nic/update?myip="$ip"
# done # done
# eval "$shellstate" # 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 _ read -r _
# wait for ping and ssh # wait for ping and ssh
...@@ -42,11 +42,14 @@ ansible -m command -a '/root/nfs-volume.sh' nfs ...@@ -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 copy -a 'src=terraform/squid-volume.sh dest=/root/ mode=preserve' 'ingress[0]'
ansible -m command -a '/root/squid-volume.sh' 'ingress[0]' ansible -m command -a '/root/squid-volume.sh' 'ingress[0]'
# k8s + notebooks # kubernetes
ansible-playbook playbooks/k8s.yaml 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 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) # 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 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 -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
...@@ -20,6 +20,8 @@ for auth in $FEDCLOUD_DYNAMIC_DNS; do ...@@ -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" curl -i -X GET -u "$auth" https://nsupdate.fedcloud.eu/nic/update?myip="$ip"
done done
eval "$shellstate" eval "$shellstate"
echo "Terraform finished. Check terraform/docker-volume.sh. Continue? (CTRL-C to quit)"
read -r _
# wait for ping and ssh # wait for ping and ssh
for ip in $(cat terraform/hosts.txt) $(cat terraform/fip.txt); do 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]' ...@@ -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 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' ansible -m command -a '/root/scratch-volume.sh' 'ingress nfs worker gpu'
# k8s + notebooks # kubernetes
ansible-playbook playbooks/k8s.yaml 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 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) # docker runtime directory after Kubernetes deployment (problem with unmounts)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment