EnglishFrenchSpanish

OnWorks favicon

rexp - Online in the Cloud

Run rexp in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command rexp that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


(R)?ex - (Remote)? Execution

DESCRIPTION


Rex is a tool to ease the execution of commands on multiple remote servers. You can define
small tasks, chain tasks to batches, link them with servers or server groups, and execute
them easily in your terminal.

Command line options
-b Run batch
-e Run the give code fragment
-E Execute task on the given environment
-H Execute task on these hosts
-z Execute task on hosts from this command's output
-G|-g Execute task on these group
-u Username for the ssh connection
-p Password for the ssh connection
-P Private Keyfile for the ssh connection
-K Public Keyfile for the ssh connection
-T List all known tasks.
-Tm List all known tasks in "machine readable" format
-Ty List all known tasks in YAML format
-Tv List all known tasks with all information
-f Use this file instead of Rexfile
-h Display this help
-m Monochrome output. No colors
-M Load Module instead of Rexfile
-s Use sudo for every command
-S Password for sudo
-v Display (R)?ex Version
-F Force. Don't regard lock file
-d Debug
-dd More Debug (includes Profiling Output)
-o <module> Create a compatible output for the given module
-C Turn cache OFF
-c Turn cache ON
-q Quiet mode. No Logging output
-qw Quiet mode. Only output warnings and errors
-Q Really quiet. Output nothing.
-t Number of threads to use ('parallelism' parameter)

Rexfile
If you run rex it will read the file Rexfile in the current working directory. A Rexfile
consists of 3 major parts.

Authentication and Configuration

In that part you define the user and password you want to use to log into your servers.
You can even define timeouts or the paralellism of task execution.

Simple Authentication

Define the user

user "<user>";

Define the password

password "<password>";

Set password authentication

pass_auth;

Key Authentication

Define Private Key

private_key "/path/to/your/private/key.file";

Define Public Key

public_key "/path/to/your/public/key.file";

Define Logging

Log to a file

logging to_file => "rex.log";

Log to syslog

logging to_syslog => "local0";

Other Configuration parameters

Define ssh timeout

timeout 10;

Define parallelism

parallelism 2;

Group your servers

Rex gives you the possibility to group your servers. One way is to do it in code within
the Rexfile. Another is to use a server.ini file in the same directory as the Rexfile.

Code in the Rexfile

Rex gives you the possibility to group your servers. So you don't need to type every
servername multiple times.

group "frontends" => "frontend01", "frontend02", "frontend03", "frontend04";

You can even define ranges in the servernames:

group "frontends" => "frontend[01..04]";

Using server.ini

The same group definition can be stored in a server.ini file:

[frontends]
frontend[01..04]

Your tasks

Create a task description

desc "This is a long description of a task";

Create the task

task "shortname", group => "frontends", sub {
run "uptime";
};

or, if you don't have groups

task "shortname", "frontend01", "frontend02", "frontend03", "frontend04", sub {
run "uptime";
};

and with serverranges

task "shortname", "frontend[01..04]", sub {
run "uptime";
};

Use rexp online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

Linux commands

  • 1
    abi-dumper
    abi-dumper
    abi-dumper - a tool to dump ABI of an
    ELF object containing DWARF debug info
    DESCRIPTION: NAME: ABI Dumper
    (abi-dumper) Dump ABI of an ELF object
    containing DW...
    Run abi-dumper
  • 2
    abi-tracker
    abi-tracker
    abi-tracker - visualize ABI changes
    timeline of a C/C++ software library.
    DESCRIPTION: NAME: ABI Tracker
    (abi-tracker) Visualize ABI changes
    timeline of a C/C+...
    Run abi-tracker
  • 3
    copylinkp
    copylinkp
    copylink - replace a link with a copy
    of the linked file ...
    Run copylinkp
  • 4
    copymat
    copymat
    copymat - convert ASCII matrices into a
    database suitable for quick reading ...
    Run copymat
  • 5
    gatling
    gatling
    gatling - high performance file server ...
    Run gatling
  • 6
    gatos-conf
    gatos-conf
    gatos-conf - GUI GATOS configuration
    application. ...
    Run gatos-conf
  • More »

Ad