Commit Graph

13 Commits

Author SHA1 Message Date
rcourtman
c2de5f7f4c Fix: add Windows uninstall command support for unified agent
The UI only showed a bash uninstall command which doesn't work on Windows.
Added PULSE_UNINSTALL env var support to install.ps1 and updated the UI
to display platform-specific uninstall commands for both Linux/macOS and
Windows.

Related to #1176
2026-02-03 12:03:06 +00:00
rcourtman
78cb794640 fix: add --hostname flag to agent installer scripts. Related to #1169
The agent binary supported --hostname but the installer scripts
didn't accept or forward it, causing "[ERROR] Unknown argument".
2026-02-02 14:08:28 +00:00
rcourtman
8c440b6f54 feat: notify server during agent uninstallation
- Add /api/agents/host/uninstall endpoint for agent self-unregistration
- Update install.sh to notify server during --uninstall (reads agent ID from disk)
- Update install.ps1 with same logic for Windows
- Update frontend uninstall command to include URL/token flags

This ensures that when an agent is uninstalled, the host record is
immediately removed from Pulse and any linked PVE nodes have their
+Agent badge cleared.
2025-12-26 22:38:46 +00:00
rcourtman
a259b67348 feat: add Kubernetes platform support 2025-12-12 21:31:11 +00:00
rcourtman
b6f0d74c55 Use New-Service for Windows service creation
Switch from sc.exe create to PowerShell's New-Service cmdlet for
creating the Windows service. New-Service provides better error
handling and is more reliable. Keep sc.exe only for configuring
service recovery options (restart on failure), which New-Service
doesn't support.

Related to #776
2025-11-29 14:09:30 +00:00
rcourtman
1d41920d91 Fix Windows agent SC CREATE binPath quoting
The binPath parameter value needs outer quotes when it contains
embedded quotes and spaces. Without this, SC.EXE parses the value
incorrectly and fails to create the service.

Related to #776
2025-11-28 18:04:24 +00:00
rcourtman
db8790a463 Fix silent sc.exe delete failures in install.ps1
- Add error handling for sc.exe delete in uninstall logic
- Add error handling for legacy agent service deletion
- Add error handling for existing service deletion before reinstall
- Show warnings when service deletion fails instead of silently continuing

Related to #735
2025-11-28 09:58:47 +00:00
rcourtman
c66e9bb0e5 Add --agent-id parameter to unified agent installers
The unified installer was missing --agent-id support that existed in
the legacy host-agent installer. This parameter allows users to specify
a custom agent identifier instead of using auto-generated IDs.

Updated both install.sh (Linux/macOS/Synology/Unraid) and install.ps1
(Windows) to accept --agent-id and pass it through to the agent binary.

Related to #772
2025-11-28 06:08:42 +00:00
rcourtman
4a27018e46 Fix silent Windows service creation failures in install.ps1
- Add Administrator privilege check at script start
- Replace silent `| Out-Null` with proper error handling for sc.exe
- Exit with error if service creation fails
- Add try/catch for Start-Service with proper error reporting

Related to #735, #760, #751
2025-11-27 21:29:51 +00:00
rcourtman
17af64fedf security: harden Windows installer script
- Add input validation for URL (http/https), token format, and interval
- Add SHA256 checksum verification against X-Checksum-Sha256 header
- Add PE binary magic verification (MZ header)
- Add file size validation (1-100MB expected)
- Add TLS 1.2/1.3 minimum enforcement
- Add 5-minute download timeout
- Add temp file cleanup on failure
- Add binary backup/restore on installation failure
- Download to temp file before atomic move to final location
2025-11-26 13:42:45 +00:00
rcourtman
ae3b78d661 fix: propagate unified agent version and improve legacy cleanup
Issues found during scenario testing:

1. Version propagation: The hostagent and dockeragent packages were
   reporting their own Version (0.1.0-dev) instead of the unified
   agent's version. Added AgentVersion config field to pass the
   parent's version down.

2. macOS legacy cleanup: The install.sh script was missing cleanup
   for pulse-docker-agent on macOS.

3. Windows legacy cleanup: The install.ps1 script was missing cleanup
   for legacy PulseHostAgent and PulseDockerAgent services.

These fixes ensure:
- Unified agent reports consistent version across host/docker metrics
- Legacy agents are properly removed on all platforms during upgrade
- Users migrating from legacy agents get a clean transition
2025-11-25 23:39:10 +00:00
rcourtman
0436101ee5 feat: add auto-update support for unified agent
Implement self-update capability for the unified pulse-agent binary:

- Add internal/agentupdate package with cross-platform update logic
- Hourly version checks against /api/agent/version endpoint
- SHA256 checksum verification for downloaded binaries
- Atomic binary replacement with backup/rollback on failure
- Support for Linux, macOS, and Windows (10 platform/arch combinations)

Build and release changes:
- Dockerfile builds unified agent for all platforms
- build-release.sh includes unified agent in release artifacts
- validate-release.sh validates unified agent binaries
- Install scripts (install.sh, install.ps1) use correct URL format

Related to #727, #737
2025-11-25 23:15:03 +00:00
courtmanr@gmail.com
3ec7b401a3 Improve installer UX with pauses and popups on failure
Fixes #755. Adds interactive pauses and graphical popups (where available) to installer scripts when critical errors occur, ensuring troubleshooting guides are readable. Also clarifies 'build from source' instructions.
2025-11-25 11:17:37 +00:00