Solved

Bash Shell Framework

Posted on 2010-09-06
5
687 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

786 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