简体   繁体   English

从Web应用程序运行Ant任务-JBoss部署工具

[英]Run Ant tasks from web application - tool for JBoss deploying

I have a Java application that due it's size I need to deploy in two or three steps. 我有一个Java应用程序,由于它的大小,我需要分两到三个步骤进行部署。 I'm deploying it over OpenShift container. 我正在通过OpenShift容器部署它。

  • First step creates database and prepares application configuration. 第一步创建数据库并准备应用程序配置。
  • Second step should load data into databases and rebuild war using updated configuration. 第二步应该将数据加载到数据库中,并使用更新的配置重建战争。
  • Third step deploys the application on JBoss. 第三步在JBoss上部署应用程序。

All those three steps are already automated using Ant tasks. 使用Ant任务,所有这三个步骤已经自动化。 First step is ran before starting JBoss. 在启动JBoss之前先运行第一步。

I need to run the remaining two after JBoss is started. JBoss启动后,我需要运行其余两个。 So, one idea is to create a wizard/installer app that invokes those tasks in the background until the process completes (2-3min). 因此,一个想法是创建一个向导/安装程序应用程序,该程序在后台调用这些任务,直到过程完成(2-3分钟)。 Then, after successfully deployment, inform the user that the application is ready to be used. 然后,在成功部署之后,通知用户该应用程序已准备就绪可以使用。

I'm not very familiar with Java deployment tools alternatives, I would not like to use system calls to invoke ant. 我对Java部署工具的替代方案不是很熟悉,我不想使用系统调用来调用ant。 So, does this makes sense or there are other tools that I can leverage and allow me to achieve the same result? 那么,这是否有意义,或者我可以利用其他工具并获得相同的结果?

Couldn't you use action_hooks on OpenShift to execute certain tasks before or after certain stages of the deployment? 在部署的某些阶段之前或之后,您能否在OpenShift上使用action_hooks来执行某些任务? Such as the post_deploy action hook? 如post_deploy动作钩子? https://www.openshift.com/developers/deploying-and-building-applications https://www.openshift.com/developers/deploying-and-building-applications

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM