[Azure Stack] Deploy the MySQL Resource Provider

February 9, 2016 at 7:00 am in Azure Stack, TP1 by Florent

Microsoft released yesterday 3 new services in Azure Stack for the Platform-As-A-Service (PaaS):

  • SQL Server
  • MySQL
  • Web Apps

In 3 different blog posts, I will explain to you how to deploy each resource provider. We will start with the deployment of the MySQL RP. To start, connect to the ClientVM and disable the IE Enhanced Security Configuration for the Administrator and User. It’s necessary to be able to authenticate on Azure AD without any problem:

image_thumb1[1]

On the ClientVM, install the last version of Azure PowerShell (version 1.2.1), that you can find here:

image_thumb21

When it’s done, download the AzureStackMySQLforWebApps.zip and unzip it to D:\MySql:

image

Launch a command prompt as Administrator and move to D:\MySql. Execute the Bootstrap.cmd tool. It will launch PowerShell ISE with the script Bootstrap.ps1. Execute it:

image

You will now have some new tabs. Move to the tab Prepare MySql Prerequisites and execute the script New-SslCert.ps1 to generate a certificate for your MySQL infrastructure. It will ask you a password for the PFX:

image

image

If you go to D:\MySql\Prerequisites\BlobStorage\Container you will have your certificate to secure communications between your RP and the Azure Resource Manager. Now, execute the script Download-MySqlServer.ps1 (it will download MySQL binaries) and click on Yes to All to approve the license:

image

You have now in D:\MySql\Prerequisites\BlobStorage\Container your 2 MySQL packages:

image

It’s time to execute the script Upload-Microsoft.MySql-RP.ps1. This script will copy sources to a blob storage. Provide your Azure AD name (in my case azurelabdvo.onmicrosoft.com) and provide a Username/Password that is Global Admin of your Azure AD and Admin of Azure Stack:

image

image

Execute now the script Publish-GalleryPackages.ps1. This script will add 2 packages to your Azure Stack Market Place. Give your Azure AD name as parameter:

image

You have normaly these 4 packages now in D:\MySql\Prerequisites\BlobStorage\Container:

image

It’s now time to deploy the MySQL RP. On the ClientVM, Go to Market Place > Resource Providers > MySql Resource Provider 1.0.1.0:

image

Click on it and choose your VM admin username and password:

image

Go down and give the password for the PFX generated in the 1st step. Give a username/password combination that you will use to register your MySQL RP later:

SNAGHTML2e10c036

Create a new Resource Group named MySQL01 and launch the creation:

image

After approximatively 30 minutes, the VMs and the MySQL services are deployed:

image

Go back to PowerShell ISE and move to the tab Deploy MySql provider. Select the runbook Register-Microsoft.MySql-fqdn.ps1 to get the public IP address of the VM and create the associated DNS entry. For this script, you need to provide your Azure AD account:

image

image

To finish, launch the last script Register-Microsoft.MySql-provider.ps1 to register your MySQL RP. Give your Azure AD account and after, give the username/password that you provides during the installation:

image

The MySQL RP is now registered:

image

Go on your Azure Stack interface, and navigate to Plans > YourPlan > Settings > Services > Add New. Choose the Microsoft.MySql provider:

image

Login on your tenant account and click on New > Data + Storage > MySql server/database. Complete information:

image

Deployment is now finished:

image

You have information of your MySql DB:

image

To connect to this instance, use the following command:

mysql.exe -h mysql1.azurestack.local -u florent@mysqldb01 -p

image

Enjoy this deployment Sourire