fix: remove references to deleted install-host-agent.sh script
The unified agent system replaced install-host-agent.sh with install.sh. This commit updates all references: - Dockerfile: removed COPY for deleted script - router.go: serve install.sh at /install-host-agent.sh endpoint (backwards compatible) - build-release.sh: removed copy of deleted script - validate-release.sh: removed validation of deleted script - install.sh: updated script list for bare-metal installs
This commit is contained in:
parent
c12aa2c404
commit
21c033c144
5 changed files with 8 additions and 10 deletions
|
|
@ -263,7 +263,6 @@ RUN chmod +x /docker-entrypoint.sh
|
|||
RUN mkdir -p /opt/pulse/scripts
|
||||
COPY scripts/install-docker-agent.sh /opt/pulse/scripts/install-docker-agent.sh
|
||||
COPY scripts/install-container-agent.sh /opt/pulse/scripts/install-container-agent.sh
|
||||
COPY scripts/install-host-agent.sh /opt/pulse/scripts/install-host-agent.sh
|
||||
COPY scripts/install-host-agent.ps1 /opt/pulse/scripts/install-host-agent.ps1
|
||||
COPY scripts/uninstall-host-agent.sh /opt/pulse/scripts/uninstall-host-agent.sh
|
||||
COPY scripts/uninstall-host-agent.ps1 /opt/pulse/scripts/uninstall-host-agent.ps1
|
||||
|
|
|
|||
|
|
@ -2737,12 +2737,12 @@ deploy_agent_scripts() {
|
|||
local scripts=(
|
||||
"install-docker-agent.sh"
|
||||
"install-container-agent.sh"
|
||||
"install-host-agent.sh"
|
||||
"install-host-agent.ps1"
|
||||
"uninstall-host-agent.sh"
|
||||
"uninstall-host-agent.ps1"
|
||||
"install-sensor-proxy.sh"
|
||||
"install-docker.sh"
|
||||
"install.sh"
|
||||
)
|
||||
|
||||
local deployed=0
|
||||
|
|
|
|||
|
|
@ -3428,20 +3428,21 @@ func (r *Router) handleDownloadHostAgentInstallScript(w http.ResponseWriter, req
|
|||
w.Header().Set("Pragma", "no-cache")
|
||||
w.Header().Set("Expires", "0")
|
||||
|
||||
scriptPath := "/opt/pulse/scripts/install-host-agent.sh"
|
||||
// Serve the unified install.sh script (backwards compatible with install-host-agent.sh URL)
|
||||
scriptPath := "/opt/pulse/scripts/install.sh"
|
||||
content, err := os.ReadFile(scriptPath)
|
||||
if err != nil {
|
||||
// Fallback to project root (dev environment)
|
||||
scriptPath = filepath.Join(r.projectRoot, "scripts", "install-host-agent.sh")
|
||||
scriptPath = filepath.Join(r.projectRoot, "scripts", "install.sh")
|
||||
content, err = os.ReadFile(scriptPath)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Str("path", scriptPath).Msg("Failed to read host agent installer script")
|
||||
log.Error().Err(err).Str("path", scriptPath).Msg("Failed to read unified agent installer script")
|
||||
http.Error(w, "Failed to read installer script", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
http.ServeContent(w, req, "install-host-agent.sh", time.Now(), bytes.NewReader(content))
|
||||
http.ServeContent(w, req, "install.sh", time.Now(), bytes.NewReader(content))
|
||||
}
|
||||
|
||||
// handleDownloadHostAgentInstallScriptPS serves the PowerShell installation script for Windows
|
||||
|
|
|
|||
|
|
@ -163,7 +163,6 @@ for build_name in "${build_order[@]}"; do
|
|||
# Copy scripts and VERSION metadata
|
||||
cp "scripts/install-docker-agent.sh" "$staging_dir/scripts/install-docker-agent.sh"
|
||||
cp "scripts/install-container-agent.sh" "$staging_dir/scripts/install-container-agent.sh"
|
||||
cp "scripts/install-host-agent.sh" "$staging_dir/scripts/install-host-agent.sh"
|
||||
cp "scripts/install-host-agent.ps1" "$staging_dir/scripts/install-host-agent.ps1"
|
||||
cp "scripts/uninstall-host-agent.sh" "$staging_dir/scripts/uninstall-host-agent.sh"
|
||||
cp "scripts/uninstall-host-agent.ps1" "$staging_dir/scripts/uninstall-host-agent.ps1"
|
||||
|
|
@ -202,7 +201,6 @@ done
|
|||
|
||||
cp "scripts/install-docker-agent.sh" "$universal_dir/scripts/install-docker-agent.sh"
|
||||
cp "scripts/install-container-agent.sh" "$universal_dir/scripts/install-container-agent.sh"
|
||||
cp "scripts/install-host-agent.sh" "$universal_dir/scripts/install-host-agent.sh"
|
||||
cp "scripts/install-host-agent.ps1" "$universal_dir/scripts/install-host-agent.ps1"
|
||||
cp "scripts/uninstall-host-agent.sh" "$universal_dir/scripts/uninstall-host-agent.sh"
|
||||
cp "scripts/uninstall-host-agent.ps1" "$universal_dir/scripts/uninstall-host-agent.ps1"
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ if [ "$SKIP_DOCKER" = false ]; then
|
|||
|
||||
# Validate all required scripts exist and are executable
|
||||
info "Checking installer/uninstaller scripts in /opt/pulse/scripts/..."
|
||||
docker run --rm --entrypoint /bin/sh "$IMAGE" -c 'set -euo pipefail; cd /opt/pulse/scripts; required="install-docker-agent.sh install-container-agent.sh install-host-agent.sh install-host-agent.ps1 uninstall-host-agent.sh uninstall-host-agent.ps1 install-sensor-proxy.sh install-docker.sh install.sh"; for f in $required; do [ -f "$f" ] || { echo "missing script $f" >&2; exit 1; }; case "$f" in *.sh|*.ps1) [ -x "$f" ] || { echo "$f not executable" >&2; exit 1; };; esac; done; echo "All scripts present and executable"' || { error "Script validation failed"; exit 1; }
|
||||
docker run --rm --entrypoint /bin/sh "$IMAGE" -c 'set -euo pipefail; cd /opt/pulse/scripts; required="install-docker-agent.sh install-container-agent.sh install-host-agent.ps1 uninstall-host-agent.sh uninstall-host-agent.ps1 install-sensor-proxy.sh install-docker.sh install.sh"; for f in $required; do [ -f "$f" ] || { echo "missing script $f" >&2; exit 1; }; case "$f" in *.sh|*.ps1) [ -x "$f" ] || { echo "$f not executable" >&2; exit 1; };; esac; done; echo "All scripts present and executable"' || { error "Script validation failed"; exit 1; }
|
||||
success "All installer/uninstaller scripts present and executable"
|
||||
|
||||
# Validate all required binaries exist and are non-empty
|
||||
|
|
@ -446,7 +446,7 @@ for arch in "${tar_arches[@]}"; do
|
|||
check_tar_entries_nonempty "$tarball" "${unified_agent_entries[@]}"
|
||||
|
||||
# Check scripts
|
||||
tar -tzf "$tarball" ./scripts/install-docker-agent.sh ./scripts/install-container-agent.sh ./scripts/install-host-agent.sh ./scripts/install-host-agent.ps1 ./scripts/uninstall-host-agent.sh ./scripts/uninstall-host-agent.ps1 ./scripts/install-sensor-proxy.sh ./scripts/install-docker.sh ./scripts/install.sh >/dev/null 2>&1 || { error "$(basename $tarball) missing scripts"; exit 1; }
|
||||
tar -tzf "$tarball" ./scripts/install-docker-agent.sh ./scripts/install-container-agent.sh ./scripts/install-host-agent.ps1 ./scripts/uninstall-host-agent.sh ./scripts/uninstall-host-agent.ps1 ./scripts/install-sensor-proxy.sh ./scripts/install-docker.sh ./scripts/install.sh >/dev/null 2>&1 || { error "$(basename $tarball) missing scripts"; exit 1; }
|
||||
|
||||
# Check VERSION file
|
||||
tar -tzf "$tarball" ./VERSION >/dev/null 2>&1 || { error "$(basename $tarball) missing VERSION file"; exit 1; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue