stormtracker
v0.1.8
Published
A new nexus in the sleeves of a node.js.
Downloads
9
Readme
Stormtracker is the module which keeps track of all the stormflash endpoints - basically the one who provides identification, authorization and activation of stormflash endpoints
Running Stormtracker
Step-1 You need to export NODE_PATH as below, say, if the stormtracker node dir is present in path "/lib/node_modules"
export NODE_PATH=$NODE_PATH:/lib/node_modules:/lib/node_modules/stormtracker/node_modules:/lib/node_modules/stormtracker/lib:/lib/node_modules/stormtracker/lib/:/lib/node_modules/stormtracker/node_modules/
Step-2 cd /lib/node_modules/stormtracker/
Step-3 Run stormtracker js file
nohup node lib/stormtracker.js >> /var/log/stormtracker.log 2>&1 &
(or)
nohup npm start >> /var/log/stormtracker.log 2>&1 &
List of Stormtracker APIs
POST /agents
Request JSON
{
serialKey: "some serial key",
stoken: "some token"
password: "password",
stormbolt: {
state: "ACTIVE",
servers: ["bolt://testserver"],
beacon: {
interval: 2000,
retry: 2000
},
loadbalance: {
algorithm: "roundrobin"
}
}
}
Response JSON
{
id :"uuid"
serialKey: "some serial key",
stoken: "some token"
password: "password",
stormbolt: {
state: "ACTIVE",
servers: ["bolt://testserver"],
beacon: {
interval: 2000,
retry: 2000
},
loadbalance: {
algorithm: "roundrobin"
},
cabundle: {
encoding: "base64",
data: "base64 encoded certificate"
}
}
}
POST /agents/:id/csr
Request JSON
{
encoding: "base64",
data: "base64 encoded CSR"
}
Response JSON
{
encoding: "base64",
data: "base64 encoded signed certificate"
}
PUT /agents/:id
Request JSON
{
id:"uuid",
serialKey: "some serial key",
stoken: "some token"
password: "password",
stormbolt: {
state: "ACTIVE",
servers: ["bolt://testserver"],
beacon: {
interval: 2000,
retry: 2000
},
loadbalance: {
algorithm: "roundrobin"
}
}
}
Response JSON
{
id:"uuid",
serialKey: "some serial key",
stoken: "some token"
password: "password",
stormbolt: {
state: "ACTIVE",
servers: ["bolt://testserver"],
beacon: {
interval: 2000,
retry: 2000
},
loadbalance: {
algorithm: "roundrobin"
}
}
}
PUT /agents/:id/status/:status
Update the status valid values (ACTIVE | INACTIVE)
Returns Http Status code 204
GET /agents/:id
Response JSON
{
id :"uuid"
serialKey: "some serial key",
stoken: "some token"
password: "password",
stormbolt: {
state: "ACTIVE",
servers: ["bolt://testserver"],
beacon: {
interval: 2000,
retry: 2000
},
loadbalance: {
algorithm: "roundrobin"
},
cabundle: {
encoding: "base64",
data: "base64 encoded certificate"
}
}
}
GET /agents/:id/bolt
Response JSON
{
state: "ACTIVE",
servers: ["bolt://testserver"],
beacon: {
interval: 2000,
retry: 2000
},
loadbalance: {
algorithm: "roundrobin"
},
cabundle: {
encoding: "base64",
data: "base64 encoded certificate"
}
}
GET /agents/serialKey/:key
Response JSON
{
id :"uuid"
serialKey: "some serial key",
stoken: "some token"
password: "password",
stormbolt: {
state: "ACTIVE",
servers: ["bolt://testserver"],
beacon: {
interval: 2000,
retry: 2000
},
loadbalance: {
algorithm: "roundrobin"
},
cabundle: {
encoding: "base64",
data: "base64 encoded certificate"
}
}
}
DELETE /agents/:id
Returns Http status code 204