Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

GU Simple exec env driver

Przemysław Rekucki edited this page Sep 5, 2019 · 2 revisions

Provider exec env plugins specyfication.

Placement

Plugins will be scanned in directories:

  • for user ~/.local/share/golemunlimited/plugins/
  • for system /var/lib/golemu/plugins, /usr/lib/golemu/plugins/
+ plugins/
...
`--+ <plugin-name>.gu-plugin/
   `-- gu-plugin.json
   `-- gu-exec-env-driver-gwasm

Plugin manifest (gu-plugin.json)

Field Type Description
id str Unique plugin identifier.
version Version version in format <n>.<n>.<n>
creators List[str] Single or list of plugin creators
provider ProviderActivator

ProviderActivator

Field Type Description
min-version Version Minimal provider version
simple-exec-env List[SimpleExecEnvDesc] List of execution enviroments activators

SimpleExecEnvDesc

Field Type Description
code str Exec env activation code (eg. hd, docker, wasm,...)
exec str driver executable
image-repo str webdav - default type. downloads image via http.

Driver Interface

Creation of new deployment

  1. Downloads image
  2. Validate new image by running: {driver} validate-image <path to image>
  3. Creates deployment workdir. Writes create options to {workdir}\deployment-sepc.json.
  4. Creates deployment by running {driver} create --image {path to image} --workdir {workdir} --spec {path-to-deployment-spec}

Open command

Runs new process <driver> open --image <path to image> --workdir <workdir> --spec <path-to-deployment-spec>

Close command

Kills process started by open command.

Exec command

Runs new process <driver> exec --image <path to image> --workdir <workdir> --spec <path-to-deployment-spec> -- <path to program> <args>

Start command

Works as exec

Download command

  1. Runs new process <driver> resolve-path --image <path to image> --workdir <workdir> --spec <path-to-deployment-spec> <destination path>
  2. Process returns output in format {"resolvedPath": "<path-in-workspace>"}.
  3. Starts download to given path in workspace.

Upload command

Runs resolve-path command to find file or directory to upload.