Update HOW-TO-GUIDE.md: Use vim instead of nano, clarify workstation terminology
- Changed all references from 'nano' to 'vim' editor - Added new 'Terminology' section explaining: - What 'workstation' means (your main development machine) - Difference between workstation and VPS - What a repository is - Enhanced Workflow 1 with detailed explanation of workstation usage - Added examples of workstation machines (laptop, desktop, etc.) - Clarified when to use workstation vs VPS workflows This makes the guide more accessible for users unfamiliar with homelab terminology.
This commit is contained in:
@@ -4,6 +4,7 @@ Quick reference guide for using Gitea at http://100.120.125.113:3000 to manage y
|
|||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
- [Getting Started](#getting-started)
|
- [Getting Started](#getting-started)
|
||||||
|
- [Terminology](#terminology)
|
||||||
- [Cloning Repositories](#cloning-repositories)
|
- [Cloning Repositories](#cloning-repositories)
|
||||||
- [Making Changes](#making-changes)
|
- [Making Changes](#making-changes)
|
||||||
- [Pushing Changes](#pushing-changes)
|
- [Pushing Changes](#pushing-changes)
|
||||||
@@ -25,6 +26,30 @@ Quick reference guide for using Gitea at http://100.120.125.113:3000 to manage y
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Terminology
|
||||||
|
|
||||||
|
### Workstation
|
||||||
|
Your **main development machine** where you do most of your work. This could be:
|
||||||
|
- Your laptop (MacBook, Windows laptop, Linux laptop)
|
||||||
|
- Your desktop computer
|
||||||
|
- Any machine you consider your primary development environment
|
||||||
|
|
||||||
|
**Not** a VPS - it's a machine you have physical access to or directly control.
|
||||||
|
|
||||||
|
### VPS
|
||||||
|
A **Virtual Private Server** - a remote machine hosted in the cloud or on another system. Examples:
|
||||||
|
- Your system-apps VPS at your hosting provider
|
||||||
|
- Remote servers you manage
|
||||||
|
- Machines you SSH into rather than use directly
|
||||||
|
|
||||||
|
### Repository
|
||||||
|
A project folder tracked by git with version history. Each repository can be:
|
||||||
|
- `homelab-agents` - The shared agents repository
|
||||||
|
- `vps-system-apps` - Your VPS configuration repository
|
||||||
|
- Any other project you create
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Cloning Repositories
|
## Cloning Repositories
|
||||||
|
|
||||||
Cloning creates a local copy of a repository on your workstation or VPS.
|
Cloning creates a local copy of a repository on your workstation or VPS.
|
||||||
@@ -56,7 +81,7 @@ This creates a `~/projects/system-apps` directory with Docker, scripts, and docu
|
|||||||
|
|
||||||
**Use Cases:**
|
**Use Cases:**
|
||||||
- Setting up a new VPS with existing configuration
|
- Setting up a new VPS with existing configuration
|
||||||
- Cloning on your main workstation for editing
|
- Cloning on your workstation for editing
|
||||||
- Working on system configuration with version history
|
- Working on system configuration with version history
|
||||||
|
|
||||||
### Clone Any Other Project Repository
|
### Clone Any Other Project Repository
|
||||||
@@ -185,30 +210,42 @@ To http://100.120.125.113:3000/pdm/vps-system-apps.git
|
|||||||
|
|
||||||
## Common Workflows
|
## Common Workflows
|
||||||
|
|
||||||
### Workflow 1: Edit on Workstation, Push to Gitea
|
### Workflow 1: Edit on Your Workstation, Push to Gitea
|
||||||
|
|
||||||
|
**Workstation** = Your main development machine (laptop, desktop, etc.)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# On your main workstation
|
# Step 1: On your workstation, clone the repository
|
||||||
|
# (e.g., your laptop or desktop computer)
|
||||||
git clone http://100.120.125.113:3000/pdm/vps-system-apps.git ~/projects/system-apps
|
git clone http://100.120.125.113:3000/pdm/vps-system-apps.git ~/projects/system-apps
|
||||||
|
|
||||||
# Edit files in ~/projects/system-apps/
|
# Step 2: Edit files on your workstation using vim, VS Code, or any editor
|
||||||
# Update docker-compose.yml, scripts, etc.
|
cd ~/projects/system-apps
|
||||||
|
vim docker-compose/docker-compose.yml
|
||||||
|
vim scripts/deploy.sh
|
||||||
|
|
||||||
# Check what changed
|
# Step 3: Check what you changed
|
||||||
git status
|
git status
|
||||||
|
|
||||||
# Stage and commit
|
# Step 4: Stage and commit
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "Update Docker services with new health checks"
|
git commit -m "Update Docker services with new health checks"
|
||||||
|
|
||||||
# Push to Gitea
|
# Step 5: Push to Gitea
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
||||||
|
# Now your changes are backed up on Gitea and can be deployed to your VPS
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**When to use this workflow:**
|
||||||
|
- Editing configuration files on your computer
|
||||||
|
- Writing scripts and documentation
|
||||||
|
- Testing changes before deploying to VPS
|
||||||
|
|
||||||
### Workflow 2: Update Agents on VPS
|
### Workflow 2: Update Agents on VPS
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# On your VPS
|
# On your VPS (remote server)
|
||||||
cd ~/.homelab-agents
|
cd ~/.homelab-agents
|
||||||
|
|
||||||
# Get latest agents from Gitea
|
# Get latest agents from Gitea
|
||||||
@@ -221,11 +258,11 @@ cat agents/sysadmin-session-closer.md
|
|||||||
### Workflow 3: Work on VPS, Backup to Gitea
|
### Workflow 3: Work on VPS, Backup to Gitea
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# On your VPS
|
# On your VPS (remote server)
|
||||||
cd ~/projects/system-apps
|
cd ~/projects/system-apps
|
||||||
|
|
||||||
# Make changes to configurations
|
# Make changes directly on the VPS
|
||||||
nano scripts/backup.sh
|
vim scripts/backup.sh
|
||||||
vim docker-compose/docker-compose.yml
|
vim docker-compose/docker-compose.yml
|
||||||
|
|
||||||
# Back up your work to Gitea
|
# Back up your work to Gitea
|
||||||
|
|||||||
Reference in New Issue
Block a user