Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

Prototype a new CLI bmhvm #1370

@Rozzii

Description

@Rozzii

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-tools
  • bmhvm create vm should create a VM
  • bmhvm generate bmh should generate a BareMetalHost manifest for a VM

Note that you can reuse some parts here.

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.triage/acceptedIndicates an issue is ready to be actively worked on.

Type

No type

Projects

Status

BMO WIP

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions