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

  • 1
    Clementine
    Clementine
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 2
    XISMuS
    XISMuS
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    i...
    Download XISMuS
  • 3
    facetracknoir
    facetracknoir
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 4
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 5
    Freeciv
    Freeciv
    Freeciv is a free turn-based
    multiplayer strategy game, in which each
    player becomes the leader of a
    civilization, fighting to obtain the
    ultimate goal: to bec...
    Download Freeciv
  • 6
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • More »

Linux commands

Ad