Files
claudetools/docs/archives/deployment-old/MANUAL_DEPLOY_SIMPLE.txt
Mike Swanson 06f7617718 feat: Major directory reorganization and cleanup
Reorganized project structure for better maintainability and reduced
disk usage by 95.9% (11 GB -> 451 MB).

Directory Reorganization (85% reduction in root files):
- Created docs/ with subdirectories (deployment, testing, database, etc.)
- Created infrastructure/vpn-configs/ for VPN scripts
- Moved 90+ files from root to organized locations
- Archived obsolete documentation (context system, offline mode, zombie debugging)
- Moved all test files to tests/ directory
- Root directory: 119 files -> 18 files

Disk Cleanup (10.55 GB recovered):
- Deleted Rust build artifacts: 9.6 GB (target/ directories)
- Deleted Python virtual environments: 161 MB (venv/ directories)
- Deleted Python cache: 50 KB (__pycache__/)

New Structure:
- docs/ - All documentation organized by category
- docs/archives/ - Obsolete but preserved documentation
- infrastructure/ - VPN configs and SSH setup
- tests/ - All test files consolidated
- logs/ - Ready for future logs

Benefits:
- Cleaner root directory (18 vs 119 files)
- Logical organization of documentation
- 95.9% disk space reduction
- Faster navigation and discovery
- Better portability (build artifacts excluded)

Build artifacts can be regenerated:
- Rust: cargo build --release (5-15 min per project)
- Python: pip install -r requirements.txt (2-3 min)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 20:42:28 -07:00

99 lines
3.1 KiB
Plaintext

================================================================================
MANUAL DEPLOYMENT - Interactive SSH Session
================================================================================
Step 1: Open SSH Connection
----------------------------
In PowerShell, run:
plink guru@172.16.3.30
Enter your password. You should see:
guru@gururmm:~$
Step 2: Check if file was copied
---------------------------------
In the SSH session, type:
ls -lh /tmp/conv.py
If it says "No such file or directory":
- Exit SSH (type: exit)
- Run: pscp D:\ClaudeTools\api\routers\conversation_contexts.py guru@172.16.3.30:/tmp/conv.py
- Reconnect: plink guru@172.16.3.30
- Continue below
If file exists, continue:
Step 3: Deploy the file
------------------------
In the SSH session, run these commands one at a time:
sudo mv /tmp/conv.py /opt/claudetools/api/routers/conversation_contexts.py
sudo chown claudetools:claudetools /opt/claudetools/api/routers/conversation_contexts.py
sudo systemctl restart claudetools-api
(sudo should not ask for password if passwordless is set up)
Step 4: Verify deployment
--------------------------
In the SSH session, run:
grep -c "search_term.*Query" /opt/claudetools/api/routers/conversation_contexts.py
Expected output: 1 (or higher)
If you see 0, the old file is still there.
Step 5: Check service status
-----------------------------
In the SSH session, run:
sudo systemctl status claudetools-api --no-pager | head -15
Look for:
- "Active: active (running)"
- Recent timestamp (today's date, last few minutes)
Step 6: Exit SSH
-----------------
Type:
exit
Step 7: Test the API
---------------------
Back in PowerShell, run:
python -c "import requests; r=requests.get('http://172.16.3.30:8001/api/conversation-contexts/recall', headers={'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJpbXBvcnQtc2NyaXB0Iiwic2NvcGVzIjpbImFkbWluIiwiaW1wb3J0Il0sImV4cCI6MTc3MTI3NTEyOX0.-DJF50tq0MaNwVQBdO7cGYNuO5pQuXte-tTj5DpHi2U'}, params={'search_term': 'dataforth', 'limit': 2}); data=r.json(); print('SUCCESS - New code!' if 'contexts' in data else 'FAILED - Old code'); print(f'Contexts: {len(data.get(\"contexts\", []))}' if 'contexts' in data else f'Format: {list(data.keys())}')"
Expected output if successful:
SUCCESS - New code!
Contexts: 2
Expected output if failed:
FAILED - Old code
Format: ['context', 'project_id', 'tags', 'limit', 'min_relevance_score']
================================================================================
ALTERNATIVE: Copy/Paste File Content
================================================================================
If pscp isn't working, you can manually paste the file content:
1. Open: D:\ClaudeTools\api\routers\conversation_contexts.py in a text editor
2. Copy ALL the content (Ctrl+A, Ctrl+C)
3. SSH to server: plink guru@172.16.3.30
4. Create file with nano: nano /tmp/conv.py
5. Paste content (Right-click in PuTTY)
6. Save: Ctrl+X, Y, Enter
7. Continue from Step 3 above
================================================================================