Skip to content

Commit 9769435

Browse files
authored
Merge pull request #2842 from pareenaverma/content_review
New LP on creating a Cobalt 100 Linux VM with Azure Resource Manager
2 parents 70da33f + 2994494 commit 9769435

6 files changed

Lines changed: 779 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Deploy a Linux Cobalt 100 VM with Azure Resource Manager templates
3+
4+
draft: true
5+
cascade:
6+
draft: true
7+
8+
minutes_to_complete: 45
9+
10+
who_is_this_for: This is an introductory topic for developers and DevOps engineers who want to automate the deployment of Arm-based Cobalt 100 virtual machines using Azure Resource Manager templates.
11+
12+
learning_objectives:
13+
- Understand Azure Resource Manager template structure and syntax
14+
- Create a Azure Resource Manager template for deploying Cobalt 100 virtual machines
15+
- Deploy an Arm-based Linux VM using the template with Azure CLI
16+
- Configure SSH authentication for secure access
17+
18+
prerequisites:
19+
- A Microsoft Azure account with permissions to create virtual machines and resource groups
20+
- An SSH key pair for authentication
21+
22+
author: Pareena Verma
23+
24+
### Tags
25+
skilllevels: Introductory
26+
subjects: Containers and Virtualization
27+
armips:
28+
- Neoverse
29+
tools_software_languages:
30+
- Azure CLI
31+
- JSON
32+
operatingsystems:
33+
- Linux
34+
35+
further_reading:
36+
- resource:
37+
title: Azure Resource Manager documentation
38+
link: https://learn.microsoft.com/en-us/azure/azure-resource-manager/
39+
type: documentation
40+
- resource:
41+
title: Dpsv6 size series
42+
link: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series
43+
type: documentation
44+
- resource:
45+
title: Deploy a Cobalt 100 Virtual Machine on Azure
46+
link: https://learn.arm.com/learning-paths/servers-and-cloud-computing/cobalt/
47+
type: documentation
48+
49+
50+
### FIXED, DO NOT MODIFY
51+
# ================================================================================
52+
weight: 1 # _index.md always has weight of 1 to order correctly
53+
layout: "learningpathall" # All files under learning paths have this same wrapper
54+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
55+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 313 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,313 @@
1+
---
2+
title: Create the Resource Manager template
3+
weight: 3
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Azure Resource Manager template structure
10+
11+
An Azure Resource Manager template consists of several key sections:
12+
13+
- **$schema**: Defines the template language version
14+
- **contentVersion**: Your template's version number
15+
- **parameters**: Input values that customize the deployment
16+
- **variables**: Computed values used throughout the template
17+
- **resources**: Azure resources to create
18+
- **outputs**: Values returned after deployment
19+
20+
## Create the template file
21+
22+
Create a new file named `cobalt-vm-template.json` on your local machine. This template deploys a Cobalt 100 VM with all necessary networking components.
23+
24+
```json
25+
{
26+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
27+
"contentVersion": "1.0.0.0",
28+
"parameters": {
29+
"projectName": {
30+
"type": "string",
31+
"metadata": {
32+
"description": "Prefix for resource names"
33+
}
34+
},
35+
"location": {
36+
"type": "string",
37+
"defaultValue": "[resourceGroup().location]",
38+
"metadata": {
39+
"description": "Azure region for resources"
40+
}
41+
},
42+
"adminUsername": {
43+
"type": "string",
44+
"metadata": {
45+
"description": "Admin username for the VM"
46+
}
47+
},
48+
"adminPublicKey": {
49+
"type": "string",
50+
"metadata": {
51+
"description": "SSH public key for authentication"
52+
}
53+
},
54+
"vmSize": {
55+
"type": "string",
56+
"defaultValue": "Standard_D4ps_v6",
57+
"metadata": {
58+
"description": "Cobalt 100 VM size (Dpsv6 series)"
59+
}
60+
}
61+
},
62+
"variables": {
63+
"vNetName": "[concat(parameters('projectName'), '-vnet')]",
64+
"vNetAddressPrefixes": "10.0.0.0/16",
65+
"vNetSubnetName": "default",
66+
"vNetSubnetAddressPrefix": "10.0.0.0/24",
67+
"vmName": "[concat(parameters('projectName'), '-vm')]",
68+
"publicIPAddressName": "[concat(parameters('projectName'), '-ip')]",
69+
"networkInterfaceName": "[concat(parameters('projectName'), '-nic')]",
70+
"networkSecurityGroupName": "[concat(parameters('projectName'), '-nsg')]",
71+
"networkSecurityGroupName2": "[concat(variables('vNetSubnetName'), '-nsg')]"
72+
},
73+
"resources": [
74+
{
75+
"type": "Microsoft.Network/networkSecurityGroups",
76+
"apiVersion": "2023-04-01",
77+
"name": "[variables('networkSecurityGroupName')]",
78+
"location": "[parameters('location')]",
79+
"properties": {
80+
"securityRules": [
81+
{
82+
"name": "ssh_rule",
83+
"properties": {
84+
"description": "Allow SSH access",
85+
"protocol": "Tcp",
86+
"sourcePortRange": "*",
87+
"destinationPortRange": "22",
88+
"sourceAddressPrefix": "*",
89+
"destinationAddressPrefix": "*",
90+
"access": "Allow",
91+
"priority": 100,
92+
"direction": "Inbound"
93+
}
94+
}
95+
]
96+
}
97+
},
98+
{
99+
"type": "Microsoft.Network/publicIPAddresses",
100+
"apiVersion": "2023-04-01",
101+
"name": "[variables('publicIPAddressName')]",
102+
"location": "[parameters('location')]",
103+
"properties": {
104+
"publicIPAllocationMethod": "Dynamic"
105+
},
106+
"sku": {
107+
"name": "Basic"
108+
}
109+
},
110+
{
111+
"type": "Microsoft.Network/networkSecurityGroups",
112+
"apiVersion": "2023-04-01",
113+
"name": "[variables('networkSecurityGroupName2')]",
114+
"location": "[parameters('location')]",
115+
"properties": {
116+
"securityRules": [
117+
{
118+
"name": "default-allow-ssh",
119+
"properties": {
120+
"priority": 100,
121+
"access": "Allow",
122+
"direction": "Inbound",
123+
"destinationPortRange": "22",
124+
"protocol": "Tcp",
125+
"sourceAddressPrefix": "*",
126+
"sourcePortRange": "*",
127+
"destinationAddressPrefix": "*"
128+
}
129+
}
130+
]
131+
}
132+
},
133+
{
134+
"type": "Microsoft.Network/virtualNetworks",
135+
"apiVersion": "2023-04-01",
136+
"name": "[variables('vNetName')]",
137+
"location": "[parameters('location')]",
138+
"dependsOn": [
139+
"[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName2'))]"
140+
],
141+
"properties": {
142+
"addressSpace": {
143+
"addressPrefixes": [
144+
"[variables('vNetAddressPrefixes')]"
145+
]
146+
},
147+
"subnets": [
148+
{
149+
"name": "[variables('vNetSubnetName')]",
150+
"properties": {
151+
"addressPrefix": "[variables('vNetSubnetAddressPrefix')]",
152+
"networkSecurityGroup": {
153+
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName2'))]"
154+
}
155+
}
156+
}
157+
]
158+
}
159+
},
160+
{
161+
"type": "Microsoft.Network/networkInterfaces",
162+
"apiVersion": "2023-04-01",
163+
"name": "[variables('networkInterfaceName')]",
164+
"location": "[parameters('location')]",
165+
"dependsOn": [
166+
"[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]",
167+
"[resourceId('Microsoft.Network/virtualNetworks', variables('vNetName'))]",
168+
"[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
169+
],
170+
"properties": {
171+
"ipConfigurations": [
172+
{
173+
"name": "ipconfig1",
174+
"properties": {
175+
"privateIPAllocationMethod": "Dynamic",
176+
"publicIPAddress": {
177+
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
178+
},
179+
"subnet": {
180+
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNetName'), variables('vNetSubnetName'))]"
181+
}
182+
}
183+
}
184+
],
185+
"networkSecurityGroup": {
186+
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
187+
}
188+
}
189+
},
190+
{
191+
"type": "Microsoft.Compute/virtualMachines",
192+
"apiVersion": "2023-03-01",
193+
"name": "[variables('vmName')]",
194+
"location": "[parameters('location')]",
195+
"dependsOn": [
196+
"[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
197+
],
198+
"properties": {
199+
"hardwareProfile": {
200+
"vmSize": "[parameters('vmSize')]"
201+
},
202+
"osProfile": {
203+
"computerName": "[variables('vmName')]",
204+
"adminUsername": "[parameters('adminUsername')]",
205+
"linuxConfiguration": {
206+
"disablePasswordAuthentication": true,
207+
"ssh": {
208+
"publicKeys": [
209+
{
210+
"path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
211+
"keyData": "[parameters('adminPublicKey')]"
212+
}
213+
]
214+
}
215+
}
216+
},
217+
"storageProfile": {
218+
"imageReference": {
219+
"publisher": "Canonical",
220+
"offer": "ubuntu-24_04-lts",
221+
"sku": "server-arm64",
222+
"version": "latest"
223+
},
224+
"osDisk": {
225+
"createOption": "FromImage",
226+
"managedDisk": {
227+
"storageAccountType": "Premium_LRS"
228+
}
229+
}
230+
},
231+
"networkProfile": {
232+
"networkInterfaces": [
233+
{
234+
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
235+
}
236+
]
237+
}
238+
}
239+
}
240+
],
241+
"outputs": {
242+
"vmName": {
243+
"type": "string",
244+
"value": "[variables('vmName')]"
245+
},
246+
"resourceGroup": {
247+
"type": "string",
248+
"value": "[resourceGroup().name]"
249+
}
250+
}
251+
}
252+
```
253+
254+
## Key template elements for Cobalt 100
255+
256+
The template includes several Arm-specific configurations:
257+
258+
**VM size**: The `vmSize` parameter defaults to `Standard_D4ps_v6`, which is part of the Dpsv6 series powered by Cobalt 100 processors. This series provides:
259+
- Four vCPUs
260+
- General-purpose compute capabilities
261+
- Arm64 architecture
262+
263+
Other Cobalt 100 VM sizes include:
264+
- `Standard_D2ps_v6` (2 vCPUs)
265+
- `Standard_D8ps_v6` (8 vCPUs)
266+
- `Standard_D16ps_v6` (16 vCPUs)
267+
268+
**Image reference**: The `storageProfile` section specifies the operating system image with Arm64 architecture. You can choose from various Arm64-compatible Linux distributions available in Azure. The template uses Ubuntu 24.04 LTS:
269+
270+
```json
271+
"imageReference": {
272+
"publisher": "Canonical",
273+
"offer": "ubuntu-24_04-lts",
274+
"sku": "server-arm64",
275+
"version": "latest"
276+
}
277+
```
278+
279+
You can change the Arm64 image used in the `imageReference` section, for example:
280+
for Ubuntu 22.04 LTS:
281+
```json
282+
"imageReference": {
283+
"publisher": "Canonical",
284+
"offer": "0001-com-ubuntu-server-jammy",
285+
"sku": "22_04-lts-arm64",
286+
"version": "latest"
287+
}
288+
```
289+
290+
To find available Arm64 images for other Linux distributions, use:
291+
```bash
292+
az vm image list --all --architecture Arm64 --output table
293+
```
294+
295+
**SSH authentication**: The template configures SSH key authentication and disables password authentication for enhanced security:
296+
297+
```json
298+
"linuxConfiguration": {
299+
"disablePasswordAuthentication": true,
300+
"ssh": {
301+
"publicKeys": [
302+
{
303+
"path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
304+
"keyData": "[parameters('adminPublicKey')]"
305+
}
306+
]
307+
}
308+
}
309+
```
310+
311+
## What you've accomplished and what's next
312+
313+
You've created a complete Resource Manager template that defines the network infrastructure (virtual network, subnet, and network security groups), a public IP address for external access, a network interface, a Cobalt 100 VM with Ubuntu 24.04 LTS, and SSH key authentication for secure access. The template uses parameters for flexibility, allowing you to customize the deployment without modifying the template structure. In the next section, you'll deploy this template to Azure and connect to your new Cobalt 100 VM.

0 commit comments

Comments
 (0)