Skip to content

kgrid/kgrid-library

Repository files navigation

KGrid Library

CircleCI GitHub release License: GPL v3

Prerequisites

For building and running the application you need:

Clone

To get started you can simply clone this repository using git:

git clone https://github.com/kgrid/kgrid-library.git
cd kgrid-library

Quick start

This quick start will run the activator and load two example knowledge objects for testing. This objects are located in the shelf directory at the root of the project. By default application will start up and PORT 8080.

$ mvn clean package
$ java -jar applicatoin/target/kgrid-activator*.jar

Alternatively you can use the Spring Boot Maven plugin like so:

mvn clean spring-boot:run

Once Running access the Activators Health Endpoint. All statuses reported should be UP

"status": "UP",
    "shelf": {
        "status": "UP",
  

The default list of activators that the library can push objects to can be overridden by setting the environment variable VUE_APP_KGRID_ACTIVATOR_URLS with a semicolon-separated list of urls.

Running the tests

Automated tests

Unit and Integration tests can be executed via

mvn clean test
mvn clean verify

Docker Image/Container

docker pull kgrid/kgrid-library
  • Running in a container mapped to port 8080 (default port for the library)
  docker run -p 8080:8080 --name library kgrid/kgrid-library
  docker run -p 8080:8080 -v ${PWD}/shelf:/applications/shelf --name library -d kgrid/kgrid-library 
  • Example:
  docker run -it --rm --network host -p 8080:8080 -v ${PWD}/shelf:/application/shelf --name library kgrid/kgrid-library:latest
  • This example has a few things going on:

    • --network host Running with a network bridge (if your containerized activator needs to talk to the network, i.e. you're running an external runtime in another container)
    • -it --rm Running interactive and Removing the Container when stopped. can be found in the options
  • Once created, you can stop and start the container using docker stop library and docker start library.

Good to Know

  1. View Container Logs docker logs library
  2. Access container docker exec -it library sh

About

The Object Library protects and supports management of Knowledge Objects, making it easy to access and deploy them.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published