She currently looks at number of containers/builds currently on a given system and calculates the best dock to send the task to based on weights specified in the .env.* files. Docks are registered in redis and each dock has its own info which includes numContainers and numBuilds and host name.
use npm start
to start this server on port specified env HOST_POST
or env file.
run npm test
inputs
body.type
= type of task that needs to be run.
currently supports `container_build` and `container_run`
optional
body.prevDock
= key of previous dock used by this container. used in calculations
returns
{
dockHost: dockHost
}
get list of active docks
returns: array of active docks
[{
host: 'localhost',
numContainer: 1
numBuilds: 2
}, ...]
update params of dock
inputs (can also be query)
body.host
= host to update
body.value
= value to set
body.key
= key to update
currently supports `container_build` and `container_run`
returns: nothing
removes dock from selection pool
inputs (can also be query)
body.host
= host to delete
returns: nothing
adds dock to selection pool
inputs (can also be query)
body.host
= host to add
EX:
DELETE http://mavis.runnable-beta.com/docks?host=http://10.29.134.72:4242
returns: nothing
returns the name of the app 'runnable mavis: the fairy tactician'