Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brandonh-msft/custom-dev-box
https://github.com/brandonh-msft/custom-dev-box
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/brandonh-msft/custom-dev-box
- Owner: brandonh-msft
- License: gpl-3.0
- Created: 2024-02-01T03:32:40.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-17T18:21:24.000Z (7 months ago)
- Last Synced: 2024-05-29T17:13:03.690Z (5 months ago)
- Language: PowerShell
- Size: 206 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Customized Image creation and deployment to Microsoft Dev Box
This repository contains the necessary files & scripts to create a custom image and deploy it to a Microsoft Dev Box.
## Contents
`1.Setup.ps1`
* Applies Timezone redirection settings so local time is redirected to the remote machine
* Applies various Windows Optimizations (see AVD Optimizations repo for more detail)
* Creates a DevDrive VHDX and mounts it to the remote machine (`E:`), redirecting all package caches (npm, maven, nuget, etc.) to the Dev Drive`2.Configure.ps1`
* Installs [various developer tools](Install-SystemSoftware.ps1) system-wide
* Sets up a RunOnce entry in the registry that [installs more software](Apply-OneTimeUserSetup.ps1) upon user's first login
* Sets up 2 scheduled tasks on the remote machine to:
1. Mount a remote Azure File Share as the 'S:' drive on User login
1. Mount the DevDrive on User login
* Disables 'Reserved Storage' on the VMThe other files in the root are used by the above two scripts. This repo (root only) is cloned to the remote VM at `c:\scripts` during the image creation process. If you wish, you can delete it after logging into the Dev Box.
### Deployment files
* `bicepconfig.json` - Enables features required for the bicep templates written for deployment
* `common.bicep` - types, functions & variables used by the other bicep templates
* `main.bicep` - The bicep template which deploys `deployment.bicep` to a newly-created Resource Group \
`deployment.bicep` - The template which deploys the Dev Center, Project, Image Template, etc
* `afterimagebuild.bicep` - The template which deploys the Dev Box pools which reference the customized build image
* `deploy.ps1` - The script which deploys the bicep templates to Azure \
Requires parameter `region` denoting one of the [supported regions for Microsoft Dev Box](https://azure.microsoft.com/en-us/products/dev-box/#faq)## Requirements
* PowerShell (Core or Windows)
* [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli#install-or-update)## Usage
Too easy! Simply run:
```powershell
.\deployment\deploy.ps1 [-region] [[-suffix] ] [[-subscriptionId] ]
```where
`-region` is one of the [supported regions for Microsoft Dev Box](https://azure.microsoft.com/en-us/products/dev-box/#faq) \
`-suffix` is an optional suffix to append to all resources requiring unique names, and \
`-subscriptionId` is an optional parameter to specify the subscription to deploy to (otherwise the subscription currently targeted by `az account show` is used).## Customizing
Feel free to customize any software installations (machine or user) or Windows configuration by modifying the `Install-SystemSoftware.ps1` and `Apply-OneTimeUserSetup.ps1` scripts accordingly.
> **WARNING**: Testing your changes takes a really long time; Image Builder Templates take anywhere from 1-4hr to complete.You can read more about this solution on my blog [here](https://netitude.bc3tech.net/2024/02/06/microsoft-dev-box-make-it-your-own/).