I regularly need to update some Ubuntu 12.04 (Precise Pangolin) servers (Rackspace).
What I do now is:
- Copy a file to a server using SCP
- Log on to the server using SSH
- Stop Tomcat
- Do some copying and moving of the uploaded file
- Start Tomcat
Repeat the exact same process with the same file on the second server (12 servers now and the number is growing).
Is it possible to write a script that loops through a list of servers and does all this for me?
How would I go about it? Preferably the solution would not necesitate the install of any stuff. The majority within the company works on MacBooks, but Windows VM's are abundant.
Ideally servers to be updated can simply be added/removed to change the list of servers. However, any solution that saves me the time of doing the same thing +12 times is very much appreciated :)