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

[SQL VM] az sql vm update: Add configuration options for SQL Best Practices Assessment #21281

Merged
merged 15 commits into from
May 19, 2022

Conversation

vadeveka
Copy link
Contributor

@vadeveka vadeveka commented Feb 14, 2022

Description
SQL VM offers ability to configure and run assessment on-demand or on a schedule as noted in public doc. This allows customers to evaluate SQL Server on their VMs against the best practices and identify performance issues. This PR adds support for configuring assessment feature and starting assessment from CLI. Customers can then track progress of the run and view results on Azure Portal.

As defined in this technical spec, this pull request has been developed with Approach 1 in mind. In next iteration, this will be enhanced to Approach 2 by taking inspiration from az vm cretae/update implementation before publicizing the commandlets.

Testing Guide

// Enables Assessment feature and enables or updates schedule with assessment to run every 3 weeks, starting on Sunday at local time 23:00
az sql vm update –assessment-weekly-interval 3 --assessment-day-of-week Sunday –assessment-start-time-local "23:00" -g <Resource Group Name> -n <SQL VM Name>
 
// Enables Assessment feature and enables or updates schedule with assessment to run every 2nd Sunday of the month at local time 23:00
az sql vm update –monthly-occurrence 2 --assessment-day-of-week Sunday –assessment-start-time-local "23:00" -g <Resource Group Name> -n <SQL VM Name>

// Start assessment immediately
az sql vm start-assessment -g <Resource Group Name> -n <SQL VM Name>

// Disable schedule but keep the feature enabled
az sql vm update --enable-assessment-schedule false -g <Resource Group Name> -n <SQL VM Name>

// Disable feature and schedule if any
az sql vm update --enable-assessment false -g <Resource Group Name> -n <SQL VM Name>

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.


This checklist is used to make sure that common guidelines for a pull request are followed.

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 14, 2022

sqlVM

@vadeveka vadeveka changed the title Manage SQLVM Assessment [SQL VM] az sql vm: Add configuration options and start command for SQL Best Practices Assessment Apr 22, 2022
@vadeveka vadeveka changed the title [SQL VM] az sql vm: Add configuration options and start command for SQL Best Practices Assessment [SQL VM] az sql vm: Add configuration options for SQL Best Practices Assessment Apr 22, 2022
@vadeveka vadeveka marked this pull request as ready for review May 16, 2022 21:31
@vadeveka
Copy link
Contributor Author

@evelyn-ys - CLI linter is failing due to long argument names such as --assessment-monthly-occurrence. Even if I were to change it to --asmt-monthly-occurrence, it still exceeds 22 characters. For readability purposes, I think it would be best to keep the long names. I dont think there is easier alternative for "monthly-occurrence". Let me know if this requirement can be suppressed in some way for the 4 arguments.

@evelyn-ys
Copy link
Member

Hi @vadeveka, You can keep the --assessment-monthly-occurrence argument and set more short options using options_list. For example:

c.argument('assessment_monthly_occurrence', options_list=['--assessment-monthly-occurrence', '--am-occur'], help='...')

@vadeveka vadeveka changed the title [SQL VM] az sql vm: Add configuration options for SQL Best Practices Assessment [SQL VM] az sql vm update: Add configuration options for SQL Best Practices Assessment May 18, 2022
@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants