-
Notifications
You must be signed in to change notification settings - Fork 3
Description
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):
- the instances manager registers the workspace, marked as stopped
- The instances manager calls the workspace runtime, passing to the runtime:
- name
- sources path
- config path
- The instances manager asks the runtime to start the instance (may be part of a
cli startcommand, or automatically done as part ofcli init) - The runtime starts the agent
- The runtime returns runtime-specific information, which is stored in the workspace data
- The instance is marked as running
When a workspace is removed (kortex-cli remove ID):
- The instances manager stops and removes the runtime instance associated with the ID (the two steps may be handled by two commands
cli stopandcli removeor automatically done as part ofcli remove) - The instances manager unregisters the workspace
when the user wants to access the runtime instance through a terminal
- 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)
Reactions are currently unavailable