|
| 1 | +--- |
| 2 | +title: Imaging for Dev Box Team Customizations |
| 3 | +description: Configure dev box pools to use image definition files, optimizing customizations, and creating reusable images for your team. |
| 4 | +author: RoseHJM |
| 5 | +ms.author: rosemalcolm |
| 6 | +ms.service: dev-box |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 11/05/2024 |
| 9 | + |
| 10 | +#customer intent: As a dev center administrator or Project Admin, I want to configure dev box pools to use image definition files so that my development teams can create customized dev boxes. |
| 11 | +--- |
| 12 | + |
| 13 | +# Create a shared Customization |
| 14 | +Using a customization file simplifies the creation of dev boxes for your team. With dev box customizations, you can create a shared team customization by creating a customization file called an *image definition*. Creating a reusable image from this image definition optimizes customizations and saves time during dev box creation. In this article, you learn how to configure a pool to use an image definition and build reusable images for your development teams. |
| 15 | + |
| 16 | +To configure imaging for Dev Box Team Customizations, enable project-level catalogs and configure catalog sync settings for the project. Then, attach a catalog that contains a definition file to your project, configure a dev box pool to use an image definition, and verify that the customizations apply to a new dev box. When the customizations apply correctly, you can choose to build a reusable image, which makes the creation of new dev boxes quicker. |
| 17 | + |
| 18 | +[!INCLUDE [customizations-preview-text](includes/customizations-preview-text.md)] |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | +To complete the steps in this article, you need: |
| 22 | +- A dev center with an existing dev box definition and network connection. If you don't have a dev center, follow the steps in [Quickstart: Configure Microsoft Dev Box](quickstart-configure-dev-box-service.md) to create them. |
| 23 | +- A team customization file that you want to use to create a dev box. If you don't have a customization file, see [Write a customization file](./how-to-write-customization-file.md). |
| 24 | + |
| 25 | +## Permissions required to configure customizations |
| 26 | + |
| 27 | +[!INCLUDE [permissions-for-customizations](includes/permissions-for-customizations.md)] |
| 28 | + |
| 29 | +To manage a dev box pool, you need the following permissions: |
| 30 | + |
| 31 | +| Action | Permissions required | |
| 32 | +|---|---| |
| 33 | +| _Create, delete, or update a dev box pool_ | - Owner or Contributor permissions on an Azure subscription or a specific resource group. </br>- DevCenter Project Admin permissions for the project. | |
| 34 | + |
| 35 | +## Enable project-level catalogs |
| 36 | + |
| 37 | +Enable project-level catalogs. This setting allows you to attach a catalog to a project. |
| 38 | + |
| 39 | +For more information about project-level catalogs, see [Enable project-level catalogs](https://aka.ms/deployment-environments/project-catalog). |
| 40 | + |
| 41 | +## Configure catalog sync settings for the project |
| 42 | + |
| 43 | +Configure your project to sync image definitions from the catalog. This setting allows you to use the image definitions in the catalog to create dev box pools. |
| 44 | + |
| 45 | +1. Sign in to the [Azure portal](https://portal.azure.com). |
| 46 | +1. In the search box, enter **projects**. In the list of results, select **Projects**. |
| 47 | +1. Open the Dev Box project for which you want to configure catalog sync settings. |
| 48 | +1. Select **Catalogs**. |
| 49 | +1. Select **Sync settings**. |
| 50 | + |
| 51 | + :::image type="content" source="./media/how-to-configure-customization-imaging/customizations-project-sync-settings-small.png" alt-text="Screenshot of the Catalogs pane in the Azure portal, with Sync settings highlighted." lightbox="./media/how-to-configure-customization-imaging/customizations-project-sync-settings.png"::: |
| 52 | + |
| 53 | +1. In the **Sync settings** pane, select **Image definitions**, and then select **Save**. |
| 54 | + |
| 55 | + :::image type="content" source="./media/how-to-configure-customization-imaging/customizations-project-sync-image-definitions.png" alt-text="Screenshot of the Sync settings pane in the Azure portal, with Image definitions selected." lightbox="./media/how-to-configure-customization-imaging/customizations-project-sync-image-definitions.png"::: |
| 56 | + |
| 57 | +## Attach catalog that contains the definition file |
| 58 | + |
| 59 | +Before you can use a customization file as an image definition, you must attach a catalog that contains the definition file to your dev center or project. The catalog can be from GitHub or Azure Repos. |
| 60 | + |
| 61 | +On the Image definition page, you see the image definitions accessible to your project. |
| 62 | + |
| 63 | +:::image type="content" source="media/how-to-configure-customization-imaging/team-customizations-image-definitions-small.png" alt-text="Screenshot of the Image definition pane in the Azure portal, showing accessible image definitions for a project." lightbox="media/how-to-configure-customization-imaging/team-customizations-image-definitions.png"::: |
| 64 | + |
| 65 | +For more information about attaching catalogs, see [Add and configure a catalog from GitHub or Azure Repos](../deployment-environments/how-to-configure-catalog.md). |
| 66 | + |
| 67 | +## Configure a dev box pool to use an image definition |
| 68 | + |
| 69 | +Make customizations available to your development teams by configuring a dev box pool to use a customization file (*imagedefinition.yaml*). Store the customization file in a repository linked to a catalog in your dev center or project. Specify this file as the image definition for the pool, and the customizations are applied to new dev boxes. |
| 70 | + |
| 71 | +The following steps show you how to create a dev box pool and specify an image definition. |
| 72 | + |
| 73 | +1. Sign in to the [Azure portal](https://portal.azure.com). |
| 74 | +1. In the search box, enter **projects**. In the list of results, select **Projects**. |
| 75 | +1. Open the Dev Box project with which you want to associate the new dev box pool. |
| 76 | +1. Select **Dev box pools**, and then select **Create**. |
| 77 | +1. On the **Create a dev box pool** pane, enter the following values: |
| 78 | + |
| 79 | + | Setting | Value | |
| 80 | + |---|---| |
| 81 | + | **Name** |Enter a name for the pool. The pool name is visible to developers to select when they're creating dev boxes. It must be unique within a project. | |
| 82 | + | **Definition** | Lists image definitions from accessible catalogs and dev box definitions. Select an image definition file. | |
| 83 | + | **Network connection** | Select **Deploy to a Microsoft hosted network**, or use an existing network connection. | |
| 84 | + |**Enable single sign-on** | Select **Yes** to enable single sign-on for the dev boxes in this pool. Single sign-on must be configured for the organization. See [Enable single sign-on for dev boxes](https://aka.ms/dev-box/single-sign-on). | |
| 85 | + | **Dev box Creator Privileges** | Select **Local Administrator** or **Standard User**. | |
| 86 | + | **Enable Auto-stop** | **Yes** is the default. Select **No** to disable an auto-stop schedule. You can configure an auto-stop schedule after the pool is created. | |
| 87 | + | **Stop time** | Select a time to shut down all the dev boxes in the pool. | |
| 88 | + | **Time zone** | Select the time zone that the stop time is in. | |
| 89 | + | **Licensing** | Select this checkbox to confirm that your organization has Azure Hybrid Benefit licenses that you want to apply to the dev boxes in this pool. | |
| 90 | + |
| 91 | + :::image type="content" source="./media/how-to-configure-customization-imaging/pool-specify-image-definition.png" alt-text="Screenshot of the pane for creating a dev box pool." lightbox="./media/how-to-configure-customization-imaging/pool-specify-image-definition.png"::: |
| 92 | + |
| 93 | +1. Select **Create**. |
| 94 | +1. Verify that the new dev box pool appears in the list. You might need to refresh the screen. |
| 95 | + |
| 96 | +### Create a dev box by using the developer portal |
| 97 | +To verify that customizations from the image definition file are applied, create a dev box in the Microsoft Dev Box developer portal. |
| 98 | + |
| 99 | +[Quickstart: Create and connect to a dev box by using the Microsoft Dev Box developer portal](quickstart-create-dev-box.md) |
| 100 | + |
| 101 | +Sign in to the [Microsoft Dev Box developer portal](https://aka.ms/devbox-portal). |
| 102 | + |
| 103 | +When the dev box is created, the customizations from the image definition file are applied to the dev box. You can now connect to the dev box and verify that the customizations work as you expected. |
| 104 | + |
| 105 | +You can make adjustments to the customization file and create a new dev box to test the changes. When you're happy that the customizations are correct, you can build a reusable image. |
| 106 | + |
| 107 | +### Choose to build a reusable image |
| 108 | +To optimize customizations and create a reusable image for your team, you build an image from the customization file. This image applies to all dev boxes created from the pool. |
| 109 | + |
| 110 | +To build an image from a customization file, follow these steps: |
| 111 | +1. On the Image definition page, select the image you want to build. |
| 112 | + |
| 113 | + :::image type="content" source="./media/how-to-configure-customization-imaging/customizations-select-image-small.png" alt-text="Screenshot of the Image definition page, showing the list of image definition with one selected." lightbox="./media/how-to-configure-customization-imaging/customizations-select-image-small.png"::: |
| 114 | + |
| 115 | +1. Select **Build**. |
| 116 | + |
| 117 | + :::image type="content" source="./media/how-to-configure-customization-imaging/customizations-build-image-small.png" alt-text="Screenshot of the Image definition page, with Build highlighted." lightbox="./media/how-to-configure-customization-imaging/customizations-build-image-small.png"::: |
| 118 | + |
| 119 | +1. Track progress |
| 120 | + |
| 121 | + :::image type="content" source="./media/how-to-configure-customization-imaging/customizations-image-build-progress-small.png" alt-text="Screenshot of the Image definition page, with the image status Progressing highlighted." lightbox="./media/how-to-configure-customization-imaging/customizations-image-build-progress.png"::: |
| 122 | + |
| 123 | +> [!IMPORTANT] |
| 124 | +> When optimizing your image definition into an image, a dev box is created to run your customization file and generate an image. During this process, this Dev Box is connected to a virtual network managed by Microsoft, and tasks that require access to on premise resources might fail. |
| 125 | +
|
| 126 | +When the build completes successfully, the dev box pool automatically uses the image for new dev boxes. You don't need to do any extra configuration to assign the image to the pool. You can now create dev boxes from the pool, and the customizations are applied to each dev box. |
| 127 | + |
| 128 | +## Related content |
| 129 | +- [Microsoft Dev Box Team Customizations](concept-what-are-team-customizations.md) |
| 130 | +- [Write a customization file](./how-to-write-customization-file.md) |
| 131 | +- [Add and configure a catalog from GitHub or Azure Repos](../deployment-environments/how-to-configure-catalog.md) |
0 commit comments