Skip to content

Conversation

shengquan-ni
Copy link
Contributor

@shengquan-ni shengquan-ni commented May 27, 2025

This PR introduces support for multi-node (cluster-based) Computing Units.

Design Overview

This initial implementation supports a basic cluster configuration, with several assumptions:

  1. Each node in the cluster is a Kubernetes pod.
  2. All nodes must have identical CPU and memory configurations.
  3. All nodes share a common persistent storage, implemented via a Kubernetes volume.
  4. GPU allocation is not supported within the cluster.

Users can specify the desired number of nodes when creating a Computing Unit (CU). If the number of nodes is greater than one, the Computing Unit Manager initiates the cluster creation process.

Cluster configuration details—including the number of nodes and additional metadata—are stored in a JSON column within the Computing Unit’s database record.

Updated CU Creation Process

When creating a CU:

  1. The manager first allocates a PersistentVolumeClaim (PVC) with the requested disk space.

  2. It then starts a master node as a standalone pod with the PVC attached.

  3. If the number of nodes > 1, the manager:

    • Creates a Kubernetes service to expose the master's address.

    • Launches a StatefulSet of worker nodes (equal to the number of nodes - 1), each configured with:

      • The shared PVC,
      • The master's address,
      • And the necessary runtime parameters.

Passing Cluster Mode and Master IP as ENV VARs

Previously, cluster mode was set using a JVM flag, and the system automatically detected the IP address. Now, both are configured via environment variables. This change simplifies configuration and avoids the complexity and unreliability of automatic IP detection in Kubernetes environments.

Backward Compatibility for CU table

To maintain backward compatibility, all CUs created prior to this PR are treated as single-node Computing Units.

UI Changes

screen2

How to check if the cluster is ready

screen

@shengquan-ni shengquan-ni self-assigned this May 27, 2025
@shengquan-ni shengquan-ni added feature gui Changes related to the frontend GUI computing-unit labels May 27, 2025
@shengquan-ni shengquan-ni requested a review from bobbai00 June 4, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
computing-unit feature gui Changes related to the frontend GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant