Skip to content

Conversation

@huangpf
Copy link
Owner

@huangpf huangpf commented Sep 4, 2015

No description provided.

sethusrinivasan and others added 30 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
Jianghao Lu added 2 commits September 3, 2015 21:40
More warning messages for upcoming changes in ARM cmdlets
ARM cmdlets for SQLVM extension supporting auto-patching and auto-backup
huangpf added a commit that referenced this pull request Sep 4, 2015
@huangpf huangpf merged commit c10c767 into huangpf:r098 Sep 4, 2015
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