Configuring Repositories
MindCluster Ascend Deployer provides the repository configuration file. You can replace it as required.
- Python repository configuration
Configure a Python repository in the ascend-deployer/ascend_deployer/downloader/config.ini file. The Huawei repository is used by default.
[pypi] index_url=https://repo.huaweicloud.com/repository/pypi/simple
- System repository configuration
System repository 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 repository 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 repositories are enabled. System components are queried and downloaded from the two repositories. If the repositories are deleted, the downloaded components may be incomplete. By default, the Huawei open-source mirror site is used. Replace it as required. Ensure that the configuration meets the security and vulnerability fixing requirements of your organization.
If you want to change the repository, select a secure and reliable one 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 repository 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.