Configuration Before NPU, CANN, MindStudio, and Framework Installation
Before installing the NPU driver and firmware, CANN, MindStudio, framework, and Toolbox in batches, perform the following operations to complete necessary configuration:
- Log in to the server where ascend-deployer is located.
- Configure the IP addresses and usernames of other target devices on the server where ascend-deployer is located.
Go to the ascend-deployer/ascend_deployer directory, edit the inventory_file file, comment out or delete localhost ansible_connection='local' under [worker], add the IP addresses and user names of the execution device and the device to be installed, and run the :wq command to save the modification and exit. The format is as follows:
[worker] ip_address_1 ansible_ssh_user="root"# root user ip_address_2 ansible_ssh_user="root"# root user ip_address_3 ansible_ssh_user="username" # non-root user
- In non-single-server deployment scenarios, do not mix local host and IP addresses in inventory_file. You are advised to set both values to IP addresses for both the execution device and the device to be installed.
- The usernames of the remote devices are configured in the inventory_file. Both the root user and non-root users can be used for software installation. For details about software that can be installed by non-root users, see Table 1. If you want to install software listed in Table 1 as a non-root user, set ansible_ssh_user in the file to the root user and use the root user to install sys_pkg (system component) and npu (driver and firmware, installed for Ascend devices). Then, set ansible_ssh_user to the non-root user and install the software listed in Table 1.
- ip_address can be set to an IPv4 or IPv6 address. The type of the IP address used by an SSH client such as PuTTY to connect to the execution device must be the same as that configured in the inventory_file, which should be either IPv4 or IPv6.
- In the inventory_file, you can configure the passwords of other target devices for SSH password authentication by specifying the ansible_ssh_pass field. If the SSH key authentication mode is used, this configuration is not required. If the OS of a target device is openEuler_20.03LTS, openEuler_22.03LTS, Kylin V10 SP2, or CentOS 7.6, the ansible_ssh_pass field cannot be used for this configuration.
- (Optional) During batch deployment, the default number of concurrences is 50, and the maximum number of concurrences is 255. If the number of environments to be deployed is greater than 50, go to the ascend-deployer/ascend_deployer directory and change the value of forks in the ansible.cfg file to the total number of nodes to be deployed to speed up the deployment.
[defaults] forks=50
- Go to the ascend-deployer directory and run the bash install.sh --check command to test the connectivity of the target devices and whether they support the use of the ascend-deployer tool.
Ensure that all devices can be properly connected. If a device fails to be connected, check whether the network connection of the device is normal and whether SSHD is enabled.
Parent topic: Configuring Batch Installation