Skip to content

Commit

Permalink
Merge branch 'prepare-1.1.2' into 'master'
Browse files Browse the repository at this point in the history
prepare version 1.1.2

See merge request interconnect/knowledge-engine!324
  • Loading branch information
Han Kruiger committed Jul 22, 2022
2 parents eb62210 + bdc2e03 commit b29d65d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ With the API specification, you will be able to:
In the [`client_example` package](./smart-connector-rest-server/src/main/java/eu/interconnectproject/knowledge_engine/rest/api/client_example), there are several examples of clients written in Java.

## How to administer the REST API
To start a new instance of the REST API knowledge engine version 1.1.1, make sure you have `git checkout 1.1.1` the tag `1.1.1`. Now make sure you run the `mvn clean install` command successfully from the root of the repository.
To start a new instance of the REST API knowledge engine version 1.1.2, make sure you have `git checkout 1.1.2` the tag `1.1.2`. Now make sure you run the `mvn clean install` command successfully from the root of the repository.

### Starting the Knowledge Engine in local mode
When no additional configuration parameters are provided, the Knowledge Engine will be default run in local mode. This means you can create multiple Smart Connectors that can communicate with each other through the REST API, but the Knowledge Engine will not connect to a Knowledge Directory and will not be able to connect with Smart Connectors on other machines.
Expand All @@ -46,13 +46,13 @@ cd smart-connector-rest-dist/target
Finally, start the server (note that you can configure a log file by including the `-Dorg.slf4j.simpleLogger.logFile=ke.log` system property to the JVM):

```bash
java -Dorg.slf4j.simpleLogger.logFile=ke.log -cp "smart-connector-rest-dist-1.1.1.jar:dependency/*" eu.knowledge.engine.rest.Main 8280
java -Dorg.slf4j.simpleLogger.logFile=ke.log -cp "smart-connector-rest-dist-1.1.2.jar:dependency/*" eu.knowledge.engine.rest.Main 8280
```

If you want to run in it in the background, you can use the `nohup` linux command (which does not use the simpleLogger configuration system property, but redirects the standard err/out):

```bash
nohup java -cp "smart-connector-rest-dist-1.1.1.jar:dependency/*" eu.knowledge.engine.rest.Main 8280 > ke.log
nohup java -cp "smart-connector-rest-dist-1.1.2.jar:dependency/*" eu.knowledge.engine.rest.Main 8280 > ke.log
```

### Starting the Knowledge Engine in distributed mode
Expand All @@ -63,7 +63,7 @@ First of all, you need to start a Knowledge Directory. The desired port number f
```bash
cd knowledge-directory/target/

java -Dorg.slf4j.simpleLogger.logFile=kd.log -cp "knowledge-directory-1.1.1.jar:dependency/*" eu.knowledge.engine.knowledgedirectory.Main 8080
java -Dorg.slf4j.simpleLogger.logFile=kd.log -cp "knowledge-directory-1.1.2.jar:dependency/*" eu.knowledge.engine.knowledgedirectory.Main 8080
```

As explained in the local mode section, nohup can be used to run the process in the background. On overview of the registered Knowledge Engine Runtimes can be found on `http://localhost:8080/ker/` (or another host or port if you desire).
Expand All @@ -86,7 +86,7 @@ export KD_URL=http://localhost:8080
export KE_RUNTIME_EXPOSED_URL=http://localhost:8081
export KE_RUNTIME_PORT=8081

java -Dorg.slf4j.simpleLogger.logFile=ke.log -cp "smart-connector-rest-dist-1.1.1.jar:dependency/*" eu.knowledge.engine.rest.Main 8280
java -Dorg.slf4j.simpleLogger.logFile=ke.log -cp "smart-connector-rest-dist-1.1.2.jar:dependency/*" eu.knowledge.engine.rest.Main 8280
```

As explained in the local mode section, nohup can be used to run the process in the background.
Expand All @@ -101,12 +101,12 @@ These are instructions on what to do when we release a new version of the knowle
2. Make a commit for the release, and tag it with `git tag {x}.{y}.{z}` in GitLab.
3. `mvn deploy` (for this you need `Deploy-Token` configured in your Maven's `settings.xml`)
4. Build and push the new docker images:
- `docker build ./smart-connector-rest-dist -t docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.1.1`
- `docker build ./knowledge-directory -t docker-registry.inesctec.pt/interconnect/knowledge-engine/knowledge-directory:1.1.1`
- `docker build ./admin-ui -t docker-registry.inesctec.pt/interconnect/knowledge-engine/admin-ui:1.1.1`
- `docker push docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.1.1`
- `docker push docker-registry.inesctec.pt/interconnect/knowledge-engine/knowledge-directory:1.1.1`
- `docker push docker-registry.inesctec.pt/interconnect/knowledge-engine/admin-ui:1.1.1`
- `docker build ./smart-connector-rest-dist -t docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.1.2`
- `docker build ./knowledge-directory -t docker-registry.inesctec.pt/interconnect/knowledge-engine/knowledge-directory:1.1.2`
- `docker build ./admin-ui -t docker-registry.inesctec.pt/interconnect/knowledge-engine/admin-ui:1.1.2`
- `docker push docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.1.2`
- `docker push docker-registry.inesctec.pt/interconnect/knowledge-engine/knowledge-directory:1.1.2`
- `docker push docker-registry.inesctec.pt/interconnect/knowledge-engine/admin-ui:1.1.2`
5. Prepare the next SNAPSHOT version and make a commit for that too.

## Running the REST server in Docker
Expand Down
6 changes: 3 additions & 3 deletions distributed-example/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ services:
# This is the knowledge directory, facilitating discovery between different
# runtimes. It exposes its service over port 8282.
knowledge-directory:
image: docker-registry.inesctec.pt/interconnect/knowledge-engine/knowledge-directory:1.1.1
image: docker-registry.inesctec.pt/interconnect/knowledge-engine/knowledge-directory:1.1.2

# These two services are separate 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: docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.1.1
image: docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.1.2
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
ports:
- 8280:8280
runtime-2:
image: docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.1.1
image: docker-registry.inesctec.pt/interconnect/knowledge-engine/smart-connector-rest-dist:1.1.2
environment:
KE_RUNTIME_PORT: 8081 # The port that the KE uses to listen for inter-KE-runtime communication.
KE_RUNTIME_EXPOSED_URL: http://runtime-2:8081 # The URL where the runtime is available for inter-runtime communication from the outside.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<revision>1.1.2-SNAPSHOT</revision>
<revision>1.1.2</revision>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
Interactions are (un)registered and data is exchanged. Each Smart Connector
is coupled with a Knowledge Base Id, so every rest call uses this Knowledge
Base Id to identify yourself.
version: 1.1.2-SNAPSHOT
version: 1.1.2

paths:
/sc:
Expand Down

0 comments on commit b29d65d

Please sign in to comment.