Skip to content

Conversation

@sethusrinivasan
Copy link
Contributor

  1. ARM cmdlets for SQLVM extension added ( followed DSC's ARM cmdlet pattern )
  2. supports configuring auto patching in ARM mode
  3. supports configuring auto backup in ARM mode
  4. Get sqlvm extension status in ARM mode
  5. remove sqlvm extension in ARM mode

sethusrinivasan and others added 27 commits June 18, 2015 18:44
PR from parent branch
-------------
1) ARM cmdlets for SQLVM extension added ( followed DSC's ARM cmdlet pattern )
2) supports configuring auto patching in ARM mode
3) supports configuring auto backup in ARM mode
4) Get sqlvm extension status in ARM mode
5) remove sqlvm extension in ARM mode


Pending Open issues:
------------------
- MAML file generation & help documentation
- adding new functional tests
- follow up with Azure team to check why Extenstion statusus were always returning null in Get-* cmdlet

Testing:
------
Environment: SQLVM created via new Azure portal using ARM

Powershell script used:
-----------------------
Switch-AzureMode -Name AzureResourceManager

$subscriptionName = "__Subscription__"
$vmName = "__vm_name__"
$resourceGroupName = "__resourcegroupName__"


Add-azureaccount
select-azuresubscription -SubscriptionName $subscriptionName

# Get Azure VM created using ARM
$vm = get-azurevm -ResourceGroupName $resourceGroupName -Name $vmName

###########
#Set auto patching
###########
$aps = New-AzureVMSqlServerAutoPatchingConfig -Enable -DayOfWeek "EveryDay" -MaintenanceWindowStartingHour 20 -MaintenanceWindowDuration 120 -PatchCategory "Important"
$vm | Set-AzureVMSqlServerExtension -AutoPatchingSettings $aps  -ResourceGroupName $resourceGroupName -VMName $vmName -Version "1.2" -Verbose

###########
#Set auto backup
###########
$storageUrl = "https://__account__.blob.core.windows.net/"
$storageAccountKey = "__KEY__"
$storageAccountKeySecure = convertto-securestring $storageAccountKey -asplaintext -force

$abs = New-AzureVMSqlServerAutoBackupConfig -Enable -RetentionPeriod 22 -StorageUri $storageUrl -StorageKey $storageAccountKeySecure
$vm = get-azurevm -ResourceGroupName $resourceGroupName -Name $vmName
$vm | Set-AzureVMSqlServerExtension -AutoBackupSettings $abs  -ResourceGroupName $resourceGroupName -VMName $vmName -Version "1.2" -Verbose

###########
#get extension status
###########
Get-AzureVMSqlServerExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $vmName

###########
#remove extension
###########
Remove-AzureVMSqlServerExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $vmName

Task# 5468533 - SQL IaaS Extension PowerShell Resource Management support
…Azure-dev

Conflicts:
	src/ResourceManager/Compute/Commands.Compute/Common/ConstantStringTypes.cs
…red in JSON serializer

- no special handling is needed in Get-AzureVMSqlServerExtension to mask secrets
… back to read AutoBackup and AutoPatching settings
@azurecla
Copy link

azurecla commented Sep 3, 2015

Hi @sethusrinivasan, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (seths). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, or work for Microsoft Open Technologies, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@jianghaolu
Copy link
Contributor

jianghaolu pushed a commit that referenced this pull request Sep 4, 2015
ARM cmdlets for SQLVM extension supporting auto-patching and auto-backup
@jianghaolu jianghaolu merged commit ab992a1 into Azure:release-0.9.8 Sep 4, 2015
@sethusrinivasan
Copy link
Contributor Author

Thanks!

On Thu, Sep 3, 2015 at 9:41 PM, Jianghao Lu [email protected]
wrote:

Merged #852 #852.


Reply to this email directly or view it on GitHub
#852 (comment).

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.

3 participants