/sdc-cnapi

SDC Compute Node API -- deals with communication to and management of compute nodes

Primary LanguageJavaScriptMozilla Public License 2.0MPL-2.0

sdc-cnapi

This repository is part of the Joyent Triton project. See the contribution guidelines -- Triton does not use GitHub PRs -- and general documentation at the main Triton project page.

CNAPI is responsible for maintaining the states and life-cycle stages of a compute node. It communicates with compute nodes for the purpose of creating and destroying tasks, initiating tasks, etc.

Development

To run the API server:

git clone git@github.com:joyent/sdc-cnapi.git
cd cnapi
git submodule update --init
make all
node bin/cnapi.js

To update the guidelines, edit "docs/index.md" and run make docs to update "docs/index.html".

Before commiting/pushing run make prepush and, if possible, get a code review.

Testing

make test

The CNAPI_IP environment variable specifies the URL at which to point the test suite. For example, this would test CNAPI installed on bh1-kvm6:

CNAPI_IP=10.2.206.13 make test

To test on a deployed CNAPI where the admin network is not directly accessible from your workspace, first ensure your changes are applied (either via sdcadm or the tools/rsync-to script) and then run:

COAL=root@<headnode external IP> make test-coal