How to initialize MicroCloud¶
The initialization process bootstraps the MicroCloud cluster. You run the initialization on one of the machines, and it configures the required services on all of the machines that have been joined.
Pre-initialization requirements¶
Complete the steps in How to install MicroCloud before initialization.
If you intend to use full disk encryption (FDE) on any cluster member, that member must meet the prerequisites listed on this page: Full disk encryption in MicroCeph.
Follow only the instructions in the Prerequisites section on that page. Skip its Usage section; the MicroCloud initialization process handles the disk encryption.
Interactive configuration¶
If you run the initialization process in interactive mode (the default), you are prompted for information about your machines and how you want to set them up. The questions that you are asked might differ depending on your setup. For example, if you do not have the MicroOVN snap installed, you will not be prompted to configure your network; if your machines don’t have local disks, you will not be prompted to set up storage.
The following instructions show the full initialization process.
Tip
During initialization, MicroCloud displays tables of entities to choose from.
To select specific entities, use the Up and Down keys to choose a table row and select it with the Space key. To select all rows, use the Right key. You can filter the table rows by typing one or more characters.
When you have selected the required entities, hit Enter to confirm.
Complete the following steps to initialize MicroCloud:
On one of the machines, enter the following command:
sudo microcloud init
Select whether you want to set up more than one machine.
This allows you to create a MicroCloud using a single cluster member. It will skip the Trust establishment session if no more machines should be part of the MicroCloud.
Additional machines can always be added at a later point in time. See How to add a cluster member to an existing MicroCloud for more information.
Select the IP address that you want to use for MicroCloud’s internal traffic (see Network interface for intra-cluster traffic). MicroCloud automatically detects the available addresses (IPv4 and IPv6) on the existing network interfaces and displays them in a table.
You must select exactly one address.
On all the other machines, enter the following command and repeat the address selection:
sudo microcloud join
It will automatically detect the machine acting as the initiator. See Trust establishment session for more information and Automatic server detection in case the network doesn’t support multicast.
Select the machines that you want to add to the MicroCloud cluster.
MicroCloud displays all machines that have reached out during the trust establishment session. Make sure that all machines that you select have the required snaps installed.
Select whether you want to set up local storage.
Note
To set up local storage, each machine must have a local disk.
The disks must not contain any partitions.
A disk used for local storage will not be available for distributed storage.
If you choose
yes, configure the local storage:Select the disks that you want to use for local storage.
You must select exactly one disk from each machine.
Select whether you want to wipe any of the disks. Wiping a disk will destroy all data on it.
Select whether you want to set up distributed storage (using MicroCeph).
Note
You can set up distributed storage on a single cluster member.
High availability requires a minimum of 3 cluster members, with 3 separate disks across 3 different cluster members.
The disks must not contain any partitions.
A disk that was previously selected for local storage will not be shown for distributed storage.
If you choose
yes, configure the distributed storage:Select the disks that you want to use for distributed storage.
You must select at least one disk.
Select whether you want to wipe any of the disks. Wiping a disk will destroy all data on it.
Select whether you want to encrypt any of the disks. Encrypting a disk will store the encryption keys in the Ceph key ring inside the Ceph configuration folder.
Warning
Cluster members with disks to be encrypted require a kernel with
dm-cryptenabled. The snapdm-cryptplug must also be connected. See the Prerequisites section of this page for more information: Full disk encryption in MicroCeph.If you have not enabled and connected
dm-crypton any cluster member that you want to encrypt, do so now before you continue.You can choose to optionally set up a CephFS distributed file system.
If you did not set up local storage
If you did not set up local storage and you set up CephFS storage, there will be an additional step for you at the end of the initialization process.
Select either an IPv4 or IPv6 CIDR subnet for the Ceph internal traffic. You can leave it empty to use the default value, which is the MicroCloud internal network (see How to configure Ceph networking for how to configure it).
Select either an IPv4 or IPv6 CIDR subnet for the Ceph public traffic. You can leave it empty to use the default value, which is the MicroCloud internal network if you chose this as default for the Ceph internal network question, or the Ceph internal network if you chose to set a custom network other than the MicroCloud internal network (see How to configure Ceph networking for how to configure it).
Select whether you want to set up distributed networking (using MicroOVN).
If you choose
yes, configure the distributed networking:Select the network interfaces that you want to use (see Network interface to connect to the uplink network).
You must select one network interface per machine.
If you want to use IPv4, specify the IPv4 gateway on the uplink network (in CIDR notation) and the first and last IPv4 address in the range that you want to use with LXD.
If you want to use IPv6, specify the IPv6 gateway on the uplink network (in CIDR notation).
If you chose to set up distributed networking, you can optionally set up an underlay network for the distributed networking (for an explanation of the benefits, see Dedicated underlay network):
If you choose
yes, configure the underlay network:Select the network interfaces that you want to use.
You must select one network interface with an IP address per machine.
Select whether you want to create an initial UI access link.
If you choose
yes, a UI access link with admin permissions, valid for 1 day, will be created and printed. The link opens the UI in a browser and is intended for initial setup, allowing you to configure a permanent authentication method, such as mTLS or OIDC.MicroCloud now starts to bootstrap the cluster. Monitor the output to see whether all steps complete successfully. See Bootstrapping process for more information.
Once the initialization process is complete, you can start using MicroCloud.
Possible final step
If you initialized MicroCloud without local storage and with CephFS storage, continue to the section below named Configure backups_volume and images_volume to complete your initialization.
See an example of the full initialization process in the Get started with MicroCloud tutorial.
Once you have initialized MicroCloud, you can interact with it through CLI commands, API requests, or its graphical UI.