Skip to content

Commit f8d7f7a

Browse files
authored
Merge pull request #242989 from Muksvso/master
Snapshots Docs
2 parents 0f3e7c5 + ace1d16 commit f8d7f7a

File tree

11 files changed

+224
-1
lines changed

11 files changed

+224
-1
lines changed

articles/azure-app-configuration/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@
138138
items:
139139
- name: Keys and values
140140
href: concept-key-value.md
141+
- name: Snapshots
142+
href: concept-snapshots.md
141143
- name: Point-in-time key-values
142144
href: concept-point-time-snapshot.md
143145
- name: Feature management
@@ -176,6 +178,8 @@
176178
items:
177179
- name: Use labels for per-environment configuration
178180
href: howto-labels-aspnet-core.md
181+
- name: Create and manage Snapshots
182+
href: howto-create-snapshots.md
179183
- name: Import or export configuration data
180184
href: howto-import-export-data.md
181185
- name: Use JSON content-type for key-values
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: Snapshots in Azure App Configuration (preview)
3+
description: Details of Snapshots in Azure App Configuration
4+
author: Muksvso
5+
ms.author: mubatra
6+
ms.service: azure-app-configuration
7+
ms.topic: conceptual
8+
ms.date: 05/16/2023
9+
---
10+
11+
# Snapshots (preview)
12+
13+
A snapshot is a named, immutable subset of an App Configuration store's key-values. The key-values that make up a snapshot are chosen during creation time through the usage of key and label filters. Once a snapshot is created, the key-values within are guaranteed to remain unchanged.
14+
15+
## Deploy safely with snapshots
16+
17+
Snapshots are designed to safely deploy configuration changes. Deploying faulty configuration changes into a running environment can cause issues such as service disruption and data loss. In order to avoid such issues, it's important to be able to vet configuration changes before moving into production environments. If such an issue does occur, it's important to be able to roll back any faulty configuration changes in order to restore service. Snapshots are created for managing these scenarios.
18+
19+
Configuration changes should be deployed in a controlled, consistent way. Developers can use snapshots to perform controlled rollout. The only change needed in an application to begin a controlled rollout is to update the name of the snapshot the application is referencing. As the application moves into production, there's a guarantee that the configuration in the referenced snapshot remains unchanged. This guarantee against any change in a snapshot protects against unexpected settings making their way into production. The immutability and ease-of-reference of snapshots make it simple to ensure that the right set of configuration changes are rolled out safely.
20+
21+
## Scenarios for using snapshots
22+
23+
* **Controlled rollout**: Snapshots are well suited for supporting controlled rollout due to their immutable nature. When developers utilize snapshots for configuration, they can be confident that the configuration remains unchanged as the release progresses through different phases of the rollout.
24+
25+
* **Last Known Good (LKG) configuration**: Snapshots can be used to support safe deployment practices for Configuration. With snapshots, developers can ensure that a Last known Good (LKG) configuration is available for rollback if there was any issue during deployment.
26+
27+
* **Configuration versioning**: Snapshots can be used to create a version history of configuration settings to sync with release versions. Settings captured in each snapshot can be compared to identify changes between versions.
28+
29+
* **Auditing**: Snapshots can be used for auditing and compliance purposes. Developers can maintain a record of configuration changes in between releases by using the snapshots for the releases.
30+
31+
* **Testing and Staging environments**: Snapshots can be used to create consistent testing and staging environments. Developers can ensure that the same configuration is used across different environments, by using the same snapshot, which can help with debugging and testing.
32+
33+
* **Simplified Client Configuration composition**: Usually, the clients of App Configuration need a subset of the key-values from the App Configuration instance. To get the set of required key-values, they need to have query logic written in code. As Snapshots support providing filters during creation time, it helps simplify client composition because clients can now refer to the set of key-values they require by name.
34+
35+
## Snapshot operations
36+
37+
As snapshots are immutable entities, snapshots can only be created and archived. No deleting, purging or editing is possible.
38+
39+
* **Create snapshot**: Snapshots can be created by defining the key and label filters to capture the required key-values from App Configuration instance. The filtered key-values are stored as a snapshot with the name provided during creation.
40+
41+
* **Archive snapshot**: Archiving a snapshot puts it in an archived state. While a snapshot is archived, it's still fully functional. When the snapshot is archived, an expiration time is set based on the retention period configured during the snapshot's creation. If the snapshot remains in the archived state up until the expiration time, then it automatically disappears from the system when the expiration time passes. Archival is used for phasing out snapshots that are no longer in use.
42+
43+
* **Recover snapshot**: Recovering a snapshot puts it back in an active state. At this point, the snapshot is no longer subject to expiration based on its configured retention period. Recovery is only possible in the retention period after archival.
44+
45+
> [!NOTE]
46+
> The retention period can only be set during the creation of a snapshot. The default value for retention period is 30 days for Standard stores and 7 days for Free stores.
47+
48+
## Requirements for snapshot operations
49+
50+
The following sections detail the permissions required to perform snapshot related operations with Azure AD and HMAC authentication.
51+
52+
### Create a snapshot
53+
54+
To create a snapshot in stores using Azure Active Directory (Azure AD) authentication, the following permissions are required. The App Configuration Data Owner role already has these permissions.
55+
- `Microsoft.AppConfiguration/configurationStores/keyvalues/read`
56+
- `Microsoft.AppConfiguration/configurationStores/snapshots/write`
57+
58+
To archive and/or recover a snapshot using HMAC authentication, a read-write access key must be used.
59+
60+
### Archive and recover a snapshot
61+
62+
To archive and/or recover a snapshot using Azure AD authentication, the following permission is needed. The App Configuration Data Owner role already has this permission.
63+
- `Microsoft.AppConfiguration/configurationStores/snapshots/archive/action`
64+
65+
To archive and/or recover a snapshot using HMAC authentication, a read-write access key must be used.
66+
67+
### Read and list snapshots
68+
69+
To list all snapshots, or get all the key-values in an individual snapshot by name the following permission is needed for stores utilizing Azure AD authentication. The built-in Data Owner and Data Reader roles already have this permission.
70+
- `Microsoft.AppConfiguration/configurationStores/snapshots/read`
71+
72+
For stores that use HMAC authentication, both the "read snapshot" operation (to read the key-values from a snapshot) and the "list snapshots" operation can be performed using either the read-write access keys or the read-only access keys.
73+
74+
## Billing considerations and limits
75+
76+
The storage quota for snapshots is detailed in the "storage per resource section" of the [App Configuration pricing page](https://azure.microsoft.com/pricing/details/app-configuration/) There's no extra charge for snapshots before the included snapshot storage quota is exhausted.
77+
78+
App Configuration has two tiers, Free and Standard. Check the following details for snapshot quotas in each tier.
79+
80+
* **Free tier**: This tier has a snapshot storage quota of 10 MB. One can create as many snapshots as possible as long as the total storage size of all active and archived snapshots is less than 10 MB.
81+
82+
* **Standard tier**: This tier has a snapshot storage quota of 1 GB. One can create as many snapshots as possible as long as the total storage size of all active and archived snapshots is less than 1 GB.
83+
84+
The maximum size for a snapshot is 1 MB.
85+
86+
## Next steps
87+
88+
> [!div class="nextstepaction"]
89+
> [Create a snapshot](./howto-create-snapshots.md)
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
title: How to create snapshots (preview) in Azure App Configuration
3+
description: How to create and manage snapshots Azure App Configuration store.
4+
author: Muksvso
5+
ms.author: mubatra
6+
ms.service: azure-app-configuration
7+
ms.topic: how-to
8+
ms.date: 05/16/2023
9+
---
10+
11+
# Use snapshots (preview)
12+
13+
In this article, learn how to create and manage snapshots in Azure App Configuration. Snapshot is a set of App Configuration settings stored in an immutable state.
14+
15+
## Prerequisites
16+
17+
- An App Configuration store. [Create a store](./quickstart-azure-app-configuration-create.md#create-an-app-configuration-store).
18+
- "DataOwner" role in the App Configuration store. Details on required [role and permissions for snapshots](./concept-snapshots.md)
19+
20+
### Add key-values to the App configuration store
21+
22+
In your App Configuration store, go to **Operations** > **Configuration explorer** and add the following key-values. Leave **Content Type** with its default value. For more information about how to add key-values to a store using the Azure portal or the CLI, go to [Create a key-value](./quickstart-azure-app-configuration-create.md#create-a-key-value).
23+
24+
| Key | Value | Label |
25+
|----------------|----------------|----------|
26+
| *app2/bgcolor* | *Light Gray* | *label2* |
27+
| *app1/color* | *Black* | No label |
28+
| *app1/color* | *Blue* | *label1* |
29+
| *app1/color* | *Green* | *label2* |
30+
| *app1/color* | *Yellow* | *label3* |
31+
| *app1/message* | *Hello* | *label1* |
32+
| *app1/message* | *Hi!* | *label2* |
33+
| *app2/message* | *Good morning!*| *label1* |
34+
35+
## Create a snapshot
36+
37+
> [!IMPORTANT]
38+
> You may see any error "You are not authorized to view this configuration store data" when you switch to the Snapshots blade in the Azure portal if you opt to use Azure AD authentication in the Configuration explorer or the Feature manager blades. This is a known issue in the Azure portal, and we are working on addressing it. It doesn't affect any scenarios other than the Azure Portal regarding accessing snapshots with Azure AD authentication.
39+
40+
As a temporary workaround, you can switch to using Access keys authentication from either the Configuration explorer or the Feature manager blades. You should then see the Snapshot blade displayed properly, assuming you have permission for the access keys.
41+
42+
Under **Operations** > **Snapshots (preview)**, select **Create a new snapshot**.
43+
44+
1. Enter a **snapshot name** and optionally also add **Tags**.
45+
1. Under **Choose the composition type**, keep the default value **Key (default)**.
46+
- With the *Key* composition type, if your store has identical keys with different labels, only the key-value specified in the last applicable filter is included in the snapshot. Identical key-values with other labels are left out of the snapshot.
47+
- With the *Key-Label* composition type, if your store has identical keys with different labels, all key-values with identical keys but different labels are included in the snapshot depending on the specified filters.
48+
1. Select **Add filters** to select the key-values for your snapshot. Filtering is done by selecting filters: **Equals**, **Starts with**, **Any of** and **All** for keys and for labels. You can enter between one and three filters.
49+
1. Add the first filter:
50+
- Under **Key**, select **Starts with** and enter *app1*
51+
- Under **Label**, select **Equals** and select *label2* from the drop-down menu.
52+
1. Add the second filter:
53+
- Under **Key**, select **Starts with** and enter *app1*
54+
- Under **Label**, select **Equals** and select *label1* from the drop-down menu.
55+
56+
1. If you archive a snapshot, by default, it will be retained for 30 days after archival. Optionally, under **Recovery options**, decrease the number of retention days the snapshot will be available after archival.
57+
58+
> [!NOTE]
59+
> The duration of the retention period can't be updated once the snapshot has been created.
60+
61+
1. Select **Create** to generate the snapshot. In this example, the created snapshot has **Key** composition type and below filters:
62+
- Keys that start with *app1*, with *label2* label
63+
- Keys that start with *app1*, with *label1* label.
64+
65+
:::image type="content" source="./media/howto-create-snapshots/create-snapshot.png" alt-text="Screenshot of the Create form with data filled as above steps and Create button highlighted.":::
66+
67+
1. Check the table to understand which key-values from the configuration store end up in the snapshot based on the provided parameters.
68+
69+
| Key | Value | Label | Included in snapshot |
70+
|----------------|----------------|----------|-------------------------------------------------------------------------------------------------------------------|
71+
| *app2/bgcolor* | *Light Gray* | *label2* | No: doesn't start with *app1*.
72+
| *app1/color* | *Black* | No label | No: doesn't have the label *label2* or *label1*.
73+
| *app1/color* | *Blue* | *label1* | Yes: Has the right label *label1* from the last of applicable filters.
74+
| *app1/color* | *Green* | *label2* | No: Same key with label *label1* selected by the second filter overrides this one though it has the selected label, *label2*.
75+
| *app1/color* | *Yellow* | *label3* | No: doesn't have the label *label2* or *label1*.
76+
| *app1/message* | *Hello* | *label1* | Yes: Has the right label *label1* from the last of applicable filters.
77+
| *app1/message* | *Hi!* | *label2* | No: Same key with label *label1* selected by the second filter overrides this one though it has the selected label, *label2*.
78+
| *app2/message* | *Good morning!*| *label1* | No: doesn't start with *app1*.
79+
80+
## Create sample snapshots
81+
82+
To create sample snapshots and check how the snapshots feature work, use the snapshot sandbox. This sandbox contains sample data you can play with to better understand how snapshot's composition type and filters work.
83+
84+
1. In **Operations** > **Snapshots (preview)** > **Active snapshots**, select **Test in sandbox**.
85+
1. Review the sample data and practice creating snapshots by filling out the form with a composition type and one or more filters.
86+
1. Select **Create** to generate the sample snapshot.
87+
1. Check out the snapshot result generated under **Generated sample snapshot**. The sample snapshot displays all keys that are included in the sample snapshot, according to your selection.
88+
89+
## Manage active snapshots
90+
91+
The page under **Operations** > **Snapshots (preview)** displays two tabs: **Active snapshots** and **Archived snapshots**. Select **Active snapshots** to view the list of all active snapshots in an App Configuration store.
92+
93+
:::image type="content" source="./media/howto-create-snapshots/snapshots-view-list.png" alt-text="Screenshot of the list of active snapshots.":::
94+
95+
### View existing snapshot
96+
97+
In the **Active snapshots** tab, select the ellipsis **...** on the right of an existing snapshot and select **View** to view a snapshot. This action opens a Snapshot details page that displays the snapshot's settings and the key-values included in the snapshot.
98+
99+
:::image type="content" source="./media/howto-create-snapshots/snapshot-details-view.png" alt-text="Screenshot of the detailed view of an active snapshot.":::
100+
101+
### Archive a snapshot
102+
103+
In the **Active snapshots** tab, select the ellipsis **...** on the right of an existing snapshot and select **Archive** to archive a snapshot. Confirm archival by selecting **Yes** or cancel with **No**. Once a snapshot has been archived, a notification appears to confirm the operation and the list of active snapshots is updated.
104+
105+
:::image type="content" source="./media/howto-create-snapshots/archive-snapshot.png" alt-text="Screenshot of the archive option in the active snapshots.":::
106+
107+
## Manage archived snapshots
108+
109+
Go to **Operations** > **Snapshots (preview)** > **Archived snapshots** to view the list of all archived snapshots in an App Configuration store. Archived snapshots remain accessible for the retention period that was selected during their creation.
110+
111+
:::image type="content" source="./media/howto-create-snapshots/archived-snapshots.png" alt-text="Screenshot of the list of archived snapshots.":::
112+
113+
### View archived snapshot
114+
115+
Detailed view of snapshot is available in the archive state as well. In the **Archived snapshots** tab, select the ellipsis **...** on the right of an existing snapshot and select **View** to view a snapshot. This action opens a Snapshot details page that displays the snapshot's settings and the key-values included in the snapshot.
116+
117+
:::image type="content" source="./media/howto-create-snapshots/archived-snapshots-details.png" alt-text="Screenshot of the detailed view of an archived snapshot.":::
118+
119+
### Recover an archived snapshot
120+
121+
In the **Archived snapshots** tab, select the ellipsis **...** on the right of an archived snapshot and select **Recover** to recover a snapshot. Confirm App Configuration snapshot recovery by selecting **Yes** or cancel with **No**. Once a snapshot has been recovered, a notification appears to confirm the operation and the list of archived snapshots is updated.
122+
123+
:::image type="content" source="./media/howto-create-snapshots/recover-snapshots.png" alt-text="Screenshot of the recover option in the archived snapshots.":::
124+
125+
## Next steps
126+
127+
> [!div class="nextstepaction"]
128+
> [Snapshots in Azure App Configuration](./concept-snapshots.md)

articles/azure-app-configuration/index.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ landingContent:
4444
links:
4545
- text: Keys and values
4646
url: concept-key-value.md
47-
- text: Point-in-time snapshot
47+
- text: Snapshots
48+
url: concept-snapshots.md
49+
- text: Point-in-time key-values
4850
url: concept-point-time-snapshot.md
4951
- text: Feature Management
5052
url: concept-feature-management.md
77.2 KB
Loading
97.6 KB
Loading
170 KB
Loading
205 KB
Loading
54.4 KB
Loading
32.2 KB
Loading

0 commit comments

Comments
 (0)