Add terminal UI and update README
This commit is contained in:
parent
084b1cde7a
commit
c5b9dc6c39
1 changed files with 223 additions and 221 deletions
444
README.md
444
README.md
|
|
@ -219,6 +219,229 @@ update-manager update # Run updates on all hosts
|
||||||
|
|
||||||
Designed for clean infrastructure, not enterprise chaos.
|
Designed for clean infrastructure, not enterprise chaos.
|
||||||
|
|
||||||
|
Developed by Ed & NodeFox
|
||||||
|
|
||||||
|
# ⚙️ update-manager
|
||||||
|
|
||||||
|
Simple CLI tool for checking and managing updates across multiple Linux hosts over SSH.
|
||||||
|
|
||||||
|
Built for speed, clarity, and control — no fluff.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Features
|
||||||
|
|
||||||
|
* Check for available updates on all hosts
|
||||||
|
* Run updates remotely via SSH
|
||||||
|
* Simple host configuration file
|
||||||
|
* Interactive terminal UI (whiptail)
|
||||||
|
* Lightweight and dependency-minimal
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📦 Installation (Full Setup)
|
||||||
|
|
||||||
|
### 1. Clone repo
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/your-repo/update-manager.git
|
||||||
|
cd update-manager
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 2. Create install directory
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo mkdir -p /opt/update-manager
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3. Copy files
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo cp update-manager.sh /opt/update-manager/
|
||||||
|
sudo cp update-manager-ui.sh /opt/update-manager/ 2>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4. Make executable
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo chmod +x /opt/update-manager/update-manager.sh
|
||||||
|
sudo chmod +x /opt/update-manager/update-manager-ui.sh 2>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5. Create symlinks
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo ln -sf /opt/update-manager/update-manager.sh /usr/local/bin/update-manager
|
||||||
|
sudo ln -sf /opt/update-manager/update-manager-ui.sh /usr/local/bin/update-manager-ui 2>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 6. Install dependencies
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt update && sudo apt install -y whiptail openssh-client
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 7. First run (creates config)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
update-manager check
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚡ Quick Start (1 minute)
|
||||||
|
|
||||||
|
### Edit hosts file
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nano /opt/update-manager/hosts.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```txt
|
||||||
|
# name ip user
|
||||||
|
lanx-ai 172.16.5.135 ed
|
||||||
|
lanx-www 172.16.5.140 ed
|
||||||
|
lanx-modoboa 172.16.5.130 ed
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Run check
|
||||||
|
|
||||||
|
```bash
|
||||||
|
update-manager check
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🧠 Notes
|
||||||
|
|
||||||
|
* Hosts file is created automatically on first run
|
||||||
|
* Lines starting with `#` are ignored
|
||||||
|
* Empty lines are ignored
|
||||||
|
* Requires passwordless SSH access
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔐 SSH Setup (Required)
|
||||||
|
|
||||||
|
Generate SSH key (if needed):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh-keygen
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy key to hosts:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh-copy-id user@host
|
||||||
|
```
|
||||||
|
|
||||||
|
Test access:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh user@host
|
||||||
|
```
|
||||||
|
|
||||||
|
✔ No password prompt = ready
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🖥️ Terminal UI
|
||||||
|
|
||||||
|
Interactive menu for managing hosts.
|
||||||
|
|
||||||
|
### Start UI
|
||||||
|
|
||||||
|
```bash
|
||||||
|
update-manager-ui
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### UI Features
|
||||||
|
|
||||||
|
* Check all hosts
|
||||||
|
* View hosts file
|
||||||
|
* Edit hosts file
|
||||||
|
* Add host
|
||||||
|
* Remove host
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📁 File Structure
|
||||||
|
|
||||||
|
```txt
|
||||||
|
/opt/update-manager/
|
||||||
|
├── update-manager.sh
|
||||||
|
├── update-manager-ui.sh
|
||||||
|
├── hosts.conf
|
||||||
|
└── update-manager.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚙️ Configuration
|
||||||
|
|
||||||
|
Default config:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/etc/update-manager.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
HOSTS_FILE="/opt/update-manager/hosts.conf"
|
||||||
|
SSH_OPTIONS="-o BatchMode=yes -o ConnectTimeout=5"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
update-manager check # Check all hosts
|
||||||
|
update-manager update # Run updates on all hosts
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 💡 Philosophy
|
||||||
|
|
||||||
|
* Keep it simple
|
||||||
|
* Keep it transparent
|
||||||
|
* No hidden magic
|
||||||
|
* Pure SSH control
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🧱 Future Ideas
|
||||||
|
|
||||||
|
* Email reports (cron)
|
||||||
|
* Optional web UI
|
||||||
|
* Integration with Lanx monitoring
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ❤️ Built for Lanx
|
||||||
|
|
||||||
|
Designed for clean infrastructure, not enterprise chaos.
|
||||||
|
|
||||||
Developed by Ed & # ⚙️ update-manager
|
Developed by Ed & # ⚙️ update-manager
|
||||||
|
|
||||||
Simple CLI tool for checking and managing updates across multiple Linux hosts over SSH.
|
Simple CLI tool for checking and managing updates across multiple Linux hosts over SSH.
|
||||||
|
|
@ -440,225 +663,4 @@ update-manager update # Run updates on all hosts
|
||||||
|
|
||||||
Designed for clean infrastructure, not enterprise chaos.
|
Designed for clean infrastructure, not enterprise chaos.
|
||||||
|
|
||||||
Developed by Ed & # ⚙️ update-manager
|
|
||||||
|
|
||||||
Simple CLI tool for checking and managing updates across multiple Linux hosts over SSH.
|
|
||||||
|
|
||||||
Built for speed, clarity, and control — no fluff.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 Features
|
|
||||||
|
|
||||||
* Check for available updates on all hosts
|
|
||||||
* Run updates remotely via SSH
|
|
||||||
* Simple host configuration file
|
|
||||||
* Interactive terminal UI (whiptail)
|
|
||||||
* Lightweight and dependency-minimal
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📦 Installation (Full Setup)
|
|
||||||
|
|
||||||
### 1. Clone repo
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/your-repo/update-manager.git
|
|
||||||
cd update-manager
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 2. Create install directory
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo mkdir -p /opt/update-manager
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 3. Copy files
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo cp update-manager.sh /opt/update-manager/
|
|
||||||
sudo cp update-manager-ui.sh /opt/update-manager/ 2>/dev/null
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 4. Make executable
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo chmod +x /opt/update-manager/update-manager.sh
|
|
||||||
sudo chmod +x /opt/update-manager/update-manager-ui.sh 2>/dev/null
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 5. Create symlinks
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo ln -sf /opt/update-manager/update-manager.sh /usr/local/bin/update-manager
|
|
||||||
sudo ln -sf /opt/update-manager/update-manager-ui.sh /usr/local/bin/update-manager-ui 2>/dev/null
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 6. Install dependencies
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo apt update && sudo apt install -y whiptail openssh-client
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 7. First run (creates config)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
update-manager check
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⚡ Quick Start (1 minute)
|
|
||||||
|
|
||||||
### Edit hosts file
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nano /opt/update-manager/hosts.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```txt
|
|
||||||
# name ip user
|
|
||||||
lanx-ai 172.16.5.135 ed
|
|
||||||
lanx-www 172.16.5.140 ed
|
|
||||||
lanx-modoboa 172.16.5.130 ed
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Run check
|
|
||||||
|
|
||||||
```bash
|
|
||||||
update-manager check
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🧠 Notes
|
|
||||||
|
|
||||||
* Hosts file is created automatically on first run
|
|
||||||
* Lines starting with `#` are ignored
|
|
||||||
* Empty lines are ignored
|
|
||||||
* Requires passwordless SSH access
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔐 SSH Setup (Required)
|
|
||||||
|
|
||||||
Generate SSH key (if needed):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ssh-keygen
|
|
||||||
```
|
|
||||||
|
|
||||||
Copy key to hosts:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ssh-copy-id user@host
|
|
||||||
```
|
|
||||||
|
|
||||||
Test access:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ssh user@host
|
|
||||||
```
|
|
||||||
|
|
||||||
✔ No password prompt = ready
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🖥️ Terminal UI
|
|
||||||
|
|
||||||
Interactive menu for managing hosts.
|
|
||||||
|
|
||||||
### Start UI
|
|
||||||
|
|
||||||
```bash
|
|
||||||
update-manager-ui
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### UI Features
|
|
||||||
|
|
||||||
* Check all hosts
|
|
||||||
* View hosts file
|
|
||||||
* Edit hosts file
|
|
||||||
* Add host
|
|
||||||
* Remove host
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📁 File Structure
|
|
||||||
|
|
||||||
```txt
|
|
||||||
/opt/update-manager/
|
|
||||||
├── update-manager.sh
|
|
||||||
├── update-manager-ui.sh
|
|
||||||
├── hosts.conf
|
|
||||||
└── update-manager.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⚙️ Configuration
|
|
||||||
|
|
||||||
Default config:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
/etc/update-manager.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
HOSTS_FILE="/opt/update-manager/hosts.conf"
|
|
||||||
SSH_OPTIONS="-o BatchMode=yes -o ConnectTimeout=5"
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 Commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
update-manager check # Check all hosts
|
|
||||||
update-manager update # Run updates on all hosts
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 💡 Philosophy
|
|
||||||
|
|
||||||
* Keep it simple
|
|
||||||
* Keep it transparent
|
|
||||||
* No hidden magic
|
|
||||||
* Pure SSH control
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🧱 Future Ideas
|
|
||||||
|
|
||||||
* Email reports (cron)
|
|
||||||
* Optional web UI
|
|
||||||
* Integration with Lanx monitoring
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ❤️ Built for Lanx
|
|
||||||
|
|
||||||
Designed for clean infrastructure, not enterprise chaos.
|
|
||||||
|
|
||||||
Developed by Ed & NodeFox
|
Developed by Ed & NodeFox
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue