Skip to content

[Arch Refactor for Agent Runtime]: Deprecating SSH-based communication and use EventStream #2404

Closed
@xingyaoww

Description

@xingyaoww

What problem or use case are you trying to solve?

Right now, the backend mainly relies on ssh to communicate with sandbox, which does not fit too well with our current Event Stream-based communication. The requirement of the backend to know the existence of "ssh" makes thing much harder to support different runtimes/docker images (#1387, e.g., we need to automatically install sshd if user bring their own docker images without it - and it can get tricky very quickly since sshd may need to be installed differently across different linux distributions) and creating hosted version (#1086).

Describe the UX of the solution you'd like

I imagine our next step in architecture will be able to support arbitrary docker image sandbox/runtime by creating one piece of software called od-runtime-client and automatically installing it into the user-provided sandbox (if it wasn't installed already - this is already partially done in #2101).

Then, at the entry point of each docker sandbox, od-runtime-client will be started:

Do you have thoughts on the technical implementation?

Due to the diversity of user-provided docker images we might need to support, I propose we use some package manager like miniforge that is already multi-platform to maintain the environment (miniforge can install different python version, and even maintains its own glibc version to circumvent some system-level restriction, e.g., glibc version too old) and dependencies of od-runtime-client. So the workflow of user-bring docker sandbox would be (essentially what we implemented in #2101):

  1. Detect if a user brings an image that comes with already installed od-runtime-client
  2. If not, we create a temporary Dockerfile, FROM user-provided-docker, then build that image with a suffix _od
  3. Then we use ${SANDBOX_CONTAINER_IMAGE}_od to start the sandbox, and assume every dependencies is met.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions