The control plane VMs are created on each node by running the salt
state.
This state leverages the salt virt
module along with some customizations
defined in a Mirantis formula called salt-formula-salt
. Similarly to how
MAAS manages bare metal, the salt virt
module creates VMs based on
profiles that are defined in the metadata and mounts the virtual disk to add
the appropriate parameters to the minion configuration file.
After the salt
state successfully runs against a KVM node where metadata
specifies the VMs placement, these VMs will be started and automatically
added to the Salt Master node.
To create control plane VMs:
Log in to the KVM nodes that do not host the Salt Master node.
The correct physical node names used in the installation
described in this guide to perform the next step are kvm02
and
kvm03
.
Warning
Otherwise, on running the command in the step below,
you will delete the cfg
Salt Master.
Verify whether virtual machines are not yet present:
virsh list --name --all | grep -Ev '^(mas|cfg|apt)' | xargs -n 1 virsh destroy
virsh list --name --all | grep -Ev '^(mas|cfg|apt)' | xargs -n 1 virsh undefine
Log in to the Salt Master node console.
Verify that the Salt Minion nodes are synchronized by running the following command on the Salt Master node:
salt '*' saltutil.sync_all
Perform the initial Salt configuration:
salt 'kvm*' state.sls salt.minion
Set up the network interfaces and the SSH access:
salt -C 'I@salt:control' cmd.run 'salt-call state.sls \
linux.system.user,openssh,linux.network;reboot'
Warning
This will also reboot the Salt Master node because
it is running on top of kvm01
.
Log in back to the Salt Master node console.
Run the libvirt
state:
salt 'kvm*' state.sls libvirt
For the OpenStack-based MCP clusters, add
system.salt.control.cluster.openstack_gateway_single
to infra/kvm.yml
to enable a gateway VM for your OpenStack environment.
Skip this step for the Kubernetes-based MCP clusters.
Run salt.control
to create virtual machines.
This command also inserts minion.conf
files from KVM hosts:
salt 'kvm*' state.sls salt.control
Verify that all your Salt Minion nodes are registered on the Salt Master node. This may take a few minutes.
salt-key
Example of system response:
mon03.bud.mirantis.net
msg01.bud.mirantis.net
msg02.bud.mirantis.net
msg03.bud.mirantis.net
mtr01.bud.mirantis.net
mtr02.bud.mirantis.net
mtr03.bud.mirantis.net
nal01.bud.mirantis.net
nal02.bud.mirantis.net
nal03.bud.mirantis.net
ntw01.bud.mirantis.net
ntw02.bud.mirantis.net
ntw03.bud.mirantis.net
prx01.bud.mirantis.net
prx02.bud.mirantis.net
...