Microcluster v2.0.5 has been released

Introduction

The LXD team would like to announce the release of Microcluster v2.0.5!

It contains improvements for the current v2 LTS release that will be supported until July 2029.

Improvements

Dqlite LTS

At the time of Microcluster’s v2 LTS release there hasn’t been a LTS version of Dqlite.
This has changed last month and MicroCluster is now tracking the dqlite v2.0.0 LTS version of go-dqlite.

When building your Microcluster based project you also need to have the dqlite C library installed on the system, along with its dependencies.
Make sure to use the respective lts-1.17.x branch.

Pin LXD dependency

When defining new endpoints in Microcluster the API handlers have to comply with the following signature:

func(state state.State, r *http.Request) response.Response

The response.Response interface is sourced from the LXD respository which allows reuse of already defined response types.

As the version of LXD tracked in Microcluster v2 can diverge from the version of LXD you are importing in your own project to create the API handlers, we recommend to pin down the version of LXD in your go.mod file to the @stable-5.21 branch.
The pinning was put into place for Microcluster to ensure there aren’t any breaking changes throughout the lifetime of the LTS when performing regular dependency updates.

To pin down the version of LXD you have to run the following command as part of your regular dependency update procedure to ensure LXD is always pulled from the stable-5.21 branch:

go get github.com/canonical/lxd@stable-5.21

See some examples from Microcluster itself, MicroCloud, MicroCeph and MicroOVN.

Importing Microcluster v2.0.5

go get -u github.com/canonical/microcluster/v2

Or if you haven’t yet added Microcluster to your list of dependencies run

go get github.com/canonical/microcluster/v2@latest

Github release

3 Likes