A NodeJS library for the Nimbix Jarvice cloud computing platform
npm install nimbox-node
The library looks for your API credentials environmental variables 'username' and 'apikey'
{username: process.env.username,
apikey: process.env.apikey}
To use the library, you must include it:
var jarvice = require("./lib/jarvice.js");
\\ Required the client...
var jarvice = require("./lib/jarvice.js");
\\ Define the job submission details...
var options = {
url: 'https://api.jarvice.com/jarvice/submit',
method: 'POST',
port: 443,
body:{"app": "migenius-irayviewer",
"staging": false,
"checkedout": false,
"application": {
"command": "irayviewer",
"geometry": "1520x695"
},
"machine": {
"type": "ng4",
"nodes": 1
},
"vault": {
"name": "drop.jarvice.com",
"force": false,
"readonly": false
},
"user": {
"username": process.env.username,
"apikey": process.env.apikey
}
},
json: true,
};
\\ Submit the job!
jarvice.submitJob(options);
The following methods are currently available, note that all callbacks are of the form: function(error, results)
See Jarvice API docs for description of the required inputs and outputs of the various methods.
//jarvice.submitJob();
//jarvice.getJobs();
//jarvice.jobStatus(359982);
//jarvice.shutdownJob(xx); // graceful
//jarvice.terminateJob() // Immediate
//jarvice.connect(xx);
//jarvice.tail(xx);
//jarvice.info(xx);
//jarvice.getMachines();
//jarvice.getOutput(289503);
//jarvice.getApps();
//jarvice.getScreenshot(297527);