Skip to content

Commit 0389aae

Browse files
committed
make it compliant with the arm quickstart guidance
1 parent 5a24bc2 commit 0389aae

File tree

3 files changed

+38
-84
lines changed

3 files changed

+38
-84
lines changed

articles/virtual-machine-scale-sets/TOC.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
href: quick-create-cli.md
1414
- name: Create with Azure PowerShell
1515
href: quick-create-powershell.md
16-
- name: Create with a template
16+
- name: Create with ARM template
1717
items:
1818
- name: Linux scale set
19+
displayName: ARM, resource manager
1920
href: quick-create-template-linux.md
2021
- name: Windows scale set
22+
displayName: ARM, resource manager
2123
href: quick-create-template-windows.md
2224
- name: Tutorials
2325
items:
@@ -229,7 +231,7 @@
229231
- name: Extension sequencing
230232
href: disk-encryption-extension-sequencing.md
231233
- name: Key vault for Azure Disk Encryption
232-
href: disk-encryption-key-vault.md
234+
href: disk-encryption-key-vault.md
233235
- name: Work with large scale sets
234236
href: virtual-machine-scale-sets-placement-groups.md
235237
- name: Convert a scale set template to use managed disk
-13.6 KB
Loading

articles/virtual-machine-scale-sets/quick-create-template-linux.md

Lines changed: 34 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,47 @@
11
---
2-
title: Quickstart - Create a Linux virtual machine scale set with an Azure template
2+
title: Quickstart - Create a Linux virtual machine scale set with an Azure Resource Manager template
33
description: Learn how to quickly create a Linux virtual machine scale with an Azure Resource Manager template that deploys a sample app and configures autoscale rules
44
author: cynthn
55
tags: azure-resource-manager
66
ms.service: virtual-machine-scale-sets
77
ms.topic: quickstart
8-
ms.custom: mvc
9-
ms.date: 03/27/2018
8+
ms.custom: mvc,subject-armqs
9+
ms.date: 03/26/2020
1010
ms.author: cynthn
1111

1212
---
1313

14-
# Quickstart: Create a Linux virtual machine scale set with an Azure template
14+
# Quickstart: Create a Linux virtual machine scale set with an Azure Resource Manager template
15+
1516
A virtual machine scale set allows you to deploy and manage a set of identical, auto-scaling virtual machines. You can scale the number of VMs in the scale set manually, or define rules to autoscale based on resource usage like CPU, memory demand, or network traffic. An Azure load balancer then distributes traffic to the VM instances in the scale set. In this quickstart, you create a virtual machine scale set and deploy a sample application with an Azure Resource Manager template.
1617

18+
[!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-introduction.md)]
19+
1720
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
1821

19-
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
22+
## Prerequisites
23+
24+
None.
25+
26+
## Create a scale set
27+
28+
Azure Resource Manager templates let you deploy groups of related resources. In a single template, you can create the virtual machine scale set, install applications, and configure autoscale rules. With the use of variables and parameters, this template can be reused to update existing, or create additional, scale sets. You can deploy templates through the Azure portal, Azure CLI, or Azure PowerShell, or from continuous integration / continuous delivery (CI/CD) pipelines.
29+
30+
### Review the template
2031

21-
If you choose to install and use the CLI locally, this tutorial requires that you are running the Azure CLI version 2.0.29 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI]( /cli/azure/install-azure-cli).
32+
The template used in this quickstart is from [Azure Quickstart templates](https://azure.microsoft.com/resources/templates/201-vmss-bottle-autoscale/).
2233

34+
:::code language="json" source="~/quickstart-templates/201-vmss-bottle-autoscale/azuredeploy.json" range="1-330" highlight="176-264":::
2335

24-
## Define a scale set in a template
25-
Azure Resource Manager templates let you deploy groups of related resources. Templates are written in JavaScript Object Notation (JSON) and define the entire Azure infrastructure environment for your application. In a single template, you can create the virtual machine scale set, install applications, and configure autoscale rules. With the use of variables and parameters, this template can be reused to update existing, or create additional, scale sets. You can deploy templates through the Azure portal, Azure CLI, or Azure PowerShell, or from continuous integration / continuous delivery (CI/CD) pipelines.
36+
These resources are defined in the template:
2637

27-
For more information on templates, see [Azure Resource Manager overview](https://docs.microsoft.com/azure/azure-resource-manager/template-deployment-overview#template-deployment-process). For JSON syntax and properties, see [Microsoft.Compute/virtualMachineScaleSets](/azure/templates/microsoft.compute/virtualmachinescalesets) template reference.
38+
- [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualnetworks)
39+
- [**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses)
40+
- [**Microsoft.Network/loadBalancers**](/azure/templates/microsoft.network/loadbalancers)
41+
- [**Microsoft.Compute/virtualMachineScaleSets**](/azure/templates/microsoft.compute/virtualmachinescalesets)
42+
- [**Microsoft.Insights/autoscaleSettings**](/azure/templates/microsoft.insights/autoscalesettings)
2843

29-
To create a scale with a template, you define the appropriate resources. The core parts of the virtual machine scale set resource type are:
44+
The highlighted portion is the scale set resource definition. To create a scale with a template, you define the appropriate resources. The core parts of the virtual machine scale set resource type are:
3045

3146
| Property | Description of property | Example template value |
3247
|------------------------------|----------------------------------------------------------|-------------------------------------------|
@@ -41,49 +56,8 @@ To create a scale with a template, you define the appropriate resources. The cor
4156
| osProfile.adminUsername | The username for each VM instance | azureuser |
4257
| osProfile.adminPassword | The password for each VM instance | P@ssw0rd! |
4358

44-
The following example shows the core scale set resource definition. To customize a scale set template, you can change the VM size or initial capacity, or use a different platform or a custom image.
45-
46-
```json
47-
{
48-
"type": "Microsoft.Compute/virtualMachineScaleSets",
49-
"name": "myScaleSet",
50-
"location": "East US",
51-
"apiVersion": "2017-12-01",
52-
"sku": {
53-
"name": "Standard_A1",
54-
"capacity": "2"
55-
},
56-
"properties": {
57-
"upgradePolicy": {
58-
"mode": "Automatic"
59-
},
60-
"virtualMachineProfile": {
61-
"storageProfile": {
62-
"osDisk": {
63-
"caching": "ReadWrite",
64-
"createOption": "FromImage"
65-
},
66-
"imageReference": {
67-
"publisher": "Canonical",
68-
"offer": "UbuntuServer",
69-
"sku": "16.04-LTS",
70-
"version": "latest"
71-
}
72-
},
73-
"osProfile": {
74-
"computerNamePrefix": "myvmss",
75-
"adminUsername": "azureuser",
76-
"adminPassword": "P@ssw0rd!"
77-
}
78-
}
79-
}
80-
}
81-
```
82-
83-
To keep the sample short, the virtual network interface card (NIC) configuration is not shown. Additional components, such as a load balancer, are also not shown. A complete scale set template is shown [at the end of this article](#deploy-the-template).
84-
59+
To customize a scale set template, you can change the VM size or initial capacity, or use a different platform or a custom image.
8560

86-
## Add a sample application
8761
To test your scale set, install a basic web application. When you deploy a scale set, VM extensions can provide post-deployment configuration and automation tasks, such as installing an app. Scripts can be downloaded from Azure storage or GitHub, or provided to the Azure portal at extension run-time. To apply an extension to your scale set, you add the *extensionProfile* section to the preceding resource example. The extension profile typically defines the following properties:
8862

8963
- Extension type
@@ -92,40 +66,17 @@ To test your scale set, install a basic web application. When you deploy a scale
9266
- Location of configuration or install scripts
9367
- Commands to execute on the VM instances
9468

95-
The [Python HTTP server on Linux](https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-bottle-autoscale) template uses the Custom Script Extension to install [Bottle](https://bottlepy.org/docs/dev/), a Python web framework, and a simple HTTP server.
96-
97-
Two scripts are defined in **fileUris** - *installserver.sh*, and *workserver.py*. These files are downloaded from GitHub, then *commandToExecute* runs `bash installserver.sh` to install and configure the app:
98-
99-
```json
100-
"extensionProfile": {
101-
"extensions": [
102-
{
103-
"name": "AppInstall",
104-
"properties": {
105-
"publisher": "Microsoft.Azure.Extensions",
106-
"type": "CustomScript",
107-
"typeHandlerVersion": "2.0",
108-
"autoUpgradeMinorVersion": true,
109-
"settings": {
110-
"fileUris": [
111-
"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-bottle-autoscale/installserver.sh",
112-
"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-bottle-autoscale/workserver.py"
113-
],
114-
"commandToExecute": "bash installserver.sh"
115-
}
116-
}
117-
}
118-
]
119-
}
120-
```
69+
The template uses the Custom Script Extension to install [Bottle](https://bottlepy.org/docs/dev/), a Python web framework, and a simple HTTP server.
70+
71+
Two scripts are defined in **fileUris** - *installserver.sh*, and *workserver.py*. These files are downloaded from GitHub, then *commandToExecute* runs `bash installserver.sh` to install and configure the app.
12172

73+
### Deploy the template
12274

123-
## Deploy the template
124-
You can deploy the [Python HTTP server on Linux](https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-bottle-autoscale) template with the following **Deploy to Azure** button. This button opens the Azure portal, loads the complete template, and prompts for a few parameters such as a scale set name, instance count, and admin credentials.
75+
You can deploy the template by selecting the following **Deploy to Azure** button. This button opens the Azure portal, loads the complete template, and prompts for a few parameters such as a scale set name, instance count, and admin credentials.
12576

12677
[![Deploy template to Azure](media/virtual-machine-scale-sets-create-template/deploy-button.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F201-vmss-bottle-autoscale%2Fazuredeploy.json)
12778

128-
You can also use the Azure CLI to install the Python HTTP server on Linux with [az group deployment create](/cli/azure/group/deployment) as follows:
79+
You can also deploy a Resource Manager template by using Azure CLI:
12980

13081
```azurecli-interactive
13182
# Create a resource group
@@ -140,7 +91,8 @@ az group deployment create \
14091
Answer the prompts to provide a scale set name, instance count, and admin credentials for the VM instances. It takes a few minutes for the scale set and supporting resources to be created.
14192

14293

143-
## Test your scale set
94+
## Validate the deployment
95+
14496
To see your scale set in action, access the sample web application in a web browser. Obtain the public IP address of the load balancer with [az network public-ip list](/cli/azure/network/public-ip) as follows:
14597

14698
```azurecli-interactive

0 commit comments

Comments
 (0)