Using CLI
Procedure
- Log in to the installation environment as the root user.
- Upload the software package obtained in Obtaining the Software Package to a directory in the installation environment.
- (Optional) Create the AtlasEdge installation path and log path.
- If you want to specify the installation path and log path, create them first. The installation path /home/work is used as an example. Run the mkdir -p /home/work command to create an installation path, and select this path to install the software.
- If you do not want to specify the installation path and log path, the software is installed in the default path /usr/local, and logs are recorded in the default path /var/alog.
- You are advised to use the default installation path and log path. Otherwise, other log collection tools may fail to collect logs. Each level of the installation path and log path must be must be a user directory of the root owner group and cannot be written by other users. Otherwise, the installation fails.
- By default, the owner of the /usr/local directory on Linx and UOS is staff. For version enhanced verification, the owner of this directory must be root. Otherwise, the installation fails. You can change the directory owner to root or install the software to another directory.
- The log dump directory is /home/log. Ensure that the owner of this directory and all parent directories is root and the directory cannot be mounted to the memory file system. Otherwise, the directory may be lost after restart.
- Run the following command in the directory where the software package is stored to decompress the software package:
unzip Ascend-mindxedge-atlasedge_{version}_linux-{arch}.zipReplace Ascend-mindxedge-atlasedge_{version}_linux-{arch}.zip with the actual package name.
After the software package is decompressed, the following files are generated:- Installation package: Ascend-mindxedge-atlasedge_{version}_linux-{arch}.tar.gz
- CMS signature file: Ascend-mindxedge-atlasedge_{version}_linux-{arch}.tar.gz.cms
- CRL: Ascend-mindxedge-atlasedge_{version}_linux-{arch}.tar.gz.crl
The CMS file and CRL are used to verify the inner signature of the software package.
- Run the following command to decompress the installation packages decompressed in Step 4 again:
tar -mxvf Ascend-mindxedge-atlasedge_{version}_linux-{arch}.tar.gz --no-same-owner - Install the AtlasEdge software in default installation mode or custom installation mode.
- Default installation
Run the ./install.sh command. During the installation, the MindXEdge user is created in the system. The user name and user group name are MindXEdge, the UID and GID are 1024, and the user type is nologin.
During the default installation, if the MindXEdge user already exists, the user name and user group name must be MindXEdge, the UID and GID must be 1024, and the user type must be nologin. Otherwise, the installation will fail.
- Custom installation
- Specify the installation path.
Run the ./install.sh --install_dir=installation_path command.
- Specify the log path.
- (Not recommended) Specify another user for installation. (You are advised to use the default user for installation because the installation by a specified user is complex and inconvenient for subsequent maintenance.)
Run the ./install.sh --user=user_name --group=user_group_name --user_id=user_ID --group_id=user_group_ID command.
Notes:- The --user, --group, --user_id, and --group_id parameters must be specified at the same time.
- The user name and user group name must be the same and cannot be HwHiAiUser or MindXEdge.
- The UID and GID must be the same. They must be an integer greater than 1001 and less than or equal to 65,535, and cannot be 1024.
- If the specified account already exists in the system, the account information must be the same as that specified by the parameters and the account type must be nologin. Otherwise, the installation will fail.
- If the specified account does not exist in the system, the home directory cannot contain any files or directories with the same name as the specified account. Otherwise, the installation will fail.
- The installation path, log path, and user can be specified at the same time for installation.
To specify the installation path and log path at the same time, run the ./install.sh --install_dir= installation_path --log_dir= log_path command.
- The following parameters are optional during installation.
- --install_type: The value can be install (default) or effect, indicating installation and taking effect, respectively. effect cannot be used in the backend.
- --ignore_docker_status_check: If this parameter is contained, the Docker running status is not checked. To better manage the container, you are advised to check the Docker running status during the installation. That is, discard this parameter.
- --allow_log_tmpfs: indicates whether the log path can be the memory file system. The value can be true or false (default). false indicates that the log path cannot be the memory file system.
- Specify the installation path.
After the installation is complete, AtlasEdge is deployed in the installation_path/AtlasEdge directory, and logs are recorded in the log_path/AtlasEdge_log directory.
In addition, after the AtlasEdge 2.0.3 or later is installed, the containers deployed before the installation continue to run as the HwHiAiUser user, and services are not affected. If you need to deploy a new container, ensure that the MindXEdge user exists in the system. If it does not exist, create it.
Risk warning: If the log path is specified as a directory in the memory file system, logs in the directory will be cleared after the device is restarted. Exercise caution when performing this operation.
- Default installation