Skip to content

Contains documentation, instructions and files our on-premise customers can use if they want to embed an extension into their own build of Cognigy.AI.

Notifications You must be signed in to change notification settings

Cognigy/EmbeddableExtensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains documentation, instructions and files our on-premises customers can use if they want to embed an extension into their own build of Cognigy.AI.


Embeddable Extensions


TL;DR

  1. Folder name must be same as your package.json name
  2. Add the prefix @embedded/ to the package.json name
  3. Set your container REGISTRY_URL in the build script
  4. Run the script
  5. Deploy the images

Introduction

System wide extensions are accessible organization wide and can be enabled by providing a path to a directory containing extensions.
Each extension must be unpacked including all required node_modules.


1. Naming convention

The folder name of the extension must have the same name as defined in the package.json

The name of the extension in package.json needs the additional prefix @embedded/

// package.json
{
  "name": "@embedded/random-cat-image",    
}

// folder name:
/random-cat-image

2. Update config map

Set the env FEATURE_ADDITIONAL_SYSTEM_WIDE_EXTENSIONS_PATH in the config-map and provide the path to the extensions folder. In the case of the example above it would be /app/embedded-extensions.


3. Build the docker images

The extensions need to get copied into the docker images of service-ai and service-resources.


This can be done via the provided Dockerfiles:

  • service-ai.Dockerfile
  • service-reources.Dockerfile
FROM cognigydevelopment.azurecr.io/service-ai:34a9dd993a1e75a75857d3080e0ddc4ca81a8517

WORKDIR /app

COPY embedded-extensions /app/embedded-extensions
FROM cognigydevelopment.azurecr.io/service-resources:527f57bfcdeb393d8cdc425b80e5c087a7823f24

WORKDIR /app

COPY embedded-extensions /app/embedded-extensions



Build script

Before running the script adjust the REGISTRY_URL='yourcontainerregistry.azurecr.io'.

Run the provided build script cognigy-build-embedded. for service-ai and service-resources


./bin/cognigy-build-embedded <service-name> <hash>

./bin/cognigy-build-embedded service-ai my-build-1
# This results in yourcontainerregistry.azurecr.io/service-ai:embedded-extensions-my-build-1
./bin/cognigy-build-embedded service-resources my-build-1

# This results in yourcontainerregistry.azurecr.io/service-resources:embedded-extensions-my-build-1

4. Deploy

Deploy both images to your on-premises cognigy installation.




About

Contains documentation, instructions and files our on-premise customers can use if they want to embed an extension into their own build of Cognigy.AI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published