As APIs developers may want to deploy a Hydra-based servers/agents system on the cloud, it is provided here a tool to easily structure the content of Hydra specification documentation (ApiDoc
) as a distributed cluster using a Docker stack.
Briefly, it should be possible to create a cluster from any compliant ApiDoc
and deploy a docker container for each HydraClass
in the document, so to create a "microservices-like" environment on which to plug a compliant agent (like hydra-python-agent
). The agent would act as the tool to query the relationships among classes at scale. One agent, many hydrus servers that represent the data model; to query this distributed model, every agent connected stores the graph and runs query on its graph store.
Practically:
- the
ApiDoc
is destructured into itsHydraClass
es and for each of them a hydrus instance is spawned - every authorised agent (
hydra-python-agent
) can connect to the cluster, build its own data graph and run queries and receive data updates.
Proposed implementation is to use Apache OpenWhisk. OpenWhisk is a portable serverless framework that works on top of popular technologies like Docker (i.e. Docker-On-Docker) and Kubernetes.
- install Docker and latest stable version of GoLang
- install kubectl
- install
kind
(GoLang library, only used for local development) following these instructions - install OpenWhisk wsk CLI
- install OpenWhisk wskdeploy
- Follow this instructions to create a local cluster
- Deploy local cluster with Helm. Need to clone
openwhisk-deploy-kube
repository locally - try:
wsk -i property get