OnRmt-1.0.0.0: Text UI library for performing parallel remote SSH operations

Copyright(c) Kevin Quick 2016 2017
LicenseBSD-3
Maintainerquick@sparq.org
Stabilitystable
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell98

Network.OnRmt

Contents

Description

The OnRmt library provides functionality for a tool that can be used to perform operations via SSH to multiple remote machines in parallel and report the results. Multiple operations can be performed in succession. OnRmt can be likened to an interactive version of Fabric, written in Haskell.

The UI is extensible and OnRmt comes with a command-line representation (CLI) and a text user interface (TUI) based on itemfield, brick, and vty.

OnRmt is provided as a library but is fully complete and lacks only an invocation from a main function with the set of known remote SSH nodes.

Synopsis

Exports from Concurrent.Worker

class WorkEntry a where Source #

Minimal complete definition

name, identify, rmtaddr

Methods

name :: a -> Text Source #

identify :: a -> WorkState -> Text Source #

rmtaddr :: a -> Text Source #

class WorkEntry (GroupEntry g) => WorkGroup g where Source #

Minimal complete definition

getItems, numEntries, getEntry

Associated Types

type GroupEntry g Source #

Methods

getItems :: g -> [WorkItems] Source #

numEntries :: g -> Int Source #

getEntry :: g -> Int -> GroupEntry g Source #

data WorkItems Source #

Constructors

WorkGroup WorkGroupName WorkItems 
WorkItems NumWorkItems 

data DispBlk Source #

Constructors

DispOut [Text] 
DispErr [Text] 
DispInp [Text] 
DispInfo [Text] 

Instances

Main Parameters and entrypoint

data OnRmtParams Source #

The OnRmtParams data structure specifies the operational parameters for running OnRmt. These fields can be adjusted by the client as desired.

Constructors

OnRmtParams 

Fields

  • appName :: Text

    The declared name (and version) of this app for the banner line

  • maxParallel :: Int

    Number of remotes to run in parallel at any one time

  • directSSH :: Bool

    ssh directly to target instead of bouncing via localhost. The localhost bounce is useful for capturing and responding to ssh key passphrases and passwords, but in general it imposes a lower limit on the maxParallel setting.

onRmt :: (WorkGroup a, OnRmtUI ui uistate, Show uistate) => IO a -> OnRmtParams -> ui -> (StateCmd -> IO ()) -> uistate -> IO uistate Source #

The onRmt function is the main entry point. It creates the vty-ui interface and provides the main operational loop for user interaction and remote operations.