Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions deployment/component-monitor/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The component-monitor is available as a public image at: quay.io. The latest tag is automatically updated whenever a change is made.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's great, I can extract the latest binary from the image, don't have to build it from the source code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary in the container image is dynamically linked and requires GLIBC_2.32, but RHEL8 ships with GLIBC 2.28. The binary was likely built on a newer base image.

/tmp/component-monitor: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /tmp/component-monitor)

I have Go 1.24.6 installed on RHEL8 vm, seems like I have to rollback image based logic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the service file to launch it in container directly. so this file is not needed

# Build the SHIP Status Dashboard component-monitor binary from source
# and install it to /usr/local/bin (requires sudo).

set -euo pipefail

REPO_URL="https://github.com/openshift-eng/ship-status-dash.git"
CLONE_DIR=$(mktemp -d)
INSTALL_PATH="/usr/local/bin/component-monitor"

trap "rm -rf ${CLONE_DIR}" EXIT

echo "==> Cloning ship-status-dash into temp directory..."
git clone --depth 1 "${REPO_URL}" "${CLONE_DIR}"

echo "==> Building component-monitor binary..."
cd "${CLONE_DIR}"
go build -mod=vendor -o component-monitor ./cmd/component-monitor

echo "==> Installing to ${INSTALL_PATH} (requires sudo)..."
sudo install -m 0755 component-monitor "${INSTALL_PATH}"

echo "==> Installed successfully:"
ls -lh "${INSTALL_PATH}"
component-monitor --help 2>&1 | head -1 || true
9 changes: 9 additions & 0 deletions deployment/component-monitor/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
frequency: 30s
components:
- component_slug: "errata-reliability"
sub_component_slug: "mcp-server"
http_monitor:
url: "http://10.0.76.71:8000/health"
code: 200
retry_after: 5s
severity: "Down"
28 changes: 28 additions & 0 deletions deployment/systemd/ship-status-component-monitor.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[Unit]
Description=SHIP Status Dashboard Component Monitor
After=network-online.target
Wants=network-online.target

[Service]
Type=simple

# IMPORTANT: Replace 'cloud-user' with your actual username on the VM
User=cloud-user

WorkingDirectory=/home/cloud-user/release-tests/deployment/component-monitor

ExecStart=/usr/local/bin/component-monitor \
--config-path=/home/cloud-user/release-tests/deployment/component-monitor/config.yaml \
--dashboard-url=https://protected.ship-status.ci.openshift.org \
--name=ert-component-monitor \
--report-auth-token-file=/etc/component-monitor/token.txt

Restart=always
RestartSec=10

StandardOutput=journal
StandardError=journal
SyslogIdentifier=ship-status-component-monitor

[Install]
WantedBy=multi-user.target