什么是好的 CI 构建过程 [英] What is a good CI build-process

查看:21
本文介绍了什么是好的 CI 构建过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是好的 CI 构建过程?

What constitutes a good CI build-process?

我们使用 CI,但是当您依赖多个应该部署的服务并且其他应用程序也可能依赖这些服务时,部署到生产甚至是一个现实的 CI 目标.

We use CI, but is deployment to production even a realistic CI goal when you have dependencies on several services that should be deployed too and other apps may depend on these too.

一个好的 CI 构建过程在自动化到 QA 并从那里手动完成时是否足够好?

Is a good good CI build process good enough when its automated to QA and manual from there?

推荐答案

好吧,这取决于":)

我们使用 CI 系统来:

We use our CI system to:

  1. 构建 &单元测试
  2. 部署到单机,运行集成测试和代码分析
  3. 部署到实验室环境
  4. 在类似产品的系统中运行验收测试
  5. drop 传递给 code drop 以进行 prod 部署的构建

这是一个新项目,大约十几个服务和数据库部署到 20 多台服务器,还依赖于六个其他外部"服务.

This is for a greenfield project of about a dozen services and databases deployed to 20+ servers, that also had dependencies on half a dozen other 'external' services.

使用 CI 工具将您的产品部署到生产环境作为一个现实的目标?再次......这取决于"

Using a CI tool to deploy your product to a production environment as a realistic goal? again... "it depends"

你为什么要这样做?

  • 如果您有流程,您可以更快、更频繁地滚动更改(和回滚)
  • 减少人为错误的机会
  • 您可以在投入生产之前在测试环境中测试相同的部署策略并尽早发现问题

在回答这个问题之前你必须解决一些技术问题:

Some technical things you have to address before you can answer this:

  • 您的系统的正常运行时间要求是什么?您是否允许停机或是否需要 24/7 全天候运行?
  • 您是否有需要人工干预/批准的变更控制流程?
  • 如果部署失败,您的部署是否足够健壮,任何组件都可以回滚到已知良好状态?
  • 您的系统是否设计为在一个或多个组件部署失败时处理不同版本的服务或客户端(并且您已将上述回滚到上次已知的良好状态)?
  • 该流程是否有能力处理部分部署,其中组件无法处理其依赖项/客户端的混合版本?
  • 您如何处理数据库部署/升级?
  • 您是否进行了监控,以便知道何时出现问题?

这里有几个关于 自动化构建您需要的工具.

Here are a couple of recent related links about automation and building the tools you need.

归根结底,您的系统越复杂,就越难实现自动化,但这并不意味着它不是一个有价值的目标,只是需要更多的努力和意志力来完成它——从了解您将面临的困难、您必须解决的问题(失败发生)、构建基础设施的政治挑战(与更多产品功能相比).

When it comes down to it the more complex your system the more difficult it is do automate everything, but that does not mean it is not a worthy goal, it just takes a lot more effort and willpower to get it done -- everything from knowing the difficulties you're going to face, the problems you have to account for (failure will happen), the political challenges of building infrastructure (vs. more product features).

现在这里有个大秘密......技术挑战具有挑战性,但并非不可能......政治挑战可能是无法克服的.无论是开发时间还是购买第三方解决方案,这一切都需要花钱.所以真的,你能建立 1000 美元、10000 美元、100K 美元或 100 万美元的解决方案吗?

Now heres the big secret... the technical challenges are challenging but not impossible... the political challenges may be insurmountable. Everything about this costs money whether its dev time or buying 3rd party solutions. So really, can you build the $1K, $10K, $100K, or $1M solution?

无论您采用何种解决方案,首先要确保自动化是稳健的,其次才是完整的......即,确保您拥有尽可能稳健的解决方案来部署到测试环境,而不是部署到生产环境的脆弱解决方案.

Whatever solution you go for make sure the automation is robust first, complete second... i.e. make sure you have as robust a solution as you can for getting deployment to a test environment rather than a fragile solution that deploys to production.

这篇关于什么是好的 CI 构建过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆