Skip to content

Instantly share code, notes, and snippets.

View okossuth's full-sized avatar

Oskar Kossuth okossuth

View GitHub Profile
@okossuth
okossuth / lxd.md
Last active August 16, 2023 15:17
Building an LXD 3-Node Cluster

Building an LXD 3-node Cluster on DigitalOcean with a ZFS storage based pool and FAN networking enabled.

In this example i'm using a Ubuntu 22.04 vainilla image with a 20GB extra volume disk attached to each droplet to be used for a ZFS storage pool. This ZFS pool will be named "local" and can be later expanded online by adding more physical volumes to the nodes. The 3 nodes are orion, rigel and vega, the first one used as the leader node in the cluster and the others as secondary nodes.The LXD version used is 5.15.

A FAN network is also configured for the potential containers that will run in the LXD cluster. if you dont know what is a FAN network please check here: https://wiki.ubuntu.com/FanNetworking

First we create 3 droplets on DigitalOcean's control panel, as this is the minimum number for quorum in the cluster and each with a 20GB unformatted volume attached, all in the same region and using same VPC.

Next we install LXD and ZFS-utils on all droplets: