Skip to content

Commit 6924082

Browse files
committed
Freshness pass
1 parent 4eb7857 commit 6924082

File tree

2 files changed

+76
-69
lines changed

2 files changed

+76
-69
lines changed
Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
---
2-
title: Create and configure a dev center for Azure Deployment Environments by using the Azure CLI
2+
title: Create and configure a dev center by using the Azure CLI
33
titleSuffix: Azure Deployment Environments
4-
description: Learn how to create and access an environment in an Azure Deployment Environments project using Azure CLI.
4+
description: Learn how to create and access a dev center for Azure Deployment Environments project using the Azure CLI.
55
author: renato-marciano
66
ms.author: remarcia
77
ms.service: deployment-environments
88
ms.custom: devx-track-azurecli, build-2023
99
ms.topic: quickstart
10-
ms.date: 04/28/2023
10+
ms.date: 11/29/2023
1111
---
1212

13-
# Create and configure a dev center for Azure Deployment Environments by using the Azure CLI
13+
# Create and configure a dev center by using the Azure CLI
1414

15-
This quickstart shows you how to create and configure a dev center in Azure Deployment Environments.
16-
17-
A platform engineering team typically sets up a dev center, attaches external catalogs to the dev center, creates projects, and provides access to development teams. Development teams create [environments](concept-environments-key-concepts.md#environments) by using [environment definitions](concept-environments-key-concepts.md#environment-definitions), connect to individual resources, and deploy applications.
15+
This quickstart guide shows you how to create and configure a dev center in Azure Deployment Environments.
1816

17+
A platform engineering team typically sets up a dev center, attaches external catalogs to the dev center, creates projects, and provides access to development teams. Development teams can then create [environments](concept-environments-key-concepts.md#environments) by using [environment definitions](concept-environments-key-concepts.md#environment-definitions), connect to individual resources, and deploy applications.
1918

2019
## Prerequisites
2120

2221
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2322
- Azure role-based access control role with permissions to create and manage resources in the subscription, such as [Contributor](../role-based-access-control/built-in-roles.md#contributor) or [Owner](../role-based-access-control/built-in-roles.md#owner).
2423
- [Install the Azure CLI](/cli/azure/install-azure-cli).
25-
- [Install dev center CLI extension](how-to-install-devcenter-cli-extension.md)
26-
- A GitHub Account and a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with Repo Access.
24+
- [Install the dev center CLI extension](how-to-install-devcenter-cli-extension.md)
25+
- A GitHub account and a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with repo access.
2726

2827
## Create a dev center
29-
To create and configure a Dev center in Azure Deployment Environments by using the Azure portal:
28+
29+
To create and configure a dev center in Azure Deployment Environments:
3030

3131
1. Sign in to the Azure CLI:
3232

3333
```azurecli
3434
az login
3535
```
3636
37-
1. Install the Azure Dev Center extension for the CLI.
37+
1. Install the Azure CLI *devcenter* extension.
3838
3939
```azurecli
4040
az extension add --name devcenter --upgrade
@@ -43,10 +43,10 @@ To create and configure a Dev center in Azure Deployment Environments by using t
4343
1. Configure the default subscription as the subscription in which you want to create the dev center:
4444

4545
```azurecli
46-
az account set --subscription <name>
46+
az account set --subscription <subscriptionName>
4747
```
4848

49-
1. Configure the default location as the location in which you want to create the dev center. Make sure to choose an [available regions for Azure Deployment Environments](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=deployment-environments&regions=all):
49+
1. Configure the default location where you want to create the dev center. Make sure to choose an [available region for Azure Deployment Environments](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=deployment-environments&regions=all):
5050

5151
```azurecli
5252
az configure --defaults location=eastus
@@ -55,31 +55,31 @@ To create and configure a Dev center in Azure Deployment Environments by using t
5555
1. Create the resource group in which you want to create the dev center:
5656

5757
```azurecli
58-
az group create -n <group name>
58+
az group create -n <resourceGroupName>
5959
```
6060

6161
1. Configure the default resource group as the resource group you created:
6262

6363
```azurecli
64-
az config set defaults.group=<group name>
64+
az config set defaults.group=<resourceGroupName>
6565
```
6666

6767
1. Create the dev center:
6868

6969
```azurecli
70-
az devcenter admin devcenter create -n <devcenter name>
70+
az devcenter admin devcenter create -n <devcenterName>
7171
```
7272

73-
After a few minutes, you'll get an output that it's created:
73+
After a few minutes, the output indicates that it was created:
7474

7575
```output
7676
{
7777
"devCenterUri": "https://...",
78-
"id": "/subscriptions/.../<devcenter name>",
78+
"id": "/subscriptions/.../<devcenterName>",
7979
"location": "eastus",
8080
"name": "<devcenter name>",
8181
"provisioningState": "Succeeded",
82-
"resourceGroup": "<group name>",
82+
"resourceGroup": "<resourceGroupName>",
8383
"systemData": {
8484
"createdAt": "...",
8585
"createdBy": "...",
@@ -92,24 +92,25 @@ To create and configure a Dev center in Azure Deployment Environments by using t
9292
> [!NOTE]
9393
> You can use `--help` to view more details about any command, accepted arguments, and examples. For example, use `az devcenter admin devcenter create --help` to view more details about creating a dev center.
9494
95-
## Adding personal access token to Key Vault
96-
You need an Azure Key Vault to store the GitHub personal access token (PAT) that is used to grant Azure access to your GitHub repository.
95+
## Add a personal access token to Azure Key Vault
9796

98-
1. Create a Key Vault:
97+
You need an Azure Key Vault to store the GitHub personal access token (PAT) that's used to grant Azure access to your GitHub repository.
98+
99+
1. Create a key vault:
99100

100101
```azurecli
101102
# Change the name to something Globally unique
102-
az keyvault create -n <kv name>
103+
az keyvault create -n <keyvaultName>
103104
```
104105

105106
> [!NOTE]
106-
> You may get the following Error:
107+
> You might get the following error:
107108
`Code: VaultAlreadyExists Message: The vault name 'kv-devcenter-unique' is already in use. Vault names are globally unique so it is possible that the name is already taken.` You must use a globally unique key vault name.
108109

109-
1. Add GitHub personal access token (PAT) to Key Vault as a secret:
110+
1. Add the GitHub PAT to Key Vault as a secret:
110111

111112
```azurecli
112-
az keyvault secret set --vault-name <kv name> --name GHPAT --value <PAT>
113+
az keyvault secret set --vault-name <kv name> --name GHPAT --value <personalAccessToken>
113114
```
114115

115116
## Attach an identity to the dev center
@@ -118,91 +119,96 @@ After you create a dev center, attach an [identity](concept-environments-key-con
118119

119120
In this quickstart, you configure a system-assigned managed identity for your dev center.
120121

121-
## Attach a system-assigned managed identity
122+
### Attach a system-assigned managed identity
122123

123124
To attach a system-assigned managed identity to your dev center:
124125

125126
```azurecli
126-
az devcenter admin devcenter update -n <devcenter name> --identity-type SystemAssigned
127+
az devcenter admin devcenter update -n <devcenterName> --identity-type SystemAssigned
127128
```
128129

129-
### Assign the system-assigned managed identity access to the key vault secret
130-
Make sure that the identity has access to the key vault secret that contains the personal access token to access your repository. Key Vaults support two methods of access; Azure role-based access control or Vault access policy. In this quickstart, you use a vault access policy.
130+
### Give the system-assigned managed identity access to the key vault secret
131+
132+
Make sure that the identity has access to the key vault secret that contains the GitHub PAT to access your repository. Key Vaults support two methods of access; Azure role-based access control or vault access policy. In this quickstart, you use a vault access policy.
131133

132-
1. Retrieve Object ID of your dev center's identity:
134+
1. Retrieve the Object ID of your dev center's identity:
133135

134136
```azurecli
135-
OID=$(az ad sp list --display-name <devcenter name> --query [].id -o tsv)
137+
OID=$(az ad sp list --display-name <devcenterName> --query [].id -o tsv)
136138
echo $OID
137139
```
138140

139-
1. Add a Key Vault Policy to allow dev center to get secrets from Key Vault:
141+
1. Add a Key Vault policy to allow the dev center to get secrets from Key Vault:
140142

141143
```azurecli
142-
az keyvault set-policy -n <kv name> --secret-permissions get --object-id $OID
144+
az keyvault set-policy -n <keyvaultName> --secret-permissions get --object-id $OID
143145
```
144146

145147
## Add a catalog to the dev center
146-
Azure Deployment Environments supports attaching Azure DevOps repositories and GitHub repositories. You can store a set of curated IaC templates in a repository. Attaching the repository to a dev center as a catalog gives your development teams access to the templates and enables them to quickly create consistent environments.
148+
149+
Azure Deployment Environments supports attaching Azure DevOps repositories and GitHub repositories. You can store a set of curated IaC templates in a repository. Attaching the repository to a dev center as a catalog gives your development teams access to the templates and allows them to quickly create consistent environments.
147150

148151
In this quickstart, you attach a GitHub repository that contains samples created and maintained by the Azure Deployment Environments team.
149152

150153
To add a catalog to your dev center, you first need to gather some information.
151154

152155
### Gather GitHub repo information
156+
153157
To add a catalog, you must specify the GitHub repo URL, the branch, and the folder that contains your environment definitions. You can gather this information before you begin the process of adding the catalog to the dev center.
154158

159+
You can use this [sample catalog](https://github.com/Azure/deployment-environments) as your repository. Make a fork of the repository for the following steps.
160+
155161
> [!TIP]
156-
> If you are attaching an Azure DevOps repository, use these steps: [Get the clone URL of an Azure DevOps repository](how-to-configure-catalog.md#get-the-clone-url-for-your-azure-devops-repository).
162+
> If you're attaching an Azure DevOps repository, use these steps: [Get the clone URL of an Azure DevOps repository](how-to-configure-catalog.md#get-the-clone-url-for-your-azure-devops-repository).
157163
158-
1. On your [GitHub](https://github.com) account page, select **<> Code**, and then select copy.
159-
1. Take a note of the branch that you're working in.
164+
1. Navigate to your repository, select **<> Code**, and then select copy.
165+
1. Make a note of the branch that you're working in.
160166
1. Take a note of the folder that contains your environment definitions.
161167

162168
:::image type="content" source="media/how-to-create-configure-dev-center/github-info.png" alt-text="Screenshot that shows the GitHub repo with Code, branch, and folder highlighted.":::
163169

164170
### Add a catalog to your dev center
165171

166172
1. Retrieve the secret identifier:
167-
173+
168174
```azurecli
169-
SECRETID=$(az keyvault secret show --vault-name <kv name> --name GHPAT --query id -o tsv)
175+
SECRETID=$(az keyvault secret show --vault-name <keyvaultName> --name GHPAT --query id -o tsv)
170176
echo $SECRETID
171177
```
172178

173-
1. Add Catalog:
179+
1. Add the catalog. Replace `$REPO_URL` with the URL that you copied from your GiHub fork:
174180

175181
```azurecli
176-
# Sample Catalog example
182+
# Sample catalog example
177183
REPO_URL="https://github.com/Azure/deployment-environments.git"
178-
az devcenter admin catalog create --git-hub path="/Environments" branch="main" secret-identifier=$SECRETID uri=$REPO_URL -n <catalog name> -d <devcenter name>
184+
az devcenter admin catalog create --git-hub path="/Environments" branch="main" secret-identifier=$SECRETID uri=$REPO_URL -n <catalogName> -d <devcenterName>
179185
```
180186

181-
1. Confirm that the catalog is successfully added and synced:
187+
1. Confirm that the catalog was successfully added and synced:
182188

183189
```azurecli
184-
az devcenter admin catalog list -d <devcenter name> -o table
190+
az devcenter admin catalog list -d <devcenterName> -o table
185191
```
186192

187193
## Create an environment type
188194

189195
Use an environment type to help you define the different types of environments your development teams can deploy. You can apply different settings for each environment type.
190196

191-
1. Create an Environment Type:
197+
1. Create an environment type:
192198

193199
```azurecli
194-
az devcenter admin environment-type create -d <devcenter name> -n <environment type name>
200+
az devcenter admin environment-type create -d <devcenterName> -n <environmentTypeName>
195201
```
196202

197-
1. Confirm that the Environment type is created:
203+
1. Confirm that the environment type was created:
198204

199205
```azurecli
200-
az devcenter admin environment-type list -d <devcenter name> -o table
206+
az devcenter admin environment-type list -d <devcenterName> -o table
201207
```
202208

203209
## Next steps
204210

205211
In this quickstart, you created a dev center and configured it with an identity, a catalog, and an environment type. To learn how to create and configure a project, advance to the next quickstart.
206212

207213
> [!div class="nextstepaction"]
208-
> [Create and configure a project with Azure CLI](how-to-create-configure-projects.md)
214+
> [Create and configure a project by using the Azure CLI](how-to-create-configure-projects.md)

0 commit comments

Comments
 (0)