mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
feat: improve legacy agent detection and migration UX
Add seamless migration path from legacy agents to unified agent: - Add AgentType field to report payloads (unified vs legacy detection) - Update server to detect legacy agents by type instead of version - Add UI banner showing upgrade command when legacy agents are detected - Add deprecation notice to install-host-agent.ps1 - Create install-docker-agent.sh stub that redirects to unified installer Legacy agents (pulse-host-agent, pulse-docker-agent) now show a "Legacy" badge in the UI with a one-click copy command to upgrade to the unified agent.
This commit is contained in:
Executable
+65
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# DEPRECATED: pulse-docker-agent installer
|
||||
#
|
||||
# This script is deprecated. Please use the unified agent instead:
|
||||
#
|
||||
# curl -fsSL http://<pulse-server>:7655/install.sh | \
|
||||
# sudo bash -s -- --url http://<pulse-server>:7655 --token <token> --enable-docker
|
||||
#
|
||||
# The unified agent provides:
|
||||
# - Combined host + Docker monitoring in one binary
|
||||
# - Automatic updates
|
||||
# - Simplified management
|
||||
#
|
||||
# This script will redirect you to the unified agent installer.
|
||||
#
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo ""
|
||||
echo "┌─────────────────────────────────────────────────────────────────────────────┐"
|
||||
echo "│ DEPRECATED: pulse-docker-agent has been replaced by the unified agent. │"
|
||||
echo "│ │"
|
||||
echo "│ The unified agent provides: │"
|
||||
echo "│ • Combined host + Docker monitoring in one binary │"
|
||||
echo "│ • Automatic updates │"
|
||||
echo "│ • Simplified management │"
|
||||
echo "│ │"
|
||||
echo "│ Installing unified agent instead... │"
|
||||
echo "└─────────────────────────────────────────────────────────────────────────────┘"
|
||||
echo ""
|
||||
|
||||
# Parse arguments to extract URL and token for redirection
|
||||
PULSE_URL=""
|
||||
PULSE_TOKEN=""
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--url) PULSE_URL="$2"; shift 2 ;;
|
||||
--token) PULSE_TOKEN="$2"; shift 2 ;;
|
||||
*) shift ;; # ignore other args
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z "$PULSE_URL" ]]; then
|
||||
echo "[ERROR] --url is required"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo " curl -fsSL http://<pulse-server>:7655/install.sh | \\"
|
||||
echo " sudo bash -s -- --url http://<pulse-server>:7655 --token <token> --enable-docker"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$PULSE_TOKEN" ]]; then
|
||||
echo "[ERROR] --token is required"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo " curl -fsSL ${PULSE_URL}/install.sh | \\"
|
||||
echo " sudo bash -s -- --url ${PULSE_URL} --token <token> --enable-docker"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Download and run the unified installer with --enable-docker
|
||||
echo "[INFO] Downloading unified agent installer..."
|
||||
curl -fsSL "${PULSE_URL}/install.sh" | bash -s -- --url "$PULSE_URL" --token "$PULSE_TOKEN" --enable-docker
|
||||
@@ -1,5 +1,19 @@
|
||||
# Pulse Host Agent Installation Script for Windows
|
||||
#
|
||||
# ┌─────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ DEPRECATED: This script installs the legacy pulse-host-agent. │
|
||||
# │ Please use the unified agent instead: │
|
||||
# │ │
|
||||
# │ $env:PULSE_URL="http://pulse-server:7655" │
|
||||
# │ $env:PULSE_TOKEN="your-token" │
|
||||
# │ irm http://pulse-server:7655/install.ps1 | iex │
|
||||
# │ │
|
||||
# │ The unified agent provides: │
|
||||
# │ - Combined host + Docker monitoring in one binary │
|
||||
# │ - Automatic updates │
|
||||
# │ - Simplified management │
|
||||
# └─────────────────────────────────────────────────────────────────────────────┘
|
||||
#
|
||||
# Usage:
|
||||
# iwr -useb http://pulse-server:7656/install-host-agent.ps1 | iex
|
||||
# OR with parameters:
|
||||
|
||||
Reference in New Issue
Block a user