Edit

Best practices for Azure Deployment Environments catalogs

This article describes best practices for structuring an Azure Deployment Environments catalog.

Structure the catalog for efficient caching

Platform engineers should structure catalogs in a way that makes it easier and quicker for Azure Deployment Environments to find and cache environment definitions. By organizing the repository into a specific structure, you can better target files for caching and improve the overall performance of the deployment process. To ensure optimal results, platform engineers need to understand these guidelines and structure their repositories accordingly.

When you attach a catalog to a dev center, Deployment Environments scans the catalog for an environment.yaml or a manifest.yaml file. When it locates the file, Azure Deployment Environments assumes the files in that folder and subfolders form an environment definition. Azure Deployment Environments caches only the required files, not the entire repository.

The following diagram shows the recommended structure for a repo. Each template resides within a single folder.

Diagram that shows the recommended folder structure for an Azure Deployment Environments catalog.

Linked environment definitions

In a linked environment definitions scenario, multiple .json files can point to a single template. Azure Deployment Environments checks linked environment definitions sequentially and retrieves the linked files and environment definitions from the repository. For best performance, these interactions should be minimized.

Update environment definitions and sync changes

Over time, environment definitions need updates. You make those updates in your Git repository. You must then manually sync the catalog to update the changes to Azure Deployment Environments.

In the following example, the azuredeploy.json file is above the environment.yaml (or manifest.yaml) file in the folder structure. This structure isn't valid. Environment definitions can't reference content outside of the catalog item folder.

Diagram that shows an unsupported structure for an Azure Deployment Environments catalog.