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/energy-data-services/how-to-deploy-osdu-admin-ui.md
+52-57Lines changed: 52 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,54 +4,52 @@ description: Learn how to deploy the OSDU Admin UI on top of your Azure Data Man
4
4
ms.service: energy-data-services
5
5
ms.topic: how-to
6
6
ms.reviewer: shikhagarg
7
-
ms.author: shikhagarg
8
-
author: shikhagarg1
7
+
ms.author: eihaugho
8
+
author: EirikHaughom
9
9
ms.date: 02/15/2024
10
10
---
11
11
# Deploy OSDU Admin UI on top of Azure Data Manager for Energy
12
12
13
13
This guide shows you how to deploy the OSDU Admin UI on top of your Azure Data Manager for Energy instance.
14
14
15
-
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, and view objects and visualize those on a map.
15
+
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.
16
16
17
17
## Prerequisites
18
18
- 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 WSL, we recommend using a Dev Container to eliminate potential conflicts of tooling versions, environments etc.
19
-
-Provision an[Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
19
+
-An[Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
20
20
- Add the App Registration permissions to enable Admin UI to function properly:
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/app-permission-1.png" alt-text="Screenshot that shows applications read all permission.":::
26
-
27
-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/app-permission-2.png" alt-text="Screenshot that shows user read all permission.":::
25
+
[](./media/how-to-deploy-osdu-admin-ui/app-permission-1.png#lightbox)
26
+
27
+
[](./media/how-to-deploy-osdu-admin-ui/app-permission-2.png#lightbox)
28
28
29
29
## Environment setup
30
30
1. Use the Dev Container in Visual Studio Code to deploy the OSDU Admin UI to eliminate conflicts from your local machine.
31
-
2. Click on Open to clone the repository.
31
+
1. Select `Remote - Containers | Open` to open a Development Container and clone the OSDU Admin UI repository.
32
32
33
33
[](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)
34
34
35
-
3. Accept the cloning prompt.
35
+
1. Accept the cloning prompt.
36
36
37
-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/clone-the-repository.png" alt-text="Screenshot that shows cloning therepository.":::
37
+
[](./media/how-to-deploy-osdu-admin-ui/clone-the-repository.png#lightbox)
38
38
39
-
4. When prompted for a container configuration template,
39
+
1. When prompted for a container configuration template.
3.Add the [Azure CLI](https://github.com/devcontainers/features/tree/main/src/azure-cli) feature.
42
+
3.Don't add any extra features.
43
43
44
-

44
+
1. After a few minutes, the devcontainer is running.
45
45
46
-
5. After a few minutes, the devcontainer is running.
47
-
48
-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/running-devcontainer.png" alt-text="Screenshot that shows running devcontainer.":::
46
+
[](./media/how-to-deploy-osdu-admin-ui/running-devcontainer.png#lightbox)
49
47
50
-
6. Open the terminal.
48
+
1. Open the terminal.
51
49
52
-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/open-terminal.png" alt-text="Screenshot that shows opening terminal.":::
50
+
[](./media/how-to-deploy-osdu-admin-ui/open-terminal.png#lightbox)
53
51
54
-
7. Install NVM, Node.js, npm, and Angular CLI by executing the command in the bash terminal.
52
+
1. Install Angular CLI, Azure CLI, Node.js, npm, and NVM.
[](./media/how-to-deploy-osdu-admin-ui/install-screen.png#lightbox)
65
64
66
-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/install-screen.png" alt-text="Screenshot that shows installation.":::
67
-
68
-
8. Log into Azure CLI by executing the command on the terminal. It takes you to the login screen.
65
+
1. Log into Azure CLI by executing the command on the terminal. It takes you to the sign-in screen.
69
66
```azurecli-interactive
70
67
az login
71
68
```
72
69
73
-
9. It takes you to the login screen. Enter your credentials and upon success, you see a success message.
74
-
75
-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/login.png" alt-text="Screenshot that shows successful login.":::
70
+
1. It takes you to the sign-in screen. Enter your credentials and upon success, you see a success message.
76
71
72
+
[](./media/how-to-deploy-osdu-admin-ui/login.png#lightbox)
77
73
78
74
## Configure environment variables
79
75
1. Fetch `client-id` as authAppId, `resource-group`, `subscription-id`, and `location`.
80
76
81
-

77
+
[](./media/how-to-deploy-osdu-admin-ui/location-resource-group.png#lightbox)
82
78
83
-
2. Fetch the value of `id` as the subscription ID by running the following command on the terminal.
79
+
1. Fetch the value of `id` as the subscription ID by running the following command on the terminal.
84
80
```azurecli-interactive
85
81
az account show
86
82
```
87
83
88
-
3. If the above ID isn't same as the `subcription-id` from the Azure Data Manager for Energy instance, you need to change subscription.
84
+
1. If the above ID isn't same as the `subcription-id` from the Azure Data Manager for Energy instance, you need to change subscription.
89
85
```azurecli-interactive
90
86
az account set --subscription <subscription-id>
91
87
```
92
88
93
-
4. Enter the required environment variables on the terminal.
89
+
1. Enter the required environment variables on the terminal.
94
90
```bash
95
-
export CLIENT_ID="<client-id>" ## App Registration to be used by OSDU Admin UI, usually the client ID used to provision ADME
96
-
export TENANT_ID="<tenant-id>" ## Tenant ID
97
-
export ADME_URL="<adme-url>" ## Remove www or https from the text
98
-
export DATA_PARTITION="<partition>"
99
-
export WEBSITE_NAME="<storage-name>" ## Unique name of the storage account or static web app that will be generated
100
-
export RESOURCE_GROUP="<resource-group>" ## Name of resource group
101
-
export LOCATION="<location>" ## Azure region to deploy to, i.e. "westeurope"
91
+
export ADMINUI_CLIENT_ID="" ## App Registration to be used by OSDU Admin UI, usually the client ID used to provision ADME
92
+
export WEBSITE_NAME="" ## Unique name of the static web app or storage account that will be generated
93
+
export RESOURCE_GROUP="" ## Name of resource group
94
+
export LOCATION="" ## Azure region to deploy to, i.e. "westeurope"
102
95
```
103
96
104
97
## Deploy storage account
@@ -129,32 +122,34 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
129
122
--index-document index.html
130
123
```
131
124
132
-
1. Fetch the redirect URI.
125
+
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"
141
138
```
142
-
143
-
1. Open the link you got from the above result in the browser and add the `REDIRECT_URI`.
144
-
145
-

139
+
140
+
[](./media/how-to-deploy-osdu-admin-ui/app-uri-config.png#lightbox)
146
141
147
142
## Build and deploy the web app
148
143
149
144
1. Navigate to the `OSDUApp` folder.
150
145
```bash
151
146
cd OSDUApp/
152
147
```
153
-
2. Install the dependencies.
148
+
1. Install the dependencies.
154
149
```nodejs
155
150
npm install
156
151
```
157
-
3. Modify the parameters in the config file located at `/src/config/config.json`.
152
+
1. Modify the parameters in the config file located at `/src/config/config.json`.
158
153
```json
159
154
{
160
155
"mapboxKey": "key", // This is optional for the access token from Mapbox.com and used to visualize data on the map feature.
@@ -182,19 +177,19 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
182
177
}
183
178
```
184
179
180
+
> [!NOTE]
181
+
> [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.
185
182
186
-
\* [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.
187
-
188
-
4. If you aren't able to give app permissions in the Prerequisite step because of the subscription constraints, remove `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.
183
+
1. If you aren't able to give app permissions in the Prerequisite step because of the subscription constraints, remove `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.
189
184
190
-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/graph-permission.png" alt-text="Screenshot that shows graph permissions.":::
185
+
[](./media/how-to-deploy-osdu-admin-ui/graph-permission.png#lightbox)
191
186
192
-
5. Build the web UI.
187
+
1. Build the web UI.
193
188
```bash
194
189
ng build
195
190
```
196
191
197
-
6. Upload the build to Storage Account.
192
+
1. Upload the build to Storage Account.
198
193
```azurecli-interactive
199
194
az storage blob upload-batch \
200
195
--account-name $WEBSITE_NAME \
@@ -203,14 +198,14 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
203
198
--overwrite
204
199
```
205
200
206
-
7. Fetch the website URL.
201
+
1. Fetch the website URL.
207
202
```bash
208
203
echo $REDIRECT_URI
209
204
```
210
205
211
-
8. 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.
206
+
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.
212
207
213
208
## References
214
209
215
210
For information about OSDU Admin UI, see [OSDU GitLab](https://community.opengroup.org/osdu/ui/admin-ui-group/admin-ui-totalenergies/admin-ui-totalenergies).<br>
216
-
For other deployment methods (Terraform or Azure DevOps pipeline), see [OSDU Admin UI DevOps](https://community.opengroup.org/osdu/ui/admin-ui-group/admin-ui-totalenergies/admin-ui-totalenergies/-/tree/main/OSDUApp/devops/azure).
211
+
For other deployment methods (Terraform or Azure DevOps CI/CD pipeline), see [OSDU Admin UI DevOps](https://community.opengroup.org/osdu/ui/admin-ui-group/admin-ui-totalenergies/admin-ui-totalenergies/-/tree/main/OSDUApp/devops/azure).
0 commit comments