Reputation: 56884
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:
scp
the WAR to a staging directory, somewhere on the QA machine; say 192.168.1.55:/opt/gae/staging
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 execute appcfg.sh -upload
to actually deploy the WAR to my QA app serverI'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!
Upvotes: 0
Views: 777
Reputation: 595
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:
killall -e ./appengine-java-sdk/bin/dev_appserver.sh
To run the dev appserver:
nohup ./appengine-java-sdk/bin/dev_appserver.sh you/war/directory &
Upvotes: 1
Reputation: 15143
Run the development server?
https://developers.google.com/appengine/docs/java/tools/devserver
Upvotes: 1