Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for semiautomation. #293

Merged
merged 5 commits into from
Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/activefailover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
disableIPv6: @DISABLEIPV6@
externalAccess:
type: LoadBalancer
mode: ActiveFailover
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/cluster-local-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
disableIPv6: @DISABLEIPV6@
externalAccess:
type: LoadBalancer
mode: Cluster
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/cluster-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
disableIPv6: @DISABLEIPV6@
externalAccess:
type: LoadBalancer
mode: Cluster
Expand Down
17 changes: 17 additions & 0 deletions tests/acceptance/semiautomation/cluster-sync1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: "database.arangodb.com/v1alpha"
kind: "ArangoDeployment"
metadata:
name: "acceptance-cluster1"
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
disableIPv6: @DISABLEIPV6@
externalAccess:
type: LoadBalancer
mode: Cluster
sync:
enabled: true
externalAccess:
type: LoadBalancer
accessPackageSecretNames: ["src-accesspackage"]
masterEndpoint: ["https://src-sync.9hoeffer.de:8629"]
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/cluster-sync2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
disableIPv6: @DISABLEIPV6@
externalAccess:
type: LoadBalancer
mode: Cluster
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
disableIPv6: @DISABLEIPV6@
externalAccess:
type: LoadBalancer
mode: Cluster
9 changes: 6 additions & 3 deletions tests/acceptance/semiautomation/helper.fish
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ function patchYamlFile
set -l RESULT $argv[4]
cp "$YAMLFILE" "$RESULT"
sed -i "s|@IMAGE@|$IMAGE|" "$RESULT"
sed -i "s|@ENVIRONMENT|$ENVIRONMENT|" "$RESULT"
sed -i "s|@ENVIRONMENT@|$ENVIRONMENT|" "$RESULT"
if test -z "$DISABLEIPV6"
sed -i "s|@DISABLEIPV6@|false|" "$RESULT"
else
sed -i "s|@DISABLEIPV6@|true|" "$RESULT"
end
end

function checkImages
Expand All @@ -108,5 +113,3 @@ function checkImages
exit 1
end
end

checkImages
2 changes: 1 addition & 1 deletion tests/acceptance/semiautomation/replication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: "replication-internal"
spec:
source:
masterEndpoint: ["https://@ADDRESS@:8629"]
masterEndpoint: ["https://src-sync.9hoeffer.de:8629"]
auth:
keyfileSecretName: src-accesspackage-auth
tls:
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/single.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
spec:
environment: @ENVIRONMENT@
image: @IMAGE@
disableIPv6: @DISABLEIPV6@
externalAccess:
type: LoadBalancer
mode: Single
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test1a.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test1a
set -g TESTDESC "Deployment of mode single (development)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test1b.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test1b
set -g TESTDESC "Deployment of mode active/failover (development)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test1c.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test1c
set -g TESTDESC "Deployment of mode cluster (development, enterprise)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test1d.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test1d
set -g TESTDESC "Deployment of mode cluster with sync (development, enterprise)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test2a.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test2a
set -g TESTDESC "Scale an active failover deployment (enterprise, development)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test2b.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test2b
set -g TESTDESC "Scale a cluster deployment (development, enterprise)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test3a.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test3a
set -g TESTDESC "Deployment of mode single (production)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test3b.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test3b
set -g TESTDESC "Deployment of mode active/failover (production)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test3c.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test3c
set -g TESTDESC "Deployment of mode cluster (production, enterprise)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test3d.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test3d
set -g TESTDESC "Scale a cluster deployment (production, enterprise)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test4a.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test4a
set -g TESTDESC "Deployment of mode cluster (development, enterprise, local storage)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test4b.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test4a
set -g TESTDESC "Deployment of mode cluster (development, enterprise, local storage)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test5a.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test5a
set -g TESTDESC "Pod resilience in mode single (production)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test5b.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test5b
set -g TESTDESC "Pod resilience in active/failover (production)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test5c.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test5c
set -g TESTDESC "Pod resilience in mode cluster (production, enterprise)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test6a.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test6a
set -g TESTDESC "Node resilience in mode single (production)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test6b.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test6b
set -g TESTDESC "Node resilience in active/failover (production)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test6c.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test6c
set -g TESTDESC "Node resilience in mode cluster (production, enterprise)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test6d.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test6d
set -g TESTDESC "Node resilience in mode single (production)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test6e.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test6e
set -g TESTDESC "Node resilience in active/failover (production)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test6f.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test6f
set -g TESTDESC "Node resilience in mode cluster (production, enterprise)"
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/semiautomation/test6g.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test6g
set -g TESTDESC "Node resilience in active/failover, repl factor 1 (production)"
Expand Down
10 changes: 8 additions & 2 deletions tests/acceptance/semiautomation/test7a.fish
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/fish

source helper.fish
checkImages

set -g TESTNAME test7a
set -g TESTDESC "Deployment of 2 clusters with sync with DC2DC (production, enterprise)"
set -g YAMLFILE cluster-sync.yaml
set -g YAMLFILE cluster-sync1.yaml
set -g YAMLFILE2 cluster-sync2.yaml
set -g DEPLOYMENT acceptance-cluster
set -g DEPLOYMENT acceptance-cluster1
set -g DEPLOYMENT2 acceptance-cluster2
printheader

Expand Down Expand Up @@ -37,6 +38,11 @@ and waitForKubectl "get service" "$DEPLOYMENT2-ea *LoadBalancer" "-v;pending" 1
and waitForKubectl "get service" "$DEPLOYMENT2-sync *LoadBalancer" "-v;pending" 1 180
or fail "Deployment did not get ready."

# Deploy secrets separately for sync to pick them up:
kubectl get secret src-accesspackage --template='{{index .data "accessPackage.yaml"}}' | base64 -d > accessPackage.yaml
and kubectl apply -f accessPackage.yaml
or fail "Could not redeploy secrets for replication auth."

# Automatic check
set ip (getLoadBalancerIP "$DEPLOYMENT-ea")
testArangoDB $ip 120
Expand Down