pmichna
pmichna

Reputation: 4888

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.

Upvotes: 0

Views: 715

Answers (2)

greggyNapalm
greggyNapalm

Reputation: 543

Take a look at http://salt-api.readthedocs.org/en/latest/, You can use saltstack to deploy and control servers like(puppet and chef) and use HTTP(REST) API to make some actions like deploy a new app.

Upvotes: 1

Michael Legart
Michael Legart

Reputation: 820

I think you should look at https://www.docker.io/ for the deployment.

Upvotes: 0

Related Questions