|
| 1 | +#!/usr/bin/fish |
| 2 | + |
| 3 | +source helper.fish |
| 4 | + |
| 5 | +set -g TESTNAME test7a |
| 6 | +set -g TESTDESC "Deployment of 2 clusters with sync with DC2DC (production, enterprise)" |
| 7 | +set -g YAMLFILE generated/cluster-sync-enterprise-pro.yaml |
| 8 | +set -g YAMLFILE2 generated/cluster-sync2-enterprise-pro.yaml |
| 9 | +set -g DEPLOYMENT acceptance-cluster |
| 10 | +set -g DEPLOYMENT2 acceptance-cluster2 |
| 11 | +printheader |
| 12 | + |
| 13 | +# Deploy and check |
| 14 | +kubectl apply -f $YAMLFILE |
| 15 | +kubectl apply -f $YAMLFILE2 |
| 16 | +and waitForKubectl "get pod" "$DEPLOYMENT" "1/1 *Running" 15 120 |
| 17 | +and waitForKubectl "get pod" "$DEPLOYMENT-prmr" "1/1 *Running" 3 120 |
| 18 | +and waitForKubectl "get pod" "$DEPLOYMENT-agnt" "1/1 *Running" 3 120 |
| 19 | +and waitForKubectl "get pod" "$DEPLOYMENT-crdn" "1/1 *Running" 3 120 |
| 20 | +and waitForKubectl "get pod" "$DEPLOYMENT-syma" "1/1 *Running" 3 120 |
| 21 | +and waitForKubectl "get pod" "$DEPLOYMENT-sywo" "1/1 *Running" 3 120 |
| 22 | +and waitForKubectl "get service" "$DEPLOYMENT *ClusterIP" 8529 1 120 |
| 23 | +and waitForKubectl "get service" "$DEPLOYMENT-ea *LoadBalancer" "-v;pending" 1 180 |
| 24 | +and waitForKubectl "get service" "$DEPLOYMENT-sync *LoadBalancer" "-v;pending" 1 180 |
| 25 | +and waitForKubectl "get pod" "$DEPLOYMENT2" "1/1 *Running" 15 120 |
| 26 | +and waitForKubectl "get pod" "$DEPLOYMENT2-prmr" "1/1 *Running" 3 120 |
| 27 | +and waitForKubectl "get pod" "$DEPLOYMENT2-agnt" "1/1 *Running" 3 120 |
| 28 | +and waitForKubectl "get pod" "$DEPLOYMENT2-crdn" "1/1 *Running" 3 120 |
| 29 | +and waitForKubectl "get pod" "$DEPLOYMENT2-syma" "1/1 *Running" 3 120 |
| 30 | +and waitForKubectl "get pod" "$DEPLOYMENT2-sywo" "1/1 *Running" 3 120 |
| 31 | +and waitForKubectl "get service" "$DEPLOYMENT2 *ClusterIP" 8529 1 120 |
| 32 | +and waitForKubectl "get service" "$DEPLOYMENT2-ea *LoadBalancer" "-v;pending" 1 180 |
| 33 | +and waitForKubectl "get service" "$DEPLOYMENT2-sync *LoadBalancer" "-v;pending" 1 180 |
| 34 | +or fail "Deployment did not get ready." |
| 35 | + |
| 36 | +# Automatic check |
| 37 | +set ip (getLoadBalancerIP "$DEPLOYMENT-ea") |
| 38 | +testArangoDB $ip 120 |
| 39 | +or fail "ArangoDB (1) was not reachable." |
| 40 | + |
| 41 | +set ip2 (getLoadBalancerIP "$DEPLOYMENT2-ea") |
| 42 | +testArangoDB $ip2 120 |
| 43 | +or fail "ArangoDB (2) was not reachable." |
| 44 | + |
| 45 | +# Set up replication, rest is manual: |
| 46 | +# run sed here on replication.yaml, find sync-ea first |
| 47 | +kubectl apply -f replication.yaml |
| 48 | + |
| 49 | +# Manual check |
| 50 | +output "Work" "Now please check external access on this URL with your browser:" " https://$ip:8529/" "then type the outcome followed by ENTER." |
| 51 | +inputAndLogResult |
| 52 | + |
| 53 | +# Cleanup |
| 54 | +kubectl delete -f replication.yaml |
| 55 | +sleep 15 |
| 56 | +kubectl delete -f $YAMLFILE |
| 57 | +kubectl delete -f $YAMLFILE2 |
| 58 | +waitForKubectl "get pod" $DEPLOYMENT "" 0 120 |
| 59 | +waitForKubectl "get pod" $DEPLOYMENT2 "" 0 120 |
| 60 | +or fail "Could not delete deployment." |
| 61 | + |
| 62 | +output "Ready" "" |
0 commit comments