Skip to content

workspace runtimes #36

@feloy

Description

@feloy

The agents are executed by runtimes.

Example of runtimes:

  • podman
  • docker
  • apple containers
  • microvm
  • processes
  • fake
  • etc.

The user MUST provide a runtime with --runtime or KORTEX_CLI_DEFAULT_RUNTIME when using the init command. We don't want the runtime to be auto-detected depending of available runtimes at the time of executing init, for better reproducibility)

The runtime information is part of the workspace information.

The list command lists all the workspaces, from the different runtimes.

When a workspace is registered (kortex-cli init --runtime my_runtime):

  1. the instances manager registers the workspace, marked as stopped
  2. The instances manager calls the workspace runtime, passing to the runtime:
  • name
  • sources path
  • config path
  1. The instances manager asks the runtime to start the instance (may be part of a cli start command, or automatically done as part of cli init)
  2. The runtime starts the agent
  3. The runtime returns runtime-specific information, which is stored in the workspace data
  4. The instance is marked as running

When a workspace is removed (kortex-cli remove ID):

  1. The instances manager stops and removes the runtime instance associated with the ID (the two steps may be handled by two commands cli stop and cli remove or automatically done as part of cli remove)
  2. The instances manager unregisters the workspace

when the user wants to access the runtime instance through a terminal

  1. the instances manager opens a terminal connection between the user and the runtime instance

Proposed API for the runtime module

  • create(name, source path, config path) -> ID (+info?)
  • start(ID) -> Info
  • stop(ID)
  • terminal(ID)

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions