title: How to deploy and run Play! 2.1 to EC2 via Jenkins
body: <p>I have setup Jenkins for my Play! 2.1</p>
  
  <p>I have setup Build and Deploy jobs, they work well. But I seem to cannot figure out how to deploy and run Play! from Jenkins to EC2.</p>
  
  <p>For example, I used this command <code>play dist</code> to pack everything into a zip file in Build job and copy the artefact over to Deploy job. Then use <code>scp</code> to upload to EC2 via Publish-Over-SSH plugin, which works fine. Now, If I want Jenkins to run the App immediately, I will unzip the file and run <code>sh start</code> command. That would run the application run up but Play! wouldn't release the console so Jenkins job would never finish. So, how do I run Play! 2.1 and release the console so Jenkins can finish the job and how do I kill the old application if a new commit has come in? So, the process will keep going. </p>