Skip to content

Commit 1a5943c

Browse files
Edits for the feedback
1 parent 75f9446 commit 1a5943c

File tree

4 files changed

+30
-27
lines changed

4 files changed

+30
-27
lines changed

articles/container-registry/tutorial-enable-registry-cache-auth-cli.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@ This article walks you through the steps of enabling Caching for ACR with authen
2222

2323
### Create a Credential Set - Azure CLI
2424

25-
Before configuring a Credential Set, you require to create and store secrets in the Azure KeyVault and retrieve the secrets from the Key Vault. Learn more about [creating and storing credentials in a Key Vault.][create-and-store-keyvault-credentials] and to [set and retrieve a secret from Key Vault.][set-and-retrieve-a-secret].
25+
Before configuring a Credential Set, you have to create and store secrets in the Azure KeyVault and retrieve the secrets from the Key Vault. Learn more about [creating and storing credentials in a Key Vault.][create-and-store-keyvault-credentials] and to [set and retrieve a secret from Key Vault.][set-and-retrieve-a-secret].
2626

2727
1. Run [az acr credential set create][az-acr-credential-set-create] command to create a credential set.
2828

2929
- For example, To create a credential set for a given `MyRegistry` Azure Container Registry.
3030

3131
```azurecli-interactive
32-
az acr credential-set create -r MyRegistry -n MyRule -l docker.io -u https://MyKeyvault.vault.azure.net/secrets/usernamesecret -p https://MyKeyvault.vault.azure.net/secrets/passwordsecret
32+
az acr credential-set create
33+
-r MyRegistry \
34+
-n MyRule \
35+
-l docker.io \
36+
-u https://MyKeyvault.vault.azure.net/secrets/usernamesecret \
37+
-p https://MyKeyvault.vault.azure.net/secrets/passwordsecret
3338
```
3439
3540
2. Run [az acr credential set update][az-acr-credential-set-update] to update the username or password KV secret ID on a credential set.
@@ -63,7 +68,7 @@ Before configuring a Credential Set, you require to create and store secrets in
6368
- For example, to update the credential set on a cache rule for a given `MyRegistry` Azure Container Registry.
6469
6570
```azurecli-interactive
66-
az acr cache update -r MyRegistry -n MyRule -c NewCredSet-
71+
az acr cache update -r MyRegistry -n MyRule -c NewCredSet
6772
```
6873
6974
- For example, to remove a credential set from an existing cache rule for a given `MyRegistry` Azure Container Registry.
@@ -77,7 +82,7 @@ Before configuring a Credential Set, you require to create and store secrets in
7782
- For example, to show a cache rule for a given `MyRegistry` Azure Container Registry.
7883
7984
```azurecli-interactive
80-
az acr cache show -r MyRegistry -n MyRule"""
85+
az acr cache show -r MyRegistry -n MyRule
8186
```
8287
8388
### Assign permissions to Key Vault
@@ -86,9 +91,9 @@ Before configuring a Credential Set, you require to create and store secrets in
8691
8792
```azurecli-interactive
8893
PRINCIPAL_ID=$(az acr credential-set show
89-
-n $CRED_SET
90-
-r $REGISTRY \
91-
--query 'identity.principalId'
94+
-n MyCredSet \
95+
-r MyRegistry \
96+
--query 'identity.principalId' \
9297
-o tsv)
9398
```
9499
@@ -97,7 +102,7 @@ Before configuring a Credential Set, you require to create and store secrets in
97102
- For example, to assign permissions for the credential set access the KeyVault secret
98103
99104
```azurecli-interactive
100-
az keyvault set-policy --name $KEYVAULT_NAME \
105+
az keyvault set-policy --name MyKeyVault \
101106
--object-id $PRINCIPAL_ID \
102107
--secret-permissions get
103108
```
@@ -108,45 +113,45 @@ Before configuring a Credential Set, you require to create and store secrets in
108113
109114
## Clean up the resources
110115
111-
1. Run[az acr credential set list][az-acr-credential-set-list] to list the credential sets in an Azure Container Registry.
116+
1. Run [az acr cache list][az-acr-cache-list] command to list the cache rules in the Azure Container Registry.
112117
113-
- For example, to list the credential sets for a given `MyRegistry` Azure Container Registry.
118+
- For example, to list the cache rules for a given `MyRegistry` Azure Container Registry.
114119
115120
```azurecli-interactive
116-
az acr credential-set list -r MyRegistry
121+
az acr cache list -r MyRegistry
117122
```
118123
119-
2. Run [az-acr-credential-set-delete][az-acr-credential-set-delete] to delete a credential set.
124+
2. Run [az acr cache delete][az-acr-cache-delete] command to delete a cache rule.
120125
121-
- For example, to delete a credential set for a given `MyRegistry` Azure Container Registry.
126+
- For example, to delete a cache rule for a given `MyRegistry` Azure Container Registry.
122127
123128
```azurecli-interactive
124-
az acr credential-set delete -r MyRegistry -n MyCredSet
129+
az acr cache delete -r MyRegistry -n MyRule
125130
```
126131
127-
3. Run [az acr cache list][az-acr-cache-list] command to list the cache rules in the Azure Container Registry.
132+
3. Run[az acr credential set list][az-acr-credential-set-list] to list the credential sets in an Azure Container Registry.
128133
129-
- For example, to list the cache rules for a given `MyRegistry` Azure Container Registry.
134+
- For example, to list the credential sets for a given `MyRegistry` Azure Container Registry.
130135
131136
```azurecli-interactive
132-
az acr cache list -r MyRegistry
137+
az acr credential-set list -r MyRegistry
133138
```
134139
135-
4. Run [az acr cache delete][az-acr-cache-delete] command to delete a cache rule.
140+
4. Run [az-acr-credential-set-delete][az-acr-credential-set-delete] to delete a credential set.
136141
137-
- For example, to delete a cache rule for a given `MyRegistry` Azure Container Registry.
142+
- For example, to delete a credential set for a given `MyRegistry` Azure Container Registry.
138143
139144
```azurecli-interactive
140-
az acr cache delete -r MyRegistry -n MyRule
145+
az acr credential-set delete -r MyRegistry -n MyCredSet
141146
```
142147
143148
## Next steps
144149
145150
* Advance to the [next article](tutorial-troubleshoot-registry-cache.md) to walk through the troubleshoot guide for Registry Cache.
146151
147152
<!-- LINKS - External -->
148-
[create-and-store-keyvault-credentials]: ../key-vault/secrets/quick-create-cli.md
149-
[set-and-retrieve-a-secret]: ../key-vault/secrets/quick-create-cli.md
153+
[create-and-store-keyvault-credentials]: ../key-vault/secrets/quick-create-cli.md#add-a-secret-to-key-vault
154+
[set-and-retrieve-a-secret]: ../key-vault/secrets/quick-create-cli.md#retrieve-a-secret-from-key-vault
150155
[az-keyvault-set-policy]: ../key-vault/general/assign-access-policy.md#assign-an-access-policy
151156
[Install Azure CLI]: /cli/azure/install-azure-cli
152157
[Azure Cloud Shell]: /azure/cloud-shell/quickstart

articles/container-registry/tutorial-enable-registry-cache-auth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Follow the steps to create cache rule in the [Azure portal](https://portal.azure
6666
- For example, to assign permissions for the credential set access the KeyVault secret
6767

6868
```azurecli-interactive
69-
az keyvault set-policy --name $KEYVAULT_NAME \
69+
az keyvault set-policy --name MyKeyVault \
7070
--object-id $PRINCIPAL_ID \
7171
--secret-permissions get
7272
```
@@ -99,6 +99,6 @@ Before configuring a Credential Set, you require to create and store secrets in
9999
* To enable Caching for ACR (preview) with authentication using the Azure CLI advance to the next article [Enable Caching for ACR - Azure CLI](tutorial-enable-registry-cache-auth-cli.md).
100100
101101
<!-- LINKS - External -->
102-
[create-and-store-keyvault-credentials]: ../key-vault/secrets/quick-create-portal.md
103-
[set-and-retrieve-a-secret]: ../key-vault/secrets/quick-create-portal.md
102+
[create-and-store-keyvault-credentials]: ../key-vault/secrets/quick-create-portal.md#add-a-secret-to-key-vault
103+
[set-and-retrieve-a-secret]: ../key-vault/secrets/quick-create-portal.md#retrieve-a-secret-from-key-vault
104104
[az-keyvault-set-policy]: ../key-vault/general/assign-access-policy.md#assign-an-access-policy

articles/container-registry/tutorial-enable-registry-cache-cli.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ This article is part three of a six-part tutorial series. [Part one](tutorial-re
1313
## Prerequisites
1414

1515
>* You can use the [Azure Cloud Shell][Azure Cloud Shell] or a local installation of the Azure CLI to run the command examples in this article. If you'd like to use it locally, version 2.0.74 or later is required. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][Install Azure CLI].
16-
>* You have an existing Key Vault to store credentials. Learn more about [creating and storing credentials in a Key Vault.][create-and-store-keyvault-credentials]
1716
1817
## Configure Caching for ACR (preview) - Azure CLI
1918

articles/container-registry/tutorial-enable-registry-cache.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ This article is part two of a six-part tutorial series. [Part one](tutorial-regi
1212

1313
## Prerequisites
1414

15-
>* You have an existing Key Vault to store credentials. Learn more about [creating and storing credentials in a Key Vault.][create-and-store-keyvault-credentials]
1615
>* Sign in to the [Azure portal](https://ms.portal.azure.com/)
1716
1817
## Configure Caching for ACR (preview) - Azure portal

0 commit comments

Comments
 (0)