92bed208e0
ARCHITECTURE ============ Backend: FastAPI + uvicorn (port 8000) - JWT authentication with PAM system users - ZFS CLI wrapper with caching (30-60s TTL) - WebSocket pool status broadcaster (30s interval) - Services: auth, zfs_runner, file_manager, shares, identities, system_info - Routers: pools, datasets, snapshots, shares, identities, navigator, system Frontend: Next.js 15 + TypeScript (static export) - Incremental Static Regeneration (ISR) for weak hardware - Type-safe API client (lib/api.ts) - Dark mode + custom Tailwind theme - Pages: Dashboard, Login, Snapshots, Datasets, Shares, etc. DEPLOYMENT ========== Test Target: 192.168.1.179:8090 (Debian LXC) Production: 10.66.120.3:9090 (Raspberry Pi 4GB ARM64) Updater: Automated Gitea-based deployment (update-test.sh, update-pi.sh) FEATURES COMPLETED ================== Phase 3a: Dashboard Quick Stats (System, CPU, Memory, Storage) - Real-time stats with color-coded progress bars - Responsive grid layout (mobile: 1, tablet: 2, desktop: 4 columns) - ISR-optimized for fast loads on weak hardware REBRANDING ========== Renamed throughout: - Project: 'ZFS Manager' → 'ZMB Webui' - Services: 'zfs-manager' → 'zmb-webui' - Systemd units: zfs-manager-backend → zmb-webui-backend - Configuration files and documentation Co-Authored-By: Patrick <patrick@perlbach24.de>
3.0 KiB
3.0 KiB
ZMB Webui — Deployment Guide
Phase 4: Shares Management Feature
✅ Completed
- Backend Shares API (Samba + NFS)
- Frontend Datasets & Shares UI
- API integration
Prerequisites
- Python 3.10+
- Node.js 18+
- Samba installed (for Samba share testing)
- NFS utils installed (for NFS share testing)
- FastAPI + dependencies installed
Deployment Steps
1. Build Frontend
cd frontend
npm install # if needed
npm run build
Output will be in frontend/out/ directory.
2. Install Backend Dependencies
cd backend
pip install -r requirements.txt
3. Test Locally (Development)
cd backend
python main.py
# Listens on http://0.0.0.0:8000
Frontend will be served at:
/— Dashboard (index.html)/login— Login page/datasets— Datasets & Shares management/api/*— API endpoints
4. Testing Checklist
- Login works (uses PAM authentication)
- Dashboard shows pool list
- Datasets tab shows datasets
- Create Samba share (verify
/etc/samba/smb.confupdated) - Create NFS share (verify
/etc/exportsupdated) - Delete Samba share
- Delete NFS share
- Share list refreshes after operations
5. Deploy to Container (192.168.1.179)
# Copy frontend build
scp -r frontend/out/* root@192.168.1.179:/path/to/frontend/out/
# Copy backend (if changes made)
scp -r backend/* root@192.168.1.179:/path/to/backend/
# Restart service on container
ssh root@192.168.1.179 'systemctl restart zmb-webui'
6. Production Deployment (Pi 10.66.120.3)
See DEPLOYMENT_PI.md for full setup with systemd service.
API Endpoints
Samba Shares:
GET /api/shares/samba— List sharesPOST /api/shares/samba— Create shareDELETE /api/shares/samba/{name}— Delete share
NFS Shares:
GET /api/shares/nfs— List sharesPOST /api/shares/nfs— Create shareDELETE /api/shares/nfs?path=...— Delete share
All endpoints require Authorization: Bearer {token} header.
Config Files Modified
/etc/samba/smb.conf— Samba share definitions/etc/exports— NFS export definitions
Troubleshooting
Shares not showing up:
- Check file permissions on
/etc/samba/smb.confand/etc/exports - Verify Samba and NFS services are running
- Check backend logs:
docker logs <container>or systemd journal
Create share fails:
- Check file permissions
- Verify
smbcontrolandexportfscommands available - Check backend logs for subprocess errors
Authentication fails:
- Verify user exists on system (PAM auth uses system users)
- Check token validity (8-hour expiry)
- Clear browser cache and localStorage
Performance Notes
- Static export frontend: ~2MB bundle
- Backend RAM: ~50MB (FastAPI + services)
- Total with Samba/NFS: ~100MB
- Suitable for 512MB+ RAM environments
Next Features
- Pool Detail Page with VDEV visualization
- Alerts & Monitoring system
- Advanced ZFS property management
- Backup scheduling