Linux部署

1.安装前置条件

部署预测性维护前请确保已经部署了HiperMatrix系统。

2.下载安装文件

2.1 下载在线安装文件

预测性维护在线安装文件位于http://58.247.122.126:20014/api/public/dl/hbi_lnBQ,浏览器地址栏输入可直接下载,也可以在Linux服务器内输入如下命令下载文件:

wget http://58.247.122.126:20014/api/public/dl/hbi_lnBQ -O ai-linux-installer-release-v1.0.0.tar.gz

将在线安装文件下载到服务器后,执行以下命令解压安装文件:

tar -zxvf ai-linux-installer-release-v1.0.0.tar.gz

解压完成后得到ai-linux-installer-release-v1.0.0目录,安装脚本install.sh位于该目录下。

2.2 下载离线安装文件

预测性维护离线安装文件位于http://58.247.122.126:20014/api/public/dl/QzZAuCMN,浏览器地址栏输入可直接下载

将离线安装文件下载到服务器后,执行以下命令解压安装文件:

tar -zxvf ai-linux-offline-installer-release-v1.0.0.tar.gz

解压完成后得到ai-linux-offline-installer-release-v1.0.0目录,安装脚本install.sh位于该目录下。

3.安装服务

3.1 在线安装

install.sh脚本在线环境下会自动执行服务镜像的拉取以及部署,但需要保证服务器访问外网畅通,否则将会拉取不到docker镜像。

安装命令如下:

$ cd ai-linux-installer-release-v1.0.0

$ sudo ./install.sh

安装脚本执行过程如下:

iot@iservice:~/ai-linux-installer-release-v1.0.0$ bash install.sh
Start the ai services
Start ai:                       done, running service... done
Start equipment:                done, running service... done
Start file-management:          done, running service... done
All the services have started

脚本执行完后,等待5分钟左右服务可以启动完成。

3.2 离线安装

install.sh脚本离线环境下会自动构建镜像以及部署。

安装命令如下:

$ cd ai-linux-offline-installer-release-v1.0.0

$ sudo ./install.sh

安装脚本执行过程如下:

iot@iservice:~/ai-linux-offline-installer-release-v1.0.0$ bash install.sh 
/home/iot/ai-linux-offline-installer-release-v1.0.0/build-image.sh
begin to build images
[+] Building 3.3s (8/8) FINISHED                                                                        
 => [internal] load build definition from Dockerfile                                               0.0s
 => => transferring dockerfile: 243B                                                               0.0s
 => [internal] load .dockerignore                                                                  0.0s
 => => transferring context: 2B                                                                    0.0s
 => [internal] load metadata for docker.io/library/openjdk:8-jdk                                   0.0s
 => [1/3] FROM docker.io/library/openjdk:8-jdk                                                     0.0s
 => [internal] load build context                                                                  3.2s
 => => transferring context: 211.15MB                                                              3.2s
 => CACHED [2/3] RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shangh  0.0s
 => CACHED [3/3] COPY ./build/libs/*.jar /app/                                                     0.0s
 => exporting to image                                                                             0.0s
 => => exporting layers                                                                            0.0s
 => => writing image sha256:a79d115d4d5ff54b3f933abe2b5c81d64edfa701b6e363f46ef6dd60c123fe3f       0.0s
 => => naming to harbor.hipermatrix.com:10300/edge/ai:1.0.23                                       0.0s
[+] Building 1.5s (8/8) FINISHED                                                                        
 => [internal] load build definition from Dockerfile                                               0.0s
 => => transferring dockerfile: 243B                                                               0.0s
 => [internal] load .dockerignore                                                                  0.0s
 => => transferring context: 2B                                                                    0.0s
 => [internal] load metadata for docker.io/library/openjdk:8-jdk                                   0.0s
 => [1/3] FROM docker.io/library/openjdk:8-jdk                                                     0.0s
 => [internal] load build context                                                                  1.4s
 => => transferring context: 104.43MB                                                              1.4s
 => CACHED [2/3] RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shangh  0.0s
 => CACHED [3/3] COPY ./build/libs/*.jar /app/                                                     0.0s
 => exporting to image                                                                             0.0s
 => => exporting layers                                                                            0.0s
 => => writing image sha256:c0310d449cd100af4126a21bb666b05d2cd63a625007db2678c27a28c31f66b9       0.0s
 => => naming to harbor.hipermatrix.com:10300/services/equipment-master-data-server:1.13.8         0.0s
[+] Building 1.4s (8/8) FINISHED                                                                        
 => [internal] load build definition from Dockerfile                                               0.0s
 => => transferring dockerfile: 243B                                                               0.0s
 => [internal] load .dockerignore                                                                  0.0s
 => => transferring context: 2B                                                                    0.0s
 => [internal] load metadata for docker.io/library/openjdk:8-jdk                                   0.0s
 => [internal] load build context                                                                  1.4s
 => => transferring context: 106.54MB                                                              1.4s
 => [1/3] FROM docker.io/library/openjdk:8-jdk                                                     0.0s
 => CACHED [2/3] RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shangh  0.0s
 => CACHED [3/3] COPY ./build/libs/*.jar /app/                                                     0.0s
 => exporting to image                                                                             0.0s
 => => exporting layers                                                                            0.0s
 => => writing image sha256:ccb6c04d5e815107d215bb16800710740b93dc0304bb338a8adf804c8a46f5f3       0.0s
 => => naming to harbor.hipermatrix.com:10300/edge/file-management:2.0.0                           0.0s
build images is done
Start the ai services
Start ai:                       running service... done
Start equipment:                running service... done
Start file-management:          running service... done
All the services have started

脚本执行完后,等待5分钟左右服务可以启动完成。

4.菜单导入

预测性维护菜单位于http://58.247.122.126:20014/api/public/dl/Z1Ei3stQ,浏览器地址栏输入后下载,并通过浏览器访问http://${HOST_IP}:9030/menu,通过导入按钮导入该文件。

2024-03-07
0