The module lifecycle stage: Preview

Platform version

The module requires Basis Dynamix 4.6 or newer. Starting with version 4.6, Basis Dynamix creates disks and virtual machines only with a specified storage policy.

Before creating any resources in the cloud, dhctl bootstrap runs the dynamix-storage-policy preflight check. On Basis Dynamix earlier than 4.6, this check stops the installation.

Account permissions

The module works with Basis Dynamix through the user API (/restmachine/cloudapi/*). Use an account without platform administrator permissions (/restmachine/cloudbroker/*) for the module. With administrator permissions, the module gets access to the resources of other accounts, which breaks account isolation.

The account specified in the provider section of DynamixClusterConfiguration must be allowed to use the following user API groups:

Group Component Purpose
account, locations, rg All components Finding the account, the location, and the resource group by name
extnet, vins Terraform, CAPD External and internal networks
image Terraform, CAPD OS images for the nodes
storage_policy Terraform, CAPD, CSI, cloud-data-discoverer Listing the storage policies available to the account, finding a policy by name, attaching policies to the cluster resource group
disks Terraform, CSI Disks of master nodes and PersistentVolumes
compute, kvmx86 Terraform, CCM, CAPD, CSI Virtual machines and disk attachment
lb CCM Load balancers for Services of the LoadBalancer type

Storage policies in the cluster resource group

Basis Dynamix creates a virtual machine only if its storage policy is attached to the resource group. Therefore, when the module creates the cluster resource group, it attaches all ENABLED storage policies of the account to it.

The list of attached storage policies is updated when you run dhctl converge and when the terraform-manager module applies changes automatically. During the update, the module:

  • Attaches the storage policies that have become available to the account.
  • Detaches the storage policies that have become unavailable to the account or whose status has changed from ENABLED to another one.

Disable a storage policy only when the cluster nodes and volumes no longer use it. When a storage policy becomes unavailable to the account, the module deletes its StorageClass from the cluster. The volumes created in this policy are kept.

When the cluster is deleted or its installation is aborted, the module force-deletes the cluster resource group, bypassing the recycle bin. Everything still inside the group is deleted permanently with it, including volume disks, load balancers, and the virtual machines of node groups. The etcd disks of master nodes and the ViNS are also deleted bypassing the recycle bin. Move the data you need out of the cluster before deleting it.

Prepare an operating system image

Operating system vendors typically provide special cloud builds of their operating systems for use in virtualization environments. These builds typically contain virtual hardware drivers, cloud-init, virtualization guest agents, and are distributed as IMG or QCOW2 disk images. We recommend that you use these cloud images as the OS on the nodes in your clusters.

The cloud image of the operating system must be placed in the “Images” → “Template Images” section of the Basis Dynamix portal. Follow these steps to upload the OS image to the storage:

If the infrastructure does not have a DNS server, access to the Basis Dynamix portal from the cluster. Basis Dynamix portal from the cluster can be organized by adding the IP address and domains associated with the Basis Dynamix portal to the cloud-init template for generating the hosts file. This template is located in the /etc/cloud/templates/ folder. The name of the template depends on the OS.

The provider supports working with only one disk in the virtual machine template. Make sure the template contains only one disk.

After adding data to hosts and before creating the template from the virtual machine, you must run the cloud-init clean command.

Replacing the OS image

The OS image is set by the imageName parameter of the DynamixInstanceClass resource for CloudEphemeral nodes and in the instanceClass section of the DynamixClusterConfiguration resource for CloudPermanent nodes and master nodes.

The replacement procedure is described in “How do I replace the OS image in a cloud cluster?”.