clustvirt

command module
v0.0.0-...-626fa6c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 3 Imported by: 0

README

clustvirt - Libvirt cluster manager

Clustered virtualization has gotten to complicated. We have a great system for it built into the Linux kernel, with shared software stacks between whatever base distro you want to use.

Every other option has buy in, and buzzwords. I want something truly simple that can manage virtual machines on multiple hosts, integrating with existing tools, running from one/all of the hosts, a raspberry pi, or as a guest machine on the cluster itself.

The mission: Talk to libvirt hosts, coordinate them, manage them, and let people take their clusters back.

Overall goals:

  • HA Cluster resource manager (simpler then existing options, just for libvirt)
    • Share secrets
    • Share VM configs
    • know what VM is running on what cluster host
    • trigger migrations of hosts
    • most simple quorum algorithm possible, ability to run 2 hosts reliably, up to ?? hosts without worry
      • Simplest quorum: If the controller can't reach it, it's down.
  • Shared Network management
  • Shared storage managment
    • Does not include clustered storage configuration
    • Can use different clustered storage systems (just not configure them directly)
  • Reliable backup and snapshotting
    • The tools exist for this, just needs to be exposed
  • Install on any libvirt system, as long as the basic requirements are met as far as compatibility is concerned
    • Should be able to have hosts on RedHat, Rocky, Arch, Ubuntu, Debian, whatever without worry
  • Cloud-init configuration help to create useful and reusable cloud-init files, that don't need to be used by the system only. It's a standard, use it.

Existing tools and libraries to use

Roadmap

  • Create simple daemon that can run on 1 or more hosts that will keep track of things
    • Libvirt daemon
      • Host Capabilities
      • Migration Capabilities
      • Secret management
      • Storage pool management
      • Volume management
      • Guest management
      • Connection management (to other libvirt hosts)
  • Create a simple WebUI with HTMX to monitor that stuff
  • Add the ability to manage that stuff once we can monitor it, through the WebUI.

Special XMLNS definitions

Domain
  • xmlns:clustvirt="https://git.staur.ca/stobbsm/clustvirt"
<metadata>
    <clustvirt:data xmlns:clustvirt="https://git.staur.ca/stobbsm/clustvirt/">
        <clustvirt:created>true</clustvirt:created>
        <clustvirt:managed>true</clustvirt:managed>
        <clustvirt:currentHost>host01</clustvirt:currentHost>
        <clustvirt:origHost>host02</clustvirt:origHost>
        <clustvirt:baseGuest>rocky-9-base</clustvirt:baseGuest>
    </clustvirt:data>
</metadata>
Open Source Projects

The following projects are being used as part of ClustVirt. Only those being used directly are listed, not the dependencies.

Go
Library Use License
xdg XDG paths MIT
spf13/viper Configuration MIT
spf13 Command Pattern CLI Apache 2.0
go-chart/v2 Chart generation MIT
libvirt Communications with Libvirtd MIT
libvirtxml Libvirt XML parsing and generation MIT
templ HTML Templating Engine MIT
chi/v5 HTTP Routing MIT
Node NPM
Library Use License
tailwindcss CSS UI library MIT
tailwindcss/forms CSS UI library for forms MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cluster is the unique portion of this application that implements basic cluster controls overtop of Libvirtd hosts.
Package cluster is the unique portion of this application that implements basic cluster controls overtop of Libvirtd hosts.
lock
Package lock implements a locking mechanism on shared resources to ensure they don't get used at the same time.
Package lock implements a locking mechanism on shared resources to ensure they don't get used at the same time.
cmd
Package config used spf13/viper to handle configuration.
Package config used spf13/viper to handle configuration.
lib
guest
Package guest implements utilities and structured data for libvirt virtual machines
Package guest implements utilities and structured data for libvirt virtual machines
host
Package host provides utilities and data structures in relation to a libvirt host.
Package host provides utilities and data structures in relation to a libvirt host.
network
Package network defines varialbes and methods to control libvirtd networks.
Package network defines varialbes and methods to control libvirtd networks.
storagepool
Package storagepool provides utilities and data structures in relation to storage pools.
Package storagepool provides utilities and data structures in relation to storage pools.
router
api
Package api defines the routes for the REST API
Package api defines the routes for the REST API
htmx
Package htmx contains the routes for the WebUI HTMX
Package htmx contains the routes for the WebUI HTMX
cleanup
Package cleanup collects functions that should be run at the end of program operation to clean things up and shut things down properly.
Package cleanup collects functions that should be run at the end of program operation to clean things up and shut things down properly.
templ: version: v0.2.648
templ: version: v0.2.648
components
templ: version: v0.2.648
templ: version: v0.2.648
layouts
templ: version: v0.2.648
templ: version: v0.2.648
static
templ: version: v0.2.648
templ: version: v0.2.648

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL