Configuring the Source
ascend-deployer provides the source configuration file. You can replace it as required.
- Python source configuration
Configure the Python source in the ascend-deployer/ascend_deployer/downloader/config.ini file. Huawei source is used by default.
[pypi] index_url=https://repo.huaweicloud.com/repository/pypi/simple
- System source configuration
System source configuration file: ascend-deployer/ascend_deployer/downloader/config/{os}_{version}_{arch}/source.xxx
CentOS 7.6 AArch64 is used as an example. The content of the source configuration file ascend-deployer/ascend_deployer/downloader/config/CentOS_7.6_aarch64/source.repo is as follows:
[base] baseurl=https://mirrors.huaweicloud.com/centos-altarch/7/os/aarch64 [epel] baseurl=https://mirrors.huaweicloud.com/epel/7/aarch64
The preceding information indicates that both the base and epel sources are enabled. System components are queried and downloaded from the two sources. If the sources are deleted, the downloaded components may be incomplete. By default, the Huawei source is used. Replace it as required. Ensure that the source meets the security and vulnerability fixing requirements of your organization.
If you want to change the source, select a secure and reliable source and test whether the download and installation are normal. Otherwise, the downloaded components may be incomplete or the installation may fail.
- When a CentOS-like system component is downloaded, the XML file in the system source needs to be parsed. It is recommended that the defusedxml security component be installed in Python 3 to improve the capability of defending against potential XML vulnerability attacks.
- If the dependency resource you want to download does not exist, you can modify the downloader/config/{os}_{version}_{arch}/pkg_info.json file to specify the resource acquisition link, which must meet the organization's security requirements.