Create ready-to-code dev boxes using config as code – now in preview

This post has been republished via RSS; it originally appeared at: Azure Developer Community Blog articles.


At the Microsoft Build conference last week, my team shared that this July we’ll ship the general availability (GA) release of Microsoft Dev Box - our service for secure, ready-to-code cloud hosted workstations. Looking ahead to what’s next, today I’m sharing with you an invitation to try out a new config-as-code customization feature that we’re adding to Microsoft Dev Box. With the introduction of features that revolve around a devbox.yaml file, the process of defining what is needed on a dev box is as easy as submitting a code change.


Today, Microsoft Dev Box uses VM images to define ready-to-code dev boxes; customization features build on top of this, enabling devs to self-serve customize their machines by adding a few additional pieces of software or configuration. Developers can create devbox.yaml files that specify additional configuration on top of a VM base image and IT/Dev Infrastructure teams have the ability to curate the software and settings that developers can use. This combination helps teams ensure their dev boxes meet the unique compliance requirements of their organization. Read on to learn more and sign-up for the Private Preview 1 release.


Sign-up for Customizations Private Preview


Authoring a Dev Box

Let me introduce you to devbox.yaml, the new file format you’ll use to customize a dev box:


name: contoso-widgets image: microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win11-m365-gen2 hostInformation: general_a_8c32gb256ssd_v1 setupTasks: - task: choco inputs: install: azd - task: install-vs-extension inputs: extension: GitHub.copilotvs


First, you define a base VM image to use – here we’re using a default Visual Studio image that is included with Microsoft Dev Box; often you’ll use some base images built by your IT or Dev Infrastructure team. You also choose the combination of storage, CPU, and memory you want to use for the host. These are the same sorts of settings you can configure with the GA release of Microsoft Dev Box.


Next, we get into the core of the new customization functionality – setupTasks. This is where you’ll specify additional software to install, and settings to apply when creating a new VM. In this example, I’m using a choco task to install the Azure Developer CLI using the Chocolatey package manager. I’m also adding the GitHub Copilot extension to Visual Studio 2022.


Finally, this devbox.yaml file can be checked into a Git repo in either GitHub or Azure DevOps, and then made available to the dev team as a pool for creating new VMs. In our initial Private Preview 1, these repos are managed centrally for all Projects in a Dev Center. In upcoming previews, we’ll make it possible to store these devbox.yaml files alongside your project source code.


Tasks, the building blocks of a Dev Box

Tasks, as you just saw, are like building blocks for your Dev Box. You can combine them to create a development VM that’s unique to your team. To start, we include a default set of tasks to help with common setup steps:

  • Installing software with the WinGet or Chocolatey package managers
  • Setting common OS settings like enabling Windows Features
  • Configuring applications like installing Visual Studio extensions

Companies and development teams adopting Microsoft Dev Box can then add on top of this default set, or even choose to replace the set completely to fit their requirements.


Using tasks to help meet compliance needs

Every company is unique, and many have specific requirements around data use, privacy, and governmental compliance. Customization tasks help engineering organizations curate and define the types of installation and configuration settings that development teams can safely use to remain compliant. Think of it as pre-assembling the kits of building blocks that teams can use to build their dev box VMs.


Using WinGet configuration to customize your dev box

Last week, the Windows team announced a wonderful new feature now in preview – WinGet Configuration. Using WinGet Configuration, you can also use a config-as-code approach to define the unique sets of software and configuration settings required to get a Windows environment in a ready-to-code state for repos that you work on. The configuration files can also be used to setup a VM in Microsoft Dev Box, by leveraging a WinGet task that we include with the default set of setupTasks mentioned earlier:


task: winget inputs: configure: "projectConfiguration.dsc.yaml"


Sign-up for the Private Preview

Our Customizations Private Preview 1 release is coming soon for Microsoft Dev Box users to try out and share your feedback. You can sign-up now and we’ll let you know as soon as it’s ready to use. If you aren’t an existing Microsoft Dev Box user, you can still sign-up and then follow our Getting Started instructions to setup your own instance of Microsoft Dev Box so you can try out the new Preview release once it’s ready.


Sign-up for Customizations Private Preview

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.