Skip to content

Commit c2cc9ad

Browse files
Merge pull request #266804 from EirikHaughom/patch-1
Update how-to-deploy-osdu-admin-ui.md
2 parents 8d3a1c5 + c944c8f commit c2cc9ad

File tree

1 file changed

+52
-57
lines changed

1 file changed

+52
-57
lines changed

articles/energy-data-services/how-to-deploy-osdu-admin-ui.md

Lines changed: 52 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,52 @@ description: Learn how to deploy the OSDU Admin UI on top of your Azure Data Man
44
ms.service: energy-data-services
55
ms.topic: how-to
66
ms.reviewer: shikhagarg
7-
ms.author: shikhagarg
8-
author: shikhagarg1
7+
ms.author: eihaugho
8+
author: EirikHaughom
99
ms.date: 02/15/2024
1010
---
1111
# Deploy OSDU Admin UI on top of Azure Data Manager for Energy
1212

1313
This guide shows you how to deploy the OSDU Admin UI on top of your Azure Data Manager for Energy instance.
1414

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.
1616

1717
## Prerequisites
1818
- 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).
2020
- Add the App Registration permissions to enable Admin UI to function properly:
2121
- [Application.Read.All](/graph/permissions-reference#applicationreadall)
2222
- [User.Read](/graph/permissions-reference#applicationreadall)
2323
- [User.Read.All](/graph/permissions-reference#userreadall)
2424

25-
:::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+
[![Screenshot that shows applications read all permission.](./media/how-to-deploy-osdu-admin-ui/app-permission-1.png)](./media/how-to-deploy-osdu-admin-ui/app-permission-1.png#lightbox)
26+
27+
[![Screenshot that shows user read all permission.](./media/how-to-deploy-osdu-admin-ui/app-permission-2.png)](./media/how-to-deploy-osdu-admin-ui/app-permission-2.png#lightbox)
2828

2929
## Environment setup
3030
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.
3232

3333
[![Open in Remote - Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Remote%20-%20Containers&message=Open&color=blue&logo=visualstudiocode)](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)
3434

35-
3. Accept the cloning prompt.
35+
1. Accept the cloning prompt.
3636

37-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/clone-the-repository.png" alt-text="Screenshot that shows cloning the repository.":::
37+
[![Screenshot that shows cloning the repository.](./media/how-to-deploy-osdu-admin-ui/clone-the-repository.png)](./media/how-to-deploy-osdu-admin-ui/clone-the-repository.png#lightbox)
3838

39-
4. When prompted for a container configuration template,
39+
1. When prompted for a container configuration template.
4040
1. Select [Ubuntu](https://github.com/devcontainers/templates/tree/main/src/ubuntu).
4141
2. Accept the default version.
42-
3. Add the [Azure CLI](https://github.com/devcontainers/features/tree/main/src/azure-cli) feature.
42+
3. Don't add any extra features.
4343

44-
![Screenshot that shows option selection.](./media/how-to-deploy-osdu-admin-ui/option-selection.png)
44+
1. After a few minutes, the devcontainer is running.
4545

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+
[![Screenshot that shows running devcontainer.](./media/how-to-deploy-osdu-admin-ui/running-devcontainer.png)](./media/how-to-deploy-osdu-admin-ui/running-devcontainer.png#lightbox)
4947

50-
6. Open the terminal.
48+
1. Open the terminal.
5149

52-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/open-terminal.png" alt-text="Screenshot that shows opening terminal.":::
50+
[![Screenshot that shows opening terminal.](./media/how-to-deploy-osdu-admin-ui/open-terminal.png)](./media/how-to-deploy-osdu-admin-ui/open-terminal.png#lightbox)
5351

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.
5553

5654
```bash
5755
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
@@ -62,43 +60,38 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
6260
npm install -g @angular/[email protected] && \
6361
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
6462
```
63+
[![Screenshot that shows installation.](./media/how-to-deploy-osdu-admin-ui/install-screen.png)](./media/how-to-deploy-osdu-admin-ui/install-screen.png#lightbox)
6564

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.
6966
```azurecli-interactive
7067
az login
7168
```
7269

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.
7671

72+
[![Screenshot that shows successful login.](./media/how-to-deploy-osdu-admin-ui/login.png)](./media/how-to-deploy-osdu-admin-ui/login.png#lightbox)
7773

7874
## Configure environment variables
7975
1. Fetch `client-id` as authAppId, `resource-group`, `subscription-id`, and `location`.
8076

81-
![Screenshot that shows how to fetch location and resource group.](./media/how-to-deploy-osdu-admin-ui/location-resource-group.png)
77+
[![Screenshot that shows how to fetch location and resource group.](./media/how-to-deploy-osdu-admin-ui/location-resource-group.png)](./media/how-to-deploy-osdu-admin-ui/location-resource-group.png#lightbox)
8278

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.
8480
```azurecli-interactive
8581
az account show
8682
```
8783

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.
8985
```azurecli-interactive
9086
az account set --subscription <subscription-id>
9187
```
9288
93-
4. Enter the required environment variables on the terminal.
89+
1. Enter the required environment variables on the terminal.
9490
```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"
10295
```
10396
10497
## Deploy storage account
@@ -129,32 +122,34 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
129122
--index-document index.html
130123
```
131124
132-
1. Fetch the redirect URI.
125+
1. Set $web container permissions to allow anonymous access.
133126
```azurecli-interactive
134-
export REDIRECT_URI=$(az storage account show --resource-group $RESOURCE_GROUP --name $WEBSITE_NAME --query "primaryEndpoints.web") && \
135-
echo "Redirect URL: $REDIRECT_URI"
127+
az storage container set-permission \
128+
--name '$web' \
129+
--account-name $WEBSITE_NAME \
130+
--public-access blob
136131
```
137132
138-
1. Get the App Registration's Single-page Application (SPA) section.
139-
```azurecli-interactive
140-
echo "https://ms.portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/Authentication/appId/$CLIENT_ID/isMSAApp~/false"
133+
1. Add the redirect URI to the App Registration.
134+
```azurecli-interactive
135+
export REDIRECT_URI=$(az storage account show --resource-group $RESOURCE_GROUP --name $WEBSITE_NAME --query "primaryEndpoints.web") && \
136+
echo "Redirect URL: $REDIRECT_URI" && \
137+
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"
141138
```
142-
143-
1. Open the link you got from the above result in the browser and add the `REDIRECT_URI`.
144-
145-
![Screenshot showing redirect URIs of an App Registration.](./media/how-to-deploy-osdu-admin-ui/app-uri-config.png)
139+
140+
[![Screenshot showing redirect URIs of an App Registration.](./media/how-to-deploy-osdu-admin-ui/app-uri-config.png)](./media/how-to-deploy-osdu-admin-ui/app-uri-config.png#lightbox)
146141

147142
## Build and deploy the web app
148143

149144
1. Navigate to the `OSDUApp` folder.
150145
```bash
151146
cd OSDUApp/
152147
```
153-
2. Install the dependencies.
148+
1. Install the dependencies.
154149
```nodejs
155150
npm install
156151
```
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`.
158153
```json
159154
{
160155
"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
182177
}
183178
```
184179

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.
185182

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.
189184
190-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/graph-permission.png" alt-text="Screenshot that shows graph permissions.":::
185+
[![Screenshot that shows graph permissions.](./media/how-to-deploy-osdu-admin-ui/graph-permission.png)](./media/how-to-deploy-osdu-admin-ui/graph-permission.png#lightbox)
191186
192-
5. Build the web UI.
187+
1. Build the web UI.
193188
```bash
194189
ng build
195190
```
196191
197-
6. Upload the build to Storage Account.
192+
1. Upload the build to Storage Account.
198193
```azurecli-interactive
199194
az storage blob upload-batch \
200195
--account-name $WEBSITE_NAME \
@@ -203,14 +198,14 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
203198
--overwrite
204199
```
205200
206-
7. Fetch the website URL.
201+
1. Fetch the website URL.
207202
```bash
208203
echo $REDIRECT_URI
209204
```
210205
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.
212207

213208
## References
214209

215210
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

Comments
 (0)