Installation
This section describes how to install the Kunpeng DevKit full installation package on the Kunpeng platform running openEuler 20.03 LTS SP1. The installation method also applies on other hardware platforms and OSs.
Deployment
You can deploy the Kunpeng DevKit for development or testing on a single x86 server or a single server powered by the Kunpeng processor (a Kunpeng server preferred).
The deployment modes are as follows:
|
Deployment |
Description |
|---|---|
|
Full installation package deployment |
You can install the basic framework only or install it together with part or all of the plugins. A full installation covers all tools, and is suitable to users who are unfamiliar with the tool and want to quickly get started. After the installation is complete, you can log in to the Kunpeng DevKit and install or uninstall plugins. For details, see Installing a Tool. |
|
Lite installation package deployment |
Install the basic framework. After that, you can also select desired functions and these function packages will be downloaded and installed. A lite installation is quick, occupies a small storage space, and does not depend on high network speeds. It is suitable for users who are familiar with the tool and have specific requirements. After the installation is complete, you can log in to the Kunpeng DevKit and install plugins. For details, see Installing a Tool. |
|
Porting Advisor package deployment |
If you only need to use the Porting Advisor, deploy it individually to prevent unnecessary components from occupying resources. |
Procedure
- Use an SSH remote login tool to copy the Kunpeng DevKit installation package (DevKit-All-x.x.x-Linux-Kunpeng.tar.gz) obtained in Obtaining Software Packages to a custom path.
- Use an SSH tool to remotely log in to the openEuler CLI.
- Access the directory hosting the Kunpeng DevKit installation package.
1cd custom_path
- Decompress the Kunpeng DevKit installation package. In the following command, x.x.x indicates the version. Replace it with the actual version number.
1tar --no-same-owner -zxvf DevKit-All-x.x.x-Linux-Kunpeng.tar.gz
--no-same-owner ensures that the decompressed file belongs to the owner group of current user (root).
- Go to the directory where the extracted Kunpeng DevKit installation package is stored. In the following command, x.x.x indicates the version. Replace it with the actual version number.
1cd DevKit-All-x.x.x-Linux-Kunpeng
- Install the Kunpeng DevKit.
- The root user has all the operation rights. Accessing the server as the root user may pose security risks. For security purposes, disable the SSH login of the root user. 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.
- The tool in WebUI mode can be installed only by the root user. To install the DevKit as the root user, log in to the server as a common user. Switch to the root user, and then install the DevKit.
- The installation directory cannot be the directory where the Kunpeng DevKit installation package is located or a system directory, such as /, /bin, /boot, /dev, /etc, /lib, /lib64, /media, /mnt, /proc, /root, /run, /sbin, /selinux, /src, /srv, /sys, /tmp, /usr, /var, and /home/devkit.
- The tool installation path cannot be a relative path.
- Do not modify the files in the DevKit-All-x.x.x-Linux-Kunpeng directory. Otherwise, the tool installation may fail.
- If you select SSO access mode when installing the Kunpeng DevKit, ensure that an external system that implements the SSO interface defined by the Kunpeng DevKit is integrated. Otherwise, this installation mode cannot be used.
- Run the following command to install the Kunpeng DevKit:
1./install.sh
Select a tool access mode for the installation.
1 2 3 4 5 6 7 8 9
Installing... Please wait. The system uses yum to manage packages. Select a tool access mode for your installation: [1]: User name and password [2]: OAuth 2.0-based SSO (You will be automatically logged in to the DevKit once you logged in to the system.) If you select [2], to ensure proper use of the Kunpeng DevKit, ensure that you have installed an external system that implements the OAuth2 authorization interface defined by the Kunpeng DevKit. Enter the sequence number of the tool access mode for your installation (default: 1): The access mode with the user name and password will be used for the installation. ...
Table 2 Installation command parameters Access Mode
Parameter Settings
1
(Default) Standard installation mode. You need to enter the user name and password for access after the installation.
2
In this mode, you can access the tool using OAuth 2.0–based SSO after installation. For details, see DevKit Interconnection Precautions. Configure parameters as follows:
- registration ID: application ID registered for DevKit in your authorization system.
- registration key: application
key registered for DevKit in your authorization system. - SSL Certificate Verification: indicates whether to ignore
SSL certificate verification.- Ignore certificate verification: You do not need to enter the path of the server certificate.
- Use a self-signed certificate for verification: You need to enter a valid path of the authorization server certificate.
- Use a
CA trusted certificate for verification.
- redirect URL: defaults to the URL for DevKit installation.
- authorize_code URL: URL to get an authorization code, which is used to request the access_token.
- access_token URL: URL to get an access token, which is used to access the user information interface.
- user_info URL: URL to get user login information.
- refresh access_token URL: URL to refresh the access token. This item is optional and left blank by default.
- user validity info URL: URL for requesting the validity of existing user information (optional, this item is left blank by default)
- Logout URL: redirection URL after you log out of the DevKit.
- Select the installation mode as prompted. Skip this step when installing the framework package or System Migration package.
1 2 3 4 5 6 7
Select an installation mode: [1] : Install the DevKit framework and all plugins [2] : Install the DevKit framework and selected plugins [3] : Install the DevKit framework Enter the sequence number of the tool to be installed (default: 1): Selected install_tool: DevKit framework with plugins including porting,affinity,devtools,debugger,sys_perf,java_perf,sys_diagnosis ...
Table 3 Installation modes Installation Mode
Description
1
Installs the Kunpeng DevKit framework and all the tools. This is the default option.
2
Installs the Kunpeng DevKit framework and selected tools.
3
Installs only the Kunpeng DevKit framework but not tools.
- Verify the environment. Set whether to authorize the tool to process failed environment check items based on the command output.
- If yes, enter y and press Enter.
- If no, enter n and press Enter to terminate the installation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Installation environment check result: SequenceNumber CheckItem CheckResult Suggestion [1] installation user ok N/A [2] sudo permission ok N/A [3] su permission ok N/A [4] pam_rootok ok N/A [5] sudoers configuration file fail '#includedir /etc/sudoers.d' is not set in the /etc/sudoers file. During the installation, you can authorize the tool to configure files. [6] devkit user ok N/A [7] service configuration file ok N/A [8] tool installation path ok N/A [9] user home directory ok N/A [10] framework dependency ok N/A [11] devkitworkers ok The tool will create 10 users (default devkitworker1-10) to execute background tasks. All the users belong to the devkit user group and have the same user permissions. [12] porting optional dependencies fail The following optional components have not been installed:java-devel [13] sys_perf optional dependencies fail The following optional components have not been installed:modulecmd lshw ibdev2netdev cma_roce_tos ofed_info mlxconfig mlnx_qos show_gids ucx_info nvidia-smi java kernel-debuginfo [14] sys_diagnosis optional dependencies fail The following optional components have not been installed:ibv kernel-debuginfo Do you want to authorize the tool to handle the items failed in the installation environment check?[y/N]: y Check environment success
- Set installation parameters.
- Tool installation directory, which is /opt by default
- Web server IP address
- HTTPS port number, which is 8086 by default
The following information is displayed:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
Start obtaining installation parameters. Obtain the IP address, port number, and installation path required by the tool service. Enter the installation path. (The default path is /opt): Selected install_path: /opt Checking install path permission... The permission check of the installation path is successful. Checking install path space... The space check of the installation path is successful. IP address list: sequence_number ip_address device [1] xx.xx.xx.xx enp125s0f2 [2] xx.xx.xx.xx enp129s0f2 Please enter the sequence number of the listed IP address as the web server IP (default: 1): Selected IP address of the web server: xx.xx.xx.xx Please enter the installation port (default: 8086): Selected Nginx port: 8086 Selected HTTP server port: 8002 Selected RPC cluster server port: 50051 Selected the internal port of the tool: 7996 The following parameters will be used for deployment: ++++++++++++++++++++++++++++++++++++++++++++++++ OS_TYPE : OpenEulerOS TOOL_VERSION : x.x.x INSTALL_TOOL : porting,affinity,devtools,debugger,sys_perf,java_perf,sys_diagnosis INSTALL_PATH : /opt NGINX_IP : xx.xx.xx.xx NGINX_PORT : 8086 PLUGIN_GUNICORN_PORT : 7996 GRPC_SERVER_IP : xx.xx.xx.xx GRPC_LISTEN_PORT : 50051 HTTP_LISTEN_PORT : 8002 ++++++++++++++++++++++++++++++++++++++++++++++++ DevKit Configuration Generation ... ... ... welcome to install DevKit for Java! checking the configuration and the minimal requirements before the installation: Check disk space Check install path disk space Success JAVA_HOME is /opt/DevKit/devkitplugins/java_perf/jdk-17.0.10 THOR_JAVA_HOME is /opt/DevKit/devkitplugins/java_perf/jdk-17.0.10 Selected Java_perf server port: 18080 Selected Java_perf socket server port: 19090 The pre-checking as OK. ... ... ...
- You can select an IP address from the IP address list displayed in the command output.
- The RPC cluster service port number and HTTPS port number range from 1024 to 65535.
- The RPC cluster service port number must be different from the HTTPS port number. If the specified port number is in use, the system automatically increments the port number by 1 until an available port number is found. If no port is available, the installation stops.
- If the OS firewall of the server is enabled, the tool automatically checks whether the configured port is enabled. If the port is enabled, the installation continues. If the port is not enabled, you are prompted to enable the port. If you input y, the tool automatically enables the port. When the tool is uninstalled, the port will be restored to the original status. If you do not enable the port, the tool installation is not affected, but the web access will fail. If you want to access the tool using a web browser, you need to enable the firewall port of the server OS. For details, see Enabling the Firewall Port.
- If the tool in WebUI mode is installed on EulerOS, run the following command as the root user to modify the permission on the readelf executable file after the installation is successful:
1chmod 755 /usr/bin/readelf
- During the installation, if the ISO dependency is not configured in the current environment or the dependency fails to be installed, the tool provides three solutions for you to install the ISO dependency before continuing with the installation.
- If you select solution 1, download the required image source to the local PC and enter the path of the local image source.
- If you select solution 2, enter the URL for downloading the image source and download the image source online.
- If you select solution 3, the system automatically matches the installation image source that exists on Huawei Cloud. (Solution 3 is supported only when the OS is installed on the Kunpeng platform and is CentOS 7.6/8.0/8.1/8.2, openEuler 20.03, Debian 10, or EulerOS 2.0 SP8. The image source is automatically matched and installed.)
- During the tool installation, the tool checks the OS you are using. If the OS is not on the compatibility list, you will be prompted to install the OS in the default mode (CentOS, Debian, or openEuler).
- During the tool installation, the tool checks whether the devadmin user, configuration file, installation path (/opt/DevKit/), and home path (/home/devkit/) of the tool exist. If any of them exists, the tool prompts you to manually uninstall the tool or delete the existing user, path, or file, or authorize the tool to handle the problem and continue the installation.
- 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.
- You can perform the software porting check in your workspace. The owner of the workspace is the devkit user who runs the tool. When checking the user software source code, the system needs to resolve the software build configuration file and execute the Linux commands, shell scripts, or binary files in the build file. The system uses the background user devkitworkerX to complete the check, preventing horizontal privilege escalation in the user space through malicious commands or scripts in the build file.
- In WebUI mode, a web user is a logical user. The user who executes jobs is the Linux system user devkit or devkitworkerX. Web users can perform operations, such as software build and compilation, in the Linux system using the devkit or devkitworkerX account. These operations must be performed within the permission scope of the devkit or devkitworkerX user.
- The DHE algorithm is affected by CVE-2002-2001 and is therefore not recommended in Nginx.
- If dependency components need to be installed in a user-defined directory, add corresponding environment variables to the .bash_profile or /opt/DevKit/tools/script_port/service_gunicorn.sh file in the directory of the devkit user.
- The following information is displayed:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
Operations to perform: Apply all migrations: affinity_tasks, auth, commonanalysis, contenttypes, cuda_debugger, data_comparison, dependency_dictionary, dependency_filter, devtools_tasks, diagnostic_importexporttasks, diagnostic_nodemanager, diagnostic_scheduletask, diagnostic_sysconfig, diagnostic_taskmanager, diagnostic_usermanager, dynamic_search, importexporttasks, mpi_debugger, nfs_dpc_diagnostic_analysis, nodemanager, optimization_assistant, scene, scheduletask, sessions, ssh_key, storageio_diagnostic_task, sys_config, sysmig, taskmanager, tasks, usermanager Running migrations: Applying diagnostic_importexporttasks.0001_initial... OK Applying diagnostic_nodemanager.0001_initial... OK Applying diagnostic_scheduletask.0001_initial... OK Applying diagnostic_sysconfig.0001_initial... OK Applying diagnostic_taskmanager.0001_initial... OK Applying diagnostic_usermanager.0001_initial... OK Applying nfs_dpc_diagnostic_analysis.0001_initial... OK Applying storageio_diagnostic_task.0001_initial... OK Run sys_diagnosis install script Check disk space Check install path disk space Success ... ... ... Install iperf3 /home/devkit_package/DevKit-All-x.x.x-Linux-Kunpeng/DevKit-All-x.x.x-Linux-Kunpeng/DevKit-Sys-Diagnosis-x.x.x-Linux-Kunpeng/DevKit-Sys-Diagnosis-x.x.x-Linux-Kunpeng/deploy/iperf /home/devkit_package/DevKit-All-x.x.x-Linux-Kunpeng/DevKit-All-x.x.x-Linux-Kunpeng/DevKit-Sys-Diagnosis-x.x.x-Linux-Kunpeng/DevKit-Sys-Diagnosis-x.x.x-Linux-Kunpeng/deploy Configure iperf, please wait Make iperf3, please wait Make install iperf3, please wait Install iperf3 Success /home/devkit_package/DevKit-All-x.x.x-Linux-Kunpeng/DevKit-All-x.x.x-Linux-Kunpeng/DevKit-Sys-Diagnosis-x.x.x-Linux-Kunpeng/DevKit-Sys-Diagnosis-x.x.x-Linux-Kunpeng/deploy Install trace_net_flow Install trace_net_flow Success Load database success Run sys_diagnosis install script success install sys_diagnosis success Encryption success Signature verification key generated successfully Generate agent package success The porting plugin is successfully installed in the /opt/DevKit/devkitplugins/porting directory. The affinity plugin is successfully installed in the /opt/DevKit/devkitplugins/affinity directory. The devtools plugin is successfully installed in the /opt/DevKit/devkitplugins/devtools directory. The debugger plugin is successfully installed in the /opt/DevKit/devkitplugins/debugger directory. The sys_perf plugin is successfully installed in the /opt/DevKit/devkitplugins/sys_perf directory. The java_perf plugin is successfully installed in the /opt/DevKit/devkitplugins/java_perf directory. The sys_diagnosis plugin is successfully installed in the /opt/DevKit/devkitplugins/sys_diagnosis directory. The Kunpeng DevKit Advisor is successfully installed in the /opt/DevKit directory. The DevKit Web console is running. Visit https://xx.xx.xx.xx:8086 If xx.xx.xx.xx:8086 has mapping IP. Please use the mapping IP.
- The root user has all the operation rights. Accessing the server as the root user may pose security risks. For security purposes, disable the SSH login of the root user. Configuration procedure:
- (Optional) In an isolated network environment, configure a proxy to access the Internet.
- Modify the gunicorn_framework.service or gunicorn_plugin.service file. The following commands use the gunicorn_framework.service file as an example.
- For Ubuntu:
1vi /lib/systemd/system/gunicorn_framework.service - For other OSs:
1vi /usr/lib/systemd/system/gunicorn_framework.service
- gunicorn_framework.service is the file of the Kunpeng DevKit framework service. It is used to perform an online installation and download dependencies required by the tool.
- gunicorn_plugin.service is the file of the Kunpeng DevKit subtool service, which is used to deploy SDKs online in VS Code.
- For Ubuntu:
- In the gunicorn_framework.service file, add the following environment variables to the end of the [Service] field:
1 2
Environment="http_proxy=ip:port" Environment="https_proxy=ip:port"
ip:port indicates the IP address and port number of the proxy server.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Restart the service.
- Reload the configuration file.
1systemctl daemon-reload - Restart the service.
1 2
systemctl restart gunicorn_framework.service systemctl restart gunicorn_plugin.service
If the tool is installed in a container, you can run docker_service.sh to restart the service, such as gunicorn_framework.service. (Replace the example directory /opt with the actual tool installation directory.)bash /opt/DevKit/tools/docker_service.sh restart gunicorn_framework.service
- Reload the configuration file.
- Configure the DNS. (Skip this step if the DNS has been configured.)
- Open the resolv.conf file.
1vi /etc/resolv.conf - Add the following content to the file:
1nameserver ip
ip indicates the IP address of the DNS server.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the resolv.conf file.
- Modify the gunicorn_framework.service or gunicorn_plugin.service file. The following commands use the gunicorn_framework.service file as an example.
Post-installation Description
Table 4 describes how to use the tools in the /opt/DevKit/tools/ directory after the Kunpeng DevKit is installed.
|
Tool Name |
Tool Path |
Execution Command |
Configuration Parameter |
Description |
|---|---|---|---|---|
|
change_ip_port.sh |
/opt/DevKit/tools/change_ip_port.sh |
bash change_ip_port.sh |
|
Changes the service IP address and port number. For details, see Changing the IP Address and Port Number of the Kunpeng DevKit. |
|
check_nginx_security_conf.sh |
/opt/DevKit/tools/check_nginx_security_conf.sh |
bash check_nginx_security_conf.sh |
- |
Security configuration query script, which is used to print the effective security configuration information on the console. |
|
docker_service.sh |
/opt/DevKit/tools/docker_service.sh |
./docker_service.sh |
./docker_service.sh --help |
Manages services in containers. |
|
sso_register.sh |
/opt/DevKit/tools/sso_register.sh |
./sso_register.sh |
DevKit installation path. The default installation path is /opt. |
Resets SSO configuration parameters. |
|
uninstall.sh |
/opt/DevKit/tools/uninstall.sh |
bash uninstall.sh |
- |
Uninstalls the Kunpeng DevKit. For details, see Uninstallation. |
