应用程序构建/部署工作流程

发布于 2024-09-06 07:21:41 字数 475 浏览 5 评论 0原文

构建完成后,您使用什么来管理部署应用程序的工作流程?我不仅仅谈论在服务器上获取文件的行为,我谈论的是之后发生的事情。验证、测试、批准、迁移到生产、淘汰旧版本等。

示例:

  1. 构建完成
  2. 构建已部署到测试环境
  3. 测试已完成(手动步骤
  4. 如果测试通过部署到 UAT 否则拒绝构建
  5. UAT 已完成(手动步骤
  6. 如果 UAT 通过部署到 Prod 否则拒绝构建
  7. 淘汰之前在 Prod 中的构建

有没有可以管理长时间运行的构建工作流程的优秀应用程序?

更新

我还应该提到,我正在寻找实际实现工作流程的工具,而不仅仅是跟踪它所处的状态。(复制构建、更改构建状态、发送电子邮件、启动/停止服务、 ETC)

What do you use to manage the workflow of deploying your application after the build completes? I'm not talking about just the act of getting files on a server, I'm talking about what happens after that. Verification, testing, approval, migration to production, retiring old builds, etc.

Example:

  1. Build completes
  2. Build is deployed to a test environment
  3. Testing is completed (manual step)
  4. If testing passes deploy to UAT else reject build
  5. UAT is completed (manual step)
  6. If UAT passes deploy to Prod else reject build
  7. Retire build previously in Prod

Any good applications out there that can manage long running build workflows?

Update

I should also mention that I'm looking for tooling that actually implements the workflow and not just to track what state it's in. (Copy build, change build status, send emails, start/stop services, etc)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

相思故 2024-09-13 07:21:41

此构建和发布系统是不同内容的混合体,因此按照您的列表,我将回复:

  1. 构建完成(带有 Maven 构建的 CruiseControl)
  2. 构建已部署到测试环境(Ant 任务,从 CruiseControl 调用)
  3. 测试已完成(手动步骤 ) )(Maven 告诉你这一点)
  4. 如果测试通过,则部署到 UAT,否则拒绝构建(如果测试失败,Maven 将不会结束,不会调用 ant 部署程序)

从这里开始,我们几乎使用 ant 和bash 脚本

  1. UAT 已完成(手动步骤)
  2. 如果 UAT 通过部署到 Prod 否则拒绝构建
  3. 退出 Prod 中之前的构建

我们发现更困难的事情是重新启动我们的应用程序服务器,因为我们在热部署方面没有良好的经验,但它是可行的仅使用 Maven、Ant 和 bash。

This build and release systems are a mixture of different stuff, so following your list I'll respond:

  1. Build completes (CruiseControl with Maven Build)
  2. Build is deployed to a test environment (Ant task, called from CruiseControl)
  3. Testing is completed (manual step) (Maven tells you this)
  4. If testing passes deploy to UAT else reject build (If the tests fail, Maven won't end, no call to the ant deployer)

From here on, we do it pretty much with a mixture of ant and bash scripts

  1. UAT is completed (manual step)
  2. If UAT passes deploy to Prod else reject build
  3. Retire build previously in Prod

The harder thing we've found was to restart our application servers since we haven't had good experiences with hot deployments but it's doable with only maven, ant and bash.

百变从容 2024-09-13 07:21:41

许多公司都使用项目调度应用程序,例如 MS Project。

这是一个开源项目调度应用程序,Open Workbench,您可能会发现它很有用。它有局限性,但我用它来管理我的日程安排。

A lot of companies use a project scheduling application, like MS Project.

Here's an open source project scheduling application, Open Workbench, that you might find useful. It has limitations, but I've used it to manage my schedules.

青衫儰鉨ミ守葔 2024-09-13 07:21:41

ThoughtWorks Go 看起来很合适。我们目前使用 Maven,但仍只具备其功能的一小部分。

ThoughtWorks Go looks the part. We use Maven at the moment, but still at a fracion of its capabilities.

蓝咒 2024-09-13 07:21:41

我真的不明白为什么不能使用 Ant 来完成此操作(http://ant.apache.org) 执行一些任务,每一步一个。由于这些事情的时间安排是手动的,并且每个环境一次只能有一份软件副本,因此除了编写工作流程并让人们参与之外,似乎没有什么可做的。

I don't really see why this couldn't be done using Ant (http://ant.apache.org) with some tasks, one per step. Since the timing of these things is manual and each environment can only have one copy of the software at one time, there doesn't seem to be much to do but code the workflow and letting folks at it.

逐鹿 2024-09-13 07:21:41

如果您设法实现测试自动化(并且根据您使用的软件类型,没有理由不这样做),您应该能够使用任何持续集成软件。

问题是,每个阶段都可以写成任务,这些任务可以根据前一个情况的结果一个接一个地执行。

例如,我有一个 CruiseControl 的设置,它完全按照您在此处描述的方式进行,测试阶段运行一堆单元测试(c++/qt),并且 uat 内容是使用可测试性驱动程序编写的。

If you manage to automate your tests (and depending on what sort of software you do, there's no reason why not), you should be able to use any continuous integration software.

The thing is, each phase can be written down as tasks that can be executed one after an another depending of what was the result of previous case.

For example, i've had a setup of CruiseControl that does exactly what you describe here, testing phase was running bunch of unittests (c++/qt) and uat stuff was written with testability driver.

据我所知,没有一个系统可以自动完成您提到的所有任务。您需要编写一些脚本和测试来自动部署系统及其测试。然后你可以使用 CI 服务器将它们组合在一起。我的建议如下:

  1. 使用适合您平台的脚本语言(例如 Ant、shell 脚本、批处理文件)来自动化您的部署过程。这包括您提到的任务:
    • 将二进制文件上传到目标服务器
    • 备份系统
    • 发送电子邮件提醒用户升级
    • 通过关闭系统、更改符号链接以指向新版本并再次启动来执行升级。
  2. 编写一些测试来验证软件是否在特定环境中运行。您需要能够针对 UAT 和生产服务器运行这些软件,以验证软件是否已部署并正确运行。

一旦您将这些事情自动化,您就可以使用持续集成服务器来安排这些任务或按需执行它们。我最熟悉 Bamboo (我为 Atlassian 工作),但我确信CruiseControlHudson 也有类似的功能。以下是您在 Bamboo 中执行此操作的方法:

  1. 为您的 UAT 部署创建一个新的构建计划,该计划执行您的部署脚本,然后进行测试 通过
  2. 以下任一方式决定您希望如何触发构建:
    • 将其添加为主构建的依赖项,以便它在成功构建时自动运行
    • 让它按计划运行,这样您就可以每晚进行部署
    • 使其仅手动触发,在这种情况下,您只需在需要部署时运行构建即可。
  3. 配置构建的权限,以便只有授权用户才能将版本部署到您的服务器。

然后,您可以执行相同的操作并为生产部署设置构建,但可能只能手动触发并具有更严格的权限。

As far as I know, there is no single system that will automatically do all the tasks you mention. You need to write some scripts and tests to automate the deployment of your system and its testing. Then you can use a CI server to put it together. Here's what I'd suggest:

  1. Automate your deployment process using a scripting language appropriate to your platform (e.g. Ant, shell scripts, batch files). That includes the tasks you mention:
    • uploading the binary to the target server
    • taking a backup of the system
    • sending an email to alert users to the upgrade
    • performing the upgrade by bringing down the system, changing a symlink to point to the new version, and starting it up again.
  2. Write some tests which can verify that the software is working in a particular environment. You need to be able to run these against your UAT and production server to verify that the software has been deployed and is running correctly.

Once you have these things automated, you can use a continuous integration server to schedule these tasks or do them on demand. I'm most familiar with Bamboo (I work for Atlassian), but I'm sure CruiseControl and Hudson have similar features. Here's how you'd do it in Bamboo:

  1. Create a new build plan for your UAT deployment, which executes your deployment script followed by the tests
  2. Decide how you want to trigger the build, by either:
    • adding it as a dependency on your main build, such that it runs automatically on a successful build
    • make it run on a schedule, so you get nightly deployments
    • make it only triggered manually, in which case you just run the build when you want it to be deployed.
  3. Configure the permissions for the build so only authorised users can deploy versions to your server.

You'd then do the same and set up a build for your production deployment, but probably with only manually triggering and with more restrictive permissions.

吐个泡泡 2024-09-13 07:21:41

我使用了一个名为 Hudson 的基于网络的开源工具,并且对它非常满意。它非常擅长管理构建,并且与 SVN 和 ant 具有出色的集成。唯一需要注意的是您需要将其托管在您自己的服务器上。

I've used a web-based open source tool called Hudson and have been very happy with it. It's very good at managing builds and has excellent integration with SVN and ant. The only caveat is that you need to host it on your own server.

跨年 2024-09-13 07:21:41

我们用的是一个名叫阿利斯泰尔的威尔士老家伙。就像魅力一样。

We use this old Welsh guy called Alistair. Works like a charm.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文