Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[task]: extend vm factory to provide support for container implementation #2

Closed
hexfusion opened this issue Jun 22, 2023 · 1 comment
Assignees
Milestone

Comments

@hexfusion
Copy link
Owner

hexfusion commented Jun 22, 2023

During bootstrap the vm factory uses the VM runtime engine to start a vm subprocess[1]. Currently this is very specific to the subprocess implementation. We loop the files in the directory[1] and attempt to match VMID. In order for the node to pick up the configuration for the container we will want to drop the pod yaml in the plugins dir using the following format. <VMID>_pod.yaml

tGas3T58KzdjcJ2iKSyiYsWiqYctRXaPTqBCA11BqEkNg8kPc_pod.yaml

Then if we match _pod.yaml use the container implementation otherwise subprocess.

[1] https://github.com/ava-labs/avalanchego/blob/eb6e7973a900dc647d29a2da8e7a233ac0a5fe77/vms/registry/vm_getter.go#L102
[2] https://github.com/ava-labs/avalanchego/blob/master/vms/rpcchainvm/factory.go#L36
[3] https://github.com/ava-labs/avalanchego/blob/master/vms/registry/vm_getter.go#L64

@hexfusion hexfusion added this to the MVP milestone Jun 22, 2023
@hexfusion hexfusion moved this to Todo in Hackathon 2023 Jun 22, 2023
@hexfusion hexfusion changed the title task: extend vm factory to provide support for container implementation [task]: extend vm factory to provide support for container implementation Jun 22, 2023
@aaronbuchwald aaronbuchwald self-assigned this Jun 22, 2023
@aaronbuchwald aaronbuchwald moved this from Todo to In Progress in Hackathon 2023 Jun 22, 2023
@aaronbuchwald
Copy link
Collaborator

Just added a messy switch in that looks for the _pod suffix and will call the alternative podman factory if present.

Building the podman VM factory will depend on the podman client.

Here's the PR #11

@github-project-automation github-project-automation bot moved this from In Progress to Done in Hackathon 2023 Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants