Rate This Document
Findability
Accuracy
Completeness
Readability

Deploying and Logging In to the Kunpeng DevKit

  • The root user has all the operation permissions. Logging in to the server as the root user may pose security risks. Therefore, you are advised to log in to the server as a common user and then switch to the root user to perform subsequent deployment operations. In addition, it is a good practice to disable the SSH login of the root user to further enhance system security. Configuration procedure:

    Log in to the server as a common user, switch to the root user, and check the value of PermitRootLogin in the /etc/ssh/sshd_config file. If the value of PermitRootLogin is no, the root user is not allowed to log in to the server. If the value is yes, change it to no.

  • Reserve at least 3 GB for storing the extracted Kunpeng DevKit installation package.
  • During the installation, a system running user (devkit) and an execution user (devkitworkerX) will be created. These users are only used for running Kunpeng DevKit programs, and are locked and cannot log in to the system.
  • When using the Porting Advisor in the Kunpeng DevKit for code porting, you need to run the rpm and deb commands in Linux to complete scanning and porting tasks. These commands and logic must be run in the Linux backend.
  • To prevent system security problems caused by password leakage or other users accessing your account, do not configure a remote server or select Remember password during login on a public network or public computer.

You can deploy the Kunpeng DevKit in either of the following ways:

  • Use the plugin deployment function for one-click deployment.
    • During the deployment, the system automatically downloads the Kunpeng DevKit installation package.
    • Ensure that the tool server is connected to the Internet. Otherwise, the deployment will fail and the following error message will be displayed:
      curl: (7) Failed connect to mirrors.huaweicloud.com:443; Operation now in progress
      Connection to xx.xx.xx.xx closed.

      To reduce the impact on the operating environment, you are advised to deploy the tool on a VM or in a container in the operating environment and isolate it from the host environment.

  • Manually download the installation package and deploy the Kunpeng DevKit on the server.
    • For details, see Configuring the OS Yum, APT, or Zypper Source and Installation.
    • Download the Kunpeng DevKit installation package to the local PC. Upload the package as well as the Keys.txt and .asc files for verification to the /tmp directory on the target server. In the vs_codetimestamp directory, use the one-click deployment function to deploy the tool.

      After obtaining the installation package, verify its integrity and consistency for security purposes. For details, see Obtaining Software Packages.

Procedure

The following uses the plugin deployment function as an example. After the Kunpeng DevKit plugin is installed, click in the left menu bar to open the Kunpeng DevKit plugin. The configuration guide page is displayed.

  1. If the Kunpeng DevKit has been deployed, go to 2. If the Kunpeng DevKit has not been deployed on the server, click Start Installation on the configuration guide page, or choose > Install Kunpeng DevKit in the upper right corner. On the displayed Before You Start window, select I have read the above information and click OK. The Install Kunpeng DevKit window appears.
    1. Check Environment

      Set remote server parameters based on Table 1. After the setting is complete, click Next to check the server. If the server check is successful, click Next to go to the Select Tools page. If a message is displayed indicating that the connection check fails, reset the parameters as prompted.

      Figure 1 Installing the Kunpeng DevKit

      A server check includes server connection, server information check, and TAR tool check. If the TAR tool is not found on the server, install it.

      Table 1 Parameter description

      Parameter

      Description

      IP Address

      IP address of the server where the tool is to be deployed.

      SSH Port

      SSH port of the server where the tool is to be deployed. The default port is 22.

      SSH Connection Mode

      The options are:

      • Password authentication
      • Key authentication
      NOTE:
      • If you select Key authentication, import the id_rsa private key file. For details, see Configuring SSH Key–based Authentication.
      • After importing the private key file, enter the passphrase of the private key file.

      Server User Name

      User name for logging in to the server OS. The default user name is root.

      NOTE:

      If you want to deploy the tool as a common user, conditions described in Connecting to the Kunpeng DevKit as a Common User must be met.

      Server Password

      Password for logging in to the server OS.

      NOTE:
      • Before installing the tool, ensure that the OS of the remote server is on the compatibility list.
      • To uninstall the tool after the deployment, use an SSH login tool to remotely log in to the Linux CLI as the root user and run the following command (replace /opt with the actual tool deployment directory):

        bash /opt/DevKit/tools/uninstall.sh

    2. Select Tools

      In the Select Tools screen, select an installation mode and required tools according to Table 2, and click Next.

      Table 2 Parameter description

      Parameter

      Description

      Installation Mode

      You can install the DevKit in the following modes:

      • Online installation: The remote server is connected to the Internet. In this mode, the DevKit framework and selected tools are automatically obtained and installed online.
      • Offline installation: The remote server is isolated from the Internet. You need to manually upload the DevKit framework installation package.

      Install Tools

      Currently, the Kunpeng DevKit provides the following tools:

      • Porting Advisor
      • Affinity Analyzer
      • Compiler and Debugger
      • Development Assistant
      • System Profiler
      • Java Profiler
      • System Diagnosis
    3. Install Tools
      • Enter the password of the root user of the server to deploy the tool.
      • Set the tool deployment directory, which is /opt by default.
      • Set the web server IP address.
      • Set the HTTPS port number, which is 8086 by default.

        If the firewall has been enabled on the server, ensure that the HTTPS port (8086 by default) has been opened on the firewall of the server OS. For details, see (Optional) Enabling the Firewall Port.

    4. Get Started

      After the tools are installed, you can select the server that you deployed just now or configure another one that has already been deployed. Then click Log In.

  2. (Optional) If the Kunpeng DevKit has been deployed on the remote server, click Get Started on the Configuration Guide page. The page shown in Figure 2 appears. Table 3 describes the parameters. Set the parameters and click OK.
    Figure 2 Configuring a remote server
    Table 3 Parameters for configuring a remote server

    Parameter

    Description

    IP Address

    IP address of the remote server where the tool is to be configured.

    HTTPS Port

    HTTPS port for the configuration.

    NOTE:

    If the firewall has been enabled on the server, ensure that the HTTPS port (8086 by default) has been opened on the firewall of the server OS.

    Service Certificate

    • Before selecting Specify root certificate, ask the administrator to obtain the CSR file from the Web Server Certificates page, use the CSR file to generate a standard X.509 certificate through a CA system or self-signed certificate system, sign the certificate, and import the certificate. Then, set up a secure connection using the specified root certificate.
    • If you select Trust the current service certificate, you trust the connection to the server.
  3. After the tool is deployed, click Log In. The pages shown in Figure 3 and Figure 4 are displayed. Table 4 describes the parameters. Enter the user name and password, and click Log In. Before login, read the usage statement, select I have read and agree, and click OK. The Kunpeng DevKit homepage is displayed.
    Figure 3 First login
    Figure 4 Non-first login
    Table 4 Parameters for logging in to the Kunpeng DevKit

    Parameter

    Description

    User Name

    User name for logging in to the tool. The default administrator is devadmin.

    Password

    Password for logging in to the tool.

    Upon the first login after the tool is deployed, specify the administrator password. The password must meet the following complexity requirements:

    • Contain 8 to 32 characters.
    • Contain at least two types of uppercase letters, lowercase letters, digits, and special characters (`~!@#$%^&*()-_=+\|[{}];:'",<.>/?).
    • Cannot be the same as the user name or the user name in reverse order.
    NOTICE:
    • Common users are prompted to change their default passwords upon the first login.
    • Change this password periodically for security purposes.

    Confirm Password

    Password re-entered for confirmation.

    Remember password

    • If you select Remember password, you only need to enter the user name for next logins. The system automatically fills in the password when you click the password text box.
    • Do not select Remember password when logging in using a public network or public computer.

    Auto login

    If you select both Remember password and Auto login, you do not need to enter the user name or password after the plugin is restarted. After you log in, you can click the setting button in the upper right corner to go to the Login Settings page and change the login status.

    After the tool is deployed, you can click in the upper right corner and choose Configure Remote Server to switch to another server that has the Kunpeng DevKit deployed.

    After you log in to the Kunpeng DevKit, if you open a new VS Code window for another login, the previous login becomes invalid.

Synchronizing Code to a Remote Server

In the VS Code resource column, right-click any file, folder, or blank area in your project.

Click [Kunpeng] Synchronize Code to Remote Server. Then the plugin synchronizes source files in C, C++, Fortran, Go, interpreted, or assembly language in your local project to the remote server configured in DevKit.

Figure 5 Synchronizing code to a remote server