Deploy MySQL resource provider in Azure Stack TP1

Microsoft has released Azure Stack in the end of January. Then not long after, Microsoft published PaaS resource provider for MySQL, SQL Server and Web Apps. These resource providers enable to host web-based applications as web site and their databases. In this topic we will see how to deploy MySQL resource provider to host MySQL database.

To follow this topic, you must have a running Azure Stack infrastructure. You can follow this topic for further information.

Prepare the PortalVM

Before deploying MySQL resource provider, we need to prepare the PortalVM. First we, have to disable Internet Explorer Enhanced Security. For that I use this PowerShell script (I have found it on the Internet, but I don’t remember where):

$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 -Force
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force
Stop-Process -Name Explorer -Force
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green

Then we have to enable Javascript and Cookie. For that, open Internet Explorer in Run As Administrator context and navigate to the option. To enable cookie, navigate in the option to Privacy and Advanced. Configure properties as below.

Then navigate to Security, select Internet zone and click on custom properties. Set properties as below:

To finish the Internet Explorer configuration, close Internet Explorer to apply settings.

Prepare the environment

Now that PortalVM is ready, you can download MySQL resource provider deployment pack here. Once it is downloaded, extract the content of the ZIP file into D:\MySQL in the PortalVM.

Then, write click on Bootstrap.cmd and run this script in Run As Administrator. Powershell ISE should be opened with the Bootstrap.ps1 script. Run this script in the ISE. When the script has run, you should have some tabs as below.

Navigate to Prepare MySQL prerequisites tab and run New-SSLCert.ps1. Specify a password for the PFX file.

Then run the Download-MySQLServer.ps1 script to download MySQL binaries.

Then run the Upload-Microsoft.MySQL-RP.ps1 script to upload binaries to the AzureStack repository. Specify your Azure AD that you use with AzureStack and the admin credential to connect to Azure.

To finish, run Publish-GalleryPackages.ps1 to publish items in the marketplace.

If you navigate to D:\MySQL\Prerequisites\BlobStorage\Container you should have something like this:

Deploy MySQL resource provider

Open a session on the AzureStack portal with admin priviledge. Click on New, Resource Providers and MySQL Resource Provider. In Parameters, specify AdminUserName, AdminPassword, BasicAuthUsername, BasicAuthPassword and the PFX file password.

Then create a new Resource Group called MySQL01. Next click on create.

Now you have to wait a while (in my lab, it took almost 1 hour) before having the below message. If you have this message, all is ok.

Register MySQL resource provider in Azure Stack

Go back to the PowerShell ISE and navigate to Deploy MySQL provider tab. Run the Register-Microsoft.MySQL-fqdn.ps1 script. Specify again your Azure AD and credential.

Then run the Register-Microsoft.MySQL-provider.ps1 script and specify BasicAuth credential that you have provided when configuring the MySQL resource provider deployment.

As you can see below, the MySQL-Local provider has been registered.

Configure a plan to deliver MySQL service

Select a plan that you have created (or create a new) and add a service as below. Select Microsoft.MySQL service. To create a plan or an offer, you can get information in this topic.

At this moment, I recommend you to close your browser to avoid issue saying that MySQL provider can’t be located.

Use MySQL service

Log on Azure Stack portal with your tenant and click on New, Data + Storage and MySQL server + database. Set settings as you want and click on create.

Once the deployment is finished, you should have the below message.

If you browse the MySQL Servers, you should have something as below.

Now that MySQL resource provider is deployed, we need to deploy Web Apps service to consume database service. It will be describe in a next topic J

About Romain Serre

Romain Serre works in Lyon as a Senior Consultant. He is focused on Microsoft Technology, especially on Hyper-V, System Center, Storage, networking and Cloud OS technology as Microsoft Azure or Azure Stack. He is a MVP and he is certified Microsoft Certified Solution Expert (MCSE Server Infrastructure & Private Cloud), on Hyper-V and on Microsoft Azure (Implementing a Microsoft Azure Solution).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Check Also

Issue when deploy AzureStack Technical Preview 1 only on SSD

The last week-end, I have deployed AzureStack Technical Preview 1 on my lab server that ...

Create an offer, a plan and get a subscription in Azure Stack Technical Preview 1

In a last topic, I have explained how to deploy Azure Stack Technical Preview 1. ...

Deploy Azure Stack Technical Preview 1

Azure Stack Technical Preview 1 has been released by Microsoft this January, 29th 2016. Azure ...