Skip to content

kbaseattic/kbase-sdk-module-ui-service

 
 

Repository files navigation

UIService


A KBase module generated by the KBase SDK.

Local development

old way:

PATH=$PATH:`pwd`/../../kb_sdk/bin
kb-sdk test
bash scripts/run-bash.sh
bash scripts/start_server.sh

new way:

make docker-image-dev
make run-docker-image-dev

Pure local image build

kb_sdk's ModuleTester.java contains the code to build the docker image. All it does, as far as building goes, is construct a simple docker build bash command string. (It also manages images, etc.)

docker build --rm -t TARGET_IMAGE_NAME REPO_PATH

where TARGET_IMAGE_NAME is test/MODULE:latest

for local dev and testing, you can name this what you like. "latest" is not the best tag, probably, because it usually indicates the tip of master or the most recent release.

so, e.g.

docker build --rm -t test/ui-service:dev

If you are starting from a cold docker cache the initial build may take several minutes: the kbase base image is rather huge.

Actually...

To make the image locally:

make docker-image-dev

Then to run it:

make run-docker-image-dev

This will start the container attached to the Docker custom network

Work in Progress Instructions

In the current incarnation, when the service starts it creates the sqlite database schema, and populates initial data therein. This includes the admin user, ui_service_admin. A token for this user may be used to add alerts.

See the scripts test/manual. Running the script 'send.sh' with an argument set to the base name for an accompanying json file will send the associated json-rpc payload.

E.g.

KB_TOKEN=XXXMYTOKENXXX bash send.sh add-alert

Development

install mongo image

I use Kitematic to get the latest in the 3 series (currently 3.7.9) - the 2 series which kbase uses is not supported in the official distribution.

Change these settings:

  • enable kbase-dev network
  • map directories to SPRINT/mongo/db and SPRINT/mongo/configdb

Add ui_service user and database

mongo localhost:PORT

where port is the port reported in Kitematic (it changes with every container startup)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 49.7%
  • Java 22.6%
  • Perl 18.9%
  • JavaScript 4.0%
  • Shell 1.7%
  • Ruby 1.3%
  • Other 1.8%