Skip to content

Commit 3d90996

Browse files
authored
Update how-to-deploy-osdu-admin-ui.md
1 parent 23ed5a9 commit 3d90996

File tree

1 file changed

+58
-54
lines changed

1 file changed

+58
-54
lines changed

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

Lines changed: 58 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ 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
@@ -22,36 +22,34 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
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. Click on Open to clone the 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. Do not add any additional 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,47 @@ 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 login 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 login 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)
73+
74+
1. Make sure the correct subscription is selected by running the following command:
75+
```azurecli-interactive
76+
az account show
77+
```
78+
1. If you need to change subscription:
79+
```azurecli-interactive
80+
az account set --subscription <subscription-id>
81+
```
7782

7883
## Configure environment variables
7984
1. Fetch `client-id` as authAppId, `resource-group`, `subscription-id`, and `location`.
8085

81-
![Screenshot that shows how to fetch location and resource group.](./media/how-to-deploy-osdu-admin-ui/location-resource-group.png)
86+
[![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)
8287

83-
2. Fetch the value of `id` as the subscription ID by running the following command on the terminal.
88+
1. Fetch the value of `id` as the subscription ID by running the following command on the terminal.
8489
```azurecli-interactive
8590
az account show
8691
```
8792

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.
93+
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.
8994
```azurecli-interactive
9095
az account set --subscription <subscription-id>
9196
```
9297
93-
4. Enter the required environment variables on the terminal.
98+
1. Enter the required environment variables on the terminal.
9499
```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"
100+
export ADMINUI_CLIENT_ID="" ## App Registration to be used by OSDU Admin UI, usually the client ID used to provision ADME
101+
export WEBSITE_NAME="" ## Unique name of the static web app or storage account that will be generated
102+
export RESOURCE_GROUP="" ## Name of resource group
103+
export LOCATION="" ## Azure region to deploy to, i.e. "westeurope"
102104
```
103105
104106
## Deploy storage account
@@ -129,32 +131,34 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
129131
--index-document index.html
130132
```
131133
132-
1. Fetch the redirect URI.
134+
1. Set $web container permissions to allow anonymous access.
133135
```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"
136+
az storage container set-permission \
137+
--name '$web' \
138+
--account-name $WEBSITE_NAME \
139+
--public-access blob
136140
```
137141
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"
142+
1. Add the redirect URI to the App Registration.
143+
```azurecli-interactive
144+
export REDIRECT_URI=$(az storage account show --resource-group $RESOURCE_GROUP --name $WEBSITE_NAME --query "primaryEndpoints.web") && \
145+
echo "Redirect URL: $REDIRECT_URI" && \
146+
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"
141147
```
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)
148+
149+
[![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)
146150

147151
## Build and deploy the web app
148152

149153
1. Navigate to the `OSDUApp` folder.
150154
```bash
151155
cd OSDUApp/
152156
```
153-
2. Install the dependencies.
157+
1. Install the dependencies.
154158
```nodejs
155159
npm install
156160
```
157-
3. Modify the parameters in the config file located at `/src/config/config.json`.
161+
1. Modify the parameters in the config file located at `/src/config/config.json`.
158162
```json
159163
{
160164
"mapboxKey": "key", // This is optional for the access token from Mapbox.com and used to visualize data on the map feature.
@@ -182,19 +186,19 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
182186
}
183187
```
184188

189+
> [!NOTE]
190+
> [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.
185191

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.
192+
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.
189193
190-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/graph-permission.png" alt-text="Screenshot that shows graph permissions.":::
194+
[![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)
191195
192-
5. Build the web UI.
196+
1. Build the web UI.
193197
```bash
194198
ng build
195199
```
196200
197-
6. Upload the build to Storage Account.
201+
1. Upload the build to Storage Account.
198202
```azurecli-interactive
199203
az storage blob upload-batch \
200204
--account-name $WEBSITE_NAME \
@@ -203,12 +207,12 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
203207
--overwrite
204208
```
205209
206-
7. Fetch the website URL.
210+
1. Fetch the website URL.
207211
```bash
208212
echo $REDIRECT_URI
209213
```
210214
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.
215+
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.
212216

213217
## References
214218

0 commit comments

Comments
 (0)