You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/deployment-environments/how-to-create-access-environments.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ Code: EnvironmentNotFound
104
104
Message: The environment resource was not found.
105
105
```
106
106
107
-
To resolve the issue, assign the correct permissions: [Give project access to the development team](quickstart-create-and-configure-projects.md#give-project-access-to-the-development-team).
107
+
To resolve the issue, assign the correct permissions: [Give access to the development team](quickstart-create-and-configure-projects.md#give-access-to-the-development-team).
Copy file name to clipboardExpand all lines: articles/deployment-environments/quickstart-create-and-configure-devcenter.md
+30-47Lines changed: 30 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.author: rosemalcolm
7
7
ms.topic: quickstart
8
8
ms.service: deployment-environments
9
9
ms.custom: ignite-2022, build-2023
10
-
ms.date: 04/25/2023
10
+
ms.date: 09/06/2023
11
11
---
12
12
13
13
# Quickstart: Create and configure a dev center for Azure Deployment Environments
@@ -18,14 +18,7 @@ A platform engineering team typically sets up a dev center, attaches external ca
18
18
19
19
The following diagram shows the steps you perform in this quickstart to configure a dev center for Azure Deployment Environments in the Azure portal.
20
20
21
-
:::image type="content" source="media/quickstart-create-and-configure-devcenter/dev-box-build-stages-1a.png" alt-text="Diagram showing the stages required to configure a dev center for Deployment Environments.":::
22
-
23
-
First, you create a dev center to organize your deployment environments resources. Next, you create a key vault to store the GitHub personal access token (PAT) that is used to grant Azure access to your GitHub repository. Then, you attach an identity to the dev center and assign that identity access to the key vault. Then, you add a catalog that stores your IaC templates to the dev center. Finally, you create environment types to define the types of environments that development teams can create.
24
-
25
-
26
-
The following diagram shows the steps you perform in the [Create and configure a project quickstart](quickstart-create-and-configure-projects.md) to configure a project associated with a dev center for Deployment Environments.
27
-
28
-
:::image type="content" source="media/quickstart-create-and-configure-devcenter/dev-box-build-stages-1b.png" alt-text="Diagram showing the stages required to configure a project for Deployment Environments.":::
21
+
:::image type="content" source="media/quickstart-create-and-configure-devcenter/environments-build-stages.png" alt-text="Diagram showing the stages required to configure a dev center for Deployment Environments.":::
29
22
30
23
You need to perform the steps in both quickstarts before you can create a deployment environment.
31
24
@@ -67,31 +60,12 @@ To create and configure a Dev center in Azure Deployment Environments by using t
67
60
68
61
:::image type="content" source="media/quickstart-create-and-configure-devcenter/deployment-environments-devcenter-created.png" alt-text="Screenshot that shows the Dev centers overview, to confirm that the dev center is created.":::
69
62
70
-
## Create a Key Vault
71
-
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. Key Vaults can control access with either access policies or role-based access control (RBAC). If you have an existing key vault, you can use it, but you should check whether it uses access policies or RBAC assignments to control access. In this quickstart, you create an RBAC Key Vault. For help with configuring an access policy for a key vault, see [Assign a Key Vault access policy](/azure/key-vault/general/assign-access-policy?branch=main&tabs=azure-portal).
72
-
73
-
If you don't have an existing key vault, use the following steps to create one:
63
+
### Create a Key Vault
64
+
When you are using a GitHub repository or an Azure DevOps repository to store your [catalog](./concept-environments-key-concepts.md#catalogs), you need an Azure Key Vault to store a personal access token (PAT) that is used to grant Azure access to your repository. Key Vaults can control access with either access policies or role-based access control (RBAC). If you have an existing key vault, you can use it, but you should check whether it uses access policies or RBAC assignments to control access. This quickstart assumes you're using an RBAC Key Vault and a GitHub repository.
74
65
75
-
1. Sign in to the [Azure portal](https://portal.azure.com).
76
-
1. In the Search box, enter *Key Vault*.
77
-
1. From the results list, select **Key Vault**.
78
-
1. On the Key Vault page, select **Create**.
79
-
1. On the Create key vault tab, provide the following information:
66
+
If you don't have an existing key vault, use the following steps to create one: [Quickstart: Create a key vault using the Azure portal](/azure/key-vault/general/quick-create-portal).
80
67
81
-
|Name |Value |
82
-
|----------|-----------|
83
-
|**Name**|Enter a name for the key vault.|
84
-
|**Subscription**|Select the subscription in which you want to create the key vault.|
85
-
|**Resource group**|Either use an existing resource group or select **Create new** and enter a name for the resource group.|
86
-
|**Location**|Select the location or region where you want to create the key vault.|
87
-
88
-
Leave the other options at their defaults.
89
-
90
-
1. On the Access configuration tab, select **Azure role-based access control**, and then select **Review + create**.
91
-
92
-
1. On the Review + create tab, select **Create**.
93
-
94
-
## Create a personal access token
68
+
### Configure a personal access token
95
69
Using an authentication token like a GitHub PAT enables you to share your repository securely. GitHub offers classic PATs, and fine-grained PATs. Fine-grained and classic PATs work with Azure Deployment Environments, but fine-grained tokens give you more granular control over the repositories to which you're allowing access.
96
70
97
71
> [!TIP]
@@ -143,11 +117,11 @@ Using an authentication token like a GitHub PAT enables you to share your reposi
143
117
- Select **Create**.
144
118
1. Leave this tab open, you need to come back to the Key Vault later.
145
119
146
-
## Attach an identity to the dev center
120
+
## Configure a managed identity for the dev center
147
121
148
122
After you create a dev center, attach an [identity](concept-environments-key-concepts.md#identities) to the dev center. You can attach either a system-assigned managed identity or a user-assigned managed identity. Learn about the two [types of identities](how-to-configure-managed-identity.md#add-a-managed-identity).
149
123
150
-
In this quickstart, you configure a system-assigned managed identity for your dev center.
124
+
In this quickstart, you configure a system-assigned managed identity for your dev center. You then assign roles to the managed identity to allow the dev center to create environment types in your subscription and read the key vault secret that contains the GitHub PAT.
151
125
152
126
### Attach a system-assigned managed identity
153
127
@@ -161,23 +135,32 @@ To attach a system-assigned managed identity to your dev center:
161
135
162
136
1. In the **Enable system assigned managed identity** dialog, select **Yes**.
163
137
164
-
### Assign the system-assigned managed identity access to the key vault secret
165
-
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 (RBAC) or Vault access policy. In this quickstart, you use an RBAC key vault.
138
+
### Assign roles for the dev center managed identity
166
139
167
-
Configure vault access:
168
-
1. In the Azure portal, go to the key vault that contains the secret with the personal access token.
140
+
The managed identity that represents your dev center requires access to the subscriptions where you configure the [project environment types](concept-environments-key-concepts.md#project-environment-types), and to the key vault secret that stores your GitHub PAT.
169
141
170
-
1. In the left menu, select **Access control (IAM)**.
142
+
1. Navigate to your dev center.
143
+
1. On the left menu under Settings, select **Identity**.
144
+
1. Under System assigned > Permissions, select **Azure role assignments**.
171
145
172
-
1. Select **Add** > **Add role assignment**.
146
+
:::image type="content" source="media/quickstart-create-configure-projects/system-assigned-managed-identity.png" alt-text="Screenshot that shows a system-assigned managed identity with Role assignments highlighted.":::
173
147
174
-
1.Assign the following role. For detailed steps, see [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md).
148
+
1.To give access to the subscription, select **Add role assignment (Preview)**, enter or select the following information, and then select **Save**:
|**Members**| Select the dev center managed identity that you created in [Attach a system-assigned managed identity](#attach-a-system-assigned-managed-identity). |
150
+
|Name |Value |
151
+
|---------|----------|
152
+
|**Scope**|Subscription|
153
+
|**Subscription**|Select the subscription in which to use the managed identity.|
154
+
|**Role**|Owner|
155
+
156
+
1. To give access to the key vault, select **Add role assignment (Preview)**, enter or select the following information, and then select **Save**:
157
+
158
+
|Name |Value |
159
+
|---------|----------|
160
+
|**Scope**|Key Vault|
161
+
|**Subscription**|Select the subscription in which to use the managed identity.|
162
+
|**Resource**|Select the key vault that you created earlier.|
163
+
|**Role**|Key Vault Secrets User|
181
164
182
165
## Add a catalog to the dev center
183
166
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.
@@ -229,7 +212,7 @@ You also need the path to the secret you created in the key vault.
229
212
|**Git clone URI**| Enter or paste the clone URL for either your GitHub repository or your Azure DevOps repository.<br />*Sample catalog example:*`https://github.com/Azure/deployment-environments.git`|
230
213
|**Branch**| Enter the repository branch to connect to.<br />*Sample catalog example:*`main`|
231
214
|**Folder path**| Enter the folder path relative to the clone URI that contains subfolders that hold your environment definitions. <br /> The folder path is for the folder with subfolders containing environment definition manifests, not for the folder with the environment definition manifest itself. The following image shows the sample catalog folder structure.<br />*Sample catalog example:*`/Environments`<br /> :::image type="content" source="media/how-to-configure-catalog/github-folders.png" alt-text="Screenshot showing Environments sample folder in GitHub."::: The folder path can begin with or without a forward slash (`/`).|
232
-
|**Secret identifier**| Enter the [secret identifier](#create-a-personal-access-token) that contains your personal access token for the repository.<br /> When you copy a secret identifier, the connection string includes a version identifier at the end, like in this example: `https://contoso-kv.vault.azure.net/secrets/GitHub-repo-pat/9376b432b72441a1b9e795695708ea5a`.<br />Removing the version identifier ensures that Deployment Environments fetches the latest version of the secret from the key vault. If your personal access token expires, only the key vault needs to be updated. <br />*Example secret identifier:*`https://contoso-kv.vault.azure.net/secrets/GitHub-repo-pat`|
215
+
|**Secret identifier**| Enter the [secret identifier](#configure-a-personal-access-token) that contains your personal access token for the repository.<br /> When you copy a secret identifier, the connection string includes a version identifier at the end, like in this example: `https://contoso-kv.vault.azure.net/secrets/GitHub-repo-pat/9376b432b72441a1b9e795695708ea5a`.<br />Removing the version identifier ensures that Deployment Environments fetches the latest version of the secret from the key vault. If your personal access token expires, only the key vault needs to be updated. <br />*Example secret identifier:*`https://contoso-kv.vault.azure.net/secrets/GitHub-repo-pat`|
233
216
234
217
:::image type="content" source="media/how-to-configure-catalog/add-catalog-form-inline.png" alt-text="Screenshot that shows how to add a catalog to a dev center." lightbox="media/how-to-configure-catalog/add-catalog-form-expanded.png":::
0 commit comments