Skip to content

Steps to follow with docker

Lakindu Gunasekara edited this page Jun 21, 2018 · 3 revisions
  1. Create a docker image with first local service
  2. Have a poc project in node sending commands into the docker container use the library Check https://github.com/apocas/dockerode or https://www.npmjs.com/package/docker-exec
  3. Document all the command templates that need to be used for simulating the azure service
  4. Write a parameterized shell script(s) for this
  5. Create a node module which acts as an interface for the shell scripts
  6. Read the shell output stream from node and have translation templates to convert to meaningful results (You can try velocity templates check Apache velocity)
  7. Output results to use through json objects similar to azure sdk
  8. Repeat from 1 to 8 for any new service

Example

Your App -> Cloud-Local Wrapper -> Invokes Docker EXEC command to run a shell script in the mongoDB docker instance ----> In the docker instance this shell script invokes mongo cli commands to query/store data.

Velocity Template Engine

<Xml> <Name> John</Name> </Xml>

Can define a velocity template to convert that into a json or any other format { "Name": "John" }