Skip to content

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

License

Notifications You must be signed in to change notification settings

kbaseattic/shock_service

Repository files navigation

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 [email protected]:dev_container.git
    cd dev_container/modules
    git clone [email protected]: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/