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

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

问题描述

什么构成了良好的CI构建过程?



我们使用CI,但是部署到生产甚至是一个现实的CI目标,当您依赖于几个服务



这是一个良好的良好的CI构建过程,当它自动进行QA和手动从那里?

解决方案

好这取决于:)



我们使用CI系统:


  1. 建筑&单元测试

  2. 部署到单个框,运行集成测试和代码分析

  3. 部署到实验室环境

  4. 在类似prod的系统中运行验收测试

  5. 删除传递给prod部署的代码drop的构建

这是一个绿地项目,大约有十几个服务和数据库部署到20多个服务器,也依赖于六个其他外部服务。



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



为什么要这样做?




  • 如果您有此过程,您可以更快更频繁地进行更改(和回滚)

  • 减少人为错误的机会



  • 在开始生产之前测试相同的部署策略并在生产之前捕获问题

    回答这个问题:




    • 您的系统的正常运行时间要求是什么 - 您是否允许有停机时间或是否需要24 / 7

    • 您是否有需要人工干预/审批的变更控制流程?

    • 是您的部署足够强大,如果部署失败,则为已知良好状态?

    • 是您的系统设计用于处理不同版本的服务或客户端,以防一个或多个组件部署失败(并且您有上述回滚

    • 该进程是否具有处理部分部署的智能,其中组件不能处理其依赖项/客户端的混合版本?

    • 你如何处理数据库部署/升级?

    • 您是否有监控功能,以便在发生错误时知道?



    最近的几个相关链接关于自动化构建你需要的工具



    当你的系统越复杂,越难以自动化一切,但这不是意味着这不是一个值得的目标,它只是需要更多的努力和意志力来完成 - 从知道你会遇到的困难,你必须解决的问题(失败

    现在是大秘密...技术挑战是挑战性的,但不是不可能的... 政治挑战可能是不可逾越的。关于这一切,一切都花费金钱,无论是开发时间还是购买第三方解决方真的,你能建立1K,10K,100K或1M的解决方案吗?



    无论您使用什么解决方案,首先确保自动化是健全的,完成第二个...即确保您有一个可靠的解决方案,测试环境,而不是部署到生产的脆弱的解决方案。


    What constitutes a good CI build-process?

    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.

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

    解决方案

    Well "it depends" :)

    We use our CI system to:

    1. build & unit test
    2. deploy to single box, run intergration tests and code analisys
    3. deploy to lab environment
    4. run acceptance tests in prod-like system
    5. drop builds that pass to code drop for prod deployment

    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.

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

    Why would you want to do this?

    • if you have the process you can roll changes (and roll back) faster and more often
    • less chance for human error
    • you can test the same deployment strategy in a test environment before going to production and catch issues earlier

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

    • what is the uptime requirements for your system -- Are you allowed to have downtime or does it need to be up 24/7?
    • do you have change control processes in place that require human intervention/approval?
    • is your deployment robust enough for any component to roll back to a known-good state if a deployment fails?
    • is your system designed to handle different versions of services or clients in case one or several component deployments fails (and you have the above rollback to last known good)?
    • does the process have the smarts to handle a partial deployment where a component cannot handle mixed versions of its dependencies/clients?
    • how are you handing database deployment/upgrades?
    • do you have monitoring in place so you know when something goes wrong?

    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).

    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天全站免登陆