title: How should I create an automated deployment script?
body: <p>I need to create some way to get a local WAR file deployed on a Linux server. What I have been doing until now is the following process:</p>
  
  <ol>
  <li>Upload WAR using WinSCP.  </li>
  <li>SSH into server using PuTTY.  </li>
  <li>Move/Rename/Delete certain files folders to prepare for WAR explosion.  </li>
  <li>Explode WAR.</li>
  <li>Send email notifying users of restart.  </li>
  <li>Stop Tomcat server.  </li>
  <li>Use <code>tail</code> to make sure server stopped correctly.  </li>
  <li>Change symlink to point to exploded WAR.  </li>
  <li>Start Tomcat.  </li>
  <li>Use <code>tail</code> to make sure server started correctly.  </li>
  <li>Send email notifying users of completed restart.</li>
  </ol>
  
  <p>This stuff is all relatively straightforward. And I'm sure there are a million and one different ways to do it. Id like to hear about some options. My first thought was a Bash script. I have very little experience with scripting in general but thought this would be a good way to learn. I would also be interested in doing this with Ruby/Python or something current like this as I have little to no experience with these languages. I think as a young developer, I should definitely get some sort of scripting language under my belt.  I may also be interested in some sort of software solution that could do this stuff for me, although I think scripting would be a better way to go for the sake of ease and customizability (I might have just made that word up). </p>
  
  <p>Some actual questions for those that made it this far. What language would you recommend to automate the process I've listed above? Would this be a good opportunity for me to learn Bash/Ruby/Python/something else, or should I simply take the 10 minutes to do this by hand 2-3 times a week? I would think the answer to this is obviously no. Can I automate these things from my computer, or will I need to setup the scripts to run within the Linux server? Is the email something I can automate or am I better off doing that part myself?</p>
  
  <p>More questions will almost certainly come up as I do this so thanks to all in advance.</p>
  
  <h2>UPDATE</h2>
  
  <p>I should mention, I am using Maven to build the WAR. So if I can do all of this with Maven please let me know. </p>