ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

Apache PredictionIO PMC 版本发布全流程指南:从签名密钥到正式公告的 27 个标准步骤

Apache PredictionIO PMC 版本发布全流程指南:从签名密钥到正式公告的 27 个标准步骤 机器学习后端推荐系统【免费下载链接】predictionioPredictionIO, a machine learning server for developers and ML engineers.项目地址https://gitcode.com/gh_mirrors/pred/predictionio点击查看免费下载本指南以 Apache PredictionIO 项目根目录下的 PMC.md 为骨架系统讲解 PMCProject Management Committee成员如何按照 Apache 软件基金会ASF规范完成一次 PredictionIO 版本发布Release。读完本文你将掌握代码签名密钥管理、发布分支与标签、源码/二进制分发包制作、SVN 暂存投票、Maven 构件发布、JIRA 与邮件公告等完整发布链条中每个环节的具体命令与操作要点。适用前提本文所有命令与文件均基于当前仓库快照version in ThisBuild : 0.15.0-SNAPSHOT见 build.sbt 第 40 行整理示例以 0.15.0 版本发布为演示对象。发布流程属于 Apache 项目管理委员会的内部职责普通开发者与用户无需执行但其反映的发布规范同样适用于所有为 Apache PredictionIO 做贡献的参与者理解项目版本演进方式。一、发布前的准备PGP 签名密钥与 KEYS 文件ASF 要求所有正式发布产物源码包、二进制包、Maven 构件都带有发布者的 PGP 签名用于校验来源与完整性。因此发布流程的第一步是确保你拥有一把用于 Apache 项目的强代码签名密钥若你还没有为 Apache 项目生成过代码签名密钥需要先按照 Apache 开发者指南生成高强度密钥生成后妥善保管私钥与口令。将你的公钥追加到仓库根目录的 KEYS 文件中。该文件是项目所有发布者公钥的汇集处文件头部注释明确给出了维护方式Users: pgp KEYS gpg --import KEYS Developers: pgp -kxa your name and append it to this file. (pgpk -ll your name pgpk -xa your name) this file. (gpg --list-sigs your name gpg --armor --export your name) this file.即普通用户用gpg --import KEYS导入公钥以验证签名发布者则需把自己的指纹签名列表与 ASCII 公钥块追加进该文件。当前仓库的 KEYS 中已包含多位发布者的公钥块例如以pub 4096R/D3541808开头的代码签名密钥记录。二、创建发布分支版本号替换与打标签发布不能在主干上直接进行需要先创建一条专门的发布分支并将版本号从-SNAPSHOT提升为正式版本号git checkout -b release/0.15.0 # 将代码树中所有 0.15.0-SNAPSHOT 替换为 0.15.0 git commit -am Prepare 0.15.0-rc1 git tag -am Apache PredictionIO 0.15.0-rc1 v0.15.0-rc1-SNAPSHOT版本号在仓库中的定义位置是 build.sbt 第 40 行version in ThisBuild : 0.15.0-SNAPSHOT替换时需同步更新所有子模块对该版本的引用。随后git push origin release/0.15.0 git push origin v0.15.0-rc1将发布分支与标签推送到 Apache 的 git 仓库。三、等待 CI 构建通过推送完成后等待 Travis CI 在发布分支上的构建通过。当前仓库的 CI 配置位于 .travis.yml其中定义了三种类型的任务Unit单元测试Integration集成测试覆盖多种存储后端PGSQL、ELASTICSEARCH、HBASE、HDFS、S3与多组版本组合如PIO_SPARK_VERSION2.0.2/2.1.3/2.2.3/2.3.3/2.4.0PIO_HADOOP_VERSION2.6.5/2.7.7LicenseCheck许可证合规检查对应 tests/check_license.sh 等脚本。只有 CI 全绿才允许继续打包发布候选RC。此外CI 还会通过 tests/ 下的 docker 化测试验证不同存储后端组合下的事件服务器、引擎训练与部署行为。四、打包源码发布候选Source Release Candidate源码发布候选从已打好的 git 标签直接导出保证内容与标签严格一致git archive --format tar v0.15.0-rc1 ../apache-predictionio-0.15.0-rc1.tar cd ..; gzip apache-predictionio-0.15.0-rc1.tar生成apache-predictionio-0.15.0-rc1.tar.gz后紧接着为该包生成 PGP 分离签名detached ASCII-armored signaturegpg --armor --output apache-predictionio-0.15.0-rc1.tar.gz.asc --detach-sig apache-predictionio-0.15.0-rc1.tar.gz再生成 SHA512 校验和gpg --print-md SHA512 apache-predictionio-0.15.0-rc1.tar.gz apache-predictionio-0.15.0-rc1.tar.gz.sha512这三类文件.tar.gz包、.asc签名、.sha512校验和构成一套完整的发布候选交付物供投票者校验。五、打包二进制发布候选make-distribution.sh 深度解析与源码包不同二进制分发包需要通过项目自带的 make-distribution.sh 脚本构建。该脚本是理解 PredictionIO 发布产物的关键其核心执行序列为sbt/sbt clean sbt/sbt printBuildInfo sbt/sbt publishLocal assembly storage/publishLocal storage/assembly sbt/sbt assembly/clean assembly/universal:packageBin assembly/universal:packageZipTarball从脚本可以看到发布产物的组装逻辑对应 make-distribution.sh 第 70120 行依次执行clean、printBuildInfo打印构建信息定义于 project/PIOBuild.scala、publishLocal、assembly以及storage/assembly将 core、data、storage 等模块打成 fat jar通过assembly/universal:packageBin与packageZipTarball生成 universal 分发包之后把bin/、conf/、python/、project/build.properties、sbt/sbt、lib/下的 assembly jar 与 spark jar 拷入dist/目录形成标准目录结构将 conf/pio-env.sh.template 重命名为pio-env.sh并移入dist/conf/拷贝 LICENSE.txt 与 NOTICE.txt并touch RELEASE标记发布版本最终打包为PredictionIO-0.15.0.tar.gz此处文件名由脚本中TARNAMEPredictionIO-$VERSION.tar.gz决定。脚本还支持可选参数./make-distribution.sh --with-rpm # 额外构建 RPM 包 ./make-distribution.sh --with-deb # 额外构建 DEB 包RPM/DEB 打包依赖 assembly/src/rpm/scriptlets/ 与 assembly/src/debian/DEBIAN/ 中的脚本片段由 sbt-native-packager 驱动见 project/plugins.sbt 中的sbt-native-packager 1.3.22。构建完成后将二进制包重命名并同样完成签名与校验mv PredictionIO-0.15.0.tar.gz apache-predictionio-0.15.0-bin.tar.gz gpg --armor --output apache-predictionio-0.15.0-bin.tar.gz.asc --detach-sig apache-predictionio-0.15.0-bin.tar.gz gpg --print-md SHA512 apache-predictionio-0.15.0-bin.tar.gz apache-predictionio-0.15.0-bin.tar.gz.sha512六、SVN 暂存区staging 发布候选供投票ASF 使用 SVN 目录dist.apache.org/repos/dist/dev/predictionio作为发布候选的暂存区dev 树。操作步骤svn co https://dist.apache.org/repos/dist/dev/predictionio mkdir apache-predictionio-0.15.0-rc1 cp apache-predictionio-0.15.0-* apache-predictionio-0.15.0-rc1 # 若更新过 KEYS 文件一并拷贝到暂存区 svn commit -m Apache PredictionIO 0.15.0-rc1注意暂存区目录中必须保留一份KEYS文件方便投票者导入公钥验证签名。七、Maven 构件发布SBT Sonatype 插件配置PredictionIO 的库构件需要发布到 Apache Nexus 仓库供引擎模板依赖。发布前需在~/.sbt/1.0/sonatype.sbt中配置发布目标与凭据publishTo : { val nexus https://repository.apache.org/ if (isSnapshot.value) Some(snapshots at nexus content/repositories/snapshots) else Some(releases at nexus service/local/staging/deploy/maven2) } credentials Credentials(Sonatype Nexus Repository Manager, repository.apache.org, YOUR APACHE LDAP USERNAME, YOUR APACHE LDAP PASSWORD)项目构建层面已通过 project/plugins.sbt 引入了sbt-pgp 1.1.2提供publishSigned任务与sbt-sonatype 2.5提供 Nexus 集成因此可直接执行sbt/sbt publishLocal # 先本地验证发布流程 sbt/sbt publishSigned storage/publishSigned # 签名并发布到 Nexus staging前缀表示对crossScalaVersions当前为 Scala 2.11.12见 build.sbt逐个版本执行。构件上传后需要在 Apache Nexus 界面Close该 staged repository使其进入可被投票者审查的状态。八、发起投票dev 邮件列表与投票模板发布候选就绪后向 PredictionIO dev 邮件列表发送投票邮件模板如下Subject: [VOTE] Apache PredictionIO 0.15.0 Release (RC1) This is the vote for 0.15.0 of Apache PredictionIO. The vote will run for at least 72 hours and will close on Apr 7th, 2017. The release candidate artifacts can be downloaded here: https://dist.apache.org/repos/dist/dev/predictionio/apache-predictionio-0.15.0-rc1/ Test results of RC1 can be found here: https://travis-ci.org/apache/predictionio/builds/xxx Maven artifacts are built from the release candidate artifacts above, and are provided as convenience for testing with engine templates. The Maven artifacts are provided at the Maven staging repo here: https://repository.apache.org/content/repositories/orgapachepredictionio-nnnn/ All JIRAs completed for this release are tagged with FixVersion 0.15.0. The artifacts have been signed with Key : YOUR_KEY_ID Please vote accordingly: [ ] 1, accept RC as the official 0.15.0 release [ ] -1, do not accept RC as the official 0.15.0 release because...投票要点投票窗口至少 72 小时邮件中必须附上发布候选下载地址、CI 测试结果链接、Maven staging 仓库地址、JIRA FixVersion 链接以及签名密钥 ID只有满足 ASF 投票规则足够数量的 1 且无未解决的 -1才视为通过。九、正式发布release 树、SVN 与旧版本清理投票通过后进入正式发布阶段更新 RELEASE.md发布说明文件记录各版本的 Breaking Changes、新特性、行为变更与贡献者名单例如 0.14.0 的 Elasticsearch 6.x 支持、0.11.0 的 Scala 2.11/Spark 2 支持等创建正式发布标签不带-rc1后缀重新执行打包、签名、校验与 Maven 发布复用第 47 步使用 SVN 检出正式发布目录dist.apache.org/repos/dist/release/predictioniorelease 树svn co https://dist.apache.org/repos/dist/release/predictionio mkdir 0.15.0 # 将二进制分发包从 dev/ 树拷贝到 release/ 树 # 将官方发布包拷入 release/ 树 # 若更新过 KEYS 文件一并拷贝从 ASF 发行镜像中移除旧版本ASF 镜像只保留最新版本svn delete 0.14.0提交svn commit -m Apache PredictionIO 0.15.0十、发布收尾升级文档、JIRA 与公告邮件正式产物上线后还需要完成三项收尾工作记录破坏性变更在升级文档中记录本版本的 breaking changes对应 RELEASE.md 中Breaking changes小节的组织方式如 0.14.0 的 ES 6.x 支持、0.11.0 的 PostgreSQL JDBC 驱动不再捆绑等引导用户平滑升级更新 JIRA在 JIRA 上将 0.15.0 标记为已发布Released状态发送公告邮件向announce、user、dev三个邮件列表发送公告模板如下Subject: [ANNOUNCE] Apache PredictionIO 0.15.0 Release The Apache PredictionIO team would like to announce the release of Apache PredictionIO 0.15.0. Release notes are here: https://github.com/apache/predictionio/blob/v0.15.0/RELEASE.md Apache PredictionIO is an open source Machine Learning Server built on top of state-of-the-art open source stack, that enables developers to manage and deploy production-ready predictive services for various kinds of machine learning tasks. More details regarding Apache PredictionIO can be found here: https://predictionio.apache.org/ The release artifacts can be downloaded here: https://www.apache.org/dyn/closer.lua/predictionio/0.15.0/apache-predictionio-0.15.0-bin.tar.gz All JIRAs completed for this release are tagged with FixVersion 0.15.0; the JIRA release notes can be found here: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId12320420version12337844 Thanks! The Apache PredictionIO Team总结一次完整发布的时间线将全部步骤串起来一次 PredictionIO 版本发布的标准时间线为生成/更新 PGP 密钥维护根目录 KEYS创建release/0.15.0分支替换-SNAPSHOT版本号打v0.15.0-rc1标签并推送等待 .travis.yml 定义的单元/集成/许可检查全绿用git archive打包源码 RC用 make-distribution.sh 构建二进制 RC分别生成.asc签名与.sha512校验和上传至 SVN dev 暂存区配置 Sonatype 凭据并发布 Maven staging 构件dev 邮件列表发起 ≥72 小时投票投票通过后更新 RELEASE.md打正式标签产物上架 SVN release 树并清理旧版本更新 JIRA 发布状态向 announce/user/dev 列表发送公告。对 PMC 成员而言这套流程在 PMC.md 中以 27 个编号步骤完整呈现本文在此基础上补充了脚本与构建配置层面的实现细节make-distribution.sh、build.sbt、project/plugins.sbt并给出了 .travis.yml 的 CI 验证矩阵与 RELEASE.md 的发布说明范式可作为项目发布时的操作速查手册。赞分享机器学习后端推荐系统【免费下载链接】predictionioPredictionIO, a machine learning server for developers and ML engineers.项目地址https://gitcode.com/gh_mirrors/pred/predictionio点击查看免费下载相关推荐发布检查清单发布检查清单 功能验证 核心功能正常工作搜索、LLM集成、回答生成 自定义LLM配置功能测试通过 多语言支持验证 性能与安全 内存使用监控500MB人工智能AI 应用后端RAG本地部署Apache DolphinScheduler 版本发布全流程实战指南从 GPG 签名到社区投票与公告Apache DolphinScheduler 版本发布全流程实战指南从 GPG 签名到社区投票与公告 本指南以 Apache DolphinSchedule任务调度数据编排工作流自动化后端大数据cuML版本发布流程从RC到正式版的步骤解析cuML版本发布流程从RC到正式版的步骤解析 还在为cuML版本发布流程头疼一文掌握从候选版本到正式发布的完整流程 读完本文你将掌握 cuML版本发布机器学习高性能计算创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表