sudo apt update
sudo apt install -y openvswitch-switch ovn-common
Ubuntu will have an outdated version of LXD pre-installed, so we need to make sure we have the most current version.
sudo snap refresh lxd
sudo snap install microceph
TODO: Discuss the importance of using ntp to avoid clock skews.*
The current version of LXD is picky about keyring location; however, this is expected to change in the future.
sudo ln -s ceph.keyring /var/snap/microceph/current/conf/ceph.client.admin.keyring
To keep LXD happy, you'll need to enable pool deletion:
sudo microceph.ceph config set mon mon_allow_pool_delete true
You should use OVN networking because it allows you to create isolated VPCs that behave like you're used to.
Disable the default openvswitch services:
sudo systemctl stop openvswitch-switch.service ovs-vswitchd.service ovsdb-server.service
sudo systemctl disable openvswitch-switch.service ovs-vswitchd.service ovsdb-server.service
Install the snap package; as there isn't a stable microovn release yet, we must utilize Edge here.
sudo snap install --edge --devmode microovn
Finally, a number of simple hacks were made to allow LXD and microovn to communicate:
sudo mkdir -p /var/run/openvswitch
sudo sudo ln -s /var/snap/microovn/common/run/switch/db.sock /var/run/openvswitch/db.sock
for t in $(lxc cluster ls -f json | jq -r '.[].server_name'); do
lxc network create br0 --type=bridge --target=$t
done
lxc network create br0 --type=bridge
for t in $(lxc cluster ls -f json | jq -r '.[].server_name'); do
lxc network create uplink --type=physical parent=br0 --target=$t
done
lxc network create uplink --type=physical \
ipv4.ovn.ranges=<IP_range> \
ipv6.ovn.ranges=<IP_range> \
ipv4.gateway=<gateway> \
ipv6.gateway=<gateway> \
dns.nameservers=<name_server>
parent_network=uplink
lxc network create ovntest --type=ovn network=$parent_network