Skip to content

Commit 2ae0f58

Browse files
committed
docs: updated documentation
1 parent 0f585d9 commit 2ae0f58

7 files changed

Lines changed: 272 additions & 16 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Most homelab setups require weeks of configuration, trial and error, and manual
2323

2424
| Feature | Description |
2525
|---------|-------------|
26-
| 🚀 **One-Command Deploy** | Entire infrastructure deployed with `task ansible:deploy:full` |
26+
| 🚀 **One-Command Deploy** | Entire infrastructure deployed with `task ansible:deploy` |
2727
| 🔐 **Centralized SSO** | Authentik integrated with 8+ services for unified authentication |
2828
| 📊 **Full Observability** | Prometheus + Grafana + Loki for metrics, dashboards, and logs |
2929
| 🔒 **Automatic SSL** | Traefik + Cloudflare for zero-config HTTPS certificates |
@@ -222,7 +222,7 @@ task ansible:bootstrap
222222
task ansible:cluster:init
223223

224224
# Deploy all services
225-
task ansible:deploy:full
225+
task ansible:deploy
226226
```
227227

228228
### 3. Access Your Services

docs/architecture/storage.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,125 @@ volumes:
433433
434434
**Solution:** SQLite database on OCFS2 cluster filesystem
435435
436+
## Ansible Storage Role
437+
438+
The `ansible/roles/storage` role automates the full iSCSI + OCFS2 setup across all cluster nodes. It is invoked during bootstrap and runs only when `iscsi_enabled` is `true`.
439+
440+
### What the Role Does
441+
442+
**`tasks/main.yml`** - Entry point that conditionally includes:
443+
1. `ocfs2-setup.yml` - Installs `ocfs2-tools`, configures the O2CB cluster daemon, and brings the `homelab` cluster online
444+
2. `iscsi-mount.yml` - Discovers iSCSI targets, logs in, creates OCFS2 filesystems (first run only), mounts them, and verifies cluster-wide access
445+
446+
**`tasks/ocfs2-setup.yml`** - Configures the OCFS2 cluster stack:
447+
- Installs `ocfs2-tools` package
448+
- Writes `/etc/ocfs2/cluster.conf` from a Jinja2 template
449+
- Enables and starts the `o2cb` systemd service
450+
- Brings the `homelab` cluster online and verifies status
451+
452+
**`tasks/iscsi-mount.yml`** - Loop-based iSCSI mounting (supports up to 3 mounts):
453+
- Discovers all iSCSI targets from the NAS via `iscsiadm`
454+
- Logs into each enabled target and verifies active sessions
455+
- Creates OCFS2 filesystems on first use (`mkfs.ocfs2`, runs once on manager)
456+
- Creates mount points and adds entries to `/etc/fstab`
457+
- Mounts OCFS2 filesystems and verifies write access on every node
458+
- Runs a cluster test to confirm the shared filesystem is visible across all nodes
459+
460+
### Configuration Variables
461+
462+
All variables are defined in `ansible/inventory/group_vars/all.yml` and sourced from the root `.env` file:
463+
464+
#### Primary iSCSI Mount (`media-apps`)
465+
466+
| Variable | Default | Description |
467+
|----------|---------|-------------|
468+
| `iscsi_enabled` | `false` | Master switch - enables the storage role |
469+
| `iscsi_target_ip` | `192.168.86.189` | NAS IP address hosting the iSCSI target |
470+
| `iscsi_target_port` | `3260` | iSCSI target port |
471+
| `iscsi_target_iqn` | *(required)* | IQN of the iSCSI target for media-apps |
472+
| `iscsi_mount_path` | `/mnt/iscsi/media-apps` | Mount point on cluster nodes |
473+
474+
#### Second iSCSI Mount (`app-data`)
475+
476+
| Variable | Default | Description |
477+
|----------|---------|-------------|
478+
| `iscsi_app_data_enabled` | `false` | Enable the app-data mount |
479+
| `iscsi_app_data_iqn` | *(required)* | IQN of the iSCSI target for app-data |
480+
| `iscsi_app_data_mount_path` | `/mnt/iscsi/app-data` | Mount point on cluster nodes |
481+
482+
#### Third iSCSI Mount (`cache`)
483+
484+
| Variable | Default | Description |
485+
|----------|---------|-------------|
486+
| `iscsi_cache_enabled` | `false` | Enable the cache mount |
487+
| `iscsi_cache_iqn` | *(required)* | IQN of the iSCSI target for cache |
488+
| `iscsi_cache_mount_path` | `/mnt/iscsi/cache` | Mount point on cluster nodes |
489+
490+
### How to Enable iSCSI Mounts
491+
492+
**Step 1: Configure iSCSI targets on your NAS**
493+
494+
Create iSCSI LUNs on your NAS (OpenMediaVault, TrueNAS, etc.) and note the IQN for each. Common IQN format:
495+
```
496+
iqn.2023-01.com.example:storage.media-apps
497+
```
498+
499+
**Step 2: Add variables to your `.env` file**
500+
501+
```bash
502+
# Enable iSCSI storage
503+
ISCSI_ENABLED=true
504+
NAS_IP=192.168.1.100 # Your NAS IP
505+
ISCSI_TARGET_PORT=3260 # Default iSCSI port
506+
ISCSI_TARGET_IQN=iqn.2023-01.com.example:storage.media-apps
507+
ISCSI_MOUNT_PATH=/mnt/iscsi/media-apps
508+
509+
# Optional: app-data mount
510+
ISCSI_APP_DATA_ENABLED=true
511+
ISCSI_APP_DATA_IQN=iqn.2023-01.com.example:storage.app-data
512+
ISCSI_APP_DATA_MOUNT_PATH=/mnt/iscsi/app-data
513+
514+
# Optional: cache mount
515+
ISCSI_CACHE_ENABLED=true
516+
ISCSI_CACHE_IQN=iqn.2023-01.com.example:storage.cache
517+
ISCSI_CACHE_MOUNT_PATH=/mnt/iscsi/cache
518+
```
519+
520+
**Step 3: Run bootstrap to configure storage**
521+
522+
```bash
523+
# Re-run bootstrap to apply storage configuration
524+
task ansible:bootstrap
525+
526+
# Or run with the storage tag only
527+
task ansible:tags -- storage,iscsi
528+
```
529+
530+
**Step 4: Verify mounts**
531+
532+
```bash
533+
# Check active iSCSI sessions
534+
task ansible:cmd -- iscsiadm -m session
535+
536+
# Verify OCFS2 mounts
537+
task ansible:cmd -- mount | grep ocfs2
538+
539+
# Check iSCSI/OCFS2 reconfigure (if NAS IP changed)
540+
task ansible:iscsi:reconfigure -- -e "old_nas_ip=192.168.1.100"
541+
```
542+
543+
### Role Tags
544+
545+
The storage role tasks are tagged for selective execution:
546+
547+
- `storage` - All storage-related tasks
548+
- `iscsi` - iSCSI-specific tasks (subset of `storage`)
549+
550+
```bash
551+
# Run only storage tasks during bootstrap
552+
task ansible:tags -- storage
553+
```
554+
436555
## Summary
437556

438557
The hybrid storage architecture provides:

docs/getting-started/quick-start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ task ansible:bootstrap
105105
task ansible:cluster:init
106106

107107
# Deploy all services
108-
task ansible:deploy:full
108+
task ansible:deploy
109109
```
110110
Or deploy specific services only:
111111
```bash
@@ -162,7 +162,7 @@ The Homepage dashboard will show all your deployed services!
162162

163163
```bash
164164
# Deployment Commands
165-
task ansible:deploy:full # Deploy all services
165+
task ansible:deploy # Deploy all services
166166
task ansible:deploy:stack -- -e "stack_name=service1" # Deploy a specific service
167167

168168
# Cluster Management

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ A Docker Swarm-based homelab deployment platform that simplifies running multipl
7575

7676
---
7777

78-
Deploy everything with `task ansible:deploy:full` after a one-time setup.
78+
Deploy everything with `task ansible:deploy` after a one-time setup.
7979

8080
</div>
8181

@@ -163,7 +163,7 @@ task ansible:install
163163
# 5. Deploy everything
164164
task ansible:bootstrap
165165
task ansible:cluster:init
166-
task ansible:deploy:full
166+
task ansible:deploy
167167
```
168168

169169
**That's it!** All services deploy automatically with:

docs/roadmap.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ Our mission is to create the ultimate self-hosting platform that makes running y
8484
8585
```
8686

87-
## ✅ MILE 2: Essential Services (25 Deployed)
88-
**Status:** COMPLETED • **Services Live:** 25
87+
## ✅ MILE 2: Essential Services (27 Deployed)
88+
**Status:** COMPLETED • **Services Live:** 27
8989

9090
### 🏗️ Infrastructure Layer
9191
- ✅ Technitium DNS - Local DNS server
@@ -120,18 +120,20 @@ Our mission is to create the ultimate self-hosting platform that makes running y
120120

121121
### 🛡️ Prepper & Resilience
122122
- ✅ Kiwix - Offline Wikipedia (119GB) + Project Gutenberg + Stack Overflow + Medical knowledge
123+
- ✅ Kolibri - Offline K-12 educational platform (Khan Academy, CK-12, and more)
123124

124125
### 🔐 Security & Privacy
125126
- ✅ Vaultwarden - Password manager (with Authentik SSO)
126127

127128
### 🤖 AI & Development
128129
- ✅ LibreChat - AI chat interface
129130
- ✅ MLflow - ML experiment tracking
131+
- ✅ Forgejo - Self-hosted Git service with issue tracking and CI/CD
130132

131133
### 💾 Backup & Recovery
132134
- ✅ Kopia - Automated encrypted backups to Backblaze B2
133135

134-
**Rest Stop Summary:** Production platform with 25 services ✅
136+
**Rest Stop Summary:** Production platform with 27 services ✅
135137

136138
---
137139

@@ -196,16 +198,21 @@ Our mission is to create the ultimate self-hosting platform that makes running y
196198

197199
## 🗺️ The Road Ahead: Future Destinations
198200

201+
### ✅ Recently Completed
202+
203+
| Service | Details |
204+
|---------|---------|
205+
| **Forgejo** | Self-hosted Git service with PostgreSQL backend, Authentik OIDC SSO, SSH access on port 2222, and iSCSI storage. Deployed at `git.yourdomain.com` |
206+
| **Kolibri** | Offline K-12 educational platform with Khan Academy content, hybrid iSCSI + CIFS storage, optional Authentik OIDC. Deployed at `kolibri.yourdomain.com` |
207+
199208
### 🎯 NEEDS (High Priority - Real Gaps to Fill)
200209

201210
| Need / Current Gap | Solution | Why It Matters |
202211
|-------------------|----------|----------------|
203212
| **Document Management & Archival**<br>No system for organizing scanned documents, PDFs, receipts, tax forms, contracts | **Paperless-ngx** | Long-term archival with OCR, tagging, full-text search, automated organization |
204213
| **File Sync, Calendar, & Contacts**<br>No unified cloud storage replacement or calendar/contacts synchronization | **NextCloud** | Self-hosted file sync across devices, calendar management, contacts storage, document collaboration |
205-
| **Source Code Hosting**<br>No local git repository with issue tracking and CI/CD capabilities | **Forgejo**<br>(community-driven Gitea fork) | Self-hosted git repos, issue tracking, pull requests, built-in CI/CD pipelines |
206214
| **Offline AI Assistance**<br>LibreChat requires external API calls - no true offline AI capability | **Ollama**<br>(integrates with LibreChat) | Run LLMs locally for offline AI assistance, privacy, no API costs |
207215
| **Offline Navigation Maps**<br>Kiwix has OSM Wiki documentation but not actual map tiles for GPS navigation | **OpenStreetMap Tile Server** | Render and serve map tiles locally for offline navigation and mapping apps |
208-
| **Offline Educational Content**<br>Wikipedia provides general knowledge but lacks structured K-12 curriculum with video lessons | **Kolibri**<br>(Khan Academy content) | Structured learning paths, video lessons, interactive exercises, progress tracking |
209216
| **Web Page Archiving**<br>No way to preserve important websites before they disappear or change | **ArchiveBox** | Archive critical web pages, articles, and sites for offline reference and preservation |
210217

211218
---

docs/services/index.md

Lines changed: 101 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,21 @@ Browse our comprehensive catalog of self-hosted services. Each service is pre-co
8686

8787
**1 service available**
8888

89+
- :material-source-branch: **[Development & CI/CD](#development-cicd)**
90+
91+
---
92+
93+
Self-hosted source code hosting and collaboration
94+
95+
**1 service available**
96+
8997
- :material-book-open-variant: **[Knowledge & Learning](#knowledge-learning)**
9098

9199
---
92100

93101
Offline knowledge bases and reference materials
94102

95-
**1 service available**
103+
**2 services available**
96104

97105
- :material-view-dashboard: **[Core Infrastructure](#core-infrastructure)**
98106

@@ -1102,6 +1110,52 @@ task ansible:deploy:stack -- -e "stack_name=mlflow"
11021110

11031111
---
11041112

1113+
## Development & CI/CD
1114+
1115+
### Forgejo {#forgejo}
1116+
1117+
<div class="service-card">
1118+
1119+
**Self-hosted lightweight software forge with Git hosting and CI/CD**
1120+
1121+
- **Domain**: `git.yourdomain.com`
1122+
- **Port**: `3000` (web), `2222` (SSH)
1123+
- **Status**: ✅ Available
1124+
- **Tags**: `development` `git` `ci-cd` `code` `sso`
1125+
1126+
#### Features
1127+
- Git repository hosting with web interface
1128+
- Issue tracking and pull requests
1129+
- Wiki and project management
1130+
- SSH and HTTPS clone support
1131+
- Built-in CI/CD pipeline (Forgejo Actions)
1132+
- Lightweight Gitea fork by the community
1133+
1134+
#### Authentik SSO Integration
1135+
- **Method**: OAuth/OIDC
1136+
- Group-based admin rights via `forgejo-admins` group
1137+
- Users can link existing local accounts to SSO
1138+
1139+
#### Storage Requirements
1140+
- PostgreSQL data: iSCSI mount (`/mnt/iscsi/app-data/forgejo/postgresql`)
1141+
- Git repositories: iSCSI mount (`/mnt/iscsi/app-data/forgejo/data`)
1142+
- Configuration: iSCSI mount (`/mnt/iscsi/app-data/forgejo/config`)
1143+
1144+
#### Prerequisites
1145+
- iSCSI storage directories created and permissions set
1146+
- PostgreSQL credentials configured
1147+
1148+
#### Quick Deploy
1149+
```bash
1150+
task ansible:deploy:stack -- -e "stack_name=forgejo"
1151+
```
1152+
1153+
[Learn more about Forgejo →](https://forgejo.org/)
1154+
1155+
</div>
1156+
1157+
---
1158+
11051159
## Knowledge & Learning
11061160

11071161
### Kiwix {#kiwix}
@@ -1156,6 +1210,49 @@ task ansible:deploy:stack -- -e "stack_name=kiwix"
11561210

11571211
</div>
11581212

1213+
### Kolibri {#kolibri}
1214+
1215+
<div class="service-card">
1216+
1217+
**Offline educational platform with structured K-12 curriculum content**
1218+
1219+
- **Domain**: `kolibri.yourdomain.com`
1220+
- **Port**: `8080`
1221+
- **Status**: ✅ Available
1222+
- **Tags**: `knowledge` `offline` `education` `k12` `sso`
1223+
1224+
#### Features
1225+
- Structured learning paths with video lessons and exercises
1226+
- Khan Academy, CK-12, and other educational content channels
1227+
- User management with learner, coach, and admin roles
1228+
- Classroom and progress tracking for coaches
1229+
- Full-text search across imported content
1230+
- No internet required after content download
1231+
1232+
#### Authentik SSO Integration
1233+
- **Method**: OAuth/OIDC (via kolibri-oidc-client-plugin)
1234+
- Auto-registration enabled for new users
1235+
1236+
#### Storage Requirements
1237+
- Application data (SQLite DB, user data): iSCSI mount (`/mnt/iscsi/app-data/kolibri`) - 5-10 GB
1238+
- Educational content (videos, exercises): CIFS mount (`//${NAS_SERVER}/kolibri_content`) - 20-200 GB
1239+
1240+
#### Prerequisites
1241+
- iSCSI storage for application database
1242+
- CIFS share on NAS for educational content
1243+
- Authentik OIDC provider configured (optional, for SSO)
1244+
1245+
#### Quick Deploy
1246+
```bash
1247+
task ansible:deploy:stack -- -e "stack_name=kolibri"
1248+
```
1249+
1250+
**Offline Education**: Provides structured K-12 curriculum access during network outages or for environments with limited connectivity.
1251+
1252+
[Learn more about Kolibri →](https://learningequality.org/kolibri/)
1253+
1254+
</div>
1255+
11591256
---
11601257

11611258
## Core Infrastructure
@@ -1260,9 +1357,10 @@ Consider contributing your service definition to help others!
12601357
| Home Automation | 2 |
12611358
| AI & Chat | 1 |
12621359
| Development & ML | 1 |
1263-
| Knowledge & Learning | 1 |
1360+
| Development & CI/CD | 1 |
1361+
| Knowledge & Learning | 2 |
12641362
| Core Infrastructure | 1 |
1265-
| **Total Application Services** | **25** |
1363+
| **Total Application Services** | **27** |
12661364

12671365
**Plus 4 Infrastructure Stacks:**
12681366
- Traefik (Reverse Proxy)

0 commit comments

Comments
 (0)