Skip to content

ExeUnit Runtime CLI

Adam Mizerski edited this page Jul 7, 2020 · 4 revisions

Mandatory arguments

  • --workdir path

    An absolute path to Runtime's working directory

  • --task-package path

    An absolute path to the image file for deployment and execution

Commands

The remaining ExeUnit script commands (TRANSFER) are handled by the supervisor.

DEPLOY

Initiates deployment of ExeUnit for the newly created Activity.

arguments:

  • none

example:

wasmtime-exeunit --workdir /tmp/work --task-package /tmp/cache/rust-wasi-tutorial.zip \
    deploy

NEW On stdout is expected response in json format:

{
  "valid": {
    "Ok": "success"
  },
  "vols": [
    {
      "name": "vol-9a0c1c4a",
      "path": "/in"
    },
    {
      "name": "vol-a68672e0",
      "path": "/out"
    }
  ]
}

https://github.com/golemfactory/yagna/blob/master/exe-unit/runtime-api/src/deploy.rs for reply parsing details.


START

Launches the Activity on the instantiated ExeUnit.

arguments:

  • varargs

    An arbitrary list of arguments

example:

wasmtime-exeunit --workdir /tmp/work --task-package /tmp/cache/rust-wasi-tutorial.zip \
    start --cached 

RUN

Runs arbitrary command on the ExeUnit. The semantics of a command is specific to the ExeUnit, eg. for containerized applications, RUN would run an OS command (as if from command prompt).

arguments:

  • --entrypoint name

    Entrypoint to be executed

  • varargs

    An arbitrary list of arguments

example:

wasmtime-exeunit --workdir /tmp/work --task-package /tmp/cache/rust-wasi-tutorial.zip \
    run --entrypoint rust-wasi-tutorial /input/file_in /output/file_out
Clone this wiki locally