Osh Installation

To use osh locally, follow the instructions for Local Installation. Once osh is installed locally, you can install to all nodes of a cluster by following the instructions for Installation to a Cluster.

Local Installation

In order to run osh, you need:
Follow these steps to install osh. You must su to root before performing these steps: Once installation is complete, you can delete the installation directory you created and everything in it.

Test that installation succeeded by running a simple osh command, e.g.

    zack$ osh gen 3 $

Installation to a Cluster

Before you can use the remote execution capabilities of osh, you must ensure that osh is installed on the target cluster.

Configure cluster in .oshrc: Suppose that you want to configure a cluster named fred containing these nodes:
osh configuration is specified in ~/.oshrc. Create this file if necessary and make sure it contains these lines:
from osh.config import *

osh.remote.fred.user = 'root'
osh.remote.fred.hosts = {
    '101': '',
    '102': '',
    '103': '',
This says that fred will be accessed as root (via ssh), and specifies the IP addresses of the cluster's nodes. (See
Configuring osh for more details.)

Check connectivity over ssh: Access to a cluster is done over ssh. You must configure an ssh agent so that access via root does not prompt for a password or generate any diagnostic messages. For example, to check connectivity to cluster fred:

    zack$ osh @fred [ testssh ] $
    '101' stderr: Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
    '101' stdout: hello
    '102' stderr: Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
    '102' stdout: hello
    '103' stderr: Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
    '103' stdout: hello
Each node of cluster fred was tested, and because it was the first ssh session to each node, a warning was printed on stderr. The test command used by testssh is echo hello, and that output is reported also. The next run of testssh does not have any output on stderr because the nodes are now registered in ~/.ssh/known_hosts:
    zack$ osh @fred [ testssh ] $
    '101' stdout: hello
    '102' stdout: hello
    '103' stdout: hello
osh is now ready to install to the cluster.

Install to cluster: To install osh on cluster fred run this command:

    zack$ osh @fred [ installosh ]
This must be run from a shell capable of running curses, (e.g. not an Emacs shell). You will see a table showing installation progress for each node.

Check success: Once installation is complete, you can run remote osh commands. For example, this command will report the osh version on each node:

    zack$ osh @fred [ version ] $
    ('101', '1.0.2')
    ('102', '1.0.2')
    ('103', '1.0.2')