Skip to content

Commit c133665

Browse files
Merge pull request #266935 from EirikHaughom/patch-2
Update how-to-deploy-osdu-admin-ui.md
2 parents 24eeccc + a70bade commit c133665

File tree

1 file changed

+26
-32
lines changed

1 file changed

+26
-32
lines changed

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

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ ms.date: 02/15/2024
1010
---
1111
# Deploy OSDU Admin UI on top of Azure Data Manager for Energy
1212

13-
This guide shows you how to deploy the OSDU Admin UI on top of your Azure Data Manager for Energy instance.
13+
This guide shows you how to deploy the OSDU Admin UI on top of your Azure Data Manager for Energy (ADME) instance.
1414

1515
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
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.
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 Subsystem for Linux (WSL), we recommend using a Dev Container to eliminate potential conflicts of tooling versions, environments etc.
1919
- An [Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
20-
- Add the App Registration permissions to enable Admin UI to function properly:
21-
- [Application.Read.All](/graph/permissions-reference#applicationreadall)
22-
- [User.Read](/graph/permissions-reference#applicationreadall)
23-
- [User.Read.All](/graph/permissions-reference#userreadall)
24-
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)
20+
- 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.
21+
22+
> [!IMPORTANT]
23+
> The following API permissions are required on the App Registration for the Admin UI to function properly.
24+
> - [Application.Read.All](/graph/permissions-reference#applicationreadall)
25+
> - [User.Read](/graph/permissions-reference#applicationreadall)
26+
> - [User.Read.All](/graph/permissions-reference#userreadall)
27+
>
28+
> 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).
2829
2930
## Environment setup
3031
1. Use the Dev Container in Visual Studio Code to deploy the OSDU Admin UI to eliminate conflicts from your local machine.
@@ -49,7 +50,7 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
4950

5051
[![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)
5152

52-
1. Install Angular CLI, Azure CLI, Node.js, npm, and NVM.
53+
1. Install [Angular CLI](https://angular.io/cli), [Azure CLI](/cli/azure/install-azure-cli), [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), and [Node Version Manager (NVM)](https://github.com/nvm-sh/nvm).
5354

5455
```bash
5556
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \
@@ -63,28 +64,25 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
6364
[![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)
6465

6566
1. Log into Azure CLI by executing the command on the terminal. It takes you to the sign-in screen.
66-
```azurecli-interactive
67+
```azurecli
6768
az login
6869
```
6970

7071
1. It takes you to the sign-in screen. Enter your credentials and upon success, you see a success message.
7172

7273
[![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-
## Configure environment variables
75-
1. Fetch `client-id` as authAppId, `resource-group`, `subscription-id`, and `location`.
76-
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)
7874

79-
1. Fetch the value of `id` as the subscription ID by running the following command on the terminal.
80-
```azurecli-interactive
75+
1. Validate that you're using the correct subscription.
76+
```azurecli
8177
az account show
8278
```
8379
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.
85-
```azurecli-interactive
80+
1. If needed, use this code to change subscription.
81+
```azurecli
8682
az account set --subscription <subscription-id>
8783
```
84+
85+
## Configure environment variables
8886
8987
1. Enter the required environment variables on the terminal.
9088
```bash
@@ -96,14 +94,14 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
9694
9795
## Deploy storage account
9896
1. Create resource group. Skip this step if the resource group exists already.
99-
```azurecli-interactive
97+
```azurecli
10098
az group create \
10199
--name $RESOURCE_GROUP \
102100
--location $LOCATION
103101
```
104102
105103
1. Create storage account.
106-
```azurecli-interactive
104+
```azurecli
107105
az storage account create \
108106
--resource-group $RESOURCE_GROUP \
109107
--location $LOCATION \
@@ -114,7 +112,7 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
114112
```
115113
116114
1. Configure the static website.
117-
```azurecli-interactive
115+
```azurecli
118116
az storage blob service-properties update \
119117
--account-name $WEBSITE_NAME \
120118
--static-website \
@@ -123,15 +121,15 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
123121
```
124122
125123
1. Set $web container permissions to allow anonymous access.
126-
```azurecli-interactive
124+
```azurecli
127125
az storage container set-permission \
128126
--name '$web' \
129127
--account-name $WEBSITE_NAME \
130128
--public-access blob
131129
```
132130
133131
1. Add the redirect URI to the App Registration.
134-
```azurecli-interactive
132+
```azurecli
135133
export REDIRECT_URI=$(az storage account show --resource-group $RESOURCE_GROUP --name $WEBSITE_NAME --query "primaryEndpoints.web") && \
136134
echo "Redirect URL: $REDIRECT_URI" && \
137135
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"
@@ -159,7 +157,7 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
159157
...
160158
"tenant_id": "<tenant_id>", // Entra ID tenant ID
161159
"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"
162-
"redirect_uri": "<https://storageaccount.zXX.web.core.windows.net/>", // This is the website URL ($REDIRECT_URI)
160+
"redirect_uri": "<redirect_uri>", // This is the website URL ($REDIRECT_URI), i.e. "https://contoso.z1.web.core.windows.net"
163161
"scope": "<client_id>/.default" // Scope of the ADME instance, i.e. "6ee7e0d6-0641-4b29-a283-541c5d00655a/.default"
164162
},
165163
"api_endpoints": { // Just replace contoso.energy.azure.com with your ADME_URL after removing https or wwww in all the API endpoints below.
@@ -179,18 +177,14 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
179177

180178
> [!NOTE]
181179
> [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.
182-
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.
184-
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)
186180

187181
1. Build the web UI.
188182
```bash
189183
ng build
190184
```
191185

192186
1. Upload the build to Storage Account.
193-
```azurecli-interactive
187+
```azurecli
194188
az storage blob upload-batch \
195189
--account-name $WEBSITE_NAME \
196190
--source ./dist/OSDUApp \

0 commit comments

Comments
 (0)