一、使用eiigui工具必要部分
- Ubuntu18.04/20.04
- eiigui工具
- eii源码
- eii基础镜像及sample镜像
二、下载安装
1.下载安装eiigui工具
$ git clone https://gitee.com/open-edge-insights/eii-deployment-tool.git
$ cd eii-deployment-tool && ./install.sh
2.下载eii源码
- 安装repo工具
# 安装curl工具
$ sudo apt update
$ sudo apt install curl git
# 下载repo工具
$ curl https://storage.googleapis.com/git-repo-downloads/repo > repo
$ sudo mv repo /bin/repo
$ sudo chmod a+x /bin/repo
# 查看版本信息
$ repo --version
如果执行repo报错:" ‘/usr/bin/python’ no such file "(Ubuntu20.04可能遇到),请执行以下操作解决
$ sudo ln -s /usr/bin/python3 /usr/bin/python
- 下载EII源码
# 默认的REPO_URL地址在PRC网络无法访问,执行下列指令进行替换
$ export REPO_URL="https://gerrit-googlesource.lug.ustc.edu.cn/git-repo"
# 创建工作目录并进入
$ mkdir -p <work-dir>
$ cd <work-dir>
# 初始化repo仓库(默认master分支)
# 基于某个分支初始化repo仓库(指定分支)
$ repo init -u "repo init -u "https://github.com/open-edge-insights/eii-manifests.git" -b refs/tags/v2.6
# 若第一次执行,没有配置git账号,根据提示配置git信息后,再次执行上一步"repo init"
$ git config --global user.email "you@example.com"
$ git config --global user.name "Your Name"
Note:
- 如果repo报错: fatal: unable to access 'https://gerrit-googlesource.lug.ustc.edu.cn/git-repo/': server certificate verification failed. CAfile: none CRLfile: none repo: error: "git" failed with exit status 128 cwd: /home/test/Desktop/edge_insights_industrial/.repo/repo cmd: ['git', 'fetch', '--quiet', '--progress', 'origin', '+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'] fatal: cloning the git-repo repository failed, will remove '.repo/repo' , 请执行以下操作解决:
$ git config --global http.sslverify false
# 同步下载源码
$ repo sync
- 安装eii依赖工具
$ cd <work-dir>
$ sed -i 's/DEV_MODE=.*/DEV_MODE=true/g' IEdgeInsights/build/.env
$ sed -i 's!google.com!baidu.com!g' IEdgeInsights/build/pre_requisites.sh
$ sed -i 's!https://github.com/docker/compose/releases/download/${REQ_DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)!https://gitee.com/xiaowei315/eii_3rd_pkg/attach_files/802728/download/docker-compose-$(uname -s)-$(uname -m)-${REQ_DOCKER_COMPOSE_VERSION}!g' $pre_requisitesfile
$ cd <work-dir>/IEdgeInsights/build
# 如果没有网络代理:
$ sudo ./pre_requests.sh
# 如果有网络代理:
$ sudo ./pre_requests.sh --proxy="xxxx.xx.com:xxx"
$ reboot
- 拷贝eii试运行脚本并执行
# 将脚本拷贝至eii源码同级目录
cp eii-deployment-tool/eii/try_eii.sh <work-dir>/try_eii.sh
cp eii-deployment-tool/eii/stop_eii.sh <work-dir>/stop_eii.sh
sed -i 's/EII_BUILD_DIR=.*/EII_BUILD_DIR=$PWD/IEdgeInsights/build/g' <work-dir>/try_eii.sh
$ cd <work-dir> && ./try_eii.sh
$ ./stop_eii.sh
- 执行eiigui
# 查看eii&eiigui镜像
$ docker images
$ eiigui