Skip to content

Commit 2e88042

Browse files
committed
test7a not quite ready yet.
1 parent ef70706 commit 2e88042

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: "database.arangodb.com/v1alpha"
2+
kind: "ArangoDeployment"
3+
metadata:
4+
name: "acceptance-cluster2"
5+
spec:
6+
environment: @ENVIRONMENT@
7+
image: @IMAGE@
8+
externalAccess:
9+
type: LoadBalancer
10+
mode: Cluster
11+
sync:
12+
enabled: true
13+
externalAccess:
14+
type: LoadBalancer
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: "replication.database.arangodb.com/v1alpha"
2+
kind: "ArangoDeploymentReplication"
3+
metadata:
4+
name: "replication-internal"
5+
spec:
6+
source:
7+
masterEndpoint: ["https://@ADDRESS@:8629"]
8+
auth:
9+
keyfileSecretName: src-accesspackage-auth
10+
tls:
11+
caSecretName: src-accesspackage-ca
12+
destination:
13+
deploymentName: "acceptance-cluster2"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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

Comments
 (0)