A professional web-based tool for managing Symfony parameters.yml files across multiple servers via SSH connections. Perfect for DevOps teams managing multiple customer environments with automatic initialization and real-time status updates.
Modern web interface for managing Symfony parameters across multiple servers with real-time status monitoring, automatic loading, and bulk operations.
Latest interface showcasing automatic status loading (2 customers, 1 connected server), dual view modes (VSCode Edition vs Classical View), and Monaco Editor integration with YAML syntax highlighting - all loaded automatically without manual refresh!
- π Modern Web Interface - Intuitive, responsive design with automatic data loading
- β‘ Auto-Initialization - Automatic status and customer loading without manual refresh
- π SSH-Based Remote Access - Secure connections to multiple servers
- π₯ Multi-Customer Support - Manage parameters for multiple customers/projects
- π¦ Automatic Backups - Timestamped backups before any changes
- π Permission Preservation - Maintains file ownership and permissions
- β‘ Bulk Operations - Update multiple customers simultaneously
- π― Template System - Predefined parameter sets for common operations
- π Real-time Status - Live connection status and operation feedback
- π Secret Generation - Built-in secure secret key generator
- π Comprehensive Logging - Detailed operation logs for auditing
- π¨ Dual View Modes - Modern Monaco Editor and Classic view options
- π§ͺ Comprehensive Testing - Extensive test suite with CI/CD integration
- Python 3.8 or higher
- SSH access to target servers
- Symfony projects with
parameters.ymlfiles
-
Clone the repository
git clone https://github.com/bjwie/ssh-parameter-manager.git cd ssh-parameter-manager -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure SSH settings
cp ssh_config.example.yml ssh_config.yml # Edit ssh_config.yml with your server and customer details -
Start the web server
python web_server.py
-
Open your browser
http://localhost:5000
The interface will automatically load all server status and customer information - no manual refresh required!
The SSH Parameter Manager now features automatic initialization that ensures data is loaded immediately when you open the web interface:
- No Manual Refresh Required - Server status and customers load automatically
- Monaco Editor Independent - Works even if CDN resources fail to load
- Dual Loading Strategy - Both
DOMContentLoadedand Monaco Editor callbacks ensure reliability - Error Resilient - Graceful degradation when SSH connections fail
- Performance Optimized - Concurrent API requests for faster loading
// Automatic initialization on page load
document.addEventListener('DOMContentLoaded', function() {
loadSystemStatus();
setupClassicEventListeners();
});The system loads:
- Server Connection Status - Real-time SSH connection monitoring
- Customer List - All configured customers with their details
- Parameter Data - Available parameter files and their status
- System Statistics - Total customers, connected servers, etc.
Comprehensive testing ensures reliability and quality:
- Unit Tests (16 tests) - JavaScript logic, API endpoints, timing, robustness
- Browser Tests (8 tests) - Selenium-based end-to-end testing
- Performance Tests - Page load times, API response times, concurrent requests
- Integration Tests - Full system integration and error handling
# Run all auto-initialization tests
python tests/run_auto_init_tests.py
# Run specific test categories
python tests/run_auto_init_tests.py --unit
python tests/run_auto_init_tests.py --browser
python tests/run_auto_init_tests.py --performance
python tests/run_auto_init_tests.py --integration
# Run with pytest and coverage
pytest --cov=. --cov-report=xml --cov-report=html tests/π§ͺ Running Unit Tests for Auto-Initialization...
β
16/16 tests passed
π Running Browser Tests for Auto-Initialization...
β
Browser tests skipped (Selenium not available)
β‘ Running Performance Tests...
β
Page load: 0.8s, API responses: < 2s
π Running Integration Tests...
β
All initialization elements present
π All automatic initialization tests passed!
Create ssh_config.yml based on the example file:
servers:
production:
host: your-server.com
port: 22
username: deploy
description: "Production Server"
customers:
customer1:
server: production
path: /var/www/customer1/app/config/parameters.yml
description: "Customer 1 - E-commerce Platform"Ensure your SSH keys are properly configured:
# Generate SSH key if needed
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# Copy public key to servers
ssh-copy-id user@your-server.comThe web interface provides automatic loading and:
- Customer Overview - Auto-populated visual list of all customers
- Parameter Editor - Monaco Editor with syntax highlighting and validation
- Classic View - Traditional form-based editing for simple workflows
- Bulk Operations - Update multiple customers at once
- Status Monitoring - Real-time connection and operation status
- Backup Management - Create and manage configuration backups
Modern View (Monaco Editor)
- Advanced code editor with syntax highlighting
- YAML validation and error detection
- Auto-completion and formatting
- Diff view for comparing changes
Classic View
- Simple form-based interface
- Quick parameter updates
- Ideal for non-technical users
- Mobile-friendly design
For automation and scripting:
# List all customers
python ssh_manager.py --list
# Update specific parameter
python ssh_manager.py --update production:customer1 --param database_host=new-server.com
# Apply template to multiple customers
python ssh_manager.py --template database_migration --targets production:customer1,production:customer2
# Create backups for all customers
python ssh_manager.py --backup-allssh-parameter-manager/
βββ web_server.py # Flask web application with auto-init
βββ ssh_manager.py # Core SSH management logic
βββ parameter_updater.py # Parameter file operations
βββ ssh_web_interface.html # Modern web interface with auto-loading
βββ ssh_config.yml # Configuration file (create from example)
βββ requirements.txt # Python dependencies
βββ tests/ # Comprehensive test suite
β βββ test_auto_initialization.py # Browser tests (Selenium)
β βββ test_auto_initialization_unit.py # Unit tests
β βββ run_auto_init_tests.py # Test orchestration
β βββ README_AUTO_INIT_TESTS.md # Testing documentation
βββ .github/workflows/ # CI/CD pipelines
β βββ ci.yml # Main CI/CD pipeline
β βββ auto-init-tests.yml # Auto-initialization tests
βββ README.md # This file
The Flask backend provides RESTful API endpoints with automatic initialization support:
GET /api/status- System and connection status (auto-loaded)GET /api/customers- List all customers (auto-loaded)GET /api/customer/{id}/parameters- Get customer parametersPOST /api/customer/{id}/parameters- Update customer parametersPOST /api/bulk-update- Bulk parameter updatesPOST /api/backup/{id}- Create customer backupPOST /api/generate-secret- Generate secure secret key
All endpoints support concurrent requests and graceful error handling for reliable auto-initialization.
- SSH Key Authentication - Secure, password-less connections
- Permission Preservation - Maintains original file permissions
- Backup System - Automatic backups before changes
- Input Validation - Sanitized parameter inputs
- Audit Logging - Comprehensive operation logging
- Secret Generation - Cryptographically secure secret keys
- Error Handling - Graceful degradation when services are unavailable
GitHub Actions workflows ensure code quality:
- Python 3.8, 3.9, 3.10, 3.11 compatibility testing
- Dependency installation and validation
- Code style checking with Black
- Security scanning with Safety
- Automated testing on pull requests
- Browser compatibility testing (Chrome/ChromeDriver)
- Headless Selenium tests in CI environment
- Performance benchmarking
- Cross-platform compatibility (Ubuntu, macOS, Windows)
Auto-Initialization Not Working
# Check browser console for JavaScript errors
# Verify API endpoints are responding:
curl http://localhost:5000/api/status
curl http://localhost:5000/api/customersSSH Connection Failed
# Test SSH connection manually
ssh -i ~/.ssh/id_rsa user@server.com
# Check SSH agent
ssh-add -lPermission Denied
# Ensure correct file permissions
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pubMonaco Editor Not Loading
- The system will fall back to classic view automatically
- Check internet connection for CDN resources
- Verify browser JavaScript is enabled
YAML Parsing Error
- Verify YAML syntax in configuration files
- Check for proper indentation (spaces, not tabs)
Enable debug logging:
# In ssh_config.yml
logging:
level: DEBUGRun tests to verify functionality:
# Test auto-initialization specifically
python tests/run_auto_init_tests.py --all
# Test with verbose output
python tests/run_auto_init_tests.py --unit --verboseContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Run the test suite (
python tests/run_auto_init_tests.py --all) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
All contributions should include:
- Unit tests for new functionality
- Integration tests for API changes
- Browser tests for UI modifications
- Documentation updates
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for Symfony framework parameter management
- Inspired by DevOps automation needs
- Uses Flask for the web interface with auto-initialization
- Paramiko for SSH connections
- Monaco Editor for advanced code editing
- Selenium for comprehensive browser testing
If you encounter any issues or have questions:
- Check the troubleshooting section
- Run the diagnostic tests (
python tests/run_auto_init_tests.py --all) - Search existing GitHub issues
- Create a new issue with detailed information including:
- Test results output
- Browser console errors (if applicable)
- SSH configuration (without sensitive data)
The auto-initialization system is optimized for performance:
- Page Load Time: < 3 seconds (target)
- API Response Time: < 2 seconds per endpoint
- Concurrent Requests: Supports 5+ simultaneous connections
- Error Recovery: Automatic retry with exponential backoff
- Caching: Intelligent caching of customer data and status
Made with β€οΈ for the DevOps community - Now with automatic everything! π


