Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Deploy a Linux Cobalt 100 VM with Azure Resource Manager templates

draft: true
cascade:
draft: true

minutes_to_complete: 45

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.

learning_objectives:
- Understand Azure Resource Manager template structure and syntax
- Create a Azure Resource Manager template for deploying Cobalt 100 virtual machines
- Deploy an Arm-based Linux VM using the template with Azure CLI
- Configure SSH authentication for secure access

prerequisites:
- A Microsoft Azure account with permissions to create virtual machines and resource groups
- An SSH key pair for authentication

author: Pareena Verma

### Tags
skilllevels: Introductory
subjects: Containers and Virtualization
armips:
- Neoverse
tools_software_languages:
- Azure CLI
- JSON
operatingsystems:
- Linux

further_reading:
- resource:
title: Azure Resource Manager documentation
link: https://learn.microsoft.com/en-us/azure/azure-resource-manager/
type: documentation
- resource:
title: Dpsv6 size series
link: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series
type: documentation
- resource:
title: Deploy a Cobalt 100 Virtual Machine on Azure
link: https://learn.arm.com/learning-paths/servers-and-cloud-computing/cobalt/
type: documentation


### FIXED, DO NOT MODIFY
# ================================================================================
weight: 1 # _index.md always has weight of 1 to order correctly
layout: "learningpathall" # All files under learning paths have this same wrapper
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# ================================================================================
# FIXED, DO NOT MODIFY THIS FILE
# ================================================================================
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
title: "Next Steps" # Always the same, html page title.
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
---
title: Create the Resource Manager template
weight: 3

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Azure Resource Manager template structure

An Azure Resource Manager template consists of several key sections:

- **$schema**: Defines the template language version
- **contentVersion**: Your template's version number
- **parameters**: Input values that customize the deployment
- **variables**: Computed values used throughout the template
- **resources**: Azure resources to create
- **outputs**: Values returned after deployment

## Create the template file

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.

```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"projectName": {
"type": "string",
"metadata": {
"description": "Prefix for resource names"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Azure region for resources"
}
},
"adminUsername": {
"type": "string",
"metadata": {
"description": "Admin username for the VM"
}
},
"adminPublicKey": {
"type": "string",
"metadata": {
"description": "SSH public key for authentication"
}
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_D4ps_v6",
"metadata": {
"description": "Cobalt 100 VM size (Dpsv6 series)"
}
}
},
"variables": {
"vNetName": "[concat(parameters('projectName'), '-vnet')]",
"vNetAddressPrefixes": "10.0.0.0/16",
"vNetSubnetName": "default",
"vNetSubnetAddressPrefix": "10.0.0.0/24",
"vmName": "[concat(parameters('projectName'), '-vm')]",
"publicIPAddressName": "[concat(parameters('projectName'), '-ip')]",
"networkInterfaceName": "[concat(parameters('projectName'), '-nic')]",
"networkSecurityGroupName": "[concat(parameters('projectName'), '-nsg')]",
"networkSecurityGroupName2": "[concat(variables('vNetSubnetName'), '-nsg')]"
},
"resources": [
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2023-04-01",
"name": "[variables('networkSecurityGroupName')]",
"location": "[parameters('location')]",
"properties": {
"securityRules": [
{
"name": "ssh_rule",
"properties": {
"description": "Allow SSH access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "22",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 100,
"direction": "Inbound"
}
}
]
}
},
{
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2023-04-01",
"name": "[variables('publicIPAddressName')]",
"location": "[parameters('location')]",
"properties": {
"publicIPAllocationMethod": "Dynamic"
},
"sku": {
"name": "Basic"
}
},
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2023-04-01",
"name": "[variables('networkSecurityGroupName2')]",
"location": "[parameters('location')]",
"properties": {
"securityRules": [
{
"name": "default-allow-ssh",
"properties": {
"priority": 100,
"access": "Allow",
"direction": "Inbound",
"destinationPortRange": "22",
"protocol": "Tcp",
"sourceAddressPrefix": "*",
"sourcePortRange": "*",
"destinationAddressPrefix": "*"
}
}
]
}
},
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2023-04-01",
"name": "[variables('vNetName')]",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName2'))]"
],
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('vNetAddressPrefixes')]"
]
},
"subnets": [
{
"name": "[variables('vNetSubnetName')]",
"properties": {
"addressPrefix": "[variables('vNetSubnetAddressPrefix')]",
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName2'))]"
}
}
}
]
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2023-04-01",
"name": "[variables('networkInterfaceName')]",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', variables('vNetName'))]",
"[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
},
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vNetName'), variables('vNetSubnetName'))]"
}
}
}
],
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
}
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2023-03-01",
"name": "[variables('vmName')]",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"osProfile": {
"computerName": "[variables('vmName')]",
"adminUsername": "[parameters('adminUsername')]",
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {
"publicKeys": [
{
"path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
"keyData": "[parameters('adminPublicKey')]"
}
]
}
}
},
"storageProfile": {
"imageReference": {
"publisher": "Canonical",
"offer": "ubuntu-24_04-lts",
"sku": "server-arm64",
"version": "latest"
},
"osDisk": {
"createOption": "FromImage",
"managedDisk": {
"storageAccountType": "Premium_LRS"
}
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
}
]
}
}
}
],
"outputs": {
"vmName": {
"type": "string",
"value": "[variables('vmName')]"
},
"resourceGroup": {
"type": "string",
"value": "[resourceGroup().name]"
}
}
}
```

## Key template elements for Cobalt 100

The template includes several Arm-specific configurations:

**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:
- Four vCPUs
- General-purpose compute capabilities
- Arm64 architecture

Other Cobalt 100 VM sizes include:
- `Standard_D2ps_v6` (2 vCPUs)
- `Standard_D8ps_v6` (8 vCPUs)
- `Standard_D16ps_v6` (16 vCPUs)

**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:

```json
"imageReference": {
"publisher": "Canonical",
"offer": "ubuntu-24_04-lts",
"sku": "server-arm64",
"version": "latest"
}
```

You can change the Arm64 image used in the `imageReference` section, for example:
for Ubuntu 22.04 LTS:
```json
"imageReference": {
"publisher": "Canonical",
"offer": "0001-com-ubuntu-server-jammy",
"sku": "22_04-lts-arm64",
"version": "latest"
}
```

To find available Arm64 images for other Linux distributions, use:
```bash
az vm image list --all --architecture Arm64 --output table
```

**SSH authentication**: The template configures SSH key authentication and disables password authentication for enhanced security:

```json
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {
"publicKeys": [
{
"path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
"keyData": "[parameters('adminPublicKey')]"
}
]
}
}
```

## What you've accomplished and what's next

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.
Loading