Enables deployment of shock server and clients within the kbase release environment
JavaScript CSS Perl HTML Python Shell Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Shock @ 194593b
init
lib
scripts
service
test
webapps
.gitignore
.gitmodules
COMMANDS
DEPENDENCIES
LICENSE.md
Makefile
README.md
RELEASE_NOTES
deploy.cfg
fix_dates.js
shock.cfg.tt

README.md

shock_service

Enables deployment of shock server and clients within the kbase release environment.

The following are instructions on how to deploy the Shock service in KBase from launching a fresh KBase instance to starting the service...

  • Create security group for Shock server (this isn't required with the test ports in the Makefile but makes it convenient if you want to change the ports later)
  • Using this security group and your key, launch a KBase instance
  • Get code:
    sudo -s
    cd /kb
    git clone kbase@git.kbase.us:dev_container.git
    cd dev_container/modules
    git clone kbase@git.kbase.us:shock_service.git
    cd shock_service

  • Create a mongo data directory on the mounted drive and symbolic link to point to it:
    cd /mnt
    mkdir db
    cd /
    mkdir data
    cd data/
    ln -s /mnt/db .

  • Start mongod (preferably in a screen session):
    cd /kb/dev_container
    ./bootstrap /kb/runtime
    source user-env.sh
    mongod

(NOTE: mongod needs a few minutes to start. Once you can run "mongo" from the command line and connect to mongo db, then proceed with deploying Shock)

  • Deploy Shock:
    cd /kb/dev_container
    ./bootstrap /kb/runtime
    source user-env.sh
    make
    make deploy

  • Start Shock:
    (NOTE: If you're not deploying Shock on the production server, run the start_service command with the '-e test' option)
    /kb/deployment/services/shock_service/start_service

  • After deployment has completed, if you've associated an IP with your instance you should be able to confirm that Shock is running by going to either url below (ports are defined in shock.cfg):
    site -> http://[Shock Server IP]:7077/
    api -> http://[Shock Server IP]:7078/