Solved

Bash Shell Framework

Posted on 2010-09-06
5
681 Views
Last Modified: 2013-12-11
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
Comment
Question by:crazywolf2010
5 Comments
 
LVL 3

Accepted Solution

by:
gremwell earned 500 total points
ID: 33613225
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
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 33613679
Or use CVS and have cvs update as a cron job
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 33613686
(i.e. pserver CVS: if the repository is unavailable one night, the update will happen the next)
0
 
LVL 3

Expert Comment

by:egarciat
ID: 33613848


This is what you need:

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

0
 
LVL 48

Expert Comment

by:Tintin
ID: 33614041
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now