I need to create a way to get a local WAR file deployed to a Linux server. What I have done so far is the following process:
- Download WAR using WinSCP.
- SSH to the server using PuTTY.
- Move / rename / delete specific file folders to prepare for a WAR explosion.
- Explosion WAR.
- Send an email notifying users of a reboot.
- Stop the Tomcat server.
- Use
tail to make sure the server is stopped correctly. - Change the symbolic link to indicate an exploded WAR.
- Launch Tomcat.
- Use
tail to verify that the server is running correctly. - Send an email notifying users of a completed restart.
All this is pretty simple. And I'm sure there is a million and one other way to do this. I'd love to hear about some options. My first thought was a Bash script. I have very little experience writing scripts in general, but I thought it would be a good way to find out. I would also be interested in doing this with Ruby / Python or something like that, since I have little experience with these languages. I think that as a young developer, I should definitely get some kind of scripting language under my belt. I may also be interested in some kind of software solution that could do this for me, although I believe that scripting would be the best way to simplify and customize (maybe I just made that word).
Some relevant questions for those who have done this so far. In what language would you recommend automating the process I specified above? Will this be a good opportunity for me to learn Bash / Ruby / Python / something else, or will I just take 10 minutes to do it manually 2-3 times a week? I think the answer to this is obviously not. Can I automate these things from my computer, or do I need to configure scripts to run on a Linux server? Is email something that I can automate, or am I better off doing this part myself?
More questions will almost certainly come, as I am doing it this way, thanks to everyone in advance.
UPDATE
I must mention, I am using Maven to create a WAR. Therefore, if I can do all this with Maven, please let me know.
deployment automation
Umyeah
source share