OpenBEL / belmgr

Website for managing BEL Evidences - based on Aurelia. Requires the OpenBEL Platform for the backend API/storage.
Apache License 2.0
2 stars 4 forks source link

BEL Manager

Website for managing BEL Nanopubs - based on Aurelia. Requires the OpenBEL API for the backend API/storage.

Table of contents

Getting started

Installation of Webeditor and Plugin

System Requirements

  1. Install NodeJS from https://nodejs.org/en/
  2. Install Gulp -- 'npm install -g gulp'
  3. Install jspm -- 'npm install -g jspm'
  4. Run bash <(curl -s https://raw.githubusercontent.com/OpenBEL/belmgr/master/bin/initial-setup.sh) to clone and run setup commands (you can also read the script to see what is going to be done or to modify the instructions)
  5. Start webeditor cd belmgr/webeditor, gulp watch
  6. Go to http://localhost:9000 in your browser (check the gulp watch results for a different port number if that doesn't work)

If you see 'github rate limit reached' - follow these instructions:

Note: jspm queries GitHub to install semver packages, but GitHub has a rate limit on anonymous API requests. It is advised that you configure jspm with your GitHub credentials in order to avoid problems. You can do this by executing jspm registry config github and following the prompts. If you choose to authorize jspm by an access token instead of giving your password (see GitHub Settings > Personal Access Tokens), public_repo access for the token is required.

Configuring

Example Configuration file

Configuration - this goes into src/config/config.json when building or /config/config.json when serving the application.

{
    "openbelApiUrls": [
      {"api": "http://bel2.demo.openbel.org/api", "name": "Demo BEL 2.0 API"},
      {"api": "http://bel1.demo.openbel.org/api", "name": "Demo BEL 1.0 API"},
      {"api": "http://localhost:9000", "name": "Local Dev OpenBEL API"}
    ]
}

Webeditor

Local development notes

We use npm link to allow for easier local development of the belmgr-plugin with the webeditor. You can see the npm link commands used in the https://raw.githubusercontent.com/OpenBEL/belmgr/master/bin/initial-setup.sh file.

Run webeditor locally using from the webeditor directory:

gulp watch

Building Production docker image

From the root directory of the belmgr code repository (with webeditor and plugin as child directories):

bin/build-webeditor-image.sh

Deploying manually

Nginx Example Deployment Configuration

    server {
        listen          0.0.0.0:80;
        server_name     internal-belmgr.domain.com;
        access_log      /var/log/nginx/belmgr-access.log main;
        error_log       /var/log/nginx/belmgr-error.log info;

        location / {
            alias                       /opt/belmgr/;
            index                       index.html;
            add_header  Cache-Control   no-cache;
        }
    }

BELMgr plugin

This plugin provides BEL Mgr BEL Editing functionality (http://openbel.org). You can deploy the entire BEL Nanopub edit form or subcomponents of the edit form via this plugin.

Technical requirements

System Requirements

Installation Requirements

  1. Install the latest version of NodeJS: https://nodejs.org/en/download/
  2. Install the latest version of Git including Git Bash: https://git-scm.com/downloads
  3. Install Gulp globally: (sudo?) npm install -g gulp
  4. Install JSPM globally: (sudo?) npm install -g jspm

Installing the plugin

jspm install belmgr-plugin

Using the plugin

There are examples of how to use this plugin in this repo in the sample* directories

Updating the belmgr-plugin NPM package

Assuming that you have permission to push an update. If not, please contact whayes@openbel.org.

Select the semantic portion to update using the npm version command (e.g. is this a major, minor or patch level update).

npm version {patch minor major}
npm publish