Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 701
  • Last Modified:

Bash Shell Framework

Gents,
I have number of Linux systems. We have tonnes of custom scripts to monitor,control & interrogate status of different jobs. Currently these scripts are located at each server and often updating one means leaving others out of sync. I have to go to each server and update them manually.  I think there is a better way to fix this problem.

I am looking for a BASH shell script console which will connect remotely to these servers and run scripts either located at console or at remote node. I can create password less login between servers using SSH.

Does any of you created shell console for similar use?

0
crazywolf2010
Asked:
crazywolf2010
1 Solution
 
gremwellCommented:
Have a look at http://www.theether.org/pssh/. You could use prsync to push your changes to the nodes and pssh to execute the scripts.

Perhaps the better is to put your script under version control (i.e. into SVN repository) and create SVN commit hook (it will be invoked automatically whenever you commit). The commit hooks should use pssh log into each server and check out the latest version of your script.
0
 
Duncan RoeSoftware DeveloperCommented:
Or use CVS and have cvs update as a cron job
0
 
Duncan RoeSoftware DeveloperCommented:
(i.e. pserver CVS: if the repository is unavailable one night, the update will happen the next)
0
 
egarciatCommented:


This is what you need:

http://en.wikipedia.org/wiki/Rsync

0
 
TintinCommented:
Assuming you don't need/have any unique scripts on each of your nodes, then a simple rsync from the master server to the nodes will ensure you sync any changes to the scripts.  You could add a cronjob to ensure it syncs on a regular basis, eg:

0 0 * * * rsync -av /usr/local/bin node1:/usr/local/bin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now