Operating System - HP-UX
1837724 Members
3038 Online
110118 Solutions
New Discussion

push a tool over to multiple servers from a depot

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

push a tool over to multiple servers from a depot

I want to swinstall the same product over multiple servers from the depot, is there anyway to achieve that?
none
10 REPLIES 10
Bharat Katkar
Honored Contributor

Re: push a tool over to multiple servers from a depot

Hi,
on server1:

Copy the product depot file's to /tmp/depot

# swinstall -l depot /tmp/depot
# swinstall -s /tmp/depot

From all other servers:

# swinstall -s server1:/tmp/depot

OR

Use remsh to do the same for all servers from server1. You need to configure .rhosts file. see man .rhosts

Hope this is what you want.
Regards,
You need to know a lot to actually know how little you know
Sridhar Bhaskarla
Honored Contributor

Re: push a tool over to multiple servers from a depot

Hi Hanry,

If these are 11i systems, then SD-UX remote operations can do what you want. However, this involves configuration which includes giving permissions to the sw-server on each client system. Look at the man page of 'swinstall' and search for operations. It may be helpful if you are going to do this kind of work time and again.

For a single time task, I write a script that will do the job for me.

swinstall -s :/depot_path product,r=x.x.x

Push it to all the servers using your enterprise management server (like Tivoli/Openview VPO etc.,). If not, ssh or remsh.

Worst (do not attempt unless it is really required), edit .netrc file in the home directory to temporarily add the hostname and passwords and run the script through rexec.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: push a tool over to multiple servers from a depot

The reason sd/ux networking was be default off was a perceived security threat(opinion).

One thing you can not just do is export filesystem on an nfs mount and then mount and install.

You need to tell SD-UX its all right to do the network installation.

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
Sundar_7
Honored Contributor
Solution

Re: push a tool over to multiple servers from a depot

Hi Henry,

As Sri mentioned, with 11i, the bundled SD-UX is capable of installing the softwares remotely.

With 11.0, you will have to install SD-OV or SCM (Service Control Manager) to remotely push the softwares to the nodes.

If this is a one time requirement then you are better off creating a software depot in your system and use remsh to install the software in the nodes.

In your server

# swcopy -s /CDROM(orwhatever may be the source) @ /var/spool/sw

# swlist -l depot | grep /var/spool/sw

# vi /usr/local/etc/nodes
node1
node2
..
..
..
node100
#

# for NODE in $(cat /usr/local/etc/nodes)
do
remsh $NODE /usr/sbin/swinstall -s server1:/var/spool/sw \*
done
#

Sundar


Learn What to do ,How to do and more importantly When to do ?
Hanry Zhou
Super Advisor

Re: push a tool over to multiple servers from a depot

Sundar,

Is the server I'm running remsh same as where the depot is located?
Another words, I will be running the following command:
"remsh $NODE /usr/sbin/swinstall -s server1:/var/spool/sw \* " on server1?

Also, can I use ssh instead of remsh?



none
Hanry Zhou
Super Advisor

Re: push a tool over to multiple servers from a depot

If I run the following command, the terminal gui version of swinstall will come up, that is not what I want, since I want to put this line in a script:
ssh server1 "/usr/sbin/swinstall
-s /full/pathto/depot/xyz"

Any idea how to use command line swinstall in the ssh?

none
Sridhar Bhaskarla
Honored Contributor

Re: push a tool over to multiple servers from a depot

Hi Hanry,

You have to specify the product that you want to install from the depot. If the depot contains only one product, then simply specify \*.

swinstall -s your_swserver:/wherever-the-depot-is \*

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Hanry Zhou
Super Advisor

Re: push a tool over to multiple servers from a depot

Sri,

I'm acturally trying install lsof, the command on the server I want to install:
swinstall -s depot_server:/fullpathtodepot/lsof \*

It is giving me error, and complaining no depot. I'm sure lsof depot was created already, and I can see it from swinstall window if i want to use the window.
none
Bharat Katkar
Honored Contributor

Re: push a tool over to multiple servers from a depot

Hanry,

register the depot first.

On depot server:

# swreg -l depot /fullpathtodepot

I had mentioned this in my earlier post but by mistake i wrote swinstall there.

Regards,

You need to know a lot to actually know how little you know
Chris Watkins_1
Respected Contributor

Re: push a tool over to multiple servers from a depot

We compiled ours... I couldn't find a depot at that time.
After compiling on one server, we copied the binary all around.
As long as you're on similar hardware and identical OS, it works.

If you're running mixed OS's there, compile once on each,
and copy it around to the other servers with same OS level.

Just an idea... if you can live without an actual depot.
Everyone's thoughts on SD-UX are right on, too.

Not without 2 backups and an Ignite image!