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

Automation mssql #141

Open
wants to merge 89 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
b8dfc3f
Added basic automation
manavrajvanshi Jun 15, 2023
07fce5b
Updated teardown
manavrajvanshi Jun 15, 2023
e714be1
Merge branch 'main' into automation
manavrajvanshi Jun 22, 2023
00b762c
Addressed review comments
manavrajvanshi Jun 27, 2023
eb01630
Added minor comment to DatabaseInterface
mazin-s Jul 25, 2023
c11ff90
Changed databaseInstanceName
mazin-s Jul 25, 2023
5fab2f5
added comments, and error check
mazin-s Jul 26, 2023
25e7785
Changed comments
mazin-s Jul 26, 2023
5954e08
Changed function names
mazin-s Jul 26, 2023
8f1cf7c
Deleted some error handelining not needed
mazin-s Jul 26, 2023
33d7b43
Setup Path
mazin-s Jul 26, 2023
fcc409a
changed to setuppath
mazin-s Jul 26, 2023
2d637f5
added setupconfig structure
mazin-s Jul 26, 2023
5cdb09d
Added setupConfig case to ConverBytesToType, ConvertBytesToSetUpConfi…
mazin-s Jul 26, 2023
2d1e67e
Removed simple comments
mazin-s Jul 26, 2023
8707e09
added sandbox for putting secrets
mazin-s Jul 26, 2023
33827ed
added comment to test suite
mazin-s Jul 26, 2023
1cdb04b
As suggested by Yash, method should not be exported
mazin-s Jul 26, 2023
b765942
save changes
mazin-s Jul 27, 2023
96c5669
removed a log i was using to help me
mazin-s Jul 27, 2023
dc8a10f
Not needed methods I created
mazin-s Jul 27, 2023
8cfe133
Helpers changed
mazin-s Aug 3, 2023
56ee0f9
Renamed SetupPaths
mazin-s Aug 3, 2023
654339f
Added some logs and deleted some logs
mazin-s Aug 3, 2023
d8cdf9b
Added generic function
mazin-s Aug 3, 2023
1ac5eec
Add public key
mazin-s Aug 3, 2023
56e2c5f
Changed makefile to test pg_si
mazin-s Aug 3, 2023
0217d3a
Changed method names to capital
mazin-s Aug 3, 2023
e5ac2b5
Restructured tests
mazin-s Aug 3, 2023
bf1aabd
Changed to test mssql_si
mazin-s Aug 3, 2023
b3c58c5
Added logs
mazin-s Aug 3, 2023
eee5843
rough copy of tests
mazin-s Aug 3, 2023
2b75a6b
changed yaml
mazin-s Aug 3, 2023
7381762
mssql e2e support
mazin-s Aug 4, 2023
3d560ab
constant files added
mazin-s Aug 4, 2023
570c73a
Hiding mssql 2e2 test
mazin-s Aug 4, 2023
4e9c5ed
Removed mssql test
mazin-s Aug 4, 2023
6d3a13f
e2e postgres passes
mazin-s Aug 4, 2023
2fdef75
Merge branch 'main' into automation
mazin-s Aug 4, 2023
78ab12c
Added profiles
mazin-s Aug 4, 2023
60d8bb2
delted line in git ignore
mazin-s Aug 4, 2023
7122b24
Merge branch 'main' into automation
manavrajvanshi Aug 5, 2023
662520e
Error check added
mazin-s Aug 7, 2023
2db14f9
Made make-test run whole automation file instead of indivdual test
mazin-s Aug 7, 2023
dd47d8c
Removed ssh
mazin-s Aug 7, 2023
6537b77
CreateTypeFromPath instead of CreateGeneric
mazin-s Aug 7, 2023
867da7a
Removed some logs
mazin-s Aug 7, 2023
bf5f28a
removed because not using right now, will include in next PR
mazin-s Aug 8, 2023
25755f3
changed make file test
mazin-s Aug 8, 2023
810ab59
Renamed from generic to theType
mazin-s Aug 8, 2023
547a88e
Added comments
mazin-s Aug 8, 2023
f3b55d6
Deleted a comment and added one
mazin-s Aug 8, 2023
67d9d2c
changed comment
mazin-s Aug 8, 2023
52f1fde
Moved yaml files to pg_si test
mazin-s Aug 8, 2023
b73c202
Change yaml property names
mazin-s Aug 8, 2023
74b1ac7
Refactored comments and code structure
mazin-s Aug 8, 2023
d346c0d
Added comments
mazin-s Aug 9, 2023
274fea9
Added more comments
mazin-s Aug 9, 2023
272e536
Better commenting and spacing
mazin-s Aug 9, 2023
204ea48
.gitignore changed
mazin-s Aug 9, 2023
64aaa8e
Refactored config file names to make them consistent, added a const f…
mazin-s Aug 10, 2023
9930810
Changed makefile and .ignote to accoutn for extra tests folder
mazin-s Aug 10, 2023
ae09d20
changed file path
mazin-s Aug 10, 2023
b0207ae
Edited CreateTypeFromPath to throw and error if theType is not a poin…
mazin-s Aug 14, 2023
f582d11
Elimnated unecessary line
mazin-s Aug 14, 2023
3e1fabc
Deleted readYamlFile function and using new os package because old me…
mazin-s Aug 14, 2023
0da4e2b
Addded 'Provisioning' in front of TestSetup and TestTeardown functions
mazin-s Aug 14, 2023
ae4b3c8
Merge branch 'main' into automation
mazin-s Aug 15, 2023
338bc94
Got rid of suite.kubeconfig
mazin-s Aug 15, 2023
9562dba
Added better error messages
mazin-s Aug 15, 2023
42e800d
Renamed 'setup' file to 'provisioning' file and moved waitAndRetryOpe…
mazin-s Aug 15, 2023
b58b9a1
Refactored function logic
mazin-s Aug 16, 2023
b038884
Basic mssql-si_test scafolding
mazin-s Aug 16, 2023
42cd5aa
mssql-si_test
mazin-s Aug 17, 2023
1d1685b
changed mssql pod
mazin-s Aug 17, 2023
7b97312
Change sized
mazin-s Aug 22, 2023
90d1fc9
Deleted nodePort and changed size
mazin-s Aug 22, 2023
d806b0e
appConnectivity uses kubectl port-forward
mazin-s Aug 23, 2023
012c841
Deleted not needed services
mazin-s Aug 23, 2023
339c943
Deleting service before database in teardown. Also removing service c…
mazin-s Aug 23, 2023
b753c74
Removing service creation
mazin-s Aug 23, 2023
c180f10
Removed ID
mazin-s Aug 23, 2023
bfc5fc0
Changed GetAppResponse arguments
mazin-s Aug 23, 2023
89f569a
public key placeholder
mazin-s Aug 23, 2023
d818f43
Made timeout to 90 instead of 60
mazin-s Aug 28, 2023
e950fce
waitAndRetry with 80 argument instead of 60
mazin-s Aug 28, 2023
682c867
using my image instead
mazin-s Aug 28, 2023
c25e70b
added a description field
mazin-s Aug 28, 2023
56c4de9
Moved appConnectivity, provisioning, and setup to util, changed file …
mazin-s Sep 13, 2023
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,4 @@ endif
# NDB_CLUSTER_ID='...'
.PHONY: run-automation
run-automation: install
go test ./automation/tests/... -v -timeout 60m
go test ./automation/tests/... -v -timeout 90m
211 changes: 0 additions & 211 deletions automation/setup.go

This file was deleted.

37 changes: 37 additions & 0 deletions automation/tests/mssql-si_test/config/database.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: ndb.nutanix.com/v1alpha1
kind: Database
metadata:
name: db-mssql-si
spec:
ndb:
clusterId: <cluster-id>
credentialSecret: ndb-secret-mssql-si
server: https://<ip-for-ndb>:8443/era/v0.9
skipCertificateVerification: true
databaseInstance:
databaseInstanceName: db-mssql-si
databaseNames:
- database_one
credentialSecret: db-secret-mssql-si
size: 16
timezone: "UTC"
type: mssql
profiles:
compute:
name: ""
id: ""
# A Software profile is a mandatory input for closed-source engines: SQL Server & Oracle
software:
name: "MSSQL-MAZIN2"
dbParam:
name: "DEFAULT_SQLSERVER_INSTANCE_PARAMS"
dbParamInstance:
name: "DEFAULT_SQLSERVER_INSTANCE_PARAMS"
timeMachine:
sla : "NONE"
dailySnapshotTime: "12:34:56" # Time for daily snapshot in hh:mm:ss format
snapshotsPerDay: 4 # Number of snapshots per day
logCatchUpFrequency: 90 # Frequency (in minutes)
weeklySnapshotDay: "WEDNESDAY" # Day of the week for weekly snapshot
monthlySnapshotDay: 24 # Day of the month for monthly snapshot
quarterlySnapshotMonth: "Jan" # Start month of the quarterly snapshot
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: db-secret-pg-si
name: db-secret-mssql-si
type: Opaque
stringData:
password: <password-for-database>
ssh_public_key: <enter-ssh-public-key>

9 changes: 9 additions & 0 deletions automation/tests/mssql-si_test/config/ndb-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: ndb-secret-mssql-si
type: Opaque
stringData:
username: <username-for-ndb>
password: <password-for-ndb>
ca_certificate: ""
35 changes: 35 additions & 0 deletions automation/tests/mssql-si_test/config/pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: v1
kind: Pod
metadata:
name: app-mssql-si
labels:
app: app-mssql-si
spec:
containers:
- name: app-mssql-container
image: mazins/ndb-operator-mssql:latest
env:
- name: DBHOST
value: db-mssql-si-svc
- name: USERNAME
value: Administrator
- name: DATABASE
value: database_one
- name: DBPORT
value: "80"
- name: MSSQL_INSTANCE_NAME
value: CDMINSTANCE
- name: PASSWORD
valueFrom:
secretKeyRef:
name: db-secret-mssql-si
key: password
ports:
- containerPort: 3000
initContainers:
- name: init-db
image: busybox:1.28
command: ['sh', '-c', "until nslookup $(DB_HOST).$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for $(DB_HOST); sleep 2; done"]
env:
- name: DB_HOST
value: "db-mssql-si-svc"
Loading