mirror of
https://github.com/house-of-vanity/rexec.git
synced 2025-07-08 09:14:08 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
52f4e54bc4 | |||
9dc659cea1 | |||
1235e17f6b | |||
aaa28eae67 | |||
c016ef8a0f | |||
13ab3f3dbd |
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@ -96,3 +96,22 @@ jobs:
|
|||||||
artifacts: "${{ steps.download_binary.outputs.download-path }}/*,${{ steps.download_pkg.outputs.download-path }}/*"
|
artifacts: "${{ steps.download_binary.outputs.download-path }}/*,${{ steps.download_pkg.outputs.download-path }}/*"
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
body: Static musl build for x86_64-linux and Arch Linux package
|
body: Static musl build for x86_64-linux and Arch Linux package
|
||||||
|
|
||||||
|
dispatch:
|
||||||
|
name: Notify my Arch Repo
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
- build_arch
|
||||||
|
- release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
steps:
|
||||||
|
- name: Dispatch to workflows
|
||||||
|
run: |
|
||||||
|
curl -L \
|
||||||
|
-X POST \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.ACTIONS_KEY }}" \
|
||||||
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
|
https://api.github.com/repos/house-of-vanity/arch_repo/dispatches \
|
||||||
|
-d '{"event_type":"new_package","client_payload":{}}'
|
||||||
|
15
.github/workflows/update_repo.yml
vendored
Normal file
15
.github/workflows/update_repo.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: Dispatcher
|
||||||
|
on: ["push"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dispatch:
|
||||||
|
name: Dispatch
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
steps:
|
||||||
|
- name: Dispatch to workflows
|
||||||
|
run: |
|
||||||
|
curl -H "Accept: application/vnd.github.everest-preview+json" \
|
||||||
|
-H "Authorization: token ${{ secrets.ACTIONS_KEY }}" \
|
||||||
|
--request POST \
|
||||||
|
--data '{"event_type": "some_event", "client_payload": { "foo": "bar" }}' https://api.github.com/repos/house-of-vanity/arch_repo/dispatches
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rexec"
|
name = "rexec"
|
||||||
version = "1.0.9"
|
version = "1.1.0"
|
||||||
readme = "https://github.com/house-of-vanity/rexec#readme"
|
readme = "https://github.com/house-of-vanity/rexec#readme"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Parallel SSH executor"
|
description = "Parallel SSH executor"
|
||||||
@ -22,7 +22,6 @@ lazy-st = "0.2.2"
|
|||||||
regex = "1"
|
regex = "1"
|
||||||
clap = { version = "4.3.4", features = ["derive"] }
|
clap = { version = "4.3.4", features = ["derive"] }
|
||||||
colored = "2.0.0"
|
colored = "2.0.0"
|
||||||
#dialoguer = "0.10.4"
|
|
||||||
itertools = "0.10.5"
|
itertools = "0.10.5"
|
||||||
brace-expand = "0.1.0"
|
brace-expand = "0.1.0"
|
||||||
question = "0.2.2"
|
question = "0.2.2"
|
||||||
|
74
README.md
74
README.md
@ -32,63 +32,31 @@ Options:
|
|||||||
```
|
```
|
||||||
---
|
---
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
```shell
|
```shell
|
||||||
[ab@test]$ rexec -e 'cassandra-gce-sc-[1:3].bbs-prod.*' -u ab -c 'df -h /srv/cassandra'
|
$ rexec -f \
|
||||||
|
-e 'cassandra-gce-or-[1:2]' \
|
||||||
|
-u ab \
|
||||||
|
-c 'uname -r; date'
|
||||||
[INFO ] Using string expansion to build server list.
|
[INFO ] Using string expansion to build server list.
|
||||||
[INFO ] Matched hosts:
|
[INFO ] Matched hosts:
|
||||||
[INFO ] cassandra-gce-sc-1.bbs-prod.* [35.221.18.35]
|
[INFO ] cassandra-gce-or-1.prod.example.com [2.22.123.79]
|
||||||
[INFO ] cassandra-gce-sc-2.bbs-prod.* [35.212.13.174]
|
[INFO ] cassandra-gce-or-2.prod.example.com [2.22.123.158]
|
||||||
[INFO ] cassandra-gce-sc-3.bbs-prod.* [35.211.213.123]
|
Continue on following 2 servers? y
|
||||||
Continue on following 3 servers? y
|
[INFO ] Run command on 2 servers.
|
||||||
[INFO ]
|
|
||||||
|
|
||||||
[INFO ] Run command on 3 servers.
|
|
||||||
[INFO ]
|
|
||||||
|
|
||||||
[INFO ] cassandra-gce-sc-2.bbs-prod.*
|
|
||||||
Code 0
|
|
||||||
STDOUT:
|
|
||||||
Filesystem Size Used Avail Use% Mounted on
|
|
||||||
/dev/mapper/storage-cassandra 1.0T 613G 411G 60% /srv/cassandra
|
|
||||||
|
|
||||||
[INFO ] cassandra-gce-sc-1.bbs-prod.*
|
cassandra-gce-or-1.prod.example.com
|
||||||
Code 0
|
Exit code [0] / stdout 45 bytes / stderr 0 bytes
|
||||||
STDOUT:
|
STDOUT
|
||||||
Filesystem Size Used Avail Use% Mounted on
|
║ 5.15.0-1040-gcp
|
||||||
/dev/mapper/storage-cassandra 1.0T 594G 430G 59% /srv/cassandra
|
║ Thu Sep 7 13:44:40 UTC 2023
|
||||||
|
|
||||||
[INFO ] cassandra-gce-sc-3.bbs-prod.*
|
cassandra-gce-or-2.prod.example.com
|
||||||
Code 0
|
Exit code [0] / stdout 45 bytes / stderr 0 bytes
|
||||||
STDOUT:
|
STDOUT
|
||||||
Filesystem Size Used Avail Use% Mounted on
|
║ 5.15.0-1040-gcp
|
||||||
/dev/mapper/storage-cassandra 1.0T 523G 502G 52% /srv/cassandra
|
║ Thu Sep 7 13:44:40 UTC 2023
|
||||||
```
|
|
||||||
---
|
|
||||||
|
|
||||||
```shell
|
|
||||||
[ab@test]$ ./rexec -u ab -k -c uptime -e admin.* -f
|
|
||||||
[INFO ] Matched hosts:
|
|
||||||
[INFO ] admin-gce-sc-1.lca-prod.** [35.211.27.195]
|
|
||||||
[INFO ] admin-gce-sc-1.mmk-prod.** [35.211.79.202]
|
|
||||||
[ERROR] admin-gce-sc-1.led-prod.** couldn't be resolved.
|
|
||||||
[INFO ] admin-gce-sc-1.msq-dev.** [35.211.0.24]
|
|
||||||
[ERROR] admin-gce-sc-1.hui-dev.** couldn't be resolved.
|
|
||||||
|
|
||||||
[INFO ] Run command on 3 servers.
|
|
||||||
|
|
||||||
[INFO ] admin.gnb-prod.**
|
|
||||||
Code 0
|
|
||||||
STDOUT:
|
|
||||||
23:31:21 up 294 days, 14:14, 0 users, load average: 0.53, 0.64, 0.52
|
|
||||||
|
|
||||||
[INFO ] admin.abe-prod.**
|
|
||||||
Code 0
|
|
||||||
STDOUT:
|
|
||||||
23:31:22 up 154 days, 9:24, 0 users, load average: 0.31, 0.25, 0.18
|
|
||||||
|
|
||||||
[INFO ] admin-gce-be-1.toy-prod.**
|
|
||||||
Code 0
|
|
||||||
STDOUT:
|
|
||||||
23:31:22 up 98 days, 6:20, 0 users, load average: 0.88, 0.74, 0.80
|
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user