From 3be8da033d22173c8b74fa9f73e524e7c437d06f Mon Sep 17 00:00:00 2001 From: prasadtalasila Date: Wed, 20 Sep 2023 17:17:56 +0200 Subject: [PATCH] Improves README --- servers/execution/runner/README.md | 42 +++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/servers/execution/runner/README.md b/servers/execution/runner/README.md index ea53bbdc4..723b2119f 100644 --- a/servers/execution/runner/README.md +++ b/servers/execution/runner/README.md @@ -1,8 +1,19 @@ # :runner: Digital Twin Runner -A commandline utility to run a digital twin. It will provide REST interface -to execute lifecycle scripts of a digital twin. It is possible to run -multiple instances of this utility within one computer. +A utility service to manage the [lifecycle of one digital twin](../../../docs/user/digital-twins/lifecycle.md). +The lifecycle of a digital twin is made of multiple phases. This digital twin runner utility +helps with the managing the execution of lifecycle phases. This utility can be +launched in two scenarios: + +1. User launches this from commandline and let the utility +manage the lifecycle of one digital twin. +2. Execution infrastructure of Digital Twin as a Service (DTaaS) +launches this utility and instructs it to manage the lifecycle of +one digital twin. + +The digital twin runner utility runs as a service and will provide +REST API interface to execute lifecycle scripts of a digital twin. +One digital twin runner is responsible for execution of a digital twin. ## :hammer_and_wrench: Developer Commands @@ -11,6 +22,7 @@ yarn install # Install dependencies for the microservice yarn syntax # analyzes source code for potential errors, style violations, and other issues, yarn build # compile ES6 files into ES5 javascript files and copy all JS files into build/ directory yarn test # run tests +yarn test:nocov # run the tests but do not report coverage yarn test:watchAll #Watch changes in test/ and run the tests yarn start # start the application yarn clean # deletes directories "build", "coverage", and "dist" @@ -68,6 +80,30 @@ sudo npm list -g # should list @dtaas/runner in the packages sudo npm remove --global @dtaas/runner ``` +## :rocket: Access the service + +```bash +sudo npm install --registry http://localhost:4873 -g @dtaas/runner +runner # launch the digital twin runner +``` + +Once launched, the utility runs at `port 3000`. + +If launched on one computer, +you can access the same at `http://localhost:3000`. + +Access to the service on network is available at `http://:3000/`. + +Two REST API routes are active. The route paths and the responses given +for these two sources are: + +| REST API Route | Return Value | Comment | +|:---|:---|:---| +| localhost:3000/phase | [ hello ] | The array get appended with each invocation. All the elements of are _array_. | +| localhost:3000/lifecycle/phase | _true_ | Always returns _true_ | +||| + + ## :balance_scale: License This software is owned by