hvac-kia-content/DEPLOY.md
Ben Reed 7e5377e7b1 docs: Update all documentation to use hkia naming convention
Documentation Updates:
- Updated project specification with hkia naming and paths
- Modified all markdown documentation files (12 files updated)
- Changed service names from hvac-content-* to hkia-content-*
- Updated NAS paths from /mnt/nas/hvacknowitall to /mnt/nas/hkia
- Replaced all instances of "HVAC Know It All" with "HKIA"

Files Updated:
- README.md - Updated service names and commands
- CLAUDE.md - Updated environment variables and paths
- DEPLOY.md - Updated deployment instructions
- docs/project_specification.md - Updated naming convention specs
- docs/status.md - Updated project status with new naming
- docs/final_status.md - Updated completion status
- docs/deployment_strategy.md - Updated deployment paths
- docs/DEPLOYMENT_CHECKLIST.md - Updated checklist items
- docs/PRODUCTION_TODO.md - Updated production tasks
- BACKLOG_STATUS.md - Updated backlog references
- UPDATED_CAPTURE_STATUS.md - Updated capture status
- FINAL_TALLY_REPORT.md - Updated tally report

Notes:
- Repository name remains hvacknowitall-content (unchanged)
- Project directory remains hvac-kia-content (unchanged)
- All user-facing outputs now use clean "hkia" naming

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-19 13:40:27 -03:00

124 lines
No EOL
3 KiB
Markdown

# Deployment Instructions
## Prerequisites
Ensure the following are completed:
1. Python environment is set up with `uv`
2. All dependencies installed: `uv pip install -r requirements.txt`
3. `.env` file configured with API credentials
4. Test run successful: `uv run python run_api_production_v2.py`
## Deploy to Production
### Option 1: Automated Installation (Recommended)
```bash
cd /home/ben/dev/hvac-kia-content/deploy
sudo ./install.sh
```
This will:
- Copy systemd service files to `/etc/systemd/system/`
- Enable and start the timers
- Show service status
### Option 2: Manual Installation
```bash
# Copy service files
sudo cp deploy/*.service /etc/systemd/system/
sudo cp deploy/*.timer /etc/systemd/system/
# Reload systemd
sudo systemctl daemon-reload
# Enable timers (start on boot)
sudo systemctl enable hkia-content-8am.timer
sudo systemctl enable hkia-content-12pm.timer
# Start timers immediately
sudo systemctl start hkia-content-8am.timer
sudo systemctl start hkia-content-12pm.timer
```
## Verify Deployment
Check timer status:
```bash
systemctl list-timers | grep hvac
```
Expected output:
```
NEXT LEFT LAST PASSED UNIT ACTIVATES
Mon 2025-08-20 08:00:00 ADT 21h left n/a n/a hkia-content-8am.timer hkia-content-8am.service
Mon 2025-08-19 12:00:00 ADT 1h 9min left n/a n/a hkia-content-12pm.timer hkia-content-12pm.service
```
## Monitor Services
View logs in real-time:
```bash
# Morning run logs
journalctl -u hkia-content-8am -f
# Noon run logs
journalctl -u hkia-content-12pm -f
# All logs
journalctl -u hkia-content-* -f
```
## Manual Testing
Run the service manually:
```bash
# Test morning run
sudo systemctl start hkia-content-8am.service
# Check status
sudo systemctl status hkia-content-8am.service
```
## Stop/Disable Services
If needed:
```bash
# Stop timers
sudo systemctl stop hkia-content-8am.timer
sudo systemctl stop hkia-content-12pm.timer
# Disable from starting on boot
sudo systemctl disable hkia-content-8am.timer
sudo systemctl disable hkia-content-12pm.timer
```
## Troubleshooting
### Service Fails to Start
1. Check logs: `journalctl -u hkia-content-8am -n 50`
2. Verify paths in service files
3. Check Python environment: `source .venv/bin/activate && python --version`
4. Test manual run: `cd /home/ben/dev/hvac-kia-content && uv run python run_api_production_v2.py`
### Permission Issues
- Ensure user `ben` has read/write access to data directories
- Check NAS mount permissions: `ls -la /mnt/nas/hkia/`
### Timer Not Triggering
- Check timer status: `systemctl status hkia-content-8am.timer`
- Verify system time: `timedatectl`
- Check timer schedule: `systemctl cat hkia-content-8am.timer`
## Schedule
The system runs automatically at:
- **8:00 AM ADT** - Morning content aggregation
- **12:00 PM ADT** - Noon content aggregation
Both runs will:
1. Fetch new content from all sources
2. Merge with existing cumulative files
3. Update metrics and add captions where available
4. Archive previous versions
5. Sync to NAS at `/mnt/nas/hkia/`