Update README with first-time setup guide
This commit is contained in:
parent
41d09ea542
commit
9b52c19d86
1 changed files with 64 additions and 65 deletions
129
README.md
129
README.md
|
|
@ -1,113 +1,112 @@
|
||||||
# Update Manager
|
# Update Manager
|
||||||
|
|
||||||
Lightweight SSH-based update manager for Linux systems.
|
Simple tool to check for available updates on multiple Linux servers via SSH.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Features
|
## 🚀 First Time Setup
|
||||||
|
|
||||||
- Check for updates across multiple hosts
|
### 1. Install script
|
||||||
- SSH-based (no agents)
|
|
||||||
- Simple host inventory
|
```bash
|
||||||
- No external dependencies
|
sudo mkdir -p /opt/update-manager
|
||||||
|
sudo cp update-manager.sh /opt/update-manager/
|
||||||
|
sudo chmod +x /opt/update-manager/update-manager.sh
|
||||||
|
|
||||||
|
sudo ln -s /opt/update-manager/update-manager.sh /usr/local/bin/update-manager
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Installation
|
### 2. Run for the first time
|
||||||
|
|
||||||
git clone <repo-url>
|
```bash
|
||||||
cd update-manager
|
update-manager check
|
||||||
chmod +x update-manager.sh
|
```
|
||||||
./update-manager.sh install
|
|
||||||
|
|
||||||
This will:
|
This will automatically create:
|
||||||
|
|
||||||
- Install the tool in /opt/update-manager
|
```
|
||||||
- Create global command: update-manager
|
/opt/update-manager/hosts.conf
|
||||||
- Create config files if missing
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Configuration
|
### 3. Edit hosts file
|
||||||
|
|
||||||
Edit hosts:
|
|
||||||
|
|
||||||
|
```bash
|
||||||
nano /opt/update-manager/hosts.conf
|
nano /opt/update-manager/hosts.conf
|
||||||
|
```
|
||||||
Format:
|
|
||||||
|
|
||||||
name ip ssh_user
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
server1 192.168.1.10 user
|
```bash
|
||||||
server2 192.168.1.20 user
|
# name ip user
|
||||||
|
server1 192.168.1.10 user
|
||||||
|
server2 192.168.1.20 user
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## SSH (required)
|
### 4. Setup SSH access (required)
|
||||||
|
|
||||||
Passwordless SSH must be configured.
|
From your main machine:
|
||||||
|
|
||||||
ssh-keygen -t ed25519
|
```bash
|
||||||
ssh-copy-id user@192.168.1.10
|
ssh-copy-id user@192.168.1.10
|
||||||
|
ssh-copy-id user@192.168.1.20
|
||||||
|
```
|
||||||
|
|
||||||
Repeat for all hosts.
|
Passwordless SSH is required for the tool to work.
|
||||||
|
|
||||||
Test:
|
|
||||||
|
|
||||||
ssh user@192.168.1.10
|
|
||||||
|
|
||||||
Should work without password.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Usage
|
### 5. Run again
|
||||||
|
|
||||||
|
```bash
|
||||||
update-manager check
|
update-manager check
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Output
|
## ✅ Example output
|
||||||
|
|
||||||
server1 🔴 2 updates
|
```bash
|
||||||
server2 🟢 up-to-date
|
===== server1 (192.168.1.10) =====
|
||||||
server3 ❌ connection failed
|
Up-to-date
|
||||||
|
|
||||||
|
===== server2 (192.168.1.20) =====
|
||||||
|
vim-common ...
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Config
|
## ⚠️ Requirements
|
||||||
|
|
||||||
/etc/update-manager.conf
|
* SSH access to all servers
|
||||||
|
* SSH keys configured (`ssh-copy-id`)
|
||||||
Default:
|
* Debian/Ubuntu-based systems
|
||||||
|
|
||||||
HOSTS_FILE="/opt/update-manager/hosts.conf"
|
|
||||||
SSH_OPTIONS="-o BatchMode=yes -o ConnectTimeout=5"
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Notes
|
## 📁 Hosts file format
|
||||||
|
|
||||||
- hosts.conf and update-manager.conf are local files (not in Git)
|
```
|
||||||
- .example files are templates
|
name ip user
|
||||||
- Existing config is not overwritten on reinstall
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
web 192.168.1.10 ubuntu
|
||||||
|
db 192.168.1.20 root
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Roadmap
|
## 🧠 Notes
|
||||||
|
|
||||||
- update command
|
* The hosts file is created automatically on first run
|
||||||
- parallel execution
|
* Lines starting with `#` are ignored
|
||||||
- scheduled checks
|
* Empty lines are ignored
|
||||||
- logging integration
|
* Requires passwordless SSH access
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Philosophy
|
|
||||||
|
|
||||||
Keep it simple.
|
|
||||||
|
|
||||||
- No agents
|
|
||||||
- No dependencies
|
|
||||||
- Just SSH
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue