/ azure

Azure Stack - Initial Configuration - Part 2

Now that we're registered, it is time to get base images deployed so we can start doing stuff. You can do this via the Marketplace Management in the portal, or, better, use PowerShell.

  1. Go out to MSDN and grab the latest Windows Server 2016 Datacenter Eval ISO.
  2. From the same PS session as previously, run these commands:
  3. Import-Module .\ComputeAdmin\AzureStack.ComputeAdmin.psm1
  4. $ISOPath = "<Fully_Qualified_Path_to_ISO>"
  5. New-AzsServer2016VMImage -ISOPath $ISOPath -IncludeeLatestCU

This will EASILY take more than an hour, cause you aren't just adding the ISO to the marketplace, you are creating a brand new Image with all the latest patches installed. Handy:


Since we're in a POC, we're constrained by resources quite a bit, so I wouldn't recommend doing these next steps till the above is finished. Have some Netflix. When that finishes, deploy the necessary VMs to support the SQL and MySQL Resource Providers:

  1. Get the template from here.
  2. Click the azuredeploy.json file and then click Raw.
  3. Open up the Azure Management Portal tab you had opened and do a new, custom deployment.
  4. Copy and paste the template into the Azure Management portal.
  5. Fill in a few details and you're off to the races with a SQL 2014 installation.

What's awesome about this method is the template takes care of getting all the media it needs, so nothing extra to download and keep up with. This SQL VM will be a RESOURCE Server, meaning it will give your SQL Provider capacity. Same holds true with the MySQL Provider. Start with a resource VM with MySQL all set up for you.

  1. Get the template here.
  2. Click the azuredeploy.json file and then click Raw.
  3. Open up the Azure Management Portal tab you had opened and do a new, custom deployment.
  4. Copy and paste the template into the Azure Management portal.
  5. Fill in a few details and you're off to the races with a MySQL installation.

Now, after these three things are done, it is time to stand up the Azure Stack Resource Providers for SQL Server and MySQL. Let's get started!

  1. The full docs can be found here.
  2. Download the SQL Server Resource Provider (self extracting Zip) from the above website. Extract it. Then simply run this script:
  3. $tenantID = Get-AzsDirectoryTenantID -AADTenantName "<yourtenant>.onmicrosoft.com" -EnvironmentName AzureStackAdmin
  4. $vmLocalAdminPass = ConvertTo-SecureString "<a local VM password of your choice>" -AsPlainText -Force
  5. $vmLocalAdminCreds = New-Object System.Management.Automation.PSCredential ("sqlrpadmin", $vmLocalAdminPass)
  6. $AdminPass = ConvertTo-SecureString "" -AsPlainText -Force`
  7. $AdminCreds = New-Object System.Management.Automation.PSCredential ("<username@tenant.onmicrosoft.com", $AdminPass)`
  8. $PfxPass = ConvertTo-SecureString "<an SSL cert password of your choice>" -AsPlainText -Force
  9. .\DeploySQLProvider.ps1 -DirectoryTenantID $tenantID -AzCredential $AdminCreds -VMLocalCredential $vmLocalAdminCreds -ResourceGroupName "SqlRPRG" -VmName "SqlVM" -ArmEndpoint "https://adminmanagement.local.azurestack.external" -TenantArmEndpoint "https://management.local.azurestack.external" -DefaultSSLCertificatePassword $PfxPass
    This will take, as you might expect, a bit o time. More Netflix.

Once it completes, the next step is to provide capacity to the SQL RP by giving it the creds to the SQL Server you created earlier.

  1. Open up Azure Stack Management Portal
  2. Go to Resource Providers
  3. Click into the SQLProvider
  4. Click Hosting Servers
  5. Click Add button, fill out form

If you did it right, it will complete almost instantly.

Now, do the exact same thing, except this time, for the MySQL Provider.

  1. Full instructions, and download of bits is located here.
  2. Extract them to a folder
  3. Script:
  4. .\DeployMySQLProvider.ps1 -DirectoryTenantID $tenantID -AzCredential $AdminCreds -VMLocalCredential $vmLocalAdminCreds -ResourceGroupName "MySqlRG" -VmName "MySQLRP" -ArmEndpoint "https://adminmanagement.local.azurestack.external" -TenantArmEndpoint "https://management.local.azurestack.external" -DefaultSSLCertificatePassword $PfxPass

Once the RP is installed, add some capacity:

  1. Open up Azure Stack Management Portal
  2. Go to Resource Providers
  3. Click into the MySQLProvider
  4. Click Hosting Servers
  5. Click Add button, fill out form

If you did it right, it will complete almost instantly.

All is ready now for the big step - deploying Azure App Services! That's next time.