Skip to content

Setup OVN cluster

Michele Lo Russo edited this page Nov 15, 2023 · 3 revisions
  1. Create 3 VMs with latest ubuntu

  2. In each of the VMs run

     snap refresh lxd --channel=latest/edge
     snap install microcloud microceph microovn
    
  3. When step 2. finished on all three VMs, initialize microcloud on the first VM. Accept defaults, select the other two nodes when asked.

     microcloud init
    
  4. Add your certificate to the microcloud

    1. In your local checkout of lxd-ui, run dotrun once, to ensure your certificates are created.
    2. Copy the contents of keys/lxd-ui.crt from your checkout directory
    3. Open a terminal in one of the three VMs
      1. Create a new file "nano lxd-ui.crt", and paste the contents from step 4.2, save (Ctrl+O) and exit (Ctrl+X) the file
      2. Add that cert to the trust store "lxc config trust add lxd-ui.crt"
      3. Ensure everything is setup correctly - "lxc config trust ls" should look like this:
+--------+------------------+-----------------------+--------------+------------------------------+------------------------------+
|  TYPE  |       NAME       |      COMMON NAME      | FINGERPRINT  |          ISSUE DATE          |         EXPIRY DATE          |
+--------+------------------+-----------------------+--------------+------------------------------+------------------------------+
| client | lxd-ui.crt       | localhost             | 438fe5856e9a | Jan 26, 2023 at 8:36am (UTC) | Apr 14, 2031 at 8:36am (UTC) |
+--------+------------------+-----------------------+--------------+------------------------------+------------------------------+
| server | enabling-hermit  | root@enabling-hermit  | e2be195e8a3d | May 15, 2023 at 7:34am (UTC) | May 12, 2033 at 7:34am (UTC) |
+--------+------------------+-----------------------+--------------+------------------------------+------------------------------+
| server | polished-mustang | root@polished-mustang | 32c6836027af | May 15, 2023 at 7:38am (UTC) | May 12, 2033 at 7:38am (UTC) |
+--------+------------------+-----------------------+--------------+------------------------------+------------------------------+
| server | suited-octopus   | root@suited-octopus   | c980c04ce1f8 | May 15, 2023 at 7:43am (UTC) | May 12, 2033 at 7:43am (UTC) |
+--------+------------------+-----------------------+--------------+------------------------------+------------------------------+
  1. Connect lxd ui to the ip of the first VM
  2. Create a network of type "bridge" with name "lxcbr0" via the UI - or edit the existing lxdfan0 bridge.
  3. If you created a new lxcbr0 network, set "dhcp ranges" and "ovn ranges" under the "ipv4" section. Adjust IPs to the range the network got auto assigned on creation.
  • dhcp ranges: 10.189.182.1-10.189.182.127

  • ovn ranges: 10.189.182.128-10.189.182.200

    If editing the lxdfan0 network, use the following:

  • dhcp ranges: 240.0.0.1-240.0.0.127

  • ovn ranges: 240.0.0.128-240.0.0.200

  1. You can now create and edit OVN networks with lxcbr0 or lxdfan0 as uplink