Operating System - HP-UX
1834026 Members
2243 Online
110063 Solutions
New Discussion

Re: how to keep scripts current

 
Charles Li_1
Advisor

how to keep scripts current

We have 5 servers that we run the same scripts on. We currently have about 10 such scripts. What is the best practice for keeping all these scripts in sync on all 5 servers?

Thanks.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: how to keep scripts current

Shalom,

Simplest, declare a single server to be the gold version of all scripts.

All work occurs on that server.

Use scp or rsync to keep the script library current on all other nodes via cron

If you really have a lot of scripts you can go to a version management system. Something that elaborate is not something I ever needed to do.


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: how to keep scripts current

1) Consider having one copy of the scripts and NFS mount a /utils (or something directory).

2) Create a makefile that uses make to push the scripts to the listed nodes. Make is a good choice in that if any of your platforms change, you can set up dependencies to adapt to a particular environment.

3) Use rdist under cron to push the scripts periodically.

If your network is robust, 1) has a lot of merit.
If it ain't broke, I can fix that.
hpuxrox
Respected Contributor

Re: how to keep scripts current

May I suggest rdist? Just setup the /etc/distfile, a cronjob and off you go.
Charles Li_1
Advisor

Re: how to keep scripts current

We have both RH linux and HP-UX. I did not find rsync on HP-UX. We have 11i. Is rsync a standard package on HPUX?
Bill Hassell
Honored Contributor

Re: how to keep scripts current

Both rsync and ssh are currently optional on HP-UX. Download both from software.hp.com:

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111

For good security, I would use ssh with rsync so the data is encrypted as it is distributed:

rsync -vzat --rsh=ssh mysystem:archive1/ archive1


Bill Hassell, sysadmin
PeterWolfe
Respected Contributor

Re: how to keep scripts current

Another possibility is using cfengine.
It's bundled with UX 11.23 starting
with the December '05 OE update.

cfengine is logically like using rdist/rsync
and would additionally allow you to
perform other synchronization actions in
a controlled fashion. If you just
need the 5 scripts cfengine is likely overkill.
If you want to synchronize a larger set
of files, directories, check/manage permissions
on files, perform controlled edits to files (e.g.
ensure the same cron job is defined across
N systems), check for specific processes, perform
tidy operations, etc. etc., cfengine would
be worth looking at.