Professional Documents
Culture Documents
1. Login to Azure
For this challenge, you have either elected to use your own subscription or have created a new Azure
subscription using the provided Azure Pass (or Free Trial). If you want to switch to use the provided Azure
Pass the promotion code is displayed on the My Account page on the http://challenge.azurecon.com web
site. If there is no promo code displayed, you will need to use the free trial http://azure.microsoft.com/pricing/free-trial.
Azure has TWO management portals - the classic portal (http://manage.windowsazure.com) and a new
portal that is in Preview at http://portal.azure.com. You will use the Preview portal in this challenge.
1.
2.
Enter your Microsoft Account email address and password for the Microsoft Account you
associated with your Azure Pass or your own subscription.
3.
You will now be in your Azure subscription (see opposite) and from here you can create and
manage Azure services.
2.
In the search box at the top, type Template Deployment and press enter
3.
4.
5.
On the Edit template window locate the line containing his code: "parameters": {}. This should be line 4. Between the { } put the following code:
"hostingPlanName": {
Page | 1
"type": "string",
"metadata": {
"description": "The name of the App Service plan
}
},
"siteLocation": {
"type": "string",
"metadata": {
"description": "The location to use for creating
}
},
"sku": {
"type": "string",
"allowedValues": [
"Free",
"Shared",
"Basic",
"Standard"
],
"defaultValue": "Free",
"metadata": {
"description": "The pricing tier for the hosting
}
},
"workerSize": {
"type": "string",
"allowedValues": [
"0",
"1",
"2"
],
"defaultValue": "0",
"metadata": {
"description": "The instance size of the hosting
}
}
plan."
This code defines the parameters that will be used for the template.
6.
On the Edit template window locate the line containing his code: "resources": [ ]. This should be around line 43. Between the [ ] put the following
code:
{
"apiVersion": "2015-04-01",
"name": "[parameters('hostingPlanName')]",
"type": "Microsoft.Web/serverFarms",
"location": "[parameters('siteLocation')]",
"properties": {
"name": "[parameters('hostingPlanName')]",
"sku": "[parameters('sku')]",
"workerSize": "[parameters('workerSize')]",
"numberOfWorkers": 1
}
}
This code defines the services that need to be created, in this case an Application Plan.
7.
In order to make your life easier for the next tasks, copy the whole configuration. Open Notepad and paste the configuration there.
8.
9.
On the Resource Group blade press the Or create new link, and choose
templateRG as the name of your Resource Group.
10.
Click on Resource Group Location and select any of the available regions.
11.
12.
13. For the Site Location use the SAME value you selected for the Resource
Group Location which is displayed in the Resource Group Location link (Japan
East in the example opposite).
14. Leave the other values alone and press OK
15.
Click on Legal Terms and press Buy, to indicate that you agree with the Legal
Terms (there is no purchase involved, but some resources cost money, so that
is why Microsoft chose this word).
16.
Make sure that Pin to Startboard is selected, and the press the Create
button.
Page | 2
17.
After less than a minute, your App Service Plan is created and a blade with your resource group will be open.
You are going to repeat creating the template you did in the previous task, but you have all this
copied in Notepad ready to go.
2.
Create a new template (+New -> Marketplace Search for Template Deployment and create a
template.
3.
4.
5.
In the parameters section you need to add the following parameter at the beginning of the list
so right after the opening {
"siteName": {
"type": "string",
"metadata": {
"description": "The name of the web app that you wish to create."
}
},
6.
In the resources section add a comma after the existing resource, so directly BEFORE the last ] closing square bracket and then add the
following resource:
{
"apiVersion": "2015-06-01",
"name": "[parameters('siteName')]",
"type": "Microsoft.Web/Sites",
"location": "[parameters('siteLocation')]",
"dependsOn": [
"[concat('Microsoft.Web/serverFarms/', parameters('hostingPlanName'))]"
],
"properties": {
"name": "[parameters('siteName')]",
"serverFarmId": "[parameters('hostingPlanName')]"
}
}
7.
8.
Click on Resource Group and choose TemplateRG which will fix the
location
9.
10.
For SiteName, enter a globally unique name. Suggest you use your email alias
prefix plus -webappARM so if your email address was
bsmith@contoso.com, you would use bsmith-webappARM
11.
For the Hosting Plan Name, use templateASP which will fix the location.
12. For the Site Location use the SAME value you selected for the Resource Group
Location which is displayed in the Resource Group Location link (Japan East in
the example opposite).
13. Leave the other values alone and press OK
14.
Click on Legal Terms and press Buy, to indicate that you agree with the Legal
Terms (there is no purchase involved, but some resources cost money, so that
is why Microsoft chose this word).
15.
Make sure that Pin to Startboard is selected, and the press the Create button.
Page | 3
Clcik on Resource Groups on the left Nav. You will see your templateRG group.
2.
Click the Resource Group and in the Summary of resources on the next blade you will see your App Service Plan and Your Web App. These were
the resources that were described by the template. They were created using the values you supplied to the template based on the parameters
the template needed.
3.
Click your Web Site and click Browse on the toolbar. Your site opens. It all just works.
Now you just created a template thats not too dissimilar to the template used (under the covers) when you go +New -> Web + Mobile -> Web App.
5. Create a single App Service Plan, a Web App, a SQL Server, and a SQL Database
In this task we are going to put it all together use a template that describes a more complex set of resources. Many of these templates already exisit on the
Azure Quickstart Templates gallery on GitHub.
1.
Create a new template (+New -> Marketplace Search for Template Deployment and create a template.
2.
3.
web-app-sql-database/azuredeploy.json copy the whole code from there and Paste it in the Edit template window replacing the
existing content.
4.
5.
6.
7.
For the Site Location use any one of these 4 values: West US, South Central US, Central US and East US, and then press OK.
8.
9.
For the Server Location use the same location as you used for Site Location.
10.
For Administrator login use alias + admin e.g. bsmithadmin and use a password you can remember
11.
For the Database Name we suggest you use alias-sqldbARM e.g. bsmith-sqldbARM. Press OK.
12.
On the Resource Group blade press the Or create new link, and choose FullArmRG as the name of you Resource Group.
13.
On the resource group location use the same location you used for the Site Location.
14.
On the legal terms press Buy, to indicate that you agree with the Legal Terms (there is no purchase involved, but some resources cost money, so
that is why Microsoft chose this word).
15.
Make sure that Pin to Startboard is selected, and the press the Create button.
16.
After a while, depending on the load on Azure at the time, your deployment is created and a blade with your resource group will be open.
--- END OF LAB --Go back to the AzureCon Challenge web site (http://challenge.azurecon.com) and complete the challenge question to get your points.
REMEMBER: You only have one chance at the question, make sure you really know the answer!
Page | 4