Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Runon script #674

Merged
merged 3 commits into from
Jan 2, 2025
Merged

Feat: Runon script #674

merged 3 commits into from
Jan 2, 2025

Conversation

ktechmidas
Copy link
Contributor

@ktechmidas ktechmidas commented Jan 1, 2025

Issue being fixed or feature implemented

A more complicated version of the bin/ssh script. This script will run the provided command on either a single instance or a full group of nodes or all nodes for a given network.


Usage: ./bin/runon -n <network> [ -g <group> ] [ <server> ] [ -c <command> ] [ -a ]

Flags:
  -n <network>  (required)
  -g <group>    (optional) e.g. hp-masternodes
  -c <command>  (optional) command to run
  -a            (optional) run on ALL servers

Example usage:
  ./bin/runon -n testnet -a -c "echo 'Hello from all' && hostname"
  ./bin/runon -n testnet -g hp-masternodes -c "echo 'Hello group' && hostname"
  ./bin/runon -n testnet hp-masternode-4 -c "sudo hostnamectl set-hostname hp-masternode-4"

What was done?

Added script

How Has This Been Tested?

Tested with basic commands that do no harm

Breaking Changes

No breaking changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Copy link
Contributor

@vivekgsharma vivekgsharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ktechmidas ktechmidas merged commit 5325929 into v1.0-dev Jan 2, 2025
1 check passed
@ktechmidas ktechmidas deleted the runon branch January 2, 2025 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants