Commit Graph

2 Commits

Author SHA1 Message Date
cschantz 406e2accfe Fix deploy script integer comparison - handle edge cases better 2025-11-20 15:40:18 -05:00
cschantz 8cec01b646 Add deployment documentation and automated deploy script
Make it dead simple to deploy and run validation scripts on test servers.

NEW FILES:

1. testing/DEPLOYMENT.md
   - Complete deployment guide with 5 different methods
   - SCP (simplest), GitHub clone, wget/curl, copy-paste, archive
   - Step-by-step instructions for both InterWorx and Plesk
   - What to expect during execution
   - How to review and share results
   - Troubleshooting section
   - Security notes (scripts are read-only, safe to run)

2. testing/deploy-and-run.sh (AUTOMATED!)
   - One command to deploy, run, and retrieve results
   - Handles all 4 steps automatically
   - Shows live summary of pass/fail/warn counts
   - Extracts critical answers automatically
   - Error handling and helpful tips

USAGE:

Simple method (manual):
```bash
scp testing/validate-interworx.sh root@SERVER:/tmp/
ssh root@SERVER "/tmp/validate-interworx.sh"
scp root@SERVER:/tmp/interworx-validation-results.txt ./
```

Automated method (one command!):
```bash
cd testing/
./deploy-and-run.sh 192.168.1.100 interworx
# OR
./deploy-and-run.sh plesk-server.com plesk
```

WHAT THE AUTOMATED SCRIPT DOES:
[1/4] Deploys script to server via SCP
[2/4] Runs validation script remotely
[3/4] Retrieves results file
[4/4] Shows summary (PASS/FAIL/WARN counts + critical answers)

OUTPUT EXAMPLE:
```
=======================================================================
VALIDATION SUMMARY
=======================================================================
PASS: 45
FAIL: 0
WARN: 3

✓ All critical tests passed!

=======================================================================
CRITICAL ANSWERS FOUND
=======================================================================
Document roots: /home/USERNAME/DOMAIN/html/
Access logs: /home/USERNAME/var/DOMAIN/logs/access_log
Database prefix: username_ (VERIFIED)
Cron user: testuser
```

SECURITY:
- Scripts are read-only (don't modify system)
- Only exception: cron test (writes then immediately deletes)
- Results in /tmp/ (auto-cleaned on reboot)
- No passwords logged

Ready to deploy to test servers! 🚀
2025-11-20 15:33:29 -05:00