This repository contains the necessary configuration to create Microsoft Dev Boxes to use as developer workstations for workshop participants in Cloud-akademiet.
👉 If you are an end user jump directly down to end user usage.
This section is inteded for those who are deploying and managing Dev Center, Dev Box definitions and Dev Box pools.
- PowerShell 7.x (tested with 7.5.1)
- Bicep tools (tested with Bicep 0.35.1)
- Owner role assignment on an Azure subscription with the
Microsoft.DevCenter
provider registered- How to: Register Resource Provider Microsoft.DevCenter
- How to: Assign Roles in the Azure portal
- Note that the quota for DevBoxes General vCPUs in your region might need an increase if you are planning on deploying many. Follow this guide to request a increase if needed.
- Configure parameters in main.bicepparam and save the file
- Sign into the tenant by running
Connect-AzAccount -Tenant <tenant-id>
in PowerShell and ensure you select the appropriate subscription for deployment. - Choose the desired subscription with
Set-AzContext -Subscription <subscription name or id>
- Run the deployment with:
New-AzDeployment -Name "devbox-$(get-date -Format 'ddMMyy-HHmmss')" -Location 'westeurope' -TemplateFile './bicep/main.bicep' -TemplateParameterFile './bicep/main.bicepparam'
Note: You can optionally replace Azure PowerShell with Azure CLI to deploy using az login
and az deployment sub create
.
The Dev Box definitions are set up as specified in main.bicepparam with:
- Windows 11 24H2 with Visual Studio 2022 Enterprise image
- 8 vCPU, 32 GB RAM, 256 GB SSD storage
- Single-sign on enabled
- Hibernate support with automatic hibernation after 60m of inactivity
- Users are given local administrator
The VMs have by default this list of available software preinstalled.
Additionally they have a set of customizations defined in this file.
For the given size the pricing per DevBox is approximately:
SKU | Max Monthly Price | Hourly Compute | Monthly Storage |
---|---|---|---|
8 vCPU, 32 GB RAM, 256 GB Storage | kr1,564.31 | kr16.87 | kr215.07 |
Note that when a Dev Box's total cost (including its monthly storage and hourly compute) reaches the level of the max monthly price of that instance for that month, billing will automatically stop for that Dev Box instance.
As a cost-saving measurement a forced hibernation is run on a schedule.
This section is inteded for those who are provided access to provision their own Dev Boxes for development.
- Sign into the Developer Portal: https://devportal.microsoft.com/
- Press + New and select New Dev Box
- Give the Dev Box a name, e.g.
devbox-<firstname>
- Select Apply customizations and then press Continue
- Select Create to begin provisioning your Dev Box (can take 30-45 minutes)
For additional guide, see the official docs.
- Sign into the Developer Portal: https://devportal.microsoft.com/
- Press Open in RDP Client on the Dev Box
- Choose Connect via Windows App
- If you do not have the Windows App, press the link to download and install this app
- Press Connect to connect to your Dev Box
- Enter your Sopra Steria username and password to login
For additional guide, see the official docs
Upon the initial boot there will be some installations that will automatically start:
- Accept the prompt for installing SQL Server 2022 Express
- Wait for the installation of SQL Server 2022 Express to complete
You can disregard any Sopra Steria-branded software pop-ups (not needed for this workshop).
You will for a later part of the workshop need to install Rancher Desktop. To do this:
- Open the Terminal application
- Run
winget install SUSE.RancherDesktop
and select 'Y' to accept the installation - Accept the administrator prompt to continue the install (there might be two prompts here!)
- Restart the Dev Box and reconnect after a couple of minutes
- Open 'Rancher Desktop' (you don't need to enable Kubernetes) and ensure it runs
- Open the Terminal application and run
docker run hello-world
. It should show the following content:
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
- Restart machine: In case of required restarts after installations or updates you can restart via Windows menu after connecting, wait a few minutes and then connect again. You can also restart the machine via the Developer Portal.
- Install missing software: Use
winget
to install software. See list of required packages in this script that should already be installed during provisioning. You can search all available software for Winget here. - Update software: Use
winget upgrade
to upgrade Software. You can also run Windows Update in settings to trigger system updates. - Hibernation: The machine is set to hibernate after 60m of inactivity. This is to ensure cost efficiency and not to pay for the machine while it is not in use.
- Visual Studio versions: The machine already have Visual Studio Professional 2022 installed. If you do not have an license and want to use the community version this will show as "Visual Studio 2022 - Community" in the applications overview.
Feel free to contribute to this repo. Contact @matsest if you have any questions.