GoogleCloudPlatform / database-assessment

Database Migration Assessment
https://googlecloudplatform.github.io/database-assessment/
Apache License 2.0
56 stars 34 forks source link

feat: Add option to request user credentials when collecting HW specs (windows) #342

Closed YairHalberstadt closed 5 months ago

YairHalberstadt commented 5 months ago

We first try to collect using current user credentials. If that fails, and the user has set the -collectVMSpecs flag, we request the credentials from the user via a pop up prompt:

image

We also slightly modify the existing script to write machine name to csv even on failure.

YairHalberstadt commented 5 months ago

@liozme please take a look

shane-borden commented 5 months ago

Tested the scripts with a local and a remote collection. Data was collected, however the column TotalOSMemoryMB is reporting incorrectly in "bytes" instead of "megabytes".

"pkey"|"dma_source_id"|"dma_manual_id"|"MachineName"|"PhysicalCpuCount"|"LogicalCpuCount"|"TotalOSMemoryMB"
"MS-SERVER2012_master_SQL2014_012424182648"|"MS-SERVER2012_1380AFC7574E40A4BB06FFC9E61D998D_SQL2014"|"NA"|"MS-SERVER2012"|"4"|"8"|"34359738368"

Also, we need to add a switch to create an empty file for this collection if the script is running against Azure or GCP CloudSQL.

shane-borden commented 5 months ago

The help text contained within instanceReview.ps1 and runAssessment.bat needs to be revised to show the new switch. Also the docs need to be updated as well as the readme in order to reflect the new switch.

YairHalberstadt commented 5 months ago

@shane-borden:

Data was collected, however the column TotalOSMemoryMB is reporting incorrectly in "bytes" instead of "megabytes".

Fixed

The help text contained within instanceReview.ps1 and runAssessment.bat needs to be revised to show the new switch.

Done for runAssessment.bat, this was already the case for instanceReview.ps1

Also the docs need to be updated as well as the readme in order to reflect the new switch.

Done

Also, we need to add a switch to create an empty file for this collection if the script is running against Azure or GCP CloudSQL.

Why is this necessary? The user can just not set the -collectVMSpecs switch, we'll fail to collect anything, and silently continue (that's already the case today).