Databox container manager and dashboard are the part of the databox platform. see the main repository for more information.
For developing Databox core components - Container Manager (CM) exposes following functions:
setHttpsHelper(helper)
: this function provides a https-agent with Databox root certificate, so that arbitor accepts requests by the https-agent.install(sla)
: start a app/driver service as a docker container.uninstall(service)
: remove the runningservice
docker container.restart(container)
: restart thecontainer
.connect()
: this function checks if CM can connect to docker.listContainers()
: this list all Databox componentn containers.generateArbiterToken(name)
: this function generates token to be passed to arbitor for the service.updateArbiter(data)
: this function updates arbitor endpoint:/cm/: upsert-container-info using post 'data'restoreContainers(slas)
: this function restores containers by relaunching them by their sla's.getActiveSLAs()
: this function gives all SLA's registered in the SLA - database.
getSLA(name)
: find sla withname
in./slaStore/sladatastore.db
getAllSLAs
: list all slas in./slaStore/sladatastore.db
putSLA(name, sla)
: put sla withname
in./slaStore/sladatastore.db
deleteSLA(name)
: delete sla withname
from./slaStore/sladatastore.db
createNetwork(networkName, external)
: this function creates a docker network with namenetworkName
and boolean typeexternal
variable. Ifexternal
is true, it means external excess to the network is allowed.connectToNetwork(container, networkName)
: this function connects a container to the docker network -networkName
disconnectFromNetwork(container, networkName)
: this function disconnects a container from the docker network -networkName