Commit Graph

3 Commits

Author SHA1 Message Date
Andrew Pease 3c21bd7d14 Fix Detection Engine timeouts and standardize command output
Detection Engine improvements (kibana_manager.py):
- Increase prepackaged rules installation timeout: 60s → 180s
- Increase bulk enable rules timeout: 60s → 120s
- Fixes timeout errors when installing ~1400 prebuilt detection rules
- Rules install successfully even with previous timeout, this eliminates warnings

Output formatting improvements (docker_manager.py):
- Remove bash-style separators (##### lines)
- Standardize all command output to match 'start' command style
- Use consistent cyan for actions, green for success
- Add blank lines before final success messages
- Commands affected: stop, destroy, restart, stage
2025-12-01 13:40:08 -06:00
Andrew Pease b2807465cd Phase 6: Add intelligent container state detection
- Add check_containers_exist() method to DockerManager
  - Detects if containers exist and if they're running
  - Returns tuple (containers_exist, containers_running)

- Enhance start command with smart behavior:
  - Already running: instant exit (no-op)
  - Stopped: quick start without reconfiguration (~30 sec)
  - Not exist: full setup with Detection Engine and Fleet (~5 min)
  - Add --force-setup flag to force reconfiguration

- Enhance stop command:
  - Already stopped: instant exit (no-op)
  - Not exist: helpful error message

- Enhance restart command:
  - Not exist: error with guidance to run start
  - Stopped: starts containers instead of restarting
  - Running: normal restart behavior

- Major improvement: subsequent starts are 10x faster
- Better user experience with clear status messages
- Idempotent operations - safe to run multiple times
2025-11-24 14:24:15 -06:00
Andrew Pease 27001122eb Phase 3: Add Docker and utility modules
- Create DockerManager class for all container operations
  - Auto-detect docker compose vs docker-compose
  - Implement stage, start, stop, destroy, restart, status
  - Add clear_documents() for data stream clearing
  - Extract CA fingerprint for Fleet configuration
  - Comprehensive error handling and validation

- Create utility functions module
  - get_host_ip() for Linux/macOS IP detection
  - check_python_version() requiring 3.10+
  - run_command() helper with verbose support
  - show_docker_error() for formatted error messages
  - check_prerequisites() for system validation
2025-11-24 12:49:26 -06:00