Skip to content
Snippets Groups Projects
Select Git revision
  • 2d111c1e257d6875975679d8033241411b6944d4
  • master default protected
  • rednatco-v2
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • servers
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

webpack.config.common.js

Blame
  • deploy.sh 2.48 KiB
    #! /bin/bash -xe
    
    #
    # EOSC LOT3 Jupyter Notebooks testing instance
    #
    
    cd terraform && terraform init && terraform apply
    cd -
    cp -pv terraform/inventory.yaml inventory/1-cesnet.yaml
    
    # dynamic DNS
    ip="$(head -n 1 <terraform/fip.txt)"
    shellstate=$(shopt -po xtrace)
    set +o xtrace
    # https://nsupdate.fedcloud.eu
    vault_prefix=secrets/users/e1662e20-e34b-468c-b0ce-d899bc878364@egi.eu/eosc-testing
    FEDCLOUD_DYNAMIC_DNS=$(vault read -field data $vault_prefix/FEDCLOUD_DYNAMIC_DNS | grep ^map | head -n 1 | sed 's/map\[\(.*\)\]/\1/')
    for auth in $FEDCLOUD_DYNAMIC_DNS; do
    	echo "curl -i -X GET -u $(echo "$auth" | cut -d: -f1):XXX https://nsupdate.fedcloud.eu/nic/update?myip=$ip"
    	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
    cat terraform/hosts.txt terraform/fip.txt | while read -r ip; do
    	while ! ping -c 1 "$ip"; do sleep 5; done
    	ssh-keygen -R "$ip"
    	while ! ssh egi@"$ip" -o ConnectTimeout=10 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no :; do sleep 10; done
    done
    
    # check ssh access
    ansible -m command -a 'uname -a' allnodes
    
    # wait cloud-init
    ansible -m shell -a 'while ! test -f /var/lib/cloud/instance/boot-finished; do sleep 2; done' allnodes
    
    # setup volumes
    ansible -m copy -a 'src=terraform/nfs-volume.sh dest=/root/ mode=preserve' nfs
    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]'
    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'
    
    # kubernetes
    ansible-playbook playbooks/k8s.yaml
    while ansible -m command -a 'kubectl get pods --all-namespaces' master | tail -n +3 | grep -Ev ' (Running|Completed) '; 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 -Ev ' (Running|Completed) '; do sleep 5; done
    
    ansible-playbook playbooks/security-logs.yaml