-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #485 from TNO/474-the-ke_runtime_exposed_url-shoul…
…d-include-the-url-schema-https 474 the ke runtime exposed url should include the url schema https
- Loading branch information
Showing
7 changed files
with
225 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Runtime tests | ||
This docker compose example is used to test several scenario's that are impossible (or difficult) to test within Java Unit Tests. | ||
|
||
### Incorrect `KE_RUNTIME_EXPOSED_URL` | ||
The `docker-compose.yml` contains the exact same scenario as the `multiple-runtimes` example, but additionally it contains several broken runtimes where the exposed URL is incorrect. With this docker project we can test whether these different types of exposed urls are breaking their own KER, other KERs or the Knowledge Directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
services: | ||
# This is the knowledge directory, facilitating discovery between different | ||
# runtimes. It exposes its service over port 8282. | ||
knowledge-directory: | ||
image: ghcr.io/tno/knowledge-engine/knowledge-directory:1.2.3 | ||
|
||
# These services are seperate Knowledge Engine runtime, which can host | ||
# multiple smart connectors. Note that the REST API port is a DIFFERENT port | ||
# number than the ones configured below. It is still the default 8280. | ||
runtime-1: | ||
image: ghcr.io/tno/knowledge-engine/smart-connector:1.2.4-SNAPSHOT | ||
environment: | ||
KE_RUNTIME_PORT: 8081 # The port that the KE uses to listen for inter-KE-runtime communication. | ||
KE_RUNTIME_EXPOSED_URL: http://runtime-1:8081 # The URL where the runtime is available for inter-runtime communication from the outside. | ||
KD_URL: http://knowledge-directory:8282 | ||
runtime-2: | ||
image: ghcr.io/tno/knowledge-engine/smart-connector:1.2.4-SNAPSHOT | ||
environment: | ||
KE_RUNTIME_PORT: 8081 | ||
KE_RUNTIME_EXPOSED_URL: http://runtime-2:8081 | ||
KD_URL: http://knowledge-directory:8282 | ||
runtime-3: | ||
image: ghcr.io/tno/knowledge-engine/smart-connector:1.2.4-SNAPSHOT | ||
environment: | ||
KE_RUNTIME_PORT: 8081 | ||
KE_RUNTIME_EXPOSED_URL: http://runtime-3:8081 | ||
KD_URL: http://knowledge-directory:8282 | ||
|
||
# These Knowledge Bases use the different runtimes, and exchange data with eachother. | ||
kb1: | ||
build: ../common/asking_kb | ||
environment: | ||
KE_URL: http://runtime-1:8280/rest | ||
KB_ID: http://example.org/kb1 | ||
PREFIXES: | | ||
{ | ||
"ex": "http://example.org/" | ||
} | ||
GRAPH_PATTERN: | | ||
?a ex:relatedTo ?b . | ||
kb2: | ||
build: ../common/answering_kb | ||
environment: | ||
KE_URL: http://runtime-2:8280/rest | ||
KB_ID: http://example.org/kb2 | ||
PREFIXES: | | ||
{ | ||
"ex": "http://example.org/" | ||
} | ||
GRAPH_PATTERN: | | ||
?a ex:relatedTo ?b . | ||
KB_DATA: | | ||
[ | ||
{ | ||
"a": "<http://example.org/Math>", | ||
"b": "<http://example.org/Science>" | ||
}, | ||
{ | ||
"a": "<http://example.org/Books>", | ||
"b": "<http://example.org/Magazines>" | ||
} | ||
] | ||
kb3: | ||
build: ../common/answering_kb | ||
environment: | ||
KE_URL: http://runtime-3:8280/rest | ||
KB_ID: http://example.org/kb3 | ||
PREFIXES: | | ||
{ | ||
"ex": "http://example.org/" | ||
} | ||
GRAPH_PATTERN: | | ||
?a ex:relatedTo ?b . | ||
KB_DATA: | | ||
[ | ||
{ | ||
"a": "<http://example.org/Music>", | ||
"b": "<http://example.org/Songs>" | ||
}, | ||
{ | ||
"a": "<http://example.org/Red>", | ||
"b": "<http://example.org/Blue>" | ||
} | ||
] | ||
broken-1: | ||
image: ghcr.io/tno/knowledge-engine/smart-connector:1.2.4-SNAPSHOT | ||
environment: | ||
KE_RUNTIME_PORT: 8081 # The port that the KE uses to listen for inter-KE-runtime communication. | ||
KE_RUNTIME_EXPOSED_URL: runtime-3:8081 # The 'http://' part of the URL with a port is missing. | ||
KD_URL: http://knowledge-directory:8282 | ||
brokenkb1: | ||
build: ../common/answering_kb | ||
environment: | ||
KE_URL: http://broken-1:8280/rest | ||
KB_ID: http://example.org/brokenkb1 | ||
PREFIXES: | | ||
{ | ||
"ex": "http://example.org/" | ||
} | ||
GRAPH_PATTERN: | | ||
?a ex:relatedTo ?b . | ||
KB_DATA: | | ||
[] | ||
broken-2: | ||
image: ghcr.io/tno/knowledge-engine/smart-connector:1.2.4-SNAPSHOT | ||
environment: | ||
KE_RUNTIME_PORT: 8081 # The port that the KE uses to listen for inter-KE-runtime communication. | ||
KE_RUNTIME_EXPOSED_URL: 3test.runtime.nl:8081 # The 'http://' part of the URL with a port is missing and the first character is numeric. | ||
KD_URL: http://knowledge-directory:8282 | ||
brokenkb2: | ||
build: ../common/answering_kb | ||
environment: | ||
KE_URL: http://broken-2:8280/rest | ||
KB_ID: http://example.org/brokenkb2 | ||
PREFIXES: | | ||
{ | ||
"ex": "http://example.org/" | ||
} | ||
GRAPH_PATTERN: | | ||
?a ex:relatedTo ?b . | ||
KB_DATA: | | ||
[] | ||
broken-3: | ||
image: ghcr.io/tno/knowledge-engine/smart-connector:1.2.4-SNAPSHOT | ||
environment: | ||
KE_RUNTIME_PORT: 8081 # The port that the KE uses to listen for inter-KE-runtime communication. | ||
KE_RUNTIME_EXPOSED_URL: 3test.runtime.nl # The 'http://' part of the URL without a port is missing and the first character is numeric. | ||
KD_URL: http://knowledge-directory:8282 | ||
brokenkb3: | ||
build: ../common/answering_kb | ||
environment: | ||
KE_URL: http://broken-3:8280/rest | ||
KB_ID: http://example.org/brokenkb3 | ||
PREFIXES: | | ||
{ | ||
"ex": "http://example.org/" | ||
} | ||
GRAPH_PATTERN: | | ||
?a ex:relatedTo ?b . | ||
KB_DATA: | | ||
[] | ||
broken-4: | ||
image: ghcr.io/tno/knowledge-engine/smart-connector:1.2.4-SNAPSHOT | ||
environment: | ||
KE_RUNTIME_PORT: 8081 # The port that the KE uses to listen for inter-KE-runtime communication. | ||
KE_RUNTIME_EXPOSED_URL: http://runtime-3:8081/ # The URL ends with a '/' | ||
KD_URL: http://knowledge-directory:8282 | ||
brokenkb4: | ||
build: ../common/answering_kb | ||
environment: | ||
KE_URL: http://broken-4:8280/rest | ||
KB_ID: http://example.org/brokenkb4 | ||
PREFIXES: | | ||
{ | ||
"ex": "http://example.org/" | ||
} | ||
GRAPH_PATTERN: | | ||
?a ex:relatedTo ?b . | ||
KB_DATA: | | ||
[] | ||
broken-5: | ||
image: ghcr.io/tno/knowledge-engine/smart-connector:1.2.4-SNAPSHOT | ||
environment: | ||
KE_RUNTIME_PORT: 8081 # The port that the KE uses to listen for inter-KE-runtime communication. | ||
KE_RUNTIME_EXPOSED_URL: runtime-3 # The 'http://' part of the URL without a port is missing. | ||
KD_URL: http://knowledge-directory:8282 | ||
brokenkb5: | ||
build: ../common/answering_kb | ||
environment: | ||
KE_URL: http://broken-5:8280/rest | ||
KB_ID: http://example.org/brokenkb5 | ||
PREFIXES: | | ||
{ | ||
"ex": "http://example.org/" | ||
} | ||
GRAPH_PATTERN: | | ||
?a ex:relatedTo ?b . | ||
KB_DATA: | | ||
[] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters