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
125
README.md
125
README.md
|
|
@ -1,113 +1,112 @@
|
|||
# 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
|
||||
- SSH-based (no agents)
|
||||
- Simple host inventory
|
||||
- No external dependencies
|
||||
### 1. Install script
|
||||
|
||||
```bash
|
||||
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>
|
||||
cd update-manager
|
||||
chmod +x update-manager.sh
|
||||
./update-manager.sh install
|
||||
```bash
|
||||
update-manager check
|
||||
```
|
||||
|
||||
This will:
|
||||
This will automatically create:
|
||||
|
||||
- Install the tool in /opt/update-manager
|
||||
- Create global command: update-manager
|
||||
- Create config files if missing
|
||||
```
|
||||
/opt/update-manager/hosts.conf
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
Edit hosts:
|
||||
### 3. Edit hosts file
|
||||
|
||||
```bash
|
||||
nano /opt/update-manager/hosts.conf
|
||||
|
||||
Format:
|
||||
|
||||
name ip ssh_user
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
# 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.20
|
||||
```
|
||||
|
||||
Repeat for all hosts.
|
||||
|
||||
Test:
|
||||
|
||||
ssh user@192.168.1.10
|
||||
|
||||
Should work without password.
|
||||
Passwordless SSH is required for the tool to work.
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
### 5. Run again
|
||||
|
||||
```bash
|
||||
update-manager check
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Output
|
||||
## ✅ Example output
|
||||
|
||||
server1 🔴 2 updates
|
||||
server2 🟢 up-to-date
|
||||
server3 ❌ connection failed
|
||||
```bash
|
||||
===== server1 (192.168.1.10) =====
|
||||
Up-to-date
|
||||
|
||||
===== server2 (192.168.1.20) =====
|
||||
vim-common ...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Config
|
||||
## ⚠️ Requirements
|
||||
|
||||
/etc/update-manager.conf
|
||||
|
||||
Default:
|
||||
|
||||
HOSTS_FILE="/opt/update-manager/hosts.conf"
|
||||
SSH_OPTIONS="-o BatchMode=yes -o ConnectTimeout=5"
|
||||
* SSH access to all servers
|
||||
* SSH keys configured (`ssh-copy-id`)
|
||||
* Debian/Ubuntu-based systems
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
## 📁 Hosts file format
|
||||
|
||||
- hosts.conf and update-manager.conf are local files (not in Git)
|
||||
- .example files are templates
|
||||
- Existing config is not overwritten on reinstall
|
||||
```
|
||||
name ip user
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
web 192.168.1.10 ubuntu
|
||||
db 192.168.1.20 root
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Roadmap
|
||||
## 🧠 Notes
|
||||
|
||||
- update command
|
||||
- parallel execution
|
||||
- scheduled checks
|
||||
- logging integration
|
||||
|
||||
---
|
||||
|
||||
## Philosophy
|
||||
|
||||
Keep it simple.
|
||||
|
||||
- No agents
|
||||
- No dependencies
|
||||
- Just SSH
|
||||
* The hosts file is created automatically on first run
|
||||
* Lines starting with `#` are ignored
|
||||
* Empty lines are ignored
|
||||
* Requires passwordless SSH access
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue