6 Commits
1.0.9 ... 1.1.0

Author SHA1 Message Date
52f4e54bc4 Fix CI 2023-09-07 18:26:18 +03:00
9dc659cea1 Fix CI 2023-09-07 18:24:54 +03:00
1235e17f6b Fix CI 2023-09-07 17:55:38 +03:00
aaa28eae67 Fix CI 2023-09-07 17:54:43 +03:00
c016ef8a0f Added multiple -e 2023-09-07 17:41:12 +03:00
13ab3f3dbd Update README.md 2023-09-07 17:01:23 +03:00
4 changed files with 56 additions and 55 deletions

View File

@ -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
View 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

View File

@ -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"

View File

@ -32,63 +32,31 @@ Options:
``` ```
--- ---
![image](https://github.com/house-of-vanity/rexec/assets/4666566/4c52915d-2bc1-46b9-9833-b0d7c0527f2d)
## 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. cassandra-gce-or-1.prod.example.com
[INFO ] Exit code [0] / stdout 45 bytes / stderr 0 bytes
STDOUT
║ 5.15.0-1040-gcp
║ Thu Sep 7 13:44:40 UTC 2023
[INFO ] cassandra-gce-sc-2.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 613G 411G 60% /srv/cassandra ║ Thu Sep 7 13:44:40 UTC 2023
[INFO ] cassandra-gce-sc-1.bbs-prod.*
Code 0
STDOUT:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/storage-cassandra 1.0T 594G 430G 59% /srv/cassandra
[INFO ] cassandra-gce-sc-3.bbs-prod.*
Code 0
STDOUT:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/storage-cassandra 1.0T 523G 502G 52% /srv/cassandra
```
---
```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
``` ```