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
:::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. Click on Open to clone the 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.Do not add any additional 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 login 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 login 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)
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
+
```
77
82
78
83
## Configure environment variables
79
84
1. Fetch `client-id` as authAppId, `resource-group`, `subscription-id`, and `location`.
80
85
81
-

86
+
[](./media/how-to-deploy-osdu-admin-ui/location-resource-group.png#lightbox)
82
87
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.
84
89
```azurecli-interactive
85
90
az account show
86
91
```
87
92
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.
89
94
```azurecli-interactive
90
95
az account set --subscription <subscription-id>
91
96
```
92
97
93
-
4. Enter the required environment variables on the terminal.
98
+
1. Enter the required environment variables on the terminal.
94
99
```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"
102
104
```
103
105
104
106
## Deploy storage account
@@ -129,32 +131,34 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
129
131
--index-document index.html
130
132
```
131
133
132
-
1. Fetch the redirect URI.
134
+
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
147
```
142
-
143
-
1. Open the link you got from the above result in the browser and add the `REDIRECT_URI`.
144
-
145
-

148
+
149
+
[](/media/how-to-deploy-osdu-admin-ui/app-uri-config.png#lightbox)
146
150
147
151
## Build and deploy the web app
148
152
149
153
1. Navigate to the `OSDUApp` folder.
150
154
```bash
151
155
cd OSDUApp/
152
156
```
153
-
2. Install the dependencies.
157
+
1. Install the dependencies.
154
158
```nodejs
155
159
npm install
156
160
```
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`.
158
162
```json
159
163
{
160
164
"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
182
186
}
183
187
```
184
188
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.
185
191
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.
189
193
190
-
:::image type="content" source="media/how-to-deploy-osdu-admin-ui/graph-permission.png" alt-text="Screenshot that shows graph permissions.":::
194
+
[](./media/how-to-deploy-osdu-admin-ui/graph-permission.png#lightbox)
191
195
192
-
5. Build the web UI.
196
+
1. Build the web UI.
193
197
```bash
194
198
ng build
195
199
```
196
200
197
-
6. Upload the build to Storage Account.
201
+
1. Upload the build to Storage Account.
198
202
```azurecli-interactive
199
203
az storage blob upload-batch \
200
204
--account-name $WEBSITE_NAME \
@@ -203,12 +207,12 @@ The OSDU Admin UI enables platform administrators to manage the Azure Data Manag
203
207
--overwrite
204
208
```
205
209
206
-
7. Fetch the website URL.
210
+
1. Fetch the website URL.
207
211
```bash
208
212
echo $REDIRECT_URI
209
213
```
210
214
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.
0 commit comments