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
@@ -15,18 +15,70 @@ This guide shows you how to deploy the OSDU Admin UI on top of your Azure Data M
15
15
16
16
The OSDU Admin UI enables platform administrators to manage the Azure Data Manager for Energy data partition you connect it to. The management tasks include entitlements (user and group management), legal tags, schemas, reference data, view, and visualize objects on a map.
17
17
18
+
## Deployment options
19
+
20
+
There are two deployment options for the OSDU Admin UI:
21
+
22
+
1.**[Quick-deploy](#quick-deploy)**: One-select deploy using Azure Container Apps. This deployment is the easiest and quickest way to deploy the OSDU Admin UI. It supports both public and private deployments.
23
+
24
+
1.**[Custom deployment](#custom-deployment)**: Build and deploy the OSDU Admin UI using Azure Storage Account. This deployment option is more customizable and allows you to configure the deployment to your needs.
25
+
18
26
## Prerequisites
19
-
- Install [Visual Studio Code with Dev Containers](https://code.visualstudio.com/docs/devcontainers/tutorial). It's possible to deploy the OSDU Admin UI from your local computer using either Linux or Windows Subsystem for Linux (WSL), we recommend using a Dev Container to eliminate potential conflicts of tooling versions, environments etc.
27
+
20
28
- An [Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
21
29
- An [Microsoft Entra ID App Registration](/entra/identity-platform/quickstart-register-app). <br> This App Registration can be the same as the one used for the Azure Data Manager for Energy instance. The following API permissions are required on the App Registration for the Admin UI to function properly.
Upon first login to the Admin UI it will request the necessary permissions. You can also grant the required permissions in advance, see [App Registration API Permission documentation](/entra/identity-platform/quickstart-configure-app-access-web-apis#application-permission-to-microsoft-graph).
34
+
Upon first sign-in to the Admin UI, it requests the necessary permissions. You can also grant the required permissions in advance. See [App Registration API Permission documentation](/entra/identity-platform/quickstart-configure-app-access-web-apis#application-permission-to-microsoft-graph).
35
+
36
+
## Quick-deploy
37
+
38
+
1. Select the `Deploy to Azure` button to deploy the OSDU Admin UI using Azure Container Apps.
39
+
40
+
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FADME-Solution-Accelerators%2Frefs%2Fheads%2Fmain%2Fartifacts%2Fadminui%2Fazuredeploy.json)
41
+
42
+
1. Fill in the required parameters in the Azure portal. For more information about the parameters, see the [parameters section](#parameters) for more information.
43
+
44
+
[](./media/how-to-deploy-osdu-admin-ui/quickdeploy.png#lightbox)
45
+
46
+
1. Select **Review + create** and then **Create** to deploy the OSDU Admin UI.
47
+
48
+
1. Check the `Outputs` section for the URL of the deployed OSDU Admin UI.
49
+
50
+
1. Configure the [ADME CORS policy](#add-cors-policy) and [App Registration SPA redirect URI](#add-redirect-uri-to-app-registration) with the website URL.
51
+
52
+
1. Open the URL in a browser and validate that it's working correctly and connected to the correct Azure Data Manager for Energy instance.
53
+
54
+
### Parameters
55
+
56
+
| Parameter | Description | Required |
57
+
| --- | --- | ---: |
58
+
| Subscription | The Azure subscription to deploy the OSDU Admin UI to. | Yes |
59
+
| Resource group | The resource group to deploy the OSDU Admin UI to. | Yes |
60
+
| Region | The Azure region to deploy the OSDU Admin UI to. | Yes |
61
+
| Name | The name of the OSDU Admin UI instance. Other resources use this name as the base-name and append a service abbreviation | Yes |
62
+
| Container Image | The container image to use for the OSDU Admin UI. See [OSDU Forum Admin UI Container Registry](https://community.opengroup.org/osdu/ui/admin-ui-group/admin-ui-totalenergies/admin-ui-totalenergies/container_registry) for available images. | Yes |
63
+
| Osdu Endpoint | The endpoint of the Azure Data Manager for Energy or OSDU instance to connect to. | Yes |
64
+
| Data Partition ID | The data partition ID of the Azure Data Manager for Energy or OSDU instance to connect to. | Yes |
65
+
| Entitlements Domain Name | The domain name to use for the entitlements service. Keep `.dataservices.energy` for any ADME deployment, only update if you're using another OSDU implementation. | Yes |
66
+
| Client ID | The client ID of the App Registration to use for the OSDU Admin UI. | Yes |
67
+
| Scope | The scope of the App Registration used by Azure Data Manager for Energy or OSDU. If the Client ID is the ADME App Registration, you can leave this default. | Yes |
68
+
| Connector Endpoint |*Optional:* The OSDU Admin UI [Connector API](https://community.opengroup.org/osdu/ui/admin-ui-group/admin-ui-totalenergies/connector-api-totalenergies) endpoint to use for the Admin UI. | No |
69
+
| Enable Private Network |*Optional:* Enable private network access to the OSDU Admin UI. | No |
70
+
| Enable Logging |*Optional:* Enable logging for the OSDU Admin UI. | No |
71
+
72
+
## Custom deployment
73
+
74
+
### Prepare your computer
75
+
76
+
- Install [Visual Studio Code with Dev Containers](https://code.visualstudio.com/docs/devcontainers/tutorial). It's possible to deploy the OSDU Admin UI from your local computer using either Linux or Windows Subsystem for Linux (WSL), we recommend using a Dev Container to eliminate potential conflicts of tooling versions, environments etc.
77
+
78
+
### Environment setup
27
79
28
-
## Environment setup
29
80
1. Use the Dev Container in Visual Studio Code to deploy the OSDU Admin UI to eliminate conflicts from your local machine.
81
+
30
82
1. Select `Remote - Containers | Open` to open a Development Container and clone the OSDU Admin UI repository.
31
83
32
84
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://community.opengroup.org/osdu/ui/admin-ui-group/admin-ui-totalenergies/admin-ui-totalenergies)
@@ -57,6 +109,7 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
[](./media/how-to-deploy-osdu-admin-ui/install-screen.png#lightbox)
@@ -80,25 +133,27 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
80
133
az account set --subscription <subscription-id>
81
134
```
82
135
83
-
## Configure environment variables
136
+
### Configure environment variables
84
137
85
138
1. Enter the required environment variables on the terminal.
86
-
```bash
87
-
export ADMINUI_CLIENT_ID="" ## App Registration to be used by OSDU Admin UI, usually the client ID used to provision ADME
139
+
140
+
```bash
88
141
export WEBSITE_NAME="" ## Unique name of the static web app or storage account that will be generated. Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only.
89
142
export RESOURCE_GROUP="" ## Name of resource group
90
143
export LOCATION="" ## Azure region to deploy to, i.e. "westeurope"
91
-
```
144
+
```
92
145
93
146
## Deploy storage account
94
147
1. Create resource group. Skip this step if the resource group exists already.
148
+
95
149
```azurecli
96
150
az group create \
97
151
--name $RESOURCE_GROUP \
98
152
--location $LOCATION
99
153
```
100
154
101
155
1. Create storage account.
156
+
102
157
```azurecli
103
158
az storage account create \
104
159
--resource-group $RESOURCE_GROUP \
@@ -110,6 +165,7 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
110
165
```
111
166
112
167
1. Configure the static website.
168
+
113
169
```azurecli
114
170
az storage blob service-properties update \
115
171
--account-name $WEBSITE_NAME \
@@ -119,65 +175,120 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
119
175
```
120
176
121
177
1. Set $web container permissions to allow anonymous access.
echo "Add the redirect URI above to the following App Registration's Single-page Application (SPA) section: https://ms.portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/Authentication/appId/$ADMINUI_CLIENT_ID/isMSAApp~/false"
134
-
```
135
-
136
-
[](./media/how-to-deploy-osdu-admin-ui/app-uri-config.png#lightbox)
137
-
138
-
## Build and deploy the web app
186
+
### Build and deploy the web app
139
187
140
188
1. Navigate to the `OSDUApp` folder.
189
+
141
190
```bash
142
191
cd OSDUApp/
143
192
```
193
+
194
+
1. Copy Azure routing.ts file.
195
+
196
+
```bash
197
+
cp providers/azure/routing.ts src/app/routing.ts
198
+
```
199
+
144
200
1. Install the dependencies.
201
+
145
202
```nodejs
146
203
npm install
147
204
```
205
+
148
206
1. Modify the parameters in the config file located at `/src/config/config.json`.
207
+
208
+
[Code snippet](#tab/code)
209
+
210
+
Replace the values of the environment variables with your values.
211
+
212
+
```bash
213
+
export OSDU_ENDPOINT="" # Endpoint of the Azure Data Manager for Energy or OSDU instance to connect to
214
+
export DATA_PARTITION_ID="" # ADME Data Partition ID (i.e. opendes)
215
+
export DOMAIN_NAME=".dataservices.energy" # Domain name to use for the entitlements service. Use .dataservices.energy for any ADME deployment.
216
+
export TENANT_ID="" # Entra ID tenant ID
217
+
export CLIENT_ID="" # App Registration ID to use for the admin UI, usually the same as the ADME App Registration ID
218
+
export SCOPE="" # Scope of the ADME instance, i.e. "6ee7e0d6-0641-4b29-a283-541c5d00655a/.default"
219
+
export GRAPH_ENDPOINT="https://graph.microsoft.com/v1.0/" # Microsoft Graph API endpoint
"mapboxKey": "key", // This is optional for the access token from Mapbox.com and used to visualize data on the map feature.
152
262
...
263
+
"domain_name": ".dataservices.energy", // Domain name to use for the entitlements service. Use .dataservices.energy for any ADME deployment.
153
264
"data_partition": "<adme_data_partition>", // ADME Data Partition ID (i.e. opendes)
154
-
"idp": {
155
-
...
156
-
"tenant_id": "<tenant_id>", // Entra ID tenant ID
157
-
"client_id": "<client_id>", // App Registration ID to use for the admin UI, usually the same as the ADME App Registration ID, i.e. "6ee7e0d6-0641-4b29-a283-541c5d00655a"
158
-
"redirect_uri": "<redirect_uri>", // This is the website URL ($REDIRECT_URI), i.e. "https://contoso.z1.web.core.windows.net"
159
-
"scope": "<client_id>/.default" // Scope of the ADME instance, i.e. "6ee7e0d6-0641-4b29-a283-541c5d00655a/.default"
160
-
},
161
-
"api_endpoints": { // Just replace contoso.energy.azure.com with your ADME_URL after removing https or wwww in all the API endpoints below.
"client_id": "<client_id>", // App Registration ID to use for the admin UI, usually the same as the ADME App Registration ID, i.e. "6ee7e0d6-0641-4b29-a283-541c5d00655a"
269
+
"redirect_uri": "<redirect_uri>", // This is the website URL ($REDIRECT_URI), i.e. "https://contoso.z1.web.core.windows.net"
270
+
"scope": "<client_id>/.default" // Scope of the ADME instance, i.e. "6ee7e0d6-0641-4b29-a283-541c5d00655a/.default"
271
+
},
272
+
"api_endpoints": { // Just replace contoso.energy.azure.com with your ADME_URL after removing https or wwww in all the API endpoints below.
> [OSDU Connector API](https://community.opengroup.org/osdu/ui/admin-ui-group/admin-ui-totalenergies/connector-api-totalenergies) is built as an interface between consumers and OSDU APIs wrapping some API chain calls and objects. Currently, it manages all operations and actions on project and scenario objects.
178
-
179
-
1. If you are not able to give access to the app as defined in the prerequisite step, remove `User.Read`, `User.ReadBasic.All` and `Application.Read.All` from the `src/config/environments/environment.ts`. Removing these permissions would disable the Admin UI from converting the OIDs of users and applications into the user names and application names respectively and hence would disable the autocomplete feature of resolving OIDs from names.
180
-
291
+
181
292
1. Build the web UI.
182
293
```bash
183
294
ng build
@@ -197,8 +308,20 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
197
308
echo $REDIRECT_URI
198
309
```
199
310
311
+
1. Configure the [ADME CORS policy](#add-cors-policy) and [App Registration SPA redirect URI](#add-redirect-uri-to-app-registration) with the website URL.
312
+
200
313
1. Open the Website URL in the browser and validate that it's working correctly and connected to the correct Azure Data Manager for Energy instance.
201
314
315
+
## Add CORS policy
316
+
317
+
For the Admin UI to work correctly, you need to add the redirect URI to the CORS policy on the Azure Data Manager for Energy instance.
318
+
Learn how to add a CORS policy to your Azure Data Manager for Energy instance, see the [CORS policy documentation](how-to-enable-cors.md).
319
+
320
+
## Add redirect URI to App Registration
321
+
322
+
You need to add the redirect URI as a Single-Page App to the App Registration used by the Admin UI.
323
+
To configure the redirect URI, follow the steps in the [Add redirect URI to App Registration](/entra/identity-platform/scenario-spa-app-registration) documentation.
324
+
202
325
## Next steps
203
326
After you have a successful Admin UI working, you can:
0 commit comments