diff --git a/README.md b/README.md index a92202bcc6159a0f83cb9d0d78c9d72f2b215cb7..6a84bf8575837a7d37c9ea2b12cda1560752b6e6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Pipeline solution to support building, deploying and automating any software pro ##### DevKit流水线原子能力安装部署指导 ###### 安装部署工具 通过一键下载、安装、部署工具,可将DevKit流水线上原子能力自动部署到指定的环境上 -1. [一键下载、安装、部署工具使用文档](https://gitee.com/openeuler/devkit-pipeline/blob/master/document/批量部署工具/批量部署工具devkitpipeline.md) +1. [一键下载、安装、部署工具使用文档](https://gitee.com/openeuler/devkit-pipeline/blob/master/document/批量部署工具/批量部署工具和一键下载工具说明文档.md) ###### 原子能力对接流水线实践指导 (Jenkins) DevKit各原子能力对接Jenkins流水线的脚本范例及使用说明 1. [Jenkins流水线配置DevKit迁移、亲和门禁](https://gitee.com/openeuler/devkit-pipeline/blob/master/document/Jenkins安装部署/Jenkins流水线配置迁移、亲和门禁.md) diff --git "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-windows\347\211\210\346\234\254\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267.png" "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-windows\347\211\210\346\234\254\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267.png" similarity index 100% rename from "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-windows\347\211\210\346\234\254\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267.png" rename to "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-windows\347\211\210\346\234\254\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267.png" diff --git "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-\345\234\250windows\346\234\272\345\231\250\344\270\212\344\270\213\350\275\275\347\273\204\344\273\266\345\214\205.png" "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-\345\234\250windows\346\234\272\345\231\250\344\270\212\344\270\213\350\275\275\347\273\204\344\273\266\345\214\205.png" similarity index 100% rename from "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-\345\234\250windows\346\234\272\345\231\250\344\270\212\344\270\213\350\275\275\347\273\204\344\273\266\345\214\205.png" rename to "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-\345\234\250windows\346\234\272\345\231\250\344\270\212\344\270\213\350\275\275\347\273\204\344\273\266\345\214\205.png" diff --git "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\344\275\277\347\224\250\346\217\220\347\244\272.png" "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\344\275\277\347\224\250\346\217\220\347\244\272.png" similarity index 100% rename from "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\344\275\277\347\224\250\346\217\220\347\244\272.png" rename to "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\344\275\277\347\224\250\346\217\220\347\244\272.png" diff --git "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-\346\226\207\344\273\266\345\210\227\350\241\250.png" "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-\346\226\207\344\273\266\345\210\227\350\241\250.png" similarity index 100% rename from "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-\346\226\207\344\273\266\345\210\227\350\241\250.png" rename to "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-\346\226\207\344\273\266\345\210\227\350\241\250.png" diff --git "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-\347\273\204\344\273\266\345\214\205\346\224\276\347\275\256\344\275\215\347\275\256.png" "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-\347\273\204\344\273\266\345\214\205\346\224\276\347\275\256\344\275\215\347\275\256.png" similarity index 100% rename from "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/image-\347\273\204\344\273\266\345\214\205\346\224\276\347\275\256\344\275\215\347\275\256.png" rename to "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/image-\347\273\204\344\273\266\345\214\205\346\224\276\347\275\256\344\275\215\347\275\256.png" diff --git "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/\344\270\200\351\224\256\344\270\213\350\275\275\345\221\275\344\273\244\350\241\214\345\217\202\346\225\260\350\257\264\346\230\216.PNG" "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/\344\270\200\351\224\256\344\270\213\350\275\275\345\221\275\344\273\244\350\241\214\345\217\202\346\225\260\350\257\264\346\230\216.PNG" similarity index 100% rename from "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/\344\270\200\351\224\256\344\270\213\350\275\275\345\221\275\344\273\244\350\241\214\345\217\202\346\225\260\350\257\264\346\230\216.PNG" rename to "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/\344\270\200\351\224\256\344\270\213\350\275\275\345\221\275\344\273\244\350\241\214\345\217\202\346\225\260\350\257\264\346\230\216.PNG" diff --git "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/\344\270\200\351\224\256\351\203\250\347\275\262\345\221\275\344\273\244\350\241\214\345\217\202\346\225\260\350\257\264\346\230\216.PNG" "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/\344\270\200\351\224\256\351\203\250\347\275\262\345\221\275\344\273\244\350\241\214\345\217\202\346\225\260\350\257\264\346\230\216.PNG" similarity index 100% rename from "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline/\344\270\200\351\224\256\351\203\250\347\275\262\345\221\275\344\273\244\350\241\214\345\217\202\346\225\260\350\257\264\346\230\216.PNG" rename to "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/image/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243/\344\270\200\351\224\256\351\203\250\347\275\262\345\221\275\344\273\244\350\241\214\345\217\202\346\225\260\350\257\264\346\230\216.PNG" diff --git "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline.md" "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243.md" similarity index 71% rename from "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline.md" rename to "document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243.md" index fff9299517c4fe1e0b463d5de5d8028c78a5e165..dbcbebb230748ff2905a6400ddb4aba3f8fa56f8 100644 --- "a/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267devkitpipeline.md" +++ "b/document/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267/\346\211\271\351\207\217\351\203\250\347\275\262\345\267\245\345\205\267\345\222\214\344\270\200\351\224\256\344\270\213\350\275\275\345\267\245\345\205\267\350\257\264\346\230\216\346\226\207\346\241\243.md" @@ -1,12 +1,18 @@ -# 批量部署工具devkitpipeline +# 批量部署工具 -获取本项目release包v0.2版本,解压之后,将tools/linux文件夹内所有内容上传至linux服务器,获取文件列表如下图: +获取本项目release包 `devkit-pipeline-${tag}.tar.gz` 文件 ,将其上传至linux服务器后解压,获取解压后linux文件夹内文件列表如下图: -![image-文件列表](image/批量部署工具devkitpipeline/image-文件列表.png) +![image-文件列表](image/批量部署工具和一键下载工具说明文档/image-文件列表.png) -其中 **`devkitpipeline`** 为一键批量部署工具,与本项目仓库名称相同。`machine.yaml`文件为该工具倚赖的配置文件,具体填写内容说明见下文。在无网络环境下 **`download`** 一键下载工具为其提供所需组件包下载能力,windows版本 `download` 工具支持在windows机器上下载组件包。 +其中 **`devkitpipeline`** 为一键批量部署工具,与本项目仓库名称相同。`machine.yaml`文件为该工具倚赖的配置文件,具体填写内容说明见下文。在无网络环境下 **`download`** 一键下载工具为其提供所需组件包下载能力,windows版本 `download` 工具支持在windows机器上下载组件包(注:windows版 `download` 工具在release文件列表内的名称为**`download-for-windows.exe`**)。 + + + +> [**最新版下载链接**](https://gitee.com/openeuler/devkit-pipeline/releases/tag/v0.2) + +> 注:配置流水线时,流水线使用哪个用户来执行,就需要使用该用户来执行一键部署工具。 @@ -66,7 +72,7 @@ devkit: ```shell ./devkitpipeline -h ``` -![](image/批量部署工具devkitpipeline/一键部署命令行参数说明.PNG) +![](image/批量部署工具和一键下载工具说明文档/一键部署命令行参数说明.PNG) 除 **`-h`** 使用提示参数外,**`devkitpipeline`** 批量部署工具还提供 **`-f`**,**`-iso`** ,**`--debug`** 三个参数。 @@ -90,11 +96,11 @@ devkit: -#### 批量部署工具目前支持批量部署 GCCforOpenEuler,BiShengCompiler,BiShengJDK8,BiShengJDK17,lkp-tests,并支持根据iso镜像文件挂载本地镜像。 +#### 批量部署工具目前支持批量部署 GCCforOpenEuler,BiShengCompiler,BiShengJDK8,BiShengJDK17,lkp-tests,并支持根据iso镜像文件挂载本地镜像。 -各工具下载版本为2024年2月各工具官网提供的最新版,可查看本项目源代码download_dependency工具目录下的 `download_config.py` 文件查看具体下载链接。 +各工具下载版本为2024年2月各工具官网提供的最新版,可查看本项目源代码`tools/download_dependency/src/download_config.py` 文件查看具体下载链接。 -BiShengJDK8 和 BiShengJDK17 均使用 `update-alternatives` 工具进行配置。默认BiShengJDK8版本优先。 +说明:部署工具部署BiShengJDK8 和 BiShengJDK17时,均使用服务器内部自带的 `update-alternatives` 命令进行配置。默认BiShengJDK8版本优先。 部署安装过程中会使用目标结点机器的 **`/tmp`** 目录作为临时文件所在目录,部署完成后将会删除 **`/tmp`** 目录下的临时文件。若目标结点机器 **`/tmp`** 目录磁盘空间不足,则会导致安装失败。若使用挂载本地镜像方式安装,则安装完依赖后,本地镜像源将被取消挂载并恢复原来的镜像源配置。 @@ -106,57 +112,68 @@ BiShengJDK8 和 BiShengJDK17 均使用 `update-alternatives` 工具进行配置 `devkitdependencies.tar.gz` 文件上传路径为`devkitpipeline` 批量部署工具所在路径。上传完成后目录文件列表如下: -![image-组件包放置位置](image/批量部署工具devkitpipeline/image-组件包放置位置.png) +![image-组件包放置位置](image/批量部署工具和一键下载工具说明文档/image-组件包放置位置.png) #### 一键下载工具linux版本 -该工具在release包v0.2版本,tools/linux文件夹下,在Linux机器上使用,用于下载组件包。 - -在有网络环境的linux服务器上,一键下载工具所在路径,执行如下命令,可以查看该工具的使用提示。 +该工具在release包解压后的linux文件夹下,在Linux机器上使用,用于下载组件包。 ```shell -./download -h +./download ``` -![](image/批量部署工具devkitpipeline/一键下载命令行参数说明.PNG) +直接执行该命令即可下载 **GCCforOpenEuler**,**BiShengCompiler**,**BiShengJDK8**,**BiShengJDK17**,**lkp-tests** 组件。 -除 **`-h`** 使用提示参数外,**`download`** 批量下载工具还提供 **`-iso`** 参数。 -- 使用 -iso 参数,指定下载iso版本,输入'auto'将自动检测操作系统版本,并自动下载对应的版本iso文件。 -##### 使用批量部署工具常用的命令为: +> 在有网络环境的linux服务器上,一键下载工具所在路径,执行如下命令,可以查看该工具的使用提示。 +> +> ```shell +> ./download -h +> ``` +> +> ![](image/批量部署工具和一键下载工具说明文档/一键下载命令行参数说明.PNG) +> +> 除 **`-h`** 使用提示参数外,**`download`** 批量下载工具还提供 **`-iso`** 参数。 +> +> - 使用 -iso 参数,指定下载iso版本,输入'auto'将自动检测操作系统版本,并自动下载对应的版本iso文件。 +> -```shell -./download -``` +##### 使用批量部署工具常用的命令为: -```shell -./download -iso auto -``` +> ```shell +> ./download +> ``` +> +> ```shell +> ./download -iso auto +> ``` +> #### 一键下载工具windows版本 -该工具在release包v0.2版本,tools/windows文件夹下,可在windows机器上使用,用于下载组件包。 +该工具在release文件列表内的名称为**`download-for-windows.exe`**,可在windows机器上使用,用于下载组件包。 -![image-windows版本一键下载工具](image/批量部署工具devkitpipeline/image-windows版本一键下载工具.png) +![image-windows版本一键下载工具](image/批量部署工具和一键下载工具说明文档/image-windows版本一键下载工具.png) 双击该`download.exe` 文件即可在当前目录下下载组件包。下载完成后结果如下: -![image-在windows机器上下载组件包](image/批量部署工具devkitpipeline/image-在windows机器上下载组件包.png) +![image-在windows机器上下载组件包](image/批量部署工具和一键下载工具说明文档/image-在windows机器上下载组件包.png) ##### 使用批量部署工具常用的命令为: -```shell -./download -``` - -```shell -./download -iso openEuler_2203_LTS -``` +> ```shell +> ./download +> ``` +> +> ```shell +> ./download -iso openEuler_2203_LTS +> ``` +> diff --git a/tools/download_dependency/src/download.py b/tools/download_dependency/src/download.py index eab41a3fce8e63e9e796f3ab8aa2260b9b1ea492..823f502a5efe403fb708d507888ace8051ed8528 100644 --- a/tools/download_dependency/src/download.py +++ b/tools/download_dependency/src/download.py @@ -4,7 +4,6 @@ import subprocess import sys import shutil import tarfile -import time import download_config from download_utils import download_dependence_handler, download_dependence_file from download_command_line import process_command_line, CommandLine @@ -109,7 +108,6 @@ def download_iso(): if platform.system() == "Windows" and CommandLine.download_iso == "auto": print("Please use '-iso' option in Linux machine if iso version is not specified. " "OpenEuler Operating System is recommended.") - time.sleep(10) sys.exit(1) if CommandLine.download_iso == "auto": result = subprocess.run("grep PRETTY_NAME /etc/os-release".split(' '),