Operating System - HP-UX
1830939 Members
2773 Online
110017 Solutions
New Discussion

Re: Remote deployment and execution

 
Alex Lavrov
Regular Advisor

Remote deployment and execution

Hello,

I just wanted to hear wht utilities and products do you use for remote execution and deplayment?

We are searching for utility that will give as abilities to send files to large amount of servers at once, execute scriptes on remote server and has nice API (graphical or command line).

We prefer not to write something by oursleves because probably there are some utilities that already do this thing.

Thanx in advance!.
6 REPLIES 6
Michael Tully
Honored Contributor

Re: Remote deployment and execution

The only standard ones are the 'r' commands, which quite frankly are risky.

# rexec serverB ls /etc
password:

You would have to write a program to do such a thing.
Anyone for a Mutiny ?
Muthukumar_5
Honored Contributor

Re: Remote deployment and execution

We can use rcp to transfer files easily. We can use remsh to remote execution.

If you want to use secure one then use scp and ssh for this.

We can use these remsh and ssh easily.

And more we can use ftp and sftp for file transfers. We can do it in batch mode as without prompting for passwd and user informations.

See rhosts and remsh man pages
For secure way see ssh,scp,sftp man pages
Easy to suggest when don't know about the problem!
Jan Sladky
Trusted Contributor

Re: Remote deployment and execution

I'am afraid that such utility doesn't exist,
but maybe I'm wrong.

According to your description the task doesn't seem so difficult, so I would think about shell scripts with rcp,scp,ftp, remsh ..

br Jan
GSM, Intelligent Networks, UNIX
Petr Simik_1
Valued Contributor

Re: Remote deployment and execution

I thing rexec is easy to use you don't need to buy programs.
I use this script - see attached. To run programs on many remote servers.
You have to configure .rhosts on each server (if your security allow this) than you can use rexec or this script.
TO run this script you have to create rrun.conf file in same dir and put there list of your servers.

than rrun "/dir/program.sh" runs something on any server.

Muthukumar_5
Honored Contributor

Re: Remote deployment and execution

We can do it with "r" commands ( remsh and rcp ) easily.

Using "r" commands:

If you are trying to use r commands between NODE1 and NODE2 on root user permissions then,

NODE1 with root user#
echo "NODE2 root" >> /.rhosts
chmod 400 /.rhosts

NODE2 with root user#
echo "NODE1 root" >> /.rhosts
chmod 400 /.rhosts

Check:

NODE1# remsh NODE2 hostname ( it will gives hostname of remote server )
# NODE2

Do it from NODE 2 to check it's status or simply as,

NODE1# remsh NODE2 -l root -n "remsh NODE2 hostname"
It has to print NODE1 ( hostname )

Remote operations:

If you want to execute a script as like ..,

--- test.ksh ---
#!/usr/bin/ksh
# rcommand testing

echo "System informations"
uname -a

echo "Lan status"
lanscan

echo "Hostname and IP-Address"
nslookup `hostname`

exit 0

NODE1 # rcp /tmp/test.ksh NODE2:/tmp/ksh

Remote execution:

NODE1 # remsh NODE2 -l root -n "ksh /tmp/test.ksh"
It will give all the output's of remote execution to NODE1's terminal.

If we you want to log into a log file then redirect it to a log file.


Parallel execution:

If you want to execute multiple sequentially then, use script or ; as like,

remsh NODE2 -l root -n "hostname;uname -a"

To do it in parallely,

remsh NODE2 -l root -n "ksh /tmp/test.ksh 1>>/tmp/testlog.log 2>>/tmp/testlog.log &"
Collect PID remote process with $!

remsh NODE2 -l root -n "hostname 1>> /tmp/test1.log;uname -a 1>> /tmp/test1.log &"

To get the result files,

rcp NODE2:/tmp/test*.log /tmp/.

We can restrict the user access with .rhosts and /etc/hosts.equiv file

See rhosts,rcp and remsh man pages to more
Easy to suggest when don't know about the problem!
Chris Watson
Super Advisor

Re: Remote deployment and execution

Take a look at http://www.infrastructures.org and http://www.iu.hio.no/cfengine/
Moving along nicely