You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/dev-box/quickstart-configure-dev-box-arm-template.md
+49-47Lines changed: 49 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.topic: quickstart-arm
7
7
ms.custom: subject-armqs, devx-track-arm-template
8
8
author: RoseHJM
9
9
ms.author: rosemalcolm
10
-
ms.date: 09/20/2023
10
+
ms.date: 11/28/2023
11
11
#Customer intent: As an enterprise admin, I want to understand how to create and configure dev box components with an ARM template so that I can provide dev box projects for my users.
12
12
---
13
13
@@ -17,22 +17,27 @@ This quickstart describes how to use an Azure Resource Manager (ARM) template to
This [Dev Box with customized image](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.devcenter/devbox-with-customized-image) template deploys a simple Dev Box environment that you can use for testing and exploring the service.
21
+
22
+
It creates the following Dev Box resources: dev center, project, network connection, dev box definition, and dev box pool. Once the template is deployed, you can go to the [developer portal](https://aka.ms/devbox-portal) to [create your dev box](quickstart-create-dev-box.md).
23
+
20
24
If your environment meets the prerequisites and you're familiar with using ARM templates, select the
21
25
**Deploy to Azure** button. The template opens in the Azure portal.
22
26
23
-
:::image type="content" source="../media/template-deployments/deploy-to-azure.svg" alt-text="Screenshot of the Deploy to Azure button to deploy resources with a template." link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.devcenter%2Fdevbox-with-builtin-image%2Fazuredeploy.json":::
27
+
:::image type="content" source="../media/template-deployments/deploy-to-azure.svg" alt-text="Screenshot of the Deploy to Azure button to deploy resources with a template." link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.devcenter%2Fdevbox-with-customized-image%2Fazuredeploy.json":::
24
28
25
29
## Prerequisites
26
30
27
31
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
28
32
- Owner or Contributor role on an Azure subscription or resource group.
29
33
- Microsoft Entra AD. Your organization must use Microsoft Entra AD for identity and access management.
34
+
- Microsoft Intune subscription. Your organization must use Microsoft Intune for device management.
30
35
31
36
## Review the template
32
37
33
-
The template used in this QuickStart is from [Azure Quickstart Templates](/samples/azure/azure-quickstart-templates/devbox-with-builtin-image/)
38
+
The template used in this QuickStart is from [Azure Quickstart Templates](/samples/azure/azure-quickstart-templates/devbox-with-customized-image/).
The template for this article is too long to show here. To view the template, see [azuredeploy.json](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.devcenter/devbox-with-customized-image/azuredeploy.json)
36
41
37
42
Multiple Azure resources are defined in the template:
38
43
@@ -42,40 +47,29 @@ Multiple Azure resources are defined in the template:
42
47
-[Microsoft.DevCenter/projects](/azure/templates/microsoft.devcenter/projects): create a project.
43
48
-[Microsoft.DevCenter/networkConnections](/azure/templates/microsoft.devcenter/networkConnections): create a network connection.
44
49
-[Microsoft.DevCenter/devcenters/devboxdefinitions](/azure/templates/microsoft.devcenter/devcenters/devboxdefinitions): create a dev box definition.
50
+
-[Microsoft.DevCenter/devcenters/galleries](/azure/templates/microsoft.devcenter/devcenters/galleries): create an Azure Compute Gallery.
45
51
-[Microsoft.DevCenter/projects/pools](/azure/templates/microsoft.devcenter/projects/pools): create a dev box pool.
46
52
47
-
### Find more templates
48
-
49
-
To find more templates that are related to Microsoft Dev Box, see [Azure Quickstart Templates](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.devcenter).
50
-
51
-
For example, the [Dev Box with customized image](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.devcenter/devbox-with-customized-image) template creates the following Dev Box resources: dev center, project, network connection, dev box definition, and dev box pool. You can then go to the [developer portal](https://aka.ms/devbox-portal) to [create your dev box](quickstart-create-dev-box.md).
52
-
53
-
Next, you can use a template to [add other customized images for Base, Java, .NET and Data](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.devcenter/devbox-with-customized-image#add-other-customized-image-for-base-java-net-and-data). These images have the following software and tools installed:
54
-
55
-
56
-
|Image type |Software and tools |
57
-
|---------|---------|
58
-
|Base |Git, Azure CLI, VS Code, VS Code Extension for GitHub Copilot |
59
-
|Java |Git, Azure CLI, VS Code, Maven, OpenJdk11, VS Code Extension for Java Pack |
60
-
|.NET |Git, Azure CLI, VS Code,.NET SDK, Visual Studio |
61
-
|Data |Git, Azure CLI, VS Code,Python 3, VS Code Extension for Python and Jupyter |
62
-
63
53
## Deploy the template
64
54
65
55
1. Select **Open Cloudshell** from the following code block to open Azure Cloud Shell, and then follow the instructions to sign in to Azure.
66
56
67
57
```azurepowershell-interactive
68
-
$vnetAddressPrefixes = Read-Host -Prompt "Enter a vnet address prefixes like 10.0.0.0/16"
69
-
$subnetAddressPrefixes = Read-Host -Prompt "Enter a vnet address prefixes like 10.0.0.0/24"
70
-
$location = Read-Host -Prompt "Enter the location (e.g. eastus)"
Write-Host "After all the resources are provisioned, go to https://devportal.microsoft.com/ to create a Dev Box. You can also refer to this guide: [Quickstart: Create a dev box - Microsoft Dev Box | Microsoft Learn](https://learn.microsoft.com/azure/dev-box/quickstart-create-dev-box)."
78
-
Write-Host "Press [ENTER] to continue."
58
+
$userPrincipalName = Read-Host "Please enter user principal name e.g. [email protected]"
59
+
$resourceGroupName = Read-Host "Please enter resource group name e.g. rg-devbox-dev"
60
+
$location = Read-Host "Please enter region name e.g. eastus"
az group create -l $location -n $resourceGroupName
66
+
az group deployment create -g $resourceGroupName --template-uri $templateUri --parameters userPrincipalId=$userPrincipalId
67
+
}else {
68
+
Write-Host "User Principal Name cannot be found."
69
+
}
70
+
71
+
Write-Host "Provisioning Completed."
72
+
79
73
```
80
74
81
75
Wait until you see the prompt from the console.
@@ -84,40 +78,48 @@ Next, you can use a template to [add other customized images for Base, Java, .NE
84
78
3. Right-click the shell console pane and then select **Paste**.
85
79
4. Enter the values.
86
80
87
-
It takes about 10 minutes to deploy the template. When completed, the output is similar to:
88
-
89
-
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/dev-box-template-output.png" alt-text="Screenshot showing the output of the template.":::
81
+
It takes about 30 minutes to deploy the template.
90
82
91
83
Azure PowerShell is used to deploy the template. You can also use the Azure portal and Azure CLI. To learn other deployment methods, see [Deploy templates](../azure-resource-manager/templates/deploy-portal.md).
92
84
93
-
#### Depending on your configuration, you may want to change the following parameters:
85
+
###Required parameters:
94
86
95
-
-*Resource group name:* The default resource group name is “rg-devbox-test”; you can change it by editing `$resourceGroupName = "rg-devbox-test` in the template.
87
+
-*User Principal ID*: The user principal ID of the user or group that is granted the *Devcenter Dev Box User* role.
88
+
-*User Principal Type*: The type of user principal. Valid values are *User* or *Group*.
89
+
-*Location*: The location where the resources are deployed. Choose a location close to the dev boxes users to reduce latency.
96
90
97
-
-*Subnet:* If you have an existing subnet, you can use the parameter `-existingSubnetId`to pass the existing subnet ID. The template doesn't create a new Virtual network and subnet if you specify an existing one.
91
+
Alternatively, you can provide access to a dev box project in the Azure portal, see [Provide user-level access to projects for developers](how-to-dev-box-user.md).
98
92
99
-
-*Dev Box User role:* To grant the role [*DevCenter Dev Box User*](how-to-dev-box-user.md) to your user at Dev box project level, pass the principal ID to the `-principalId` parameter.
100
-
-**User:** You can find the principal ID listed as the object ID on the user Overview page.
101
-
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/user-object-id.png" alt-text="Screenshot showing the user overview page with object ID highlighted.":::
102
-
-**Group:** You can find the principal ID listed as the object ID on the group Overview page.
103
-
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/group-object-id.png" alt-text="Screenshot showing the group overview page with object ID highlighted.":::
93
+
### Virtual network security considerations
94
+
95
+
Planning for a Microsoft Dev Box deployment covers many areas, including securing the virtual network (VNet). For more information, see [Azure network security overview](../security/fundamentals/network-overview.md).
104
96
105
-
Alternatively, you can provide access to a dev box project in the Azure portal, see [Provide user-level access to projects for developers](how-to-dev-box-user.md)
106
-
107
97
## Review deployed resources
108
98
109
99
1. Sign in to the [Azure portal](https://portal.azure.com).
110
100
2. Select **Resource groups** from the left pane.
111
101
3. Select the resource group that you created in the previous section.
112
102
113
-
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/dev-box-template-resources.png" alt-text="Screenshot showing the newly created dev box resource group and the resources it contains in the Azure portal.":::
114
-
115
-
1. Select the Dev Center. Its default name is dc-*resource-token*.
103
+
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/dev-box-template-resources.png" alt-text="Screenshot showing the newly created dev box resource group and the resources it contains in the Azure portal." lightbox="media/quickstart-configure-dev-box-arm-template/dev-box-template-resources.png":::
116
104
117
105
## Clean up resources
118
106
119
107
When you no longer need them, delete the resource group: Go to the Azure portal, select the resource group that contains these resources, and then select Delete.
120
108
109
+
## Find more templates
110
+
111
+
To find more templates that are related to Microsoft Dev Box, see [Azure Quickstart Templates](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.devcenter).
112
+
113
+
For example, you can use a template to [add other customized images for Base, Java, .NET and Data](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.devcenter/devbox-with-customized-image#add-other-customized-image-for-base-java-net-and-data). These images have the following software and tools installed:
114
+
115
+
116
+
|Image type |Software and tools |
117
+
|---------|---------|
118
+
|Base |Git, Azure CLI, VS Code, VS Code Extension for GitHub Copilot |
119
+
|Java |Git, Azure CLI, VS Code, Maven, OpenJdk11, VS Code Extension for Java Pack |
120
+
|.NET |Git, Azure CLI, VS Code,.NET SDK, Visual Studio |
121
+
|Data |Git, Azure CLI, VS Code,Python 3, VS Code Extension for Python and Jupyter |
122
+
121
123
## Next steps
122
124
123
125
-[Quickstart: Create a dev box](quickstart-create-dev-box.md)
0 commit comments