I am in the process of setting up a “QA environment” for my GAE app. This QA environment will simply be a small server on my home network with a dedicated IP address. I’m writing an Ant script to check the project out of my SVN repo, build it on my build server, and then deploy it “remotely” (across my home LAN) to the QA app server.
With Tomcat, I would just scp the web archive to the machine’s webapps/ directory, and since it can be configured to hot-deploy, that is all I usually need for a QA deploy.
But I’m new to GAE, and so I’m not seeing how I can achieve such a remote deployment via Ant. The best I can think of (although somewhat convoluted) would be:
- Checkout and build the WAR on the buildserver, like I normally would
scpthe WAR to a staging directory, somewhere on the QA machine; say192.168.1.55:/opt/gae/staging- Have a lightweight RESTful web service running on that machine (maybe hosted by Tomcat or Jetty) listening for a client to hit a certain API, say
http://192.168.1.55:8080/GaeRemoteApi/deploy; when the request handler gets a request for this URL, it kicks off a shell command to copy the WAR into the correct directory and then executeappcfg.sh -uploadto actually deploy the WAR to my QA app server
I’m pretty sure I could get this working within a day or two, but was wondering if the GAE ships with an easier (baked in) solution; or if a fresh set of eyes can think of something even simpler. Thanks in advance!
I think you should just keep it simple:
Since you are on Ubuntu, you can write a shell script that will:
You can call a shell script from ant using: http://sumedha.blogspot.com.au/2008/06/how-to-call-shell-script-from-ant.html
To stop the dev appserver:
To run the dev appserver: