-
Notifications
You must be signed in to change notification settings - Fork 119
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
Prototype a new CLI bmhvm #1370
Comments
This issue is currently awaiting triage. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@Rozzii would it help if we put that in sushy-tools instead? I'm a bit worried about potential duplication: we already have many places where the same logic is used. |
@dtantsur yeah I think we can go into that direction, and as you have mentioned let's first specify the exact scope of this and figure out the configuration format. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
/lifecycle frozen |
/assign |
/remove-lifecycle frozen After some discussion we have decided that this VM tooling would be used across the project and the best place for it would be in project-infra. CAPM3, IPAM and BMO would use it as a GO package while dev-env would use it as a cli tool. |
I'm not sure project-infra is the best place. Yes it will be used across projects, but I do think it belongs with BMO. We should publish the CLI as a build artifact binary that dev-env can use. In CAPM3 I think we should use it as a go module directly, and this is the reason I want it in BMO. CAPM3 depends on BMO already and this is a natural dependency. Depending on project-infra as a module feels wrong to me. |
I agree that CAPM3 or BMO should not depend on go package from project-infra. I'm not exactly loving the idea of having VM tools in BMO either, but it is more closely related to BMO than anything else. |
This is an advanced task. Take it only if you are already comfortable with golang, libvirt and containers.
We currently use bash scripts to set up sushy-tools and create VMs to be used as BareMetalHosts. This works, but it is not ideal. It is inflexible, hard to reuse between CI and development, and even harder to reuse from other repositories like CAPM3.
The goal of this task is to prototype a golang CLI (call it for example
bmhvm
) that can do the same thing these scripts do today. It should also be usable as a go library that can be imported in CAPM3 for example. The tool should be able to set up sushy-tools on top of either podman or docker. It should be able to create a libvirt network and create VMs in this network.You will need to work with the libvirt golang library: https://pkg.go.dev/libvirt.org/go/libvirt
Here are some suggestions for how it should work.
bmhvm init
should create a libvirt network and run sushy-toolsbmhvm create vm
should create a VMbmhvm generate bmh
should generate a BareMetalHost manifest for a VMNote that you can reuse some parts here.
The text was updated successfully, but these errors were encountered: