We wrote a script that can actually deploy our application on a remote tomcat server(within the local network) using curl, but the challenge is how do we do that on a remote tomcat server(outside our local network) which probably sitting behind NAT and may have dynamic IP's
A snippet of our script
curl -u admin:12345 -T myApp.war http://192.10.10.184:8080/manager/text/deploy?path=/myApp
Is there a solution for this already? or we should try something else for deploying our application
Note:
Our goal is to be able to deploy our application(war file) on multiple tomcat servers(laptop computers) that may jump on different physical locations for testing purposes.
Additionally, we have a Jenkins server in the cloud(AWS) that will execute the script upon the request of the deployee.
What we have looked so far
We have found a slightly fare solution, by means of VPN we can now deploy on Tomcat servers sitting behind NAT, as long as they are connected to our VPN server. The only downfall is that the speed of deployment is drastically affected.
OpenVPN https://openvpn.net/
To help you setup your own VPN server you may refer to this link https://community.openvpn.net/openvpn/wiki/Easy_Windows_Guide
Also, port forwarding works fine as well but we can't work on different ports for each of our QA so we stick to VPN for now.