Create a Lingjun basic cluster

Updated at:

A Lingjun basic cluster provides a clean compute environment. Log on to the Lingjun nodes over SSH to install and configure your own development environment.

Prerequisites

You have completed Alibaba Cloud account registration and real-name verification, and you have purchased Lingjun nodes. For more information, see Purchase Lingjun Node.

Create a Lingjun basic cluster

Step 1: Configure the cluster and groups

  1. Log on to the Intelligent Computing Lingjun console. In the left-side navigation pane, choose Resources and Nodes > Cluster Management, and then click Create Cluster > Basic Lingjun Cluster Service.

  2. Configure the following parameters:

    • Cluster Name: Enter a descriptive name for the cluster.

    • Zone: Select the zone where you want to deploy the cluster.

    • HPNZone ID: Enter the cluster ID that you obtained when you purchased the Lingjun nodes.

    • Resource group: Select the resource group that the cluster belongs to. Resource groups let you categorize and manage resources.

    Click Create Group and configure the following group parameters. Set the other parameters as needed.

    • Default Model: From the drop-down list, select the node instance type that you purchased.

    • Node Instance: Select the node instances that you purchased and add them to the current group.

    • Logon Password: Set the logon password for the root user on the cluster nodes. You use this password to connect to the nodes over SSH. Alternatively, select a key pair.

Click Save and Go to Next Step: Network Configuration.

Step 2: Configure the cluster network

Some regions and instance types require a Lingjun connection between the Lingjun nodes and your Cloud Enterprise Network (CEN) or virtual private cloud (VPC). Check whether the configuration page requires a Lingjun connection, and then follow the instructions for your scenario.

No Lingjun connection required

  • VPC: Select an existing VPC. If you don't have one, click Create VPC.

    Important

    The VPC must be in the same region as the Lingjun nodes.

  • vSwitch and Security group: Select an existing vSwitch in the VPC. For more information, see VPCs and vSwitches and Security groups.

  • Backend RDMA Network IP Version: Select the IP version for the backend RDMA network. Both IPv4 and IPv6 are supported, but some regions support only IPv4.

Lingjun connection required

  1. Configure Cluster CIDR Block.

    • Cluster CIDR Block: The private CIDR block used inside the cluster. Lingjun nodes are assigned IP addresses from this CIDR block. Example: 172.16.0.0/12.

    • Cluster Subnet: A subdivision of the Cluster CIDR Block, used to allocate IP addresses at a finer granularity.

  2. Configure Lingjun Connection.

    Click Authorize Now to authorize the Lingjun service-linked role AliyunServiceRoleForEfloVcc. Lingjun connections can then access other Alibaba Cloud services.

    • Instance ID: From the drop-down list, select the Lingjun connection instance that you purchased. If you don't have one, click Buy Lingjun Connection Instance.

      Important

      The Lingjun connection must be in the same region as the Lingjun nodes.

    • Cloud Enterprise Network (CEN): Select an existing CEN instance.

      Important

      Make sure that you have created a transit router in the CEN instance and that it is in the same region as the Lingjun nodes. For more information, see Transit routers.

  3. Configure Network Information Monitoring.

    • VPC: Select a VPC that is attached to the CEN instance. You can attach a newly created VPC to the CEN instance. Lingjun uses a vSwitch in this VPC to check whether the Lingjun connection is working. Make sure that the vSwitch has at least one available IP address.

      Important
      • The VPC must be in the same region as the Lingjun nodes.

      • The Cluster CIDR Block, the Internet CIDR block, and the monitoring network VPC must not overlap. The monitoring network VPC must not overlap with any other network that you want to connect to Lingjun, such as your other VPCs or on-premises IDC CIDR blocks. For example, if you set the Cluster CIDR Block to 172.16.0.0/12, you can set the VPC CIDR block to 10.0.0.0/16.

      • A VPC appears in the drop-down list only after it is attached to the CEN instance. For more information, see Create a VPC connection.

    • vSwitch: Select the vSwitch that you created.

Click Save and Go to Next Step: Software Instance Basic Parameters.

Step 3: Configure the software instance basic parameters

To use CPFS for Lingjun in hostPath mode, configure File System ID and Mount Path as needed. Otherwise, keep the default values. Then, click Save and Go to Next Step: Confirm Configuration.

Step 4: Confirm the configuration and create the cluster

Confirm the cluster information, network configuration, and other parameters, and then click Submit Configuration to create the cluster.

Creating the cluster takes a few minutes. After the cluster is created, the Cluster Management page appears. The cluster list shows the new cluster and its status.

Connect to Lingjun nodes over SSH

Method 1: Log on from the Lingjun console

  1. Log on to the Lingjun console. In the left-side navigation pane, choose Resources and Nodes > Node Management.

  2. In the Actions column of the target node, click Remote Logon.

    • The logon username is root.

    • The logon password is the one that you set when you created the cluster.

Method 2: Connect through an ECS jump server

Use an Elastic Compute Service (ECS) instance in the same VPC as the Lingjun cluster as a jump server to connect to Lingjun nodes over SSH:

  1. Create an ECS instance in the same VPC as the Lingjun cluster.

    For more information, see Purchase an ECS instance in the console. Select the same VPC that the Lingjun cluster uses.

  2. Configure a security group rule for the ECS instance to allow SSH traffic on port 22.

    Add the following inbound rule to the security group:

    • Port range: SSH (22)

    • Authorization object: 0.0.0.0/0. In a production environment, specify a specific CIDR block.

    • Authorization policy: Allow

  3. Connect to the ECS instance over SSH.

    For more information, see Connect to Linux. For other connection methods, see Choose a connection method.

  4. From the ECS instance, connect to the Lingjun node over SSH.

    1. In the Lingjun console, choose Resources and Nodes > Node Management. Click the name of the target node and find the private IP address in the Network Information section.

    2. In the terminal of the ECS instance, run the following command to connect to the Lingjun node:

      ssh root@<Lingjun_node_private_IP>
    3. To log on to the Lingjun node, enter the logon password that you set when you created the cluster.

Method 3: Connect through an Internet NAT gateway

To connect directly to Lingjun nodes over SSH from the Internet, configure a DNAT entry on an Internet NAT gateway:

  1. Purchase and configure an Internet NAT gateway.

    For more information, see Internet NAT gateway.

  2. Configure a DNAT entry to set up port mapping.

    • Select the Elastic IP Address (EIP) associated with the Internet NAT gateway.

    • In the Lingjun console, choose Resources and Nodes > Node Management. Click the name of the target node and find the private IP address in the Network Information section.

    • Manually enter the private IP address of the Lingjun node.

    • Set the Public Port (for example, 2222), the Private Port (22), and the Protocol (TCP).

  3. Connect to the Lingjun node over SSH from your local terminal.

    ssh root@<NAT_gateway_EIP> -p <Public_Port>

Next steps

After you connect to a Lingjun node, you can:

  • Install a development environment and the AI frameworks that your business requires, such as PyTorch and TensorFlow.

  • Upload training data and model code, and then start training your AI models. For example, to read training data from OSS, see Use Alibaba Cloud SDKs to read files from OSS.