Initial commit: homelab infrastructure wiki

- Full Obsidian vault content
- Host configs (ice, grizzley, ubuntu, proxmox, truenas, panda, hyte)
- Media stack documentation
- Traefik HA setup
- Automation scripts
- Bachelor party planning
This commit is contained in:
Hermes Agent
2026-05-24 16:08:40 -07:00
parent d132442429
commit e4d91aadf9
285 changed files with 30018 additions and 0 deletions

View File

@@ -0,0 +1,110 @@
---
title: Bachelor Party — Data Sources
type: concept
tags: [bachelor-party, data, price-tracking]
created: 2026-05-04
updated: 2026-05-04
confidence: high
---
# Bachelor Party Price Data — Two-Agent Source System
> **IMPORTANT:** There are TWO independent price-scraping agents that BOTH write to the same `history.jsonl`. They must be treated as distinct sources to avoid confusion about data provenance. Chris's local Codex agent on MacBook and the Hermes agent on grizzley both scrape prices independently.
## Architecture Overview
```
┌─────────────────────────────────────────────────────────────────────┐
│ price-watch/history.jsonl │
│ (authoritative price log — single source of truth) │
└─────────────────────┬───────────────────────────────────────────────┘
│ read on server restart / vote reload
┌─────────────────────────────────────────────────────────────────────┐
│ seed-data.js → votes.json │
│ (merged into voting app on restart or reload) │
└─────────────────────┬───────────────────────────────────────────────┘
│ serves
┌─────────────────────────────────────────────────────────────────────┐
│ cabo-vote.local.tophermayor.com :3001 │
│ (voting app — live poll results) │
└─────────────────────────────────────────────────────────────────────┘
```
## Source 1: MacBook Air — Codex Agent (Local)
| Property | Detail |
|----------|--------|
| **Host** | Chris's MacBook Air (local, not on homelab network) |
| **Agent** | OpenAI Codex CLI (`codex`) |
| **Method** | Native Computer Use Plugin — browser automation via Codex's built-in browser tool |
| **Schedule** | Every 4 hours |
| **Output** | Writes to `price-watch/history.jsonl` in the local repo clone |
| **Delivery** | Sends daily email report via AgentMail to toph.homelab@gmail.com |
| **Repo** | Clone of bachelor-party repo on MacBook at `~/hermes/bachelor_party/` |
**Key distinction:** Uses Codex's native browser automation (Computer Use Plugin). Runs locally on Chris's machine. When it scrapes, it writes directly to the local `history.jsonl` file. That file must be pushed to Git and pulled on the server for the voting app to see it.
## Source 2: grizzley — Hermes Agent (Remote/OpenComputerUse)
| Property | Detail |
|----------|--------|
| **Host** | grizzley (192.168.50.84) — Raspberry Pi 5 |
| **Agent** | Hermes Agent (autonomous AI) |
| **Method** | OpenComputerUse project — browser automation via Hermes browser tool |
| **Schedule** | Daily at 8:00 AM (`0 8 * * *`) |
| **Output** | Writes to `price-watch/history.jsonl` in the repo clone on grizzley |
| **Delivery** | Sends Telegram report to topic 1054 "Bachelor Party" in AigentZeroHermes |
| **Repo** | Clone of bachelor-party repo on grizzley at `/home/bear/hermes/bachelor_party/` |
**Cron job name:** `Cabo Bachelor Party Price Tracker — Flights, Hotels, Golf, Clubs & Excursions`
**Job ID:** `1a9f519189fb`
**Key distinction:** Uses the OpenComputerUse project (a browser automation framework) via Hermes's browser tool. Runs on the homelab Pi 5. Same output file, independent run.
## Why Two Sources?
Chris runs Codex locally on his MacBook as a lightweight always-on agent using his own API billing. The Hermes agent on grizzley is the "official" homelab agent that runs on the cluster's schedule and delivers to Telegram. Both are independent browsers hitting the same travel sites.
The risk is **data collision** — if both agents write to `history.jsonl` without coordination, entries can get interleaved or overwritten. The `history.jsonl` format (newline-delimited JSON) is append-oriented, so interleaving is the expected behavior — but this means a single run's report may have gaps if another agent's run truncated the file.
## Data Flow Into the Voting App
```
history.jsonl (price points)
│ manual step or server restart
seed-data.js (hardcoded prices via buildSeedData())
│ mergeSeedData() on server restart
votes.json (authoritative app data)
│ API: GET /api/options, GET /api/categories
cabo-vote.local.tophermayor.com :3001
```
The app does **not** read `history.jsonl` directly. Prices from `history.jsonl` must be manually promoted into `seed-data.js` (by editing the `buildSeedData()` function), then the server must be restarted to reload.
## How to Identify Which Agent Wrote an Entry
Each JSON line in `history.jsonl` has a `checkedAt` timestamp. Entries from the **MacBook Codex agent** will have `source: "computer-use"` or similar in the metadata if the agent tagged them. Entries from **Hermes on grizzley** will come from the OpenComputerUse run and may have different formatting.
If entries are mixed and it's unclear which agent produced them, check:
- **MacBook:** timestamps aligned with local MacBook timezone (PT), typically every 4 hours
- **grizzley:** timestamps aligned with the cron schedule (8 AM daily), in the Pi's timezone
## Reconciling Conflicting Prices
If the two sources report different prices for the same item:
1. Both are valid — they may have scraped at different times on different days
2. Use the **most recent** `checkedAt` timestamp as the authoritative current price
3. If timestamps are the same day, average them or flag for manual review
## Related
- [[bachelor-party/project|Project Overview]]
- [[bachelor-party/voting-app|Voting App]] — deployment and data flow

48
bachelor-party/project.md Normal file
View File

@@ -0,0 +1,48 @@
---
project:
name: Cabo Bachelor Party
status: active
category: personal
source: live-verification
created: 2026-04-30
updated: 2026-05-04
description: Bachelor party planning — San José del Cabo Feb 2-7, 2027 for 14 guests. Price tracking, voting app, and trip coordination.
tags: [bachelor-party, travel, cabo, planning]
---
# Cabo Bachelor Party — Project Overview
**Trip:** Feb 2-7, 2027 | **Group:** 14 guests | **Destination:** San José del Cabo, Mexico
## Destination Shortlist
| Destination | Flight/Person | Flight/Group | Hotel Est. | Notes |
|-------------|--------------|-------------|------------|-------|
| Cabo San Lucas (SJD) | $338 | $4,732 | ~$200/night | Best party vibe, nonstop |
| Maui (OGG) | $478 | $6,692 | $355-$644/night | 5h40m flight, free live music |
| Cancun (CUN) | $524 | $7,336 | TBD | Coco Bongo $55 all-in |
| Mazatlan (MZT) | $381 | $5,334 | TBD | BEST BUDGET — 2-stop rough travel |
## Services
| Service | Host | URL | Notes |
|---------|------|-----|-------|
| Voting App | ubuntu | cabo-vote.local.tophermayor.com | Real-time poll results |
| Price Sheet | Google | [Link](https://docs.google.com/spreadsheets/d/1ZR6KXfdBwtbgtgKypvNZmkSS154gM1pDt0dP5RH0wIo/edit) | Live price tracker |
## Price Data
- **Current data:** Apr 30-May 04, 2026 (seed v5)
- **Google Sheet:** [Cabo Bachelor Party — Price Tracker](https://docs.google.com/spreadsheets/d/1ZR6KXfdBwtbgtgKypvNZmkSS154gM1pDt0dP5RH0wIo/edit)
- **Data sources:** See [[bachelor-party/data-sources|Data Sources]]
## Key Links
- [Costco Travel — Cabo Packages](https://www.costcotravel.com/Vacation-Packages/Mexico/Los-Cabos)
- [Apple Vacations — Cabo](https://www.applevacations.com/destinations/cabo-san-lucas)
- [KAYAK Flights — LAX to SJD](https://www.kayak.com/flights)
## Related
- [[bachelor-party/data-sources|Data Sources]] — Two-agent price tracking system
- [[bachelor-party/voting-app|Voting App]] — cabo-vote deployment and data flow

View File

@@ -0,0 +1,89 @@
---
title: Cabo Vote — Voting App
type: concept
tags: [bachelor-party, voting-app, deployment]
created: 2026-04-30
updated: 2026-05-04
confidence: high
---
# Cabo Vote — Bachelor Party Voting App
Real-time polling app for the Cabo bachelor party. Tracks votes and live prices.
## Service Details
| Property | Value |
|----------|-------|
| **Host** | ubuntu (192.168.50.61) |
| **Container** | `reccollection-backend-local` (Node.js) |
| **Port** | 3001 |
| **URL** | cabo-vote.local.tophermayor.com |
| **Traefik** | ubuntu:8080 → backend:3001 |
| **Data dir** | `/home/bear/RecCollection/data` (bind mount) |
| **Data file** | `votes.json` |
## Data Flow
```
price-watch/history.jsonl ← scraped prices (two sources)
│ ← manual promotion
seed-data.js ← hardcoded via buildSeedData()
│ ← server restart / reload
votes.json ← app's authoritative data store
├──→ server.js ← Express API + WebSocket
└──→ cabo-vote.local ← served as static web app
```
## API Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/categories` | All poll categories |
| GET | `/api/options` | All options with votes and prices |
| GET | `/api/results` | Aggregated vote counts |
| GET | `/` | Static web UI |
## Key Files
| File | Purpose |
|------|---------|
| `voting_app/server.js` | Express server, WebSocket, API routes |
| `voting_app/seed-data.js` | Hardcoded seed prices, `buildSeedData()` |
| `voting_app/data/votes.json` | Persisted votes and prices |
| `voting_app/price-watch/history.jsonl` | Raw scraped price history |
| `voting_app/price-watch/latest-report.md` | Most recent scrape report |
## Price Update Process
1. **Scrape** — Agent (MacBook Codex or grizzley Hermes) scrapes travel sites → `history.jsonl`
2. **Promote** — Manual step: extract prices from report, edit `buildSeedData()` in `seed-data.js`
3. **Restart** — Server reloads: `mergeSeedData()` merges new seed with preserved votes → `votes.json`
4. **Serve** — Fresh prices appear in the UI and API
The `mergeSeedData()` function preserves existing votes when reloading — only the price data from `buildSeedData()` is refreshed.
## Seed Version
Current: **v5** (April 29, 2026)
## Deployment
The app is not containerized separately — it runs as the `reccollection-backend-local` container on ubuntu. It was originally a RecCollection app repurposed for the bachelor party.
To check the container:
```bash
ssh bear@ubuntu "docker ps | grep reccollection"
```
To restart (reload prices from votes.json):
```bash
ssh bear@ubuntu "docker restart reccollection-backend-local"
```
## Related
- [[bachelor-party/project|Project Overview]]
- [[bachelor-party/data-sources|Data Sources]] — Two-agent price tracking