简体   繁体   中英

How to remotely install Java + Tomcat on a remote Linux machine from a Java webapp?

I have a Java web application running on a WildFly server.

What I want to achieve:

  1. A user clicks a button (or does something else) in the WildFly application.
  2. Java is installed on some remote machine (not the one running the application on WildFly).
  3. Tomcat is installed on the remote machine.
  4. .war is deployed on Tomcat on the remote machine.

Suppose I have all the necessary data to operate on the remote machine (hostname, user, password, privileges).

All that is known is that the remote machine operates on Linux (distro unknown).

How could I approach this problem? Maybe executing some ssh commands with ProcessBuilder ? I think the biggest issue is to somehow make the Java installation general enough to work on every (or most of) Linux distros.

EDIT: Puppet was tried as a candidate solution but the configuration seems too complicated. I mean, it feels like there should be an easier solution for this kind of work.

看看http://salt-api.readthedocs.org/en/latest/ ,您可以使用saltstack部署和控制服务器(木偶和厨师),并使用HTTP(REST)API进行一些操作,例如部署新应用。

我认为您应该查看https://www.docker.io/进行部署。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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