Skip to content

Commit

Permalink
Improves README
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadtalasila committed Sep 20, 2023
1 parent f86642d commit 3be8da0
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions servers/execution/runner/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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"
Expand Down Expand Up @@ -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://<ip or hostname>: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
Expand Down

0 comments on commit 3be8da0

Please sign in to comment.