Sign inSign up

kgrid/kgrid-activator

By kgrid

•Updated about 5 years ago

https://github.com/kgrid/kgrid-activator

Image
0

1.0K

kgrid/kgrid-activator repository overview

⁠KGrid Activator

CircleCI GitHub release License: GPL v3

⁠Overview

As a key component of Knowledge Grid, an activator allows knowledge objects to be executable against collected data.

For the information on the activator API and the usage of the activator, see KGRID Activator API⁠

For the information on the activator configuration, see KGRID ACTIVATOR CONFIGURATION⁠

For the information on the activator deployment, see Integrator's Guide⁠

⁠Build & run the Activator locally

For development and testing purposes. See deployment for notes on how to deploy the project on a live system.

⁠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-activator.git
cd kgrid-activator
⁠Quick Start
mvn clean package
export SPRING_PROFILES_ACTIVE=dev 
# set SPRING_PROFILES_ACTIVE=dev (Windows)
java -jar target/kgrid-activator*.jar

This will run the activator and create an empty ./shelf in the current working directory. By default, the application starts on port 8080.

Access the activator health endpoint at (http://localhost:8080/actuator/health⁠). status should be up

You can load the local shelf with the example collection of KOs by setting the kgrid.shelf.manifest property at startup to point to the manifest file for the example-collection⁠ release on GitHub.

java -jar target/kgrid-activator*.jar --kgrid.shelf.manifest=https://github.com/kgrid-objects/example-collection/releases/download/4.1.1/manifest.json 

You can also point the activator to an existing /shelf on your local system using the kgrid.shelf.cdostore.url property at startup.

java -jar target/kgrid-activator*.jar --kgrid.shelf.cdostore.url=filesystem:file:///path/to/local/shelf

⁠Running the tests

Unit and Integration tests can be executed via

mvn clean verify

⁠Deploying the Activator in cloud environments

Follow your provider's documentation. If you are building the latest version from main you may need to add the oss.sonatype.org SNAPSHOT repository. For example, on Heroku by using:

MAVEN_SETTINGS_PATH=.circleci/settings.xml
⁠Deploying to heroku using docker:

This method uses the dockerfile to build and deploy an image on heroku.

  1. First run heroku container:push web -a <APPLICATION NAME> to build the docker container and push it to the heroku registry.
  2. Then run heroku container:release web -a <APPLICATION NAME> to have heroku deploy and start the application.

We publish a spring-boot container image of the activator on dockerhub.io⁠. If you’d like to deploy your dockerized Spring Boot app to a resource constrained environment you may need to explicitly set JAVA_OPTS to indicate the memory constraints. (Or, on Heroku, you’ll need to use Heroku Buildpacks⁠. This is because the Paketo buildpacks refuse to allocate heap on containers smaller than 1 GB of RAM. A free Heroku dyno has 512 MB.)

Tag summary

Content type

Image

Digest

Size

145.4 MB

Last updated

about 5 years ago

docker pull kgrid/kgrid-activator