Skip to content

Register a new plugin app with the ChRIS store API

Jorge edited this page Jun 28, 2020 · 4 revisions

Register a plugin in the ChRIS store

First save the plugin representation json file by running the plugin app with the --savejson flag

For instance:

docker run --rm -v /tmp/json:/json fnndsc/pl-simplefsapp simplefsapp.py --savejson /json

ChRIS Store server preconditions

These preconditions are only necessary to be able to register your plugin against an actual instance of a ChRIS Store server.

Install latest Docker Compose. Currently tested platforms

  • Ubuntu 16.04+ and MAC OS X 10.11+

On a Linux machine make sure to add your computer user to the docker group

Fire up the full set of ChRIS store services:

Open a terminal and run the following commands in any working directory:

$> git clone https://github.com/FNNDSC/ChRIS_store.git
$> cd ChRIS_store
$> ./make.sh up

Open another terminal and check that all the services are up:

$> docker-compose -f docker-compose_dev.yml ps

Install httpie client if not already installed

$> pip install httpie

Make a POST request to register the new plugin app in the store

For instance, using the httpie client and assuming that the ChRIS store service is running at localhost:8010 and that your store account is cubeadmin:cubeadmin1234 the plugin representation json file should be uploaded to the ChRIS Store as part of the POST request:

http -a cubeadmin:cubeadmin1234 -f POST http://localhost:8010/api/v1/plugins/ dock_image=fnndsc/pl-simplefsapp descriptor_file@/tmp/json/SimpleFSApp.json public_repo=https://github.com/FNNDSC/pl-simplefsapp name=pl-simplefsapp

This POST request should come back with a response. If the response contains an error message then the plugin representation is not correct otherwise the plugin has been successfully registered!

Tear down the full set of ChRIS store services:

You can later remove all the backend containers and release storage volumes with:

$ cd ChRIS_store
$ ./make.sh down