CHAP as a Service (a.k.a CHAPBook) provides a web based service (interface) for rapid development of CHESS analysis workflows within CHESS Analysis Pipeline (CHAP) framework.
CHAPaaS is written in GoLang and can be build using standard GoLang
build procedure. Please use provided Makefile
and build it using
make
But in order to run CHAPaaS we need the following:
- jupyter notebook where CHAP code will be executed
- miniconda or conda
- corresponding python environments for supported workflows
- tomo/conda.yml
- saxswaxs/conda.yml To install given environment please do the following:
conda env create -f <workflow>/conda.yml
To run the service please follow these steps:
- Setup jupyter notebook server elsewhere, it can be local installation or
remote one
- configure your notebook to allow access from CHAPaaS. Here is an example of local jupyter setup:
c.NotebookApp.tornado_settings = {
"headers": {
"Content-Security-Policy": "frame-ancestors 'self' http://localhost:8182"
}
}
c.NotebookApp.token = "jupyter-token"
c.NotebookApp.open_browser = False
c.NotebookApp.port = 18889
c.NotebookApp.ip = '*'
Feel free to provide your own token value, and adjust ports as necessary.
In this example port 8182
refers to CHAPaaS port, while 18889
is notebook server port.
2. Install either miniconda or coda tool
- install all supported workflow environments, e.g.
git clone git@github.com:CHESSComputing/CHAPBookWorkflows.git
conda env create -f CHAPBookWorkflows/tomo/conda.yml
conda env create -f CHAPBookWorkflows/saxswaxs/conda.yml
...
- Install ChessAnalysisPipeline and make it accessible in your PATH.
- Create proper configuration file, e.g.
config.json
{
"base": "",
"verbose": 1,
"chap": "/path/CHAPaaS/scripts/chap.sh",
"chap_dir": "/path/ChessAnalysisPipeline",
"user_dir": "/path/CHAPaaS/chap/users",
"user_repo": "/tmp/CHAPBook",
"scripts_dir": "/path/CHAPaaS/scripts",
"redirect_url": "http://localhost:8182",
"oauth": [
{
"provider": "github",
"client_id" : "123",
"client_secret": "xyz"
}
],
"jupyter_root": "/tmp/jupyter",
"jupyter_token": "jupyter-token",
"jupyter_host": "http://localhost:18889",
"workflows_root": "/path/CHAPaaS/examples",
"github_token": "/path/CHAPaaS/token",
"doi": "666131920",
"development_mode": true,
"port": 8182
}
- Start the service
./chapaas -config config.json