diff --git a/DEV_PLATFORM_ROADMAP.md b/DEV_PLATFORM_ROADMAP.md index dd01a98..2246a21 100644 --- a/DEV_PLATFORM_ROADMAP.md +++ b/DEV_PLATFORM_ROADMAP.md @@ -1,188 +1,207 @@ # Dev Launcher - Platform Support Roadmap -**Goal**: Build a launcher in the dev branch that fully supports all documented platforms with proper detection, health checks, and platform-specific options. +**Goal**: Build comprehensive **automatic platform detection** that collects all system data during launcher startup and stores in reference database (`.sysref.beta`). + +**Key Principle**: Launcher runs on startup, collects ALL data automatically, displays findings, stores in reference DB. No interactive menus - modules use the detected/stored data. --- -## Phase 1: Enhanced Platform Detection (CURRENT) -**Status**: ✅ In Progress (Step 1 Complete) +## Phase 1: Comprehensive Automatic Detection (CURRENT) +**Status**: 🔄 In Progress -### Step 1: Quick System Overview ✅ DONE -- [x] System info display at startup -- [x] Quick platform overview in menu -- [x] Detailed system info menu option (7) -- [x] Show detected platforms on every menu refresh +### Step 1: System Detection at Startup ✅ DONE +- [x] System info display at startup (show_system_overview) +- [x] Control panel detection (cPanel, Plesk, InterWorx, Standalone) +- [x] OS detection (CentOS, AlmaLinux, Rocky, CloudLinux, Ubuntu, Debian) +- [x] Web server detection (Apache, Nginx, LiteSpeed, OpenLiteSpeed) +- [x] Database detection (MySQL, MariaDB) +- [x] PHP version detection (default + EA4 + Plesk + alt-php) +- [x] Firewall detection (CSF, firewalld, UFW, iptables) -### Step 2: Platform Health Checks (NEXT) -- [ ] Create `modules/diagnostics/platform-health-check.sh` - - Verify control panel is running - - Check essential services (apache/nginx, mysql/mariadb, php) - - Firewall status and basic rules - - CloudFlare integration status - - Storage and resource warnings +### Step 2: Automatic Data Collection & Storage (NEXT) +- [ ] **Enhance reference-db.sh** to collect platform compatibility data + - Add PLATFORM record type to .sysref: + ``` + PLATFORM|control_panel|cpanel|120.0|ok + PLATFORM|os|almalinux|9|supported + PLATFORM|web_server|apache|2.4.57|ok + PLATFORM|php_version|8.1|available + PLATFORM|compatibility|cpanel_almalinux|ok + ``` + - Add health status for each component + - Add package status (installed/missing/conflict) -- [ ] Create `modules/diagnostics/os-compatibility-check.sh` - - Verify OS-specific packages installed - - Check for known incompatibilities - - Version compatibility matrix verification - - Kernel version compatibility +- [ ] **Enhance startup_detection()** to: + - Run comprehensive detection automatically + - Call platform health checks (store results, don't display menu) + - Run OS compatibility checks (store results) + - Populate PLATFORM records in .sysref.beta + - Show summary at startup (what was detected, any issues) -### Step 3: Platform-Specific Menus -- [ ] Add dynamic menu options based on detected platform - - cPanel-specific tools (cPHulk, DKIM, AutoSSL) - - Plesk-specific tools (Extension management, Packages) - - InterWorx-specific tools (NodeWorx commands) - - CloudLinux-specific tools (LVE limits, alt-php) +### Step 3: Store Platform Data in Reference DB +- [ ] Extend .sysref format to include: + - Control panel status and features + - OS compatibility status + - Package installation status + - Service health status + - Known issues found -### Step 4: Control Panel Discovery Enhancement -- [ ] Enhanced cPanel detection - - Version-specific features - - Installed plugins (AutoSSL, Immuify, etc.) +- [ ] Create functions to query this data: + - `db_get_platform_status()` - Get overall platform health + - `db_get_compatibility_issues()` - Get known incompatibilities + - `db_get_missing_packages()` - Get required packages not installed -- [ ] Enhanced Plesk detection - - Version-aware paths (pre-18.0.50 vs 18.0.50+) - - Extension detection - - Module status - -- [ ] Enhanced InterWorx detection - - Installed modules - - Custom plugins - -- [ ] CloudLinux detection - - LVE resource limits - - CloudLinux version and license +### Step 4: Display Findings at Startup +- [ ] Show platform detection summary during initialization +- [ ] List any critical issues found +- [ ] List recommendations (upgrades, package installs, fixes) +- [ ] Cache expires with .sysref (1 hour) --- -## Phase 2: Operating System Support Matrix +## Phase 2: Automatic OS Compatibility Detection **Status**: ⏳ Planned -### Supported Distributions -- [ ] CentOS/RHEL (7, 8, 9) -- [ ] AlmaLinux (8, 9) -- [ ] Rocky Linux (8, 9) -- [ ] CloudLinux (7, 8, 9) -- [ ] Ubuntu (20.04 LTS, 22.04 LTS, 24.04) -- [ ] Debian (11, 12) +### Auto-Collect for Each OS +- [ ] **Package Manager State** - YUM, DNF, or APT status +- [ ] **Required Packages** - Verify installed (httpd, apache2, mysql, etc.) +- [ ] **Service Manager** - Detect systemd vs init +- [ ] **Apache Binary** - Detect httpd vs apache2 +- [ ] **MySQL Socket** - Detect correct socket path +- [ ] **Firewall Type** - Auto-detect running firewall +- [ ] **PHP Installation** - Detect all available PHP versions +- [ ] **Repository Config** - Detect EPEL, Remi, Ondrej PPAs -### Per-OS Checks -- [ ] Package manager compatibility -- [ ] Service manager (systemd vs init) -- [ ] Apache binary (httpd vs apache2) -- [ ] MySQL socket paths -- [ ] Firewall type (firewalld vs UFW vs iptables) +### Store Results in .sysref +- Package installation status per OS +- Service availability status +- Path configuration status +- Version support timeline +- Known incompatibilities --- -## Phase 3: Web Server Support Enhancement +## Phase 3: Control Panel Feature Auto-Discovery **Status**: ⏳ Planned -### Supported Web Servers -- [x] Apache (httpd/apache2) - Already detected -- [x] Nginx - Already detected -- [x] LiteSpeed - Already detected -- [x] OpenLiteSpeed - Already detected +### Auto-Detect & Store for Each Panel -### Additional Detection -- [ ] ModSecurity status -- [ ] Modsecurity rules version -- [ ] HTTP/2 support detection -- [ ] SSL/TLS version support -- [ ] Performance modules (mod_pagespeed, ngx_cache_purge, etc.) +**cPanel**: +- [ ] Installed EA4 modules +- [ ] Installed plugins (AutoSSL, Immuify, etc.) +- [ ] cPanel API version +- [ ] License status + +**Plesk**: +- [ ] Installed extensions (Qmail, Nginx, etc.) +- [ ] Module status (mail, web, dns, etc.) +- [ ] License information +- [ ] Version-specific features + +**InterWorx**: +- [ ] Installed modules +- [ ] NodeWorx API availability +- [ ] Custom plugins + +**CloudLinux**: +- [ ] LVE limits per account +- [ ] alt-php selector availability +- [ ] CloudLinux tools availability + +### Store in .sysref as PLATFORM records --- -## Phase 4: Database & PHP Deep Dive +## Phase 4: Database & PHP Auto-Discovery **Status**: ⏳ Planned -### Database Detection Enhancement -- [ ] Detect Percona Server -- [ ] Database cluster detection (Galera for MariaDB) +### Automatic Database Data Collection +- [ ] MySQL/MariaDB version and type +- [ ] Percona Server detection +- [ ] Database cluster detection (Galera) - [ ] Replication status -- [ ] Backup tool detection (Acronis, Bacula, etc.) +- [ ] Backup tools detection (Acronis, Bacula) +- [ ] Store database inventory in .sysref (already have DB records) -### PHP Multi-Version Support -- [ ] Enumerate all installed PHP versions -- [ ] Per-domain PHP version mapping -- [ ] PHP module detection per version -- [ ] PHP-FPM pools enumeration +### Automatic PHP Detection (Already Partial) +- [ ] All installed PHP versions (default + EA4 + Plesk + alt-php) +- [ ] PHP module availability per version +- [ ] PHP-FPM pool detection - [ ] OPcache status per version +- [ ] Per-domain PHP version mapping (query from configs) -### cPanel-Specific PHP -- [ ] EA-PHP version matrix -- [ ] PHP CLI version detection -- [ ] PHPList management - -### CloudLinux alt-php -- [ ] alt-php detection and enumeration -- [ ] Per-user PHP version limits -- [ ] CloudLinux PHP selector status +### Store PHP Data in .sysref +- [ ] PHP versions available +- [ ] Default PHP version +- [ ] PHP modules per version +- [ ] PHP-FPM pool count --- -## Phase 5: Service Status Dashboard +## Phase 5: Service Status Auto-Collection **Status**: ⏳ Planned -### Essential Services -- [ ] Apache/Nginx running status -- [ ] MySQL/MariaDB status -- [ ] PHP-FPM status (if installed) +### Automatic Service Health Check +- [ ] Essential services (Apache/Nginx, MySQL, PHP-FPM, SSH) +- [ ] Control panel services (cpanel, sw-engine, iworx) - [ ] Mail service (Exim/Postfix) -- [ ] SSH service - [ ] Firewall service +- [ ] Store status in .sysref as SERVICE records: + ``` + SERVICE|apache|running|ok + SERVICE|mysql|running|ok + SERVICE|php-fpm|running|warning + SERVICE|firewall|active|ok + ``` -### Control Panel Services -- [ ] cPanel daemons (cpanel, cpsrvd) -- [ ] Plesk core services (sw-engine, sw-cp-server) -- [ ] InterWorx services (iworx, iworx-httpd) - -### Optional Services -- [ ] Nginx/Varnish cache status -- [ ] Immuify/malware detection -- [ ] Backup agents (Acronis, etc.) -- [ ] CloudFlare support +### Automatic Issue Detection +- [ ] Missing critical services +- [ ] Services that should be running but aren't +- [ ] Port conflicts (multiple web servers on port 80) +- [ ] Store findings as ISSUE records --- -## Phase 6: Intelligence & Recommendations +## Phase 6: Reference Database Queries **Status**: ⏳ Planned -### Platform-Specific Recommendations -- [ ] cPanel: Recommendations for security hardening, backup setup -- [ ] Plesk: Extension recommendations, performance tuning -- [ ] InterWorx: Resource allocation, security features -- [ ] Standalone: Web server optimization, PHP tuning +### Add Query Functions to reference-db.sh +- [ ] `db_get_platform_info()` - Get all platform data +- [ ] `db_get_compatibility_issues()` - Get known issues +- [ ] `db_get_service_status()` - Get service states +- [ ] `db_get_missing_packages()` - Get uninstalled packages +- [ ] `db_get_recommendations()` - Get suggested actions -### Compatibility Warnings -- [ ] Warn if mixing incompatible tools -- [ ] Alert on deprecated versions -- [ ] Suggest upgrades for end-of-life software - -### Performance Insights -- [ ] PHP version optimization -- [ ] Database tuning hints -- [ ] Caching recommendations -- [ ] Resource allocation suggestions +### Modules Use These to Make Decisions +Instead of detecting themselves, modules query the data: +- Modules call `db_get_platform_info()` to know the platform +- Modules call `db_get_service_status()` before running +- Modules check `db_get_missing_packages()` to suggest installs +- Modules suggest actions based on `db_get_recommendations()` --- ## Implementation Priority -### IMMEDIATE (Phase 1 - Step 2-3) -1. Platform Health Checks module -2. OS Compatibility module -3. Platform-specific menu options +### IMMEDIATE (Phase 1 - Step 2-4) +1. ⏳ Enhance reference-db.sh to collect platform data automatically +2. ⏳ Add PLATFORM record type to .sysref format +3. ⏳ Update startup_detection() to run comprehensive checks +4. ⏳ Display platform findings during initialization ### NEAR TERM (Phase 2-3) -4. OS support matrix enhancements -5. Web server detection improvements +5. ⏳ Add OS compatibility data collection to startup +6. ⏳ Add control panel feature auto-discovery +7. ⏳ Store all findings in .sysref.beta ### MEDIUM TERM (Phase 4-5) -6. Database & PHP deep dive -7. Service status dashboard +8. ⏳ Database & PHP data collection +9. ⏳ Service status auto-detection +10. ⏳ Issue detection and storage ### LONG TERM (Phase 6) -8. Intelligence & recommendations engine +11. ⏳ Query functions in reference-db.sh +12. ⏳ Modules refactored to use cached data --- @@ -210,26 +229,34 @@ ## Success Criteria -1. ✅ Detect all 4 control panels accurately -2. ✅ Detect all 6 OS types accurately -3. ✅ Display platform info without errors -4. ✅ Recommend appropriate tools per platform -5. ✅ Provide health checks for detected platforms -6. ✅ Handle missing/unknown components gracefully +1. ✅ Launcher detects all 4 control panels automatically +2. ✅ Launcher detects all 6 OS types automatically +3. ✅ All platform data stored in .sysref.beta on startup +4. ✅ Platform summary displayed during initialization +5. ✅ Critical issues flagged (missing packages, incompatibilities) +6. ✅ Modules query cached data instead of re-detecting +7. ✅ No interactive menus - launcher is pure data collection --- ## Files to Create/Modify -### New Modules -- `modules/diagnostics/platform-health-check.sh` (400-500 lines) -- `modules/diagnostics/os-compatibility-check.sh` (300-400 lines) -- `modules/platform-tools/` (directory for platform-specific tools) +### Enhanced Files +- `lib/reference-db.sh` - Add PLATFORM record collection and queries +- `lib/system-detect.sh` - Comprehensive automatic detection +- `launcher.sh` - Enhanced startup_detection() to store all findings -### Modified Files -- `launcher.sh` - Add platform-specific menu options -- `lib/system-detect.sh` - Enhance detection functions -- Various module files - Add platform compatibility checks +### New Functions in reference-db.sh +- `collect_platform_data()` - Gather all platform info +- `db_get_platform_info()` - Query platform data +- `db_get_compatibility_issues()` - Query issues found +- `db_get_service_status()` - Query service states +- `db_get_missing_packages()` - Query missing packages + +### Standalone Diagnostic Modules (Optional) +- `modules/diagnostics/platform-health-check.sh` - For manual health checks +- `modules/diagnostics/os-compatibility-check.sh` - For manual compatibility checks +- Note: These are optional modules for users to run manually, not part of launcher ---