{"id":26757096,"url":"https://github.com/hashmap-kz/rconf","last_synced_at":"2025-03-28T15:34:44.762Z","repository":{"id":282593772,"uuid":"949077905","full_name":"hashmap-kz/rconf","owner":"hashmap-kz","description":"KISS configuration management tool for executing local shell-scripts on remote hosts via SSH.","archived":false,"fork":false,"pushed_at":"2025-03-15T16:42:52.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T17:28:24.214Z","etag":null,"topics":["configuration-management","devops-tools","golang","linux-tools","remote-execution"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashmap-kz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-15T16:16:09.000Z","updated_at":"2025-03-15T16:42:32.000Z","dependencies_parsed_at":"2025-03-15T17:39:07.358Z","dependency_job_id":null,"html_url":"https://github.com/hashmap-kz/rconf","commit_stats":null,"previous_names":["hashmap-kz/rconf"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmap-kz%2Frconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmap-kz%2Frconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmap-kz%2Frconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmap-kz%2Frconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashmap-kz","download_url":"https://codeload.github.com/hashmap-kz/rconf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246054817,"owners_count":20716431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration-management","devops-tools","golang","linux-tools","remote-execution"],"created_at":"2025-03-28T15:34:44.681Z","updated_at":"2025-03-28T15:34:44.743Z","avatar_url":"https://github.com/hashmap-kz.png","language":"Go","readme":"# rconf\n\n**rconf** is a command-line tool that executes local shell-scripts on multiple remote hosts via SSH.\n\n[![License](https://img.shields.io/github/license/hashmap-kz/rconf)](https://github.com/hashmap-kz/rconf/blob/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hashmap-kz/rconf)](https://goreportcard.com/report/github.com/hashmap-kz/rconf)\n[![Workflow Status](https://img.shields.io/github/actions/workflow/status/hashmap-kz/rconf/ci.yml?branch=master)](https://github.com/hashmap-kz/rconf/actions/workflows/ci.yml?query=branch:master)\n[![GitHub Issues](https://img.shields.io/github/issues/hashmap-kz/rconf)](https://github.com/hashmap-kz/rconf/issues)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/hashmap-kz/rconf)](https://github.com/hashmap-kz/rconf/blob/master/go.mod#L3)\n[![Latest Release](https://img.shields.io/github/v/release/hashmap-kz/rconf)](https://github.com/hashmap-kz/rconf/releases/latest)\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n    - [Manual Installation](#manual-installation)\n    - [Homebrew installation](#homebrew-installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Features\n\n- Execute multiple shell scripts on multiple remote hosts via SSH\n- No complex configs, no intricate YAML, no DSLs - just plain shell and a single binary\n- Concurrent execution with worker limits\n- Structured logging\n- Secure authentication using SSH private keys\n- Automatic script upload and execution\n- Summary table of execution results\n\n---\n\n## Installation\n\n### Manual Installation\n\n1. Download the latest binary for your platform from\n   the [Releases page](https://github.com/hashmap-kz/rconf/releases).\n2. Place the binary in your system's `PATH` (e.g., `/usr/local/bin`).\n\n#### Example installation script for Unix-Based OS _(requirements: tar, curl, jq)_:\n\n```bash\n(\nset -euo pipefail\n\nOS=\"$(uname | tr '[:upper:]' '[:lower:]')\"\nARCH=\"$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\\(arm\\)\\(64\\)\\?.*/\\1\\2/' -e 's/aarch64$/arm64/')\"\nTAG=\"$(curl -s https://api.github.com/repos/hashmap-kz/rconf/releases/latest | jq -r .tag_name)\"\n\ncurl -L \"https://github.com/hashmap-kz/rconf/releases/download/${TAG}/rconf_${TAG}_${OS}_${ARCH}.tar.gz\" |\ntar -xzf - -C /usr/local/bin \u0026\u0026 \\\nchmod +x /usr/local/bin/rconf\n)\n```\n\n### Homebrew installation\n\n```bash\nbrew tap hashmap-kz/rconf\nbrew install rconf\n```\n\n---\n\n## Usage (see examples directory)\n\n```sh\nrconf \\\n  --pkey /path/to/private_key \\\n  --filename /path/to/script1.sh,/path/to/script-dir/ \\\n  --filename https://shared.company.com/path/to/script.sh \\\n  --conn backup@10.40.240.193?sudo=false \\\n  --conn myuser@10.40.240.189:2222 \\\n  --workers 5 \\\n  --log execution.log\n```\n\n### Flags\n\n| Flag          | Short | Description                                                               |\n|---------------|-------|---------------------------------------------------------------------------|\n| `--pkey`      | `-i`  | Path to SSH private key (required)                                        |\n| `--pkey-pass` |       | Passphrase to SSH private key (required when pkey is password-protected)  |\n| `--filename`  | `-f`  | Comma-separated list of script paths, directories or URL's (required)     |\n| `--conn`      | `-H`  | Comma-separated list of remote hosts (required).                          |\n|               |       | Format: `username:password@host:port?sudo=false\u0026key2=value2`              |\n|               |       | Password and Port are optional                                            |\n|               |       | Query parameters are optional                                             |\n| `--recursive` | `-R`  | \"Process the directory used in -f, --filename recursively (default: true) |\n| `--workers`   | `-w`  | Maximum concurrent SSH connections (default: 2)                           |\n| `--log`       | `-l`  | Log file path (default: `ssh_execution.log`)                              |\n\n## How It Works\n\n1. The tool reads the provided scripts into memory.\n2. It establishes SSH and SFTP connections to each host.\n3. The scripts are uploaded to the remote host's `/tmp/` directory.\n4. The scripts are executed remotely using `sudo`.\n5. Execution results are stored and displayed in a summary table.\n\n---\n\n## Example Output\n\n```plaintext\n🚀 Starting script execution...\n[HOST: 10.40.240.189] 🔄 Connecting...\n[HOST: 10.40.240.193] 🔄 Connecting...\n[HOST: 10.40.240.193] ⏳ Uploading scripts/00-packages.sh...\n[HOST: 10.40.240.193] 🚀 Executing scripts/00-packages.sh...\n[HOST: 10.40.240.189] ⏳ Uploading scripts/00-packages.sh...\n[HOST: 10.40.240.189] 🚀 Executing scripts/00-packages.sh...\n[HOST: 10.40.240.193] ✅ Successfully executed scripts/00-packages.sh\n[HOST: 10.40.240.193] ⏳ Uploading scripts/01-timezone.sh...\n[HOST: 10.40.240.193] 🚀 Executing scripts/01-timezone.sh...\n[HOST: 10.40.240.189] ✅ Successfully executed scripts/00-packages.sh\n[HOST: 10.40.240.189] ⏳ Uploading scripts/01-timezone.sh...\n[HOST: 10.40.240.189] 🚀 Executing scripts/01-timezone.sh...\n[HOST: 10.40.240.193] ✅ Successfully executed scripts/01-timezone.sh\n[HOST: 10.40.240.193] ⏳ Uploading scripts/02-locale.sh...\n[HOST: 10.40.240.193] 🚀 Executing scripts/02-locale.sh...\n[HOST: 10.40.240.189] ✅ Successfully executed scripts/01-timezone.sh\n[HOST: 10.40.240.189] ⏳ Uploading scripts/02-locale.sh...\n[HOST: 10.40.240.189] 🚀 Executing scripts/02-locale.sh...\n[HOST: 10.40.240.189] ✅ Successfully executed scripts/02-locale.sh\n[HOST: 10.40.240.189] 🔄 Disconnecting...\n[HOST: 10.40.240.193] ✅ Successfully executed scripts/02-locale.sh\n[HOST: 10.40.240.193] 🔄 Disconnecting...\n\n=== Execution Summary ===\nHOST            RESULT\n10.40.240.189  Success\n10.40.240.193  Success\n```\n\n---\n\n## Logging\n\nAll execution details, including errors, are logged to the specified log file (`ssh_execution.log`).\n\n---\n\n## Requirements\n\n- SSH access to remote hosts\n- Scripts must be shell scripts (`.sh`)\n\n---\n\n## Design notes\n\nThe goal is to keep everything as simple as possible.\n\nIf you have a bunch of shell scripts and need to run them on multiple remote hosts - whether or not you're using a CI/CD\ntool - rconf has you covered.\n\nNo complex setup, no tricky configurations.\n\nGot a fleet of VMs and just need to tweak something across all of them? Skip the messy YAML and dependency\nheadaches - just run your commands remotely with ease.\n\n---\n\n## **Contributing**\n\nWe welcome contributions! To contribute: see the [Contribution](CONTRIBUTING.md) guidelines.\n\n---\n\n## **License**\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n---\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashmap-kz%2Frconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashmap-kz%2Frconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashmap-kz%2Frconf/lists"}