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
- Docker installed
- Docker Compose installed (make sure you have compose V2)
- Git installed
- Clone the repository
git clone https://github.com/IATA-Cargo/one-record-demo.git
- Switch to the directory to docker-compose
If you have Mac or Linux, please reset folder permissions
cd one-record-demo/docker-compose
chmod -R 755 ./
- Start all services with docker compose
docker compose up -d
- 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
- 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.
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.
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.
-
Download the Postman Collection here. It will open a new github page, use the download button to get the file
-
Download the Postman Environment here. It will open a new github page, use the download button to get the file
-
Import the Environment in Postman
-
Import the Collection in Postman
-
In the Environments tab, select the subscription environment. There you will have server1, server2 and baseUrlKeyCloak
-
Select Collections on the right menu and open the Subscription collection already imported
-
Use the Token Request call to generate and access token
-
Copy the access token
We show here the process to connect the Ops UI to a NE:ONE server
-
Connect to a Ops UI , in this image you have three possibilities:
-
Click on settings in the sidebar
-
Setup the Internal API Settings - Base URL with one of the two NE:ONE servers respectively
-
Use the token generated in the previous section for the token field.
-
Now the Ops UI is linked with one of the two NE:ONE servers. You can repeat the steps for a second Ops UI.
We show here how to add an external server to the Ops UI.
-
Connect to a Ops UI , in this image you have three possibilities:
-
Click on settings in the sidebar
-
Click on ADD SERVER in the External Servers section
-
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)
-
Click on ADD
-
Now the Ops UI can interact with external servers
-
Connect to NE:ONE Play http://localhost:3001
-
Click on the setting button in the top-right corner (cog icon)
-
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
-
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
-
Now you can start using NE:ONE Play.