Windows Azure Pack – Dedicated SQL offering (Part 3)

Part 1: In the part one of this series, we have gone through the step by step instructions of installing and configuring Windows Azure Pack portal and api express on an Azure virtual machine. You can read through the part one of this series here.

Part 2: In the part two of this series, we have gone through the step by step instruction of creating group and server in SQL server resource provider, followed by creating plan and add-on based for providing a dedicated offer. Also, we created a tenant account. You can read through the part two here.

In this post, I am providing the PowerShell script that can be used to assign the private plan and add-on to the tenant. It is possible to assign private plan to tenant from admin portal. However assigning a private add-on to tenant is not enabled from admin portal. So we need to leverage PowerShell script to assign the plan and add-on to tenant.

Step 7: Assign private plan and add-on to tenant by service provider admin

# Assign all variable values specific to your environment
$windowsAuthSiteUri = "https://localhost:30072"
$adminUri  = "https://localhost:30004"
$planName  = "Dedicated Plan 001"
$addonName = "AddOn for Dedicated Plan 001"
$userName  = "admin@tenant.com"

#
# Get Token
$token = Get-MgmtSvcToken `
	-Type Windows `
	-AuthenticationSite $windowsAuthSiteUri `
	-DisableCertificateValidation `
	-ClientRealm "http://azureservices/AdminSite"

#
# Get plan, add-on and user objects
$plan = Get-MgmtSvcPlan `
	-AdminUri $adminUri `
	-Token $Token `
	-DisableCertificateValidation `
	-DisplayName $planName    

$addon = Get-MgmtSvcAddOn `
	-AdminUri $adminUri `
	-Token $Token `
	-DisableCertificateValidation `
	-DisplayName $addonName

# Create a new subscription for the user against the dedicated plan
$subscription = Add-MgmtSvcSubscription `
	-AdminUri $adminUri `
	-Token $token `
	-AccountAdminLiveEmailId $userName `
	-AccountAdminLivePuid $userName `
	-PlanId $plan.Id `
	-FriendlyName $planName `
	-DisableCertificateValidation

In the last part of this series, I will walk through the tenant experience of creating databases leveraging the dedicated plan/add-on.

About Manesh

Manesh is a software consultant and solutions architect specializing in cloud, data, Linux and devops in the azure realm with key focus on hybrid workloads. He has been working on Azure technologies since its inception and has helped many enterprises to onboard and adapt to Azure cloud, build solutions for datacenter scale / high consumer applications and services. Currently, he is Microsoft certified for Developing Microsoft Azure Solutions (70-532), Implementing Microsoft Azure Infrastructure Solutions(70-533) and Architecting Microsoft Azure Solutions (70-534).

Posted on 2015/02/10, in Cloud-OS, SQL Server and tagged , . Bookmark the permalink. 1 Comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

https://hyper-v.nu/

My views on technology

Virtualization and some coffee

My views on technology

Thomas Maurer

Cloud and Datacenter Blog focusing on Microsoft Azure

Cloud Administrator in Azure World

Begin Your Azure Management Journey with the Cloud Administrator

%d bloggers like this: