Skip to content

aloccid-iata/one-record-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

ONE Record Two Nodes

Welcome to the ONE Record Two Nodes, in this document you will find all the instructions to run a two NE:ONE server and how to setup pub/sub in ONE Record

Prerequisites

Step by step guide

  1. Clone the repository
    git clone https://github.com/IATA-Cargo/one-record-demo.git
  2. Switch to the directory to docker-compose
    cd one-record-demo/docker-compose
    If you have Mac or Linux, please reset folder permissions
    chmod -R 755 ./
  3. Start all services with docker compose
    docker compose up -d
  4. Wait until all containers are up and running:
    [+] Running 6/6
     ✔ Network docker-compose_default            Created 0.0s 
     ✔ Container docker-compose-graph-db-1       Healthy 0.0s 
     ✔ Container docker-compose-keycloak-1       Healthy 0.0s 
     ✔ Container docker-compose-ne-one-server-1  Started 0.0s 
     ✔ Container docker-compose-graph-db-setup-1 Started 0.0s
  5. Try to access the ONE Record Server by http://localhost:8080 or http://localhost:8081 using your favorite browser. You should see a HTTP Error 401, because you did not authenticate yet. But this confirms that the ONE Record Server is up and running.

Overview of services

Name Description Base URL / Admin UI
ne-one-1 ne-one server http://localhost:8080
ne-one-2 ne-one server http://localhost:8081
ne-one play ne-one play http://localhost:3001
ops ui one ONE Record operational interface http://localhost:4080
ops ui two ONE Record operational interface http://localhost:5080
ops ui three ONE Record operational interface http://localhost:6080
ops ui server one ONE Record operational interface node server used for notification and subscription http://localhost:4081
ops ui server two ONE Record operational interface node server used for notification and subscription http://localhost:5081
ops ui server three ONE Record operational interface node server used for notification and subscription http://localhost:6081
graphdb GraphDB database as database backend for ne-one-1 and ne-one-2 on two separate repositories (neone and neone2) http://localhost:7200
keycloak Identity provider for ne-one-1 and ne-one-2 servers to authenticate ONE Record clients and to obtain tokens for outgoing requests.
Preconfigured client_id: neone-client
Preconfigured client_secret: lx7ThS5aYggdsMm42BP3wMrVqKm9WpNY
http://localhost:8989
(username/password: admin/admin)
mockserver A mock server that displays all notification, subscription and action request and replies with specific patterns http://localhost:1080/mockserver/dashboard
IMPORTANT:
  • To simplify the setup, both NE:ONE servers are connected to a single Keycloak server, sharing the same user account.
  • Each ops ui is directly connected with a ops ui server to stream notification.
  • You can connect two ops ui to the two ne-one server and keep one as a standalone client. The ops ui server is be able to reply to subscription requests and receive direct notifications.

Get a token

To get a token we have prepared a Postman collection. You will need to install Postman or a compatible software in order to use it.

  1. Download the Postman Collection here. It will open a new github page, use the download button to get the file

  2. Download the Postman Environment here. It will open a new github page, use the download button to get the file

  3. Import the Environment in Postman

  4. Import the Collection in Postman

  5. In the Environments tab, select the subscription environment. There you will have server1, server2 and baseUrlKeyCloak

  6. Select Collections on the right menu and open the Subscription collection already imported

  7. Use the Token Request call to generate and access token

  8. Copy the access token

Connect Ops UI to NE:ONE

We show here the process to connect the Ops UI to a NE:ONE server

  1. Connect to a Ops UI , in this image you have three possibilities:

  2. Click on settings in the sidebar

  3. Setup the Internal API Settings - Base URL with one of the two NE:ONE servers respectively

  4. Use the token generated in the previous section for the token field.

  5. Now the Ops UI is linked with one of the two NE:ONE servers. You can repeat the steps for a second Ops UI.

Add external servers in the Ops UI

We show here how to add an external server to the Ops UI.

  1. Connect to a Ops UI , in this image you have three possibilities:

  2. Click on settings in the sidebar

  3. Click on ADD SERVER in the External Servers section

  4. On the popup insert:

    • Server name
    • The base url of the server (to use the NE:ONE server of these image use http://localhost:8080 or 8081. To use the Ops UI server input http://localhost:4081 or 5081 or 6081)
    • A OIDC token (for NE:ONE you can use the get a token section while for Ops Ui server just put a random character)
  5. Click on ADD

  6. Now the Ops UI can interact with external servers

Add NE:ONE server into NE:ONE Play

  1. Connect to NE:ONE Play http://localhost:3001

  2. Click on the setting button in the top-right corner (cog icon)

  3. Add your ne-one-1 server following this instruction:

    • Organization Name: <Choose a name (any string is accepted)>
    • Protocol: http
    • Host: http://localhost:8080
    • Token : <Use the postman collection to generate a token and copy it here (follow the previous paragraph)>
    • Color : pick up a random color
  4. Add your ne-one-1 server following this instruction:

    • Organization Name: <Choose a name (any string is accepted)>
    • Protocol: http
    • Host: http://localhost:8081
    • Token : <Use the postman collection to generate a token and copy it here (follow the previous paragraph)>
    • Color : pick up a random color
  5. Now you can start using NE:ONE Play.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published