# KGrid Activator

# Quick Start

This Quick Start Guide (opens new window) provides the instruction for downloading, configuring and running the KGrid Activator as a Spring-Boot application.

Additional information can be found for:

# Deploy a cloud native image

# Pull from DockerHub (opens new window)

  docker pull kgrid/kgrid-activator

# Running the Image (opens new window)

  • Running in a container mapped to port 8080 (default port for the activator)
  docker run -p 8080:8080 --name activator kgrid/activator
  docker run -p 8080:8080 -v ${PWD}/shelf:/applications/shelf --name activator -d kgrid/activator 
  • Example:
  docker run -it --rm --network host -p 8080:8080 -e SPRING_PROFILES_ACTIVE=dev -v ${PWD}/shelf:/application/shelf --name activator kgrid/activator:latest

# Quick start with docker-compose

You can also start the activator in your environment by setting up docker-compose.yaml file, shown below as an example

version: "3.6"

services:
  activator:
    container_name: lion-activator
    environment:
        KGRID_CONFIG: "--kgrid.shelf.cdostore.url=filesystem:file://shelf --cors.url=*  --management.info.git.mode=full"
    image: kgrid/activator:1.5.2
    ports:
      - 8080:8080
    volumes:
      - "activator_shelf:/home/kgrid/shelf"

volumes:
  activator_shelf:

that uses the the kgrid/activator:1.5.2 image, with presets for port and shelf.

Then:

docker-compose up

# Good to Know

  1. View Container Logs docker logs activator
  2. Start a shell in the container docker exec -it activator sh

# Running With External Runtime

The activator also has a proxy adapter which can connect to an external runtime and execute code natively in that environment.

Currently, we have created two reference implementations:

# Security Configuration

Security Configuration can be set as environment variables, or passed into the terminal command while running the activator. Details can be found in the Configuration Documentation (opens new window)

# Loading KOs into the activator

A Knowledge Object (KO) or a collection of KOs can be loaded into the activator in a number of ways.

  • On startup, KOs can be loaded directly from the shelf, as described in the Quick Start Guide (opens new window). The shelf can any persistent form of storage your application has access to and the activator will load any knowledge objects it finds on startup.

TIP

The shelf location can be specified using the shelf location configuration (opens new window).

  • On startup, KOs can also be loaded with the specified manifest(s). Please refer to the Configuration Documentation, see kgrid-shelf-manifest (opens new window)

  • Once the activator is running, the KOs can be loaded via the API by posting one of the three endpoints: /kos, /kos/manifest or /kos/manifest-list. For usage, please refer to Import API (opens new window)

TIP

After successfully loading the KOs to the activator via the API, /reload is needed to activated the newly added KOs. (See Activation API - Reload (opens new window) )

Last Updated: 7/12/2021, 6:55:39 PM