Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 2.04 KB

README.md

File metadata and controls

75 lines (48 loc) · 2.04 KB

pfchrs

Build

a FAST API REST service about an embedded chrs application -- basically a web-based chrs

Abstract

pfchrs is a FastAPI application thought experiment that provides REST services about an "embedded" chrs client. This repo is part of an experiment into examining the feasibility of offering chrs via web to a bundled ChRIS ecosystem instantiation.

Conceptualization

A fuller experience closer to the imagined goal is to use the chrs_web interface that provides an interactive "terminal", sends commands to pfchrs and renders results.

pfchrs Deployment

local build

To build a local version, clone this repo and then

set UID=$(id -u) # for bash/zsh
set UID (id -u)  # for fish shell
docker build --build-arg UID=UID -t local/pfchrs .

dockerhub

To use the version available on dockerhub (note, might not be available at time of reading):

docker pull fnndsc/pfchrs

running

To start the services

SESSIONUSER=localuser
docker run                                  \
        --env SESSIONUSER=$SESSIONUSER      \
        --name pfchrs --rm -it -d           \
        -p 2025:2025                        \
        local/pfchrs /start-reload.sh

To start with source code debugging and live refreshing:

SESSIONUSER=localuser
docker run                                  \
        --env SESSIONUSER=$SESSIONUSER      \
        --name pfchrs --rm -it -d           \
        -p 2025:2025                        \
        -v $PWD/pfchrs:/app:ro
        local/pfchrs /start-reload.sh

(note if you pulled from dockerhub, use fnndsc/pfchrs instead of local/pfchrs)

pfchrs Usage

POST a chrs command

pfchrs provides a POST endpoint that accepts a command to execute internally. A "vault" is used to provide credentialling to a connected CUBE.

POST :2025/api/v1/chrs/{cmd}

-30-