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: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,26 +228,32 @@ When setting up a deployment you will need to set the following variables for yo
228
228
229
229
|**Variable**|**Description**|
230
230
|-|-|
231
-
|AZURE_ENV_NAME|The name of the Azure environment you want to deploy to, such as dev, test, prod, etc.|
232
-
|AZURE_LOCATION|The Azure location you want to deploy to, such as eastus, westus, etc.|
231
+
|AZURE_CLIENT_ID|The Client ID of the identity you want to use to deploy the application.|
232
+
|AZURE_ENV_NAME|The name of the Azure environment you want to deploy to, such as `copilot-usage-advanced-dashboard-dev`.|
233
+
|AZURE_LOCATION|The Azure location you want to deploy to, such as `eastus`, `westus`, etc.|
233
234
|AZURE_RESOURCE_GROUP|The name of the resource group you want to deploy to.|
234
235
|AZURE_SUBSCRIPTION_ID|The GUID for the subscription you want to deploy to.|
236
+
|AZURE_USER_PRINCIPAL_ID|The Object ID of a user you want to grant access to to the Azure Key Vault.|
237
+
|AZURE_TENANT_ID|The Azure Tenant ID of the identity you want to use to deploy the application.|
235
238
|GH_ORGANIZATION_SLUGS|This is your GitHub Organization name. This can be a comma-separated list of orgs if you want to index multiple orgs.|
236
239
|GH_PAT|This is your GitHub Personal Access Token. Mark this variable as **secret** in your pipeline.|
240
+
|AZURE_AUTHENTICATION_ENABLED|Enable Entra ID Single-Sign On (SSO) authentication.|
241
+
|AZURE_AUTHENTICATION_CLIENT_ID|The Client ID of the Azure AD application.|
242
+
|AZURE_AUTHENTICATION_OPEN_ID_ISSUER|The OpenID Connect issuer URL for Azure AD.|
237
243
238
244
## Azure DevOps
239
-
If you are using Azure DevOps, make sure you change the name of the service connection to the name of your service connection. You will need to change line
245
+
If you are using Azure DevOps, make sure you change the name of the service connection to the name of your service connection. You will need to change line
240
246
30 and 45 of the `azure-dev.yml` file located in the `.azdo/pipelines` folder.
241
247
242
248
To create a service connection you can use the azd pipeline config --provider azdo command from the terminal. You can read more here:
You will need to install the "Install azd" extension from the [marketplace](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azd) in your Azure DevOps organization if you haven't already done so.
246
252
247
-
You will need to manually create the DevOps variables yourself in the Azure DevOps GUI.
253
+
You will need to manually create the DevOps variables yourself in the Azure DevOps GUI.
248
254
249
255
## GitHub Actions
250
-
You will create a pipeline using the `azure-dev.yml` file located in the `.github/workflows` folder. You will need to manually create the GitHub variables yourself in the GitHub GUI.
256
+
You will create a pipeline using the `azure-dev.yml` file located in the `.github/workflows` folder. You will need to manually create the GitHub variables yourself in the GitHub GUI.
251
257
252
258
## 1. Azure Container Apps
253
259
if you are using Azure Container Apps, please refer to the [Azure Container Apps deployment document](deploy/azure-container-apps.md).
Copy file name to clipboardExpand all lines: deploy/azure-container-apps.md
+49-3Lines changed: 49 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,11 @@ This document describes how to deploy the application in Azure Container Apps us
25
25
azd env set GITHUB_ORGANIZATION_SLUGS ...
26
26
```
27
27
28
-
1.**Optional*** Run the following commands to set the Grafana credentials. Note that not setting this values results in the deployment script generating credentials.
28
+
1.**Optional** Run the following commands to set the Grafana credentials. Note that not setting this values results in the deployment script generating credentials.
29
29
30
30
```shell
31
31
azd env set GRAFANA_USERNAME ...
32
+
32
33
azd env set GRAFANA_PASSWORD ...
33
34
```
34
35
@@ -37,7 +38,52 @@ This document describes how to deploy the application in Azure Container Apps us
37
38
```shell
38
39
azd up
39
40
```
40
-
41
+
41
42
1. After the deployment is complete, you can access the application using the URL provided in the output.
42
43
43
-
1. The username & password for the Grafana dashboard can be found in the Key Vault. Note that these are not secure credentials and should be changed.
44
+
1. The username & password for the Grafana dashboard can be found in the Key Vault. Note that the default values (if you didn't specify them or are not using Entra ID auth) are not secure credentials and should be changed.
45
+
46
+
### Optional: Enable Entra ID SSO for Grafana
47
+
48
+
The Grafana dashboard only uses the `Viewer` role. This means all users that can sign in can see the same data. If you need more fine-grained access, you should follow this URL to set up Entra ID SSO for Grafana: [Grafana Entra ID SSO](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/azuread/). You can also limit which users can sign in to the Grafana dashboard using [Entra ID groups](https://learn.microsoft.com/en-us/entra/identity-platform/howto-restrict-your-app-to-a-set-of-users)
49
+
50
+
1. Create an app registration in Entra ID (Azure Active Directory) with the following settings:
-**Supported account types**: Accounts in this organizational directory only (Single tenant)
54
+
-**Redirect URI**: Leave this blank for now, you can update it after the deployment.
55
+
-**Overview->Application (client) ID**: Copy this value, you will need it later.
56
+
-**Overview->Directory (tenant) ID**: Copy this value, you will need it later.
57
+
-**Authentication->Implicit grant and hybrid flows**: Check the box for `ID tokens` to enable OpenID Connect authentication.
58
+
-**API permissions**: Add the following delegated API permissions to allow Container Apps to sign-in users.
59
+
- Microsoft Graph
60
+
-`openid`
61
+
-`profile`
62
+
-`offline_access`
63
+
-`User.Read`
64
+
65
+
1. Run the following command to set the Entra ID tenant ID
66
+
67
+
```shell
68
+
azd env set AZURE_AUTHENTICATION_ENABLED true
69
+
70
+
azd env set AZURE_AUTHENTICATION_CLIENT_ID <your-app-registration-client-id>
71
+
72
+
azd env set AZURE_AUTHENTICATION_OPEN_ID_ISSUER https://login.microsoftonline.com/<your-tenant-id>
73
+
```
74
+
75
+
1. Run the following command to deploy the application.
76
+
77
+
```shell
78
+
azd up
79
+
```
80
+
81
+
1.**Optional**: If you enabled Entra ID authentication, you will need to update the Entra ID app registration with values from the deployment.
82
+
83
+
-**Authentication->Redirect URI**: Update the app registration with the URL of the Grafana dashboard, e.g., `https://<your-container-app-name>.<location>.azurecontainerapps.io/.auth/login/aad/callback`.
84
+
-**Certificates & secrets->Federated credentials**: Add a new federated credential with the following settings:
-**Select managed identity**: Select the managed identity created for the Container App (look in the Azure portal under the Container App's Identity section to find the name of the managed identity).
Copy file name to clipboardExpand all lines: infra/main.bicep
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,8 @@ param grafanaDefinition object
28
28
@description('Id of the user or app to assign application roles')
29
29
paramprincipalIdstring
30
30
31
+
paramuserPrincipalIdstring = ''
32
+
31
33
@description('If true, assign permissions to the principalId. If false, do not assign permissions to the principalId. This is useful for testing purposes or when you want to manage permissions manually.')
0 commit comments