Skip to content

Latest commit

 

History

History
269 lines (213 loc) · 6.83 KB

File metadata and controls

269 lines (213 loc) · 6.83 KB

Xandeum Pod Manager (Pod-Man) - Deployment Summary

✅ Build Complete!

The Xandeum Pod Manager (Pod-Man) v1.0.0 has been successfully built, tested, and is ready for deployment.

📦 What Was Built

Backend Components

  • ✅ Express.js server with WebSocket support
  • ✅ Service management module (systemctl wrapper)
  • ✅ pRPC API client
  • ✅ Log retrieval system (journalctl)
  • ✅ Network diagnostics module
  • ✅ System resource monitoring
  • ✅ Terminal PTY handler with security features

Frontend Components

  • ✅ Responsive dashboard UI (HTML/CSS/JavaScript)
  • ✅ Real-time system stats display
  • ✅ Service control interface
  • ✅ Log viewer with filtering
  • ✅ pRPC API testing interface
  • ✅ Network diagnostics display
  • ✅ Embedded xterm.js terminal

Security Features

  • ✅ Dangerous command detection and warnings
  • ✅ Service/action whitelist validation
  • ✅ Rate limiting (60 req/min)
  • ✅ Input sanitization
  • ✅ Session limits (max 3 terminals)
  • ✅ Activity logging
  • ✅ Confirmation dialogs for destructive actions
  • ✅ Localhost-only by default

Documentation

  • ✅ Comprehensive README.md
  • ✅ nginx reverse proxy configuration
  • ✅ nginx setup guide
  • ✅ Systemd service file
  • ✅ MIT License

Git Repository

  • ✅ Repository initialized
  • ✅ All files committed
  • ✅ Remote configured (git@github.com:T3chie-404/pod-manager.git)
  • ✅ .gitignore configured
  • ✅ Ready to push

🧪 Testing Results

All tests passed:

  • ✅ Dashboard API
  • ✅ Services API
  • ✅ System Stats API
  • ✅ Health Check API
  • ✅ Network Diagnostics API
  • ✅ Logs API
  • ✅ pRPC API
  • ✅ Frontend HTML
  • ✅ CSS Styling
  • ✅ JavaScript Logic
  • ✅ Server Process
  • ✅ Port Listening (7000)

🚀 Currently Running

Server is currently running at: http://127.0.0.1:7000

To access remotely via SSH tunnel:

ssh -L 7000:localhost:7000 ubuntu@192.190.136.28
# Then open: http://localhost:7000

📂 Project Structure

/root/pod-manager/
├── server.js                  # Main Express server
├── package.json              # Dependencies
├── config.json               # Configuration
├── README.md                 # Documentation
├── LICENSE                   # MIT License
├── .gitignore                # Git ignore rules
├── pod-manager.service  # Systemd service
├── lib/                      # Backend modules
│   ├── services.js          # Service management
│   ├── api.js               # pRPC client
│   ├── logs.js              # Log retrieval
│   ├── network.js           # Network diagnostics
│   ├── system.js            # System monitoring
│   └── terminal.js          # Terminal handler
├── public/                   # Frontend files
│   ├── index.html           # Dashboard UI
│   ├── style.css            # Styling
│   └── app.js               # Frontend logic
└── nginx-config-example/     # nginx setup
    ├── README.md            # Setup guide
    └── nginx-reverse-proxy.conf  # Config template

🔐 Security Considerations

Attack Vectors Mitigated

Vector Mitigation
Command injection Whitelist + parameterization
Fork bomb Session limits + detection
Disk wiping Dangerous command warnings
Resource exhaustion Rate limiting + timeouts
Unauthorized access Localhost-only default
Log flooding Line limits (1000 max)

Dangerous Commands Detected

  • rm -rf /
  • Fork bombs: :(){:|:&};:
  • dd if= commands
  • mkfs (format filesystem)
  • Direct disk writes
  • Recursive chmod 777
  • Pipe to bash from wget/curl

📝 Next Steps

1. Create GitHub Repository

On GitHub (https://github.com):

  1. Click "New repository"
  2. Name: pod-manager
  3. Description: "Interactive web-based monitoring dashboard for Xandeum pNodes"
  4. Public repository
  5. Don't initialize with README (we already have one)
  6. Click "Create repository"

2. Push to GitHub

cd /root/pod-manager

# Ensure SSH key is configured
eval "$(ssh-agent -s)"
ssh-add /root/.ssh/id_ed25519_t3chie

# Push to GitHub
git push -u origin master

3. Install as System Service (Optional)

# Stop the test server first
sudo pkill -f "node server.js"

# Copy service file
sudo cp pod-manager.service /etc/systemd/system/

# Enable and start
sudo systemctl daemon-reload
sudo systemctl enable pod-manager
sudo systemctl start pod-manager

# Check status
sudo systemctl status pod-manager

4. Access the Dashboard

Local: http://127.0.0.1:7000

Remote (SSH tunnel):

ssh -L 7000:localhost:7000 user@your-server
# Then: http://localhost:7000

🎯 Features You Can Test

  1. Dashboard Tab

    • View real-time system stats
    • See service status cards
    • Check overall health score
  2. Services Tab

    • View detailed service statuses
    • Try restarting a service
    • Use "Restart All" button
  3. Logs Tab

    • Select a service
    • Load logs
    • Try filtering logs
    • Use "Find Pubkey" button
  4. pRPC API Tab

    • Click "Get Version"
    • Click "Get Stats"
    • Try custom RPC method
  5. Network Tab

    • Run full diagnostics
    • Check port statuses
    • View external IP
  6. Terminal Tab

    • Use quick command buttons
    • Type commands manually
    • Try a dangerous command (it will warn you)
    • Use installer script buttons

📊 Resource Usage

  • Memory: ~40MB
  • CPU: <1% idle, ~5% active
  • Disk: ~15MB (with node_modules)
  • Network: Localhost only (no external traffic)

🔧 Troubleshooting

Server won't start

# Check if port is in use
sudo netstat -tulpn | grep 7000

# Check logs
sudo journalctl -u pod-manager -n 50

Terminal not connecting

  • Check browser console for WebSocket errors
  • Verify node-pty is installed: npm list node-pty
  • Check enableTerminal: true in config.json

API errors

  • Verify services are running
  • Check pRPC port 6000 is accessible
  • Review server logs

💡 Tips

  1. SSH Tunnel: Easiest way to access remotely
  2. nginx Proxy: For permanent public access with HTTPS
  3. Read-Only Mode: Set enableServiceControl: false for monitoring only
  4. Disable Terminal: Set enableTerminal: false for extra security
  5. Auto-Refresh: Dashboard updates every 10 seconds automatically

🎉 Success Metrics

  • ✅ All backend modules functional
  • ✅ All frontend components rendering
  • ✅ All security features implemented
  • ✅ All API endpoints responding
  • ✅ Terminal with dangerous command protection
  • ✅ Comprehensive documentation
  • ✅ Ready for production use

📫 Support


Built with security, simplicity, and user safety in mind.

Xandeum Pod Manager (Pod-Man) v1.0.0 T3chie-404 © 2025