Coder Social home page Coder Social logo

tpl20000 / herd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seveas/herd

0.0 0.0 0.0 2.42 MB

Massively parallel ssh client

Home Page: https://herd.seveas.net

License: MIT License

Shell 18.71% Perl 0.60% Go 75.75% ANTLR 0.43% Makefile 3.34% Dockerfile 0.21% Vim Script 0.96%

herd's Introduction

Herd - Lightning-fast parallel ssh client

Herd is a massively parallel ssh client that will replace all your hacky for loops, pssh, xargs and gnu parallel oneliners with something that is faster, more flexible and simply more awesome!

Herd can find your hosts in you known_hosts file, in consul and many other places. Using a powerful query syntax, you select the hosts you want and run any command in parallel on all of them. Output can be streamed as it happens, or shown at the end for easy inspection. On top of that, Herd is chock full of helpful features:

  • It can query your inventory systems and display information and statistics about your hosts
  • Timeouts, parallelism and delays are all configurable for very flexible ways of running commands
  • A variety of output modes show exactly what you need. Be it timestamps at the start of all lines, output separated by host or one big river of output. It can do all that and more.
  • Output is also stored in a machine-readable way so you can post process it as much as you want
  • An interactive shell is available that even lets you create host lists based on the result of running commands on hosts

Examples

Here are some examples to get you going. The full documentation can be found on https://herd.seveas.net

  • List all hosts in a specific domain

    herd list *.example.com

  • Run a command on all of them

    herd run *.example.com -- uptime

  • Run a long-running command, with output appearing immediately and reduced parallelism

    herd run *.example.com --parallel 10 --host-timeout 5m --timeout 1h -- sudo puppet agent -t

  • Show some information about hosts in an inventory system

    herd list site=site-5 --attributes ip_address,os,memory

  • Rolling restart of a service registered in consul

    herd run --splay 1m --parallel 1 consul_service=smtpd -- sudo systemctl restart postfix

Installing

There are pre-built binaries on the download page. If you prefer to install from source, install go, clone this repository and just run make.

herd's People

Contributors

seveas avatar mlafeldt avatar chriscool avatar grondo avatar sumpfralle avatar moy avatar dun avatar felipec avatar rhansen avatar chu11 avatar alexanders avatar ericcurtin avatar jwilk avatar johnkeeping avatar anarcat avatar peff avatar kkoroviev avatar lucidone avatar mschilli87 avatar satori avatar rafasc avatar bronson avatar thinkerbot avatar stefanbeller avatar tleguern avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.