如何使用 Puppet 在 Jboss 中部署 EAR/WAR

How to deploy EAR/WAR in Jboss using Puppet

对于我正在进行的项目,我们使用 Jenkins CI 进行设置。

我们现在想使用 Puppet 设置持续交付 (CD)。

这是我们的开发环境规格

我的问题是:如何使用 Puppet 在已安装的 Jboss 服务器(Windows m/c 上)自动部署我的应用程序?

在不知道您希望如何部署应用程序的情况下,很难准确回答如何部署。但我会看看能否为您指明正确的方向:

deploy JBoss with Puppet 的锻造中有现有模块。我建议您浏览一下,看看是否可以找到适合您要求的。

然后您可以集成您的源代码管理以在签入时自动将更改部署到您的 JBoss 实例。

此处有一个将 Puppet 与 Tomcat 和 Maven 一起用于持续交付的示例。它已经有几年历史了,但概念仍然适用:http://www.slideshare.net/carlossg/2013-02-continuous-delivery-apache-con

这里还有一个来自 CloudBees 的示例,用于使用 Puppet 和 Jenkins 进行连续交付(Jenkins 背后有很多工程师)https://www.cloudbees.com/event/continuous-delivery-jenkins-and-puppet-debug-bad-bits-production

这里还有一个通用的 PuppetLabs:https://puppetlabs.com/blog/whats-continuous-delivery-get-speed-these-great-puppetconf-decks

另外:我不想听起来太推销,而且完全公开,我在 PuppetLabs 工作。 But you can use Puppet Enterprise with up to 10 nodes for free,所以我建议不要使用 Learning VM,它并不是真正为托管应用程序而设计的。

对于我的组织,我正在使用以下工具来实现持续交付和持续集成

工头:供应和ECN(外部节点分类器)

傀儡师: 这将是 运行 在我们的主服务器

傀儡特工: 在其余服务器上

詹金斯: 在主服务器上

用于在另一台服务器上维护暂存和发布存储库的 Nexus 存储库

安装在 puppet master 中的 nexus 存储库模块。它具有连接到 Nexus 存储库的逻辑,从 "release" 存储库获取最新版本。

Flow:

  • I have a jenkins job defined whose purpose is making sure the build doesn't break and at the time of release, I perform maven release
    that in turn upload the latest version to nexus release repository.

  • Load nexus repository module in foreman and map "Nexus" class to all my servers. This is the crucial part that allows me to perform cloud deployment with a single button click in foreman. To do this, you need to have your own puppet files that perform dbmigration, undeploy and deployment. I always write a deploy maven module for all my projects which will have only these puppet files that allows me to perform deployment in all servers in one shot.

既然你已经熟悉了 CI 和 CD,我希望我的陈述是不言自明的