|
1 | 1 | ---
|
2 |
| -title: Encrypt an Azure storage account used by a lab |
3 |
| -description: Learn how to configure encryption of an Azure storage used by a lab in Azure DevTest Labs |
| 2 | +title: Manage storage accounts for labs |
| 3 | +description: Learn about DevTest Labs storage accounts, encryption, customer-managed keys, and setting expiration dates for artifact results storage. |
4 | 4 | ms.topic: how-to
|
5 |
| -ms.date: 07/29/2020 |
| 5 | +ms.date: 03/15/2022 |
6 | 6 | ---
|
7 | 7 |
|
8 |
| -# Encrypt Azure storage used by a lab in Azure DevTest Labs |
9 |
| -Every lab created in Azure DevTest Labs is created with an associated Azure storage account. The storage account is used for the following purposes: |
| 8 | +# Manage Azure DevTest Labs storage accounts |
10 | 9 |
|
11 |
| -- Storing [formula](devtest-lab-manage-formulas.md) documents that can be used to create virtual machines. |
12 |
| -- Storing artifact results that include deployment and extension logs generated from applying artifacts. |
13 |
| -- [Uploading virtual hard disks (VHDs) to create custom images in the lab.](devtest-lab-create-template.md) |
14 |
| -- Caching frequently used [artifacts](add-artifact-vm.md) and [Azure Resource Manager templates](devtest-lab-create-environment-from-arm.md) for faster retrieval during virtual machine/environment creation. |
| 10 | +This article explains how to view and manage the Azure Storage accounts associated with Azure DevTest Labs. |
15 | 11 |
|
16 |
| -> [!NOTE] |
17 |
| -> The information above is critical for the lab to operate. It's stored for the life of the lab (and lab resources) unless explicitly deleted. Manually deleting these resources can lead to errors in creating lab VMs and/or formulas becoming corrupt for future use. |
| 12 | +## View storage account contents |
18 | 13 |
|
19 |
| -## Locate the storage account and view its contents |
| 14 | +DevTest Labs automatically creates an Azure Storage account for every lab it creates. To see a lab's storage account and the information it holds: |
20 | 15 |
|
21 |
| -1. On the home page for the lab, select the **resource group** on the **Overview** page. You should see the **Resource group** page for the resource group that contains the lab. |
| 16 | +1. On the lab's **Overview** page, select the **Resource group**. |
22 | 17 |
|
23 |
| - :::image type="content" source="./media/encrypt-storage/overview-resource-group-link.png" alt-text="Select resource group on the Overview page"::: |
24 |
| -1. Select the Azure storage account of the lab. The naming convention for the lab storage account is: `a<labNameWithoutInvalidCharacters><4-digit number>`. For example, if the lab name is `contosolab`, the storage account name could be `acontosolab7576`. |
| 18 | + :::image type="content" source="./media/encrypt-storage/overview-resource-group-link.png" alt-text="Screenshot that shows selecting the resource group on the lab Overview page."::: |
25 | 19 |
|
26 |
| - :::image type="content" source="./media/encrypt-storage/select-storage-account.png" alt-text="Select storage account in the resource group of the lab"::: |
27 |
| -3. On the **Storage account** page, select **Storage Explorer (preview)** on the left menu, and then select **BLOB CONTAINERS** to find relevant lab-related content. |
| 20 | +1. On the resource group's **Overview** page, select the lab's storage account. The naming convention for the lab storage account is: `a<labName><4-digit number>`. For example, if the lab name is `contosolab`, the storage account name could be `acontosolab5237`. |
28 | 21 |
|
29 |
| - :::image type="content" source="./media/encrypt-storage/storage-explorer.png" alt-text="Storage Explorer (Preview)" lightbox="./media/encrypt-storage/storage-explorer.png"::: |
| 22 | + :::image type="content" source="./media/encrypt-storage/select-storage-account.png" alt-text="Screenshot that shows selecting the storage account in the lab's resource group."::: |
30 | 23 |
|
31 |
| -## Encrypt the lab storage account |
32 |
| -Azure Storage automatically encrypts your data when it's persisted to the cloud. Azure Storage encryption protects your data and helps you to meet your organizational security and compliance commitments. For more information, see [Azure Storage encryption for data at rest](../storage/common/storage-service-encryption.md). |
| 24 | +3. On the **Storage account** page, select **Storage browser (preview)** on the left menu, and then select **Blob containers** to see relevant lab-related content. |
33 | 25 |
|
34 |
| -Data in the lab storage account is encrypted with a **Microsoft-managed key**. You can rely on Microsoft-managed keys for the encryption of your data, or you can manage encryption with your own keys. If you choose to manage encryption with your own keys for the lab’s storage account, you can specify a **customer-managed key** with Azure Key Vault to use for encrypting/decrypting data in Blob storage and in Azure Files. For more information about customer-managed keys, see [Use customer-managed keys with Azure Key Vault to manage Azure Storage encryption](../storage/common/customer-managed-keys-overview.md). |
| 26 | + :::image type="content" source="./media/encrypt-storage/storage-explorer.png" alt-text="Screenshot that shows the Storage browser (preview)."::: |
35 | 27 |
|
36 |
| -To learn how to configure customer-managed keys for Azure Storage encryption, see the following articles: |
| 28 | +## Manage Azure Storage lifecycle |
37 | 29 |
|
38 |
| -- [Azure portal](../storage/common/customer-managed-keys-configure-key-vault.md) |
39 |
| -- [Azure PowerShell](../storage/common/customer-managed-keys-configure-key-vault.md) |
40 |
| -- [Azure CLI](../storage/common/customer-managed-keys-configure-key-vault.md) |
| 30 | +The lab storage account stores: |
41 | 31 |
|
| 32 | +- [Formula documents](devtest-lab-manage-formulas.md) to use for creating lab virtual machines (VMs). |
| 33 | +- [Uploaded virtual hard disks (VHDs)](devtest-lab-create-template.md) to use for creating custom VM images. |
| 34 | +- [Artifact](add-artifact-vm.md) and [Azure Resource Manager (ARM) template](devtest-lab-create-environment-from-arm.md) caches, for faster retrieval during VM and environment creation. |
| 35 | +- Artifact results, which are deployment and extension logs generated from applying artifacts. |
42 | 36 |
|
43 |
| -## Manage the Azure Blob storage life cycle |
44 |
| -As mentioned, the information stored in the Lab’s storage account is critical for the lab to operate without any errors. Unless explicitly deleted, this data will continue to remain in the lab’s storage account for the life of the lab or the life of specific lab virtual machines, depending on the type of data. |
| 37 | +The information in the lab storage account persists for the life of the lab and its resources, unless explicitly deleted. Most of this information is critical for the lab to operate. Manually deleting storage account information can cause data corruption or VM creation errors. |
45 | 38 |
|
46 |
| -### Uploaded VHDs |
47 |
| -These VHDs are used to create custom images. Removing them will make it no longer possible to create custom images from these VHDs. |
| 39 | +- Removing uploaded VHDs makes it no longer possible to create custom images from these VHDs. |
| 40 | +- Deleting formula documents can lead to errors when creating VMs from formulas, updating formulas, or creating new formulas. |
| 41 | +- DevTest Labs refreshes the artifact and ARM template caches whenever the lab connects to the artifact or template repositories. If you remove the caches manually, DevTest Labs recreates the caches the next time the lab connects to the repositories. |
48 | 42 |
|
49 |
| -### Artifacts Cache |
50 |
| -These caches will be re-created any time artifacts are applied. They'll be refreshed with the latest content from the respective referenced repositories. So, if you delete this information to save Storage-related expenses, the relief will be temporary. |
| 43 | +### Set expiration for artifact results |
51 | 44 |
|
52 |
| -### Azure Resource Manager template Cache |
53 |
| -These caches will be re-created any time Azure Resource Manager-based template repositories are connected and spun up in the lab. They'll be refreshed with the latest content from the respective referenced repositories. So, if you delete this information to save Storage-related expenses, the relief will be temporary. |
| 45 | +The artifact results size can increase over time as artifacts are applied. You can set an expiration rule for artifact results to regularly delete older results from the storage account. This practice reduces storage account size and helps control costs. |
54 | 46 |
|
55 |
| -### Formulas |
56 |
| -These documents are used to support the option to both create formulas from existing VMs, and creating VMs from formulas. Deleting these formula documents may lead to errors while doing the following operations: |
57 |
| - |
58 |
| -- Creating a formula from an existing lab VM |
59 |
| -- Creating or updating formulas |
60 |
| -- Creating a VM from a formula. |
61 |
| - |
62 |
| -### Artifact results |
63 |
| -As artifacts are applied, the size of the respective artifact results can increase over time depending on the number and type of artifacts being run on lab VMs. So, as a lab owner, you may want to control the lifecycle of such documents. For more information, see [Manage the Azure Blob storage lifecycle](../storage/blobs/lifecycle-management-overview.md). |
64 |
| - |
65 |
| -> [!IMPORTANT] |
66 |
| -> We recommend that you do this step to reduce expenses associated with the Azure Storage account. |
67 |
| -
|
68 |
| -For example, the following rule is used to set a 90-day expiration rule specifically for artifact results. It ensures that older artifact results are recycled from the storage account on a regular cadence. |
| 47 | +The following rule sets a 90-day expiration specifically for artifact results: |
69 | 48 |
|
70 | 49 | ```json
|
71 | 50 | {
|
@@ -93,9 +72,18 @@ For example, the following rule is used to set a 90-day expiration rule specific
|
93 | 72 | }
|
94 | 73 | ```
|
95 | 74 |
|
| 75 | +## Storage encryption and customer-managed keys |
| 76 | + |
| 77 | +Azure Storage automatically encrypts all data in the lab storage account. Azure Storage encryption protects your data and helps meet organizational security and compliance commitments. For more information, see [Azure Storage encryption for data at rest](../storage/common/storage-service-encryption.md). |
| 78 | + |
| 79 | +Azure Storage encrypts lab data with a Microsoft-managed key. Optionally, you can manage encryption with your own keys. If you choose to manage lab storage account encryption with your own key, you can use Azure Key Vault to specify a customer-managed key for encrypting and decrypting data. |
| 80 | + |
| 81 | +For more information and instructions on configuring customer-managed keys for Azure Storage encryption, see: |
| 82 | + |
| 83 | +- [Use customer-managed keys with Azure Key Vault to manage Azure Storage encryption](/azure/storage/common/customer-managed-keys-overview.md) |
| 84 | +- [Configure encryption with customer-managed keys stored in Azure Key Vault](/azure/storage/common/customer-managed-keys-configure-key-vault) |
| 85 | + |
96 | 86 | ## Next steps
|
97 |
| -To learn how to configure customer-managed keys for Azure Storage encryption, see the following articles: |
98 | 87 |
|
99 |
| -- [Azure portal](../storage/common/customer-managed-keys-configure-key-vault.md) |
100 |
| -- [Azure PowerShell](../storage/common/customer-managed-keys-configure-key-vault.md) |
101 |
| -- [Azure CLI](../storage/common/customer-managed-keys-configure-key-vault.md) |
| 88 | +For more information about managing Azure Storage, see [Optimize costs by automatically managing the data lifecycle](../storage/blobs/lifecycle-management-overview.md). |
| 89 | + |
0 commit comments