|
20 | 20 | - [Rule Panel Analysis](#rule-panel-analysis)
|
21 | 21 | - [Typology Panel Analysis](#typology-panel-analysis)
|
22 | 22 | - [UI Configuration](#ui-configuration)
|
23 |
| -- [Deployment instructions](#deployment-instructions) |
24 |
| - - [Pre-requisites](#pre-requisites) |
25 |
| - - [Installation instructions](#installation-instructions) |
| 23 | +- [Demo deployment instructions](#demo-deployment-instructions) |
| 24 | +- [Demo UI installation steps for a full service deployment](#demo-ui-installation-steps-for-a-full-service-deployment) |
| 25 | +- [Test the end-to-end deployment of the demo UI configuration](#test-the-end-to-end-deployment-of-the-demo-ui-configuration) |
| 26 | +- [Configure the demo UI setup](#configure-the-demo-ui-setup) |
26 | 27 |
|
27 | 28 | ## Introduction
|
28 | 29 |
|
@@ -248,88 +249,150 @@ The `reset` button restores the settings back to the variables defined in the de
|
248 | 249 |
|
249 | 250 | [Top](#top)
|
250 | 251 |
|
251 |
| -## Deployment instructions |
| 252 | +## Demo deployment instructions |
252 | 253 |
|
253 |
| -#### Pre-requisites |
| 254 | +The demo UI can be deployed as an optional addon for a public deployment in which case it will include Rule-901 and Typology-999. Follow the guide in the [Full-Stack-Docker-Tazama repository](https://github.com/tazama-lf/Full-Stack-Docker-Tazama) |
254 | 255 |
|
255 |
| - - Docker Desktop for Windows application should be running |
256 |
| - - A public deployment of the Tazama system should be running in docker [Tazama public deployment instructions](https://github.com/tazama-lf/Full-Stack-Docker-Tazama) OR the full service with all private rules should be deployed and running in docker [Tazama full service deployment instructions](full-service-full-stack-docker-tazama.md) |
| 256 | +The demo UI can also be deployed with the full service deployment, but the configuration is not currently compatible with the demo UI and the following additional steps are required to run the Tazama demo UI. |
257 | 257 |
|
258 |
| -#### Installation instructions |
| 258 | +## Demo UI installation steps for a full service deployment |
259 | 259 |
|
260 |
| -**1. Clone the Full-Stack-Docker-Tazama Repository to Your Local Machine** |
| 260 | +#### 1. Clone the Full-Stack-Docker-Tazama Repository to Your Local Machine <!-- omit in toc --> |
261 | 261 |
|
262 |
| -In a Windows Command Prompt, navigate to the full-stack-docker-tazama folder, then clone the repository with the following command: |
| 262 | +In a Windows Command Prompt, navigate to the folder where you want to store a copy of the source code. For example, the source code root folder path I have been using to compile this guide is C:\Tazama\GitHub. Once in your source code root folder, clone (copy) the repository with the following command: |
263 | 263 |
|
264 | 264 | ```
|
265 |
| -git clone https://github.com/tazama-lf/tazama-demo -b dev |
| 265 | +git clone https://github.com/tazama-lf/Full-Stack-Docker-Tazama -b main |
266 | 266 | ```
|
267 | 267 |
|
268 |
| -**2. Create the demo.env file** |
| 268 | +**Output:** |
269 | 269 |
|
270 |
| -Via VS Code, create a new demo.env file in the full-stack-docker-tazama/env folder with the following contents: |
| 270 | + |
271 | 271 |
|
| 272 | +#### 2. Deploy the Core Services via script <!-- omit in toc --> |
| 273 | + |
| 274 | +First, start the Docker Desktop for Windows application. |
| 275 | + |
| 276 | +With Docker Desktop running: from your Windows Command Prompt and from inside the `Full-Stack-Docker-Tazama` folder, execute the following command and follow the prompts: |
| 277 | + |
| 278 | +**Windows** |
| 279 | +Command Prompt: `start.bat` |
| 280 | +Powershell: `.\start.bat` |
| 281 | + |
| 282 | +**Unix (Linux/MacOS)** <!-- omit in toc --> |
| 283 | +Any terminal: `./start.sh` |
| 284 | + |
| 285 | +> [!IMPORTANT] |
| 286 | +> Ensure the script has the correct permissions to run. You may need to run `chmod +x start.sh` beforehand. |
| 287 | +
|
| 288 | +**Output:** |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | +Select `2` from the start.bat docker deployment menu option |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | +For option 2 (Full service DockerHub deployment) the output will be as follows: |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | +[Top](#introduction) |
| 302 | + |
| 303 | +#### 3. Configure Tazama for the demo UI <!-- omit in toc --> |
| 304 | + |
| 305 | +Tazama is configured by loading the network map, rules and typology configurations required to evaluate a transaction via the ArangoDB API. The configuration information is hidden in a private repository and if you are a member of the Tazama `frmscoe` Organization on GitHub, you'll be able to clone this repository onto your local machine with the following command: |
| 306 | + |
| 307 | +Change the current folder back to your root source code folder: |
| 308 | +``` |
| 309 | +cd .. |
| 310 | +``` |
| 311 | + |
| 312 | +Clone the `tms-configuration` repository: |
| 313 | + |
| 314 | +``` |
| 315 | +git clone https://github.com/frmscoe/tms-configuration -b main |
272 | 316 | ```
|
273 |
| -# SPDX-License-Identifier: Apache-2.0 |
274 |
| -
|
275 |
| -NODE_ENV=dev |
276 |
| -NEXT_PUBLIC_URL="http://localhost:3001" |
277 |
| -PORT="3001" |
278 |
| -NEXT_PUBLIC_TMS_SERVER_URL="http://localhost:5000" |
279 |
| -NEXT_PUBLIC_TMS_KEY="" |
280 |
| -NEXT_PUBLIC_CMS_NATS_HOSTING="nats://nats:4222" |
281 |
| -NEXT_PUBLIC_NATS_USERNAME="" |
282 |
| -NEXT_PUBLIC_NATS_PASSWORD="" |
283 |
| -NEXT_PUBLIC_ARANGO_DB_HOSTING="http://localhost:18529" |
284 |
| -NEXT_PUBLIC_DB_USER="root" |
285 |
| -NEXT_PUBLIC_DB_PASSWORD="" |
286 |
| -NEXT_PUBLIC_WS_URL="http://localhost:3001" |
287 |
| -
|
288 |
| -NEXT_PUBLIC_NATS_SUBSCRIPTIONS="['connection', '>', '[email protected]']" |
| 317 | + |
| 318 | +In addition to cloning the configuration repository, we also need to clone the Tazama `Postman` repository so that we can utilize the Postman environment file that is hosted there: |
| 319 | + |
| 320 | +``` |
| 321 | +git clone https://github.com/tazama-lf/postman -b main |
289 | 322 | ```
|
290 | 323 |
|
291 |
| - |
| 324 | +**Output:** |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | +Once these two repositories are cloned, we can perform the following Newman command to load the specific DEMO UI configuration into the ArangoDB databases and collections: |
| 329 | + |
| 330 | +``` |
| 331 | +newman run collection-file -e environment-file --timeout-request 10200 |
| 332 | +``` |
| 333 | + |
| 334 | + - The `collection-file` is the full path to the location on your local machine where the `tms-configuration\demo\full-service-config-sans-EFRuP.postman_collection.json` file is located. |
| 335 | + - The `environment-file` is the full path to the location on your local machine where the `postman\environments\Tazama-Docker-Compose-LOCAL.postman_environment.json` file is located. |
| 336 | + - If the path contains spaces, wrap the string in double-quotes. |
| 337 | + |
| 338 | +**Output:** |
| 339 | + |
| 340 | + |
292 | 341 |
|
| 342 | +[Top](#introduction) |
293 | 343 |
|
294 |
| -**3. Edit the docker-compose.yaml file** |
| 344 | +#### 4. Restart core processors <!-- omit in toc --> |
295 | 345 |
|
296 |
| -In the full-stack-docker-tazama folder, open the docker-compose.yaml file and add the following text between 2 other processors |
| 346 | +Now that the demo configuration has been loaded we need to restart our core processors. The main reason the configuration needs to preceed the deployment of the processors is that the processors read the network map at startup to set up the NATS pub/sub routes for the evaluation flow. |
297 | 347 |
|
| 348 | +Navigate back to the `full-stack-docker-tazama` folder: |
298 | 349 | ```
|
299 |
| - # DEMO |
300 |
| - demo: |
301 |
| - image: tazamaorg/demo-ui:v1.0.16 |
302 |
| - env_file: |
303 |
| - - path: ./env/demo.env |
304 |
| - required: true |
305 |
| - restart: always |
306 |
| - depends_on: |
307 |
| - - tms |
308 |
| - - arango |
309 |
| - - nats |
310 |
| - ports: |
311 |
| - - '3001:3001' |
| 350 | +cd Full-Stack-Docker-Tazama |
| 351 | +``` |
| 352 | + |
| 353 | +Execute the following command to restart the core processors: |
312 | 354 |
|
| 355 | +``` |
| 356 | +docker restart tazama-ed-1 tazama-tp-1 tazama-tadp-1 |
313 | 357 | ```
|
314 | 358 |
|
315 |
| ->> NOTE: the alignment of #DEMO should align with the other headings e.g. #TMS or #NATS-UTILITIES |
| 359 | +**Output:** |
316 | 360 |
|
317 |
| - |
| 361 | + |
318 | 362 |
|
| 363 | +[Top](#introduction) |
319 | 364 |
|
320 |
| -**3. Deploy the Demo** |
| 365 | +## Test the end-to-end deployment of the demo UI configuration |
321 | 366 |
|
322 |
| -From your Windows Command Prompt and from inside the `Full-Stack-Docker-Tazama` folder, execute the following command: |
| 367 | +You should be able to submit a test transaction to the Transaction Monitoring Service API and then be able to see the result of a complete end-to-end evaluation in the database. We can run the following Postman test via Newman to see if our deployment was successful: |
323 | 368 |
|
324 | 369 | ```
|
325 |
| -docker compose up demo -d |
| 370 | +newman run collection-file -e environment-file --timeout-request 10200 --delay-request 500 |
326 | 371 | ```
|
327 | 372 |
|
328 |
| - |
| 373 | + - The `collection-file` is the full path to the location on your local machine where the `tms-configuration\demo\demo-tms-config-test.postman_collection.json` file is located. |
| 374 | + - The `environment-file` is the full path to the location on your local machine where the `postman\environments\Tazama-Docker-Compose-LOCAL.postman_environment.json` file is located. |
| 375 | + - If the path contains spaces, wrap the string in double-quotes. |
| 376 | + - We add the `--delay-request` option to delay each individual test by 500 milliseconds to give them evaluation time to complete before we look for the result in the database. |
| 377 | + |
| 378 | +**Output:** |
| 379 | + |
| 380 | + |
329 | 381 |
|
330 | 382 |
|
| 383 | +## Configure the demo UI setup |
331 | 384 |
|
| 385 | +Change the default UI configuration settings from 'localhost' to your ip address. You can confirm your ip address by using the command `ipconfig` from the command line. |
332 | 386 |
|
| 387 | + |
| 388 | + |
| 389 | +**Output:** |
| 390 | + |
| 391 | + |
| 392 | + |
| 393 | +Select the `update` button for the changes to take effect |
| 394 | + |
| 395 | +  |
333 | 396 |
|
334 | 397 |
|
335 | 398 |
|
|
0 commit comments