I have just started to setup bullet proof nightly build environment to Play based application. So far I have not found a good tutorial about this topic. Could you review currently solution I am setuping? Thanks.
Setup Play Framework to Jenkins server and create a job, which creates a distribution package every 24h from the git/svn repository.
play dist
Above command creates app-1.0.zip file. File is copied and unzipped to multiple nodes. We are using load balancer. Eventually file is unzipped to /home/play/webapp/app-1.0 folder.
After unzip I change symlink /home/play/webapp/app => /home/play/webapp/app-1.0 and reload project. Is this symlink really needed? Can I just unzip files over old files? Do I really need to unzip project? Can I just create a jar file and run it on server?
play reload
Finally old app is removed.
rm -rf /home/play/webapp/app-0.9
Version app-0.9 was originally started by running a following script.
/etc/init.d/play start
Script is a modification of following script:
http://monocaffe.blogspot.fr/2012/09/a-play-framework-server-setup.html
Basically script runs following command, which I found from the start file inside app-xxx.zip file.
exec java $* -cp "`dirname $0`/lib/*" play.core.server.NettyServer `dirname $0`
I did also thought about creating a reload script, which verifies play application is running, if not, play application is started, not restarted.
/etc/init.d/play reload
Best regards, Markku