Platform Deployment

Downloading Installation Packages

Operating system images, offline installation packages, and plugin packages are available for download over the Internet. Contact a ZStack engineer to obtain them. Verify each file’s MD5 checksum before use.

The available downloads mainly include the following files:

Description File format Purpose
Operating system image .iso Install the ZStack operating system on physical servers or VM instances
VM image .qcow2 Install the ZStack operating system on VM instances
Platform installation package .bin Main container service platform installation package, supporting both x86 and ARM architectures
DevOps plugin package .tar DevOps add-on module for the container service platform
CSI plugin package .tar Installation package for integrating the container service platform with ZStack Enterprise Distributed Storage; supports ZStone-rbd, ZCE-X iSCSI, and ZCE-X NFS
zaku-vlan / Network configuration tool for physical servers

Installing the Operating System

ZStack provides two types of operating system installation media: ISO and qcow2 files. Download and use the appropriate type for your environment.

Use an ISO file for physical server nodes and virtualization environments such as VMware that do not support qcow2 image templates.

Use a qcow2 file on an IaaS virtualization platform that can create VM instances from qcow2 images. Skipping the operating system installation process reduces deployment time.

Installing from an ISO File

ZStack Zaku Container Service uses customized ZStack ISO images. Except for Kylin V10SP3-GFB, the installation procedure is the same on x86 and ARM servers. Follow these steps:

  1. Configure the server.

    • Back up the data on the server’s disks. Installation will overwrite the existing data.

    • Configure an appropriate RAID level on the RAID controller to provide data redundancy. Skip this step for VM instances.

    • Set the system boot disk as the first boot device.

  2. Select the boot option.

    On the ISO boot screen, select the default option to start installing the operating system.

    • Graphical, VNC, and text installation modes are available. Select the appropriate mode for your environment; graphical installation is recommended.

    • If the server has no VGA port and supports only a serial connection, use VNC or text installation.

    Boot options for ISO operating system installation
  3. Review the installation summary.

    This page displays the installation settings, which you can change as needed. The following defaults are configured:

    • DATE&TIME: Defaults to UTC+8 (Asia). The administrator should check the host clock in advance and set the current time and time zone.

    • LANGUAGE: English (United States) by default.

    • KEYBOARD: English (US) by default.

    Operating system installation summary

    Operating system installation screen

  4. Select the installation mode.

    On the installation summary screen, click SOFTWARE SELECTION and select ZStack Compute Node.

    Selecting the ZStack Compute Node installation mode
  5. Configure disk partitions.

    On the installation summary screen, click INSTALLATION DESTINATION to open the disk partitioning screen.

    Configure only the system disk at this stage; configure other disks after installation. Select Custom. to configure disk partitions manually:

    Selecting installation disks and the partitioning method

    Use the following configuration for the server’s BIOS boot mode:

    • UEFI mode
    Partition Capacity Description
    /boot 1G Core files required to boot Linux
    /boot/efi 500M UEFI boot files
    / All remaining space Linux root directory
    swap Delete Swap partition
    • Legacy mode
    Partition Capacity Description
    /boot 1G Core files required to boot Linux
    / All remaining space Linux root directory
    swap Delete Swap partition
    Operating system disk partition configuration
  6. The server restarts automatically after operating system installation.

    Details omitted.

Installing from a qcow2 File

  1. Create VM instances.

    Create VM instances according to the node sizing, network planning, and performance requirements. The VM instance creation procedure is omitted here.

    Configure VM instance anti-affinity policies so that the instances are scheduled on different physical servers. This prevents a single physical server failure from affecting the high availability of ZStack Zaku Container Service and its business clusters. Create separate anti-affinity groups for management cluster nodes, business cluster control planes, and business cluster compute nodes.

  2. Expand the VM instance root volume.

    The qcow2 image filesystem is approximately 20 to 30 GB. After creating a VM instance, expand its system disk. First increase the system disk capacity on the IaaS virtualization platform, then log in to the operating system and perform the following steps:

    # Expand the disk partition; this example uses vda as the system disk
    fdisk /dev/vda

    Enter n, p, and w in sequence.

    # Refresh the partition table and create a physical volume; /dev/vda3 is the newly created partition
    partprobe /dev/vda
    pvcreate /dev/vda3
    
    # Add the physical volume to the volume group
    vgextend zstack /dev/vda3
    
    # Extend the root logical volume using all free space in the volume group
    lvextend -l +100%FREE /dev/mapper/zstack-root
    
    # Grow the root filesystem
    xfs_growfs  /dev/mapper/zstack-root    # XFS filesystem
    resize2fs /dev/mapper/zstack-root    # ext4 filesystem
    
    # Verify that the root disk has been expanded
    df -h

Network Configuration

The platform requires consistent NIC device names on certain nodes. Standardize NIC names before deploying the platform or creating a business cluster. NIC names can differ between IaaS platforms and VM instance operating systems, and physical server NIC names can differ substantially from VM instance NIC names.

Cluster type NIC type NIC name standardization
management cluster management network NIC Required; NIC names must be consistent within the management cluster
business cluster management network NIC Required; NIC names must be consistent within the business cluster
business cluster business network NIC Required; NIC names must be consistent within the business cluster
business cluster Storage NIC Not required
Scope of NIC name standardization by cluster type

Note: This diagram illustrates which NICs require name standardization. You do not have to use the NIC names shown in the diagram.

The following scenarios show how to configure NIC names and IP addresses:

All Nodes Are VM Instances

In this example, most NIC names are already consistent (enp3s0, ens3, and ens4). Only the management network NIC on one business cluster compute node needs to be renamed.

NIC name standardization for VM instances

Standard configuration for the ens3 NIC (skip this step if the node has already obtained an IP address through DHCP):

# Configure an IP address for ens3
# zs-network-setting -i <NIC_NAME> <IP_ADDRESS> <NETMASK> <GATEWAY_ADDRESS>
zs-network-setting -i ens3 172.27.210.111 255.255.255.0 172.27.210.1

The ens9 NIC name differs from the other nodes and must be standardized:

# Create a bond
# zs-bond-ab -c <BOND_NAME>
zs-bond-ab -c ens3

# Add ens9 to the bond named ens3
# zs-nic-to-bond -a <BOND_NAME> <NIC_NAME>
zs-nic-to-bond -a ens3 ens9

# Configure an IP address for the bond named ens3
# zs-network-setting -i <BOND_NAME> <IP_ADDRESS> <NETMASK> <GATEWAY_ADDRESS>
zs-network-setting -i ens3 172.27.210.112 255.255.255.0 172.27.210.1

All Nodes Are Physical Servers

In production environments, configure NIC bonding to provide sufficient bandwidth and high reliability. Ensure that bond interface names are consistent after configuration.

Recommendations for physical NIC configuration:

  • Physically isolate the management network, business network, and storage network. Use two links in a bond for each network.

  • Prefer link aggregation mode for bonds to increase network bandwidth.

  • When NICs are of the same model, bond ports across separate physical NIC cards to provide redundancy across cards.

The following example uses the business cluster management network:

  • Physical NIC names may differ between servers, but the resulting bond interface names must be consistent. This example uses bond0.33 on all nodes.

  • Apply the same principle to the business network and storage network. Use bond0 for the management network, bond1 for the business network, and bond2 for the storage network.

NIC bonding and network planning for physical servers

Note: Configure physical server NICs through IPMI.

For a NIC without a VLAN subinterface, use the following procedure:

# Create a bond
# zs-bond-ab -c <BOND_NAME>; use zs-bond-lacp instead for link aggregation mode
zs-bond-ab -c bond0   # Or zs-bond-lacp -c bond0

# Add two physical NICs to bond0
# zs-nic-to-bond -a <BOND_NAME> <NIC_NAME>
zs-nic-to-bond -a bond0 p1p1
zs-nic-to-bond -a bond0 p2p1

# Configure an IP address for bond0
# zs-network-setting -i <BOND_NAME> <IP_ADDRESS> <NETMASK> <GATEWAY_ADDRESS>
zs-network-setting -i bond0 172.27.210.111 255.255.255.0 172.27.210.1

For a NIC that requires a VLAN subinterface, use the following procedure:

# Create a bond
# zs-bond-ab -c <BOND_NAME>; use zs-bond-lacp instead for link aggregation mode
zs-bond-ab -c bond0   # Or zs-bond-lacp -c bond0

# Add two physical NICs to bond0
# zs-nic-to-bond -a <BOND_NAME> <NIC_NAME>
zs-nic-to-bond -a bond0 p1p1
zs-nic-to-bond -a bond0 p2p1

# Create a VLAN subinterface
# zs-vlan -c <BOND_NAME> <VLAN_SUBINTERFACE_ID>
zs-vlan -c bond0 33

# Configure an IP address for bond0.33
# zs-network-setting -i <VLAN_SUBINTERFACE_NAME> <IP_ADDRESS> <NETMASK> <GATEWAY_ADDRESS>
zs-network-setting -i bond0.33 172.27.210.111 255.255.255.0 172.27.210.1

Mixed VM Instance and Physical Server Deployment

The platform supports mixed deployments of physical servers and VM instances. Because their NIC names can differ substantially, NIC names must also be standardized.

In this example, all business cluster control planes are VM instances whose management network NIC is ens3. Compute nodes are physical servers. Configure the management network bond interface on each physical server with the name ens3.

NIC name standardization for a mixed VM instance and physical server deployment

Note: Configure physical server NICs through IPMI.

Configure bonds on the physical servers as follows:

  1. If the NIC already has a configuration, remove it as described in Rolling Back NIC Configuration.

  2. Create a bond and configure an IP address.

    For a NIC without a VLAN subinterface, use the following procedure:

    # Create a bond
    # zs-bond-ab -c <BOND_NAME>; use zs-bond-lacp instead for link aggregation mode
    zs-bond-ab -c ens3   # Or zs-bond-lacp -c ens3
    
    # Add two physical NICs to ens3
    # zs-nic-to-bond -a <BOND_NAME> <NIC_NAME>
    zs-nic-to-bond -a ens3 p1p1
    zs-nic-to-bond -a ens3 p2p1
    
    # Configure an IP address for ens3
    # zs-network-setting -i <BOND_NAME> <IP_ADDRESS> <NETMASK> <GATEWAY_ADDRESS>
    zs-network-setting -i ens3 172.27.210.111 255.255.255.0 172.27.210.1

    For a NIC that requires a VLAN subinterface, use the following procedure:

    Prepare the zaku-vlan tool on each physical server in advance.

    # Download the zs-vlan tool variant for your environment: H84r or Kylin
    # H84r operating system
    mv zaku-vlan-h84r /usr/local/bin/zaku-vlan
    chmod a+x /usr/local/bin/zaku-vlan
    
    # Kylin operating system
    mv zaku-vlan-kylin /usr/local/bin/zaku-vlan
    chmod a+x /usr/local/bin/zaku-vlan

    Create the VLAN subinterface using the following commands:

    # Create a bond
    # zs-bond-ab -c <BOND_NAME>; use zs-bond-lacp instead for link aggregation mode
    zs-bond-ab -c bond0   # Or zs-bond-lacp -c bond0
    
    # Add two physical NICs to bond0
    # zs-nic-to-bond -a <BOND_NAME> <NIC_NAME>
    zs-nic-to-bond -a bond0 p1p1
    zs-nic-to-bond -a bond0 p2p1
    
    # Create the VLAN subinterface ens3
    # zaku-vlan -c <VLAN_SUBINTERFACE_NAME> <BOND_NAME> <VLAN_SUBINTERFACE_ID>
    zaku-vlan -c ens3 bond0 33
    
    # Configure an IP address for ens3 (a subinterface of bond0)
    # zs-network-setting -i <VLAN_SUBINTERFACE_NAME> <IP_ADDRESS> <NETMASK> <GATEWAY_ADDRESS>
    zs-network-setting -i ens3 172.27.210.111 255.255.255.0 172.27.210.1

Rolling Back NIC Configuration

# Remove the IP address, netmask, gateway, and bridge from the NIC interface
zs-restore-network-setting -i bond0     # Without a VLAN configuration
zs-restore-network-setting -i bond0.33  # With a VLAN configuration

# Remove physical NICs p1p1 and p1p2 from the bond
zs-nic-to-bond -d bond0 p1p1
zs-nic-to-bond -d bond0 p2p1

# Delete ens3, the subinterface created on bond0 with VLAN 33
zaku-vlan -d ens3 bond0 33

# Delete the VLAN subinterface bond0.33
zs-vlan -d bond0 33

# Delete the bond
zs-bond-ab -d bond0

Deploying the Management Platform

Installing the Deployment Bootstrap Program

ZStack Zaku deployment demonstration: Zaku Professional Edition management platform installation video

Download the installation package to the /root directory on the third management cluster node, then run:

bash zaku-1.24-3.X.0-all-in-one.bin

After installation, open http://SERVER_IP:12000 in Chrome to deploy ZStack Zaku Container Service through the graphical interface. Click Start Deployment under form-based deployment to open the deployment wizard.

Management platform deployment bootstrap home page

Deployment Wizard

  1. Platform settings

    Configure ZStack Cloud license integration, console embedding, and other platform settings.

    Parameter Example Description
    External NTP server ntp1.aliyun.com Synchronizes the clocks of all nodes
    ZStack Cloud license service Enabled When enabled, Zaku runs as a ZStack Cloud submodule.
    ZStack Cloud API address 172.21.1.50 /
    ZStack Cloud admin password password /
    Embed in ZStack Cloud Enabled Allows container resources to be managed directly in ZStack Cloud.
    ZStack Cloud address http://172.21.1.50:5000 ZStack Cloud web console address
    ZStack Cloud integration settings in the management platform deployment wizard

    To use a unified interface with ZStack Cloud, configure the nginx file on the ZStack Cloud MNs as prompted.

  2. Node settings

    Configure basic information such as node IP addresses.

    Parameter Example Description
    Reuse the Business Network as the Management Network Enabled
    cluster HA Enabled Enables high availability for the management cluster
    Management Network IPv4 Address 172.31.12.183; 172.31.12.145; 172.31.12.236 IP address of each node
    Business Network IPv4 Address Automatically reuses the management network IP address
    Node Name zaku-1; zaku-2; zaku-3
    node root password password
    node ssh port 22
    Node settings in the management platform deployment wizard
  3. Basic settings

    Configure basic information such as node IP addresses.

    Parameter Example Description
    management network IPv4 netmask 255.255.255.0
    management network IPv4 gateway 172.31.12.1
    basic service management network VIP 172.31.1.21 Used for platform HA management
    basic service business network VIP Automatically reuses the management network IP address Used for platform HA management
    console management network VIP 172.31.12.160 Used to access Zaku Container Service
    system data disk /dev/vdb Stores platform metadata, container images, monitoring data, log data, and other data
    pod ip range 10.233.64.0/18 Pod IP addresses are allocated from this range. Ensure that it does not overlap with internal network ranges.
    service CIDR 10.233.0.0/18 Service IP addresses are allocated from this range. Ensure that it does not overlap with internal network ranges.
    DNS Server 223.5.5.5
    container images disk Empty Storage for containerd data files
    Basic settings in the management platform deployment wizard
  4. Confirm settings

    Verify that all parameters are correct.

    Confirming management platform deployment settings
  5. Generate YAML configuration

    For special requirements, you can modify the YAML file before deployment. Contact a ZStack engineer to evaluate the changes before modifying the file.

    The final deployment script uses the YAML configuration file as the authoritative configuration.

    Management platform deployment YAML configuration
  6. Install and deploy

    Platform deployment takes approximately 40 minutes. The duration varies with server performance and network conditions.

    Use the Actions button to the right of each step to view deployment logs or retry that step. If an error occurs, troubleshoot it using the logs for the corresponding step.

    Management platform installation progress and actions
  7. Deployment complete

    After deployment succeeds, click Enter Console to open the Zaku console. The default username and password are admin / admin@123.

Requesting a License

After you log in, the platform automatically opens License Management. Download the request key and provide it to a ZStack engineer to request a license.

Downloading the license request key

After the license is issued, click Upload License in the upper-right corner to upload the license file.

License file upload entry

Configuring ZStack Cloud Integration

This optional configuration integrates the ZStack Cloud tenant management module with ZStack Zaku Container Service.

Prerequisites:

  • ZStack Cloud version 5.5.16 through 5.5.24.

  • The Tenant Management module is enabled in ZStack Cloud.

Cloud version Zaku version Updates
5.5.16 through 5.5.24 3.10
5.5.16 through 5.5.24 3.8, 3.9 Adapts to the new frontend framework and components in 5.5.16
5.4.x or later, earlier than 5.5.16 3.6, 3.7 Adapts to the new frontend framework in 5.4.0
5.3.20 or later 3.3~3.7 Integrates Zaku into Cloud through a micro-frontend for smoother menu navigation; supports Zaku permission configuration in Cloud roles; resolves inconsistent sessions and frequent session expiration between the two platforms
5.3.0 or later, earlier than 5.3.20 3.1, 3.2 GPU operations support a unified view of GPU devices in VM instances and container clusters
5.1.20 or later 3.1, 3.2
5.1.19 or later 3.1, 3.2 Centralizes license management in Cloud; integrates Cloud local users, tenant projects, and resource quotas; supports one-click Zaku installation from the application market

Integration procedure:

  1. Obtain the following four items.

    Description Example
    ZStack Cloud password password
    ZStack Zaku console VIP 172.10.207.201
    AccessKeyId QQxxxxxxxxxxxxBz
    AccessKeySecret 56lxxxxxxxxxxxxxxvc

    To obtain AccessKeyId and AccessKeySecret, log in to ZStack Cloud and go to Container Management > service settings > AccessKey Management.

    Obtaining AccessKeys in ZStack Cloud Container Management
  2. Configure AddContainerManagementEndpoint using zstack-cli.

    Log in through SSH to any ZStack Cloud management node and configure the endpoint using the following commands.

    Note: Replace the values highlighted in red with those for your environment.

    # Log in to the ZStack Cloud command-line interface
    # zstack-cli LogInByAccount accountName=admin password=<ZSTACK_CLOUD_PASSWORD>
    zstack-cli LogInByAccount accountName=admin password=password
    
    # Add a ContainerManagementEndpoint resource
    # zstack-cli AddContainerManagementEndpoint \
    # name=zaku-1 \
    # description=zaku-1 \
    # managementIp=<ZAKU_CONSOLE_VIP> managementPort=80 \
    # containerAccessKeyId=<AccessKeyId> \
    # containerAccessKeySecret=<AccessKeySecret> \
    # vendor=zaku
    zstack-cli AddContainerManagementEndpoint \
    name=zaku-1 \
    description=zaku-1 \
    managementIp=172.10.207.201 managementPort=80 \
    containerAccessKeyId=QQxxxxxxxxxxxxBz \
    containerAccessKeySecret=56lxxxxxxxxxxxxxxvc \
    vendor=zaku
  3. Verify that the configuration has been added.

    zstack-cli QueryContainerManagementEndpoint
    # Returns the result in JSON format
    {
        "inventories": [
            {
                "createDate": "Sep 4, 2024 2:36:06 PM",
                "description": "Zaku trial environment",
                "lastOpDate": "Sep 4, 2024 2:36:06 PM",
                "managementIp": "172.31.1.39",
                "managementPort": 80,
                "name": "zaku",
                "uuid": "5dxxxxx0c",
                "vendor": "zaku"
            }
        ],
        "success": true
    }
  4. Roll back the configuration.

    Delete the configuration using the following command:

    zstack-cli DeleteContainerManagementEndpoint uuid=5dxxxxx0c

Deploying a Business Cluster

Business cluster creation demonstration: Zaku Professional Edition business cluster creation video

Opening the Creation Wizard

Log in to ZStack Zaku Container Service, open Platform Management > cluster, and click Create Cluster to open the wizard.

Node Settings

Setting Example Notes
Reuse the Business Network as the Management Network Enabled See Management and Business Network Planning for business cluster network design.
cluster HA Enabled When enabled, the cluster has exactly three control planes; add compute nodes as needed. When disabled, it has exactly one control plane; add compute nodes as needed.
Add Type Select an option IP Address: Enter the business network address, management network address, and node name individually. IP Range: Recommended for many nodes with consecutive IP addresses.
Business Network IPv4 Address 10.16.210.41; 10.16.210.42; 10.16.210.43 /
Management Network IPv4 Address 10.16.209.41; 10.16.209.42; 10.16.209.43 Unavailable when the business network is reused as the management network.
Node Name master-1; master-2; master-3 /
control plane Selected The first three nodes in the form (one node when cluster HA is disabled) are control planes. Selected by default and cannot be changed.
compute node Selected Select this option if a control plane must also serve as a compute node. On compute nodes, it is selected by default and cannot be changed.
GPU node Selected Select this option if GPUs on the node need to be scheduled. Install the GPU driver as described in Appendix III before creating the cluster.
node root password password /
node ssh port 22 /
Business cluster node and role settings

Basic Settings

Setting Example Notes
Cluster Name cluster-1 A combination of letters, hyphens (“-”), and digits
kubernetes version 1.30 1.24 or 1.30
Business Network VIP 10.16.210.45 Must be on the same subnet as the Business Network IPv4 Address.
Management Network VIP 10.16.209.45 Must be on the same subnet as the Management Network IPv4 Address. Unavailable when the business network is reused as the management network.
Maximum pods per node 200 Maximum number of pods that can be deployed on a node.
monitoring/logging data disk /dev/sdb Primarily stores monitoring and log data.
pod ip range 10.233.64.0/18 Pod IP addresses are allocated from this range. Ensure that it does not overlap with internal network ranges.
service CIDR 10.233.0.0/18 Service IP addresses are allocated from this range. Ensure that it does not overlap with internal network ranges.
DNS Server 172.27.8.5 Internal or external DNS server address. Leave blank if no DNS server is available.
microservices governance Enabled Deploys microservices governance components so that this feature can be used in the cluster.

Confirming Settings

Verify that all parameters are correct, then click OK to start installing the Kubernetes business cluster.

Viewing Installation Logs

During cluster creation, click the log icon to view cluster installation logs.

Business cluster installation log entry
Business cluster installation log details

Business Cluster Installation Complete

After installation, the cluster is in the Running state. Use One-Click Inspection to inspect its status.

Business cluster in the Running state

Business cluster in the Running state

Installing Optional Components

After deploying ZStack Zaku Container Service, install the following optional components as needed:

DevOps add-on module: See Appendix I: Installing the DevOps Add-on Module.

CSI storage plugin module: See Appendix II: Preparing the CSI Storage Plugin.