Skip to content

initial commit to refactor cluster init#70

Draft
aditigaur4 wants to merge 1 commit into
mainfrom
cluster-init-fixes
Draft

initial commit to refactor cluster init#70
aditigaur4 wants to merge 1 commit into
mainfrom
cluster-init-fixes

Conversation

@aditigaur4

Copy link
Copy Markdown
Collaborator

No description provided.

@aditigaur4
aditigaur4 marked this pull request as draft June 25, 2026 23:19
@aditigaur4
aditigaur4 requested a review from Copilot June 26, 2026 22:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the Cluster-Init (v1) HealthAgent installation flow by separating CycleCloud jetpack-specific steps (config + package download) from the machine/OS setup steps, enabling a new standalone installer script that can run independently of jetpack.

Changes:

  • Adds a new setup-healthagent.sh script that performs venv creation, package install, optional DCGM/cuda-bindings setup, and systemd service configuration.
  • Simplifies 00-install.sh to only handle jetpack checks/downloads and then delegate to setup-healthagent.sh.
  • Introduces .install version checking to skip reinstalling when the expected HealthAgent version is already present.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
specs/default/cluster-init/scripts/setup-healthagent.sh New standalone installer script (OS setup, venv + pip install, optional GPU/DCGM setup, systemd unit creation).
specs/default/cluster-init/scripts/00-install.sh Refactored entrypoint to download via jetpack and delegate installation to the standalone script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +43 to +46
if [[ "$OS" != "almalinux" && "$OS" != "ubuntu" && "$OS" != "rhel" ]]; then
echo "Unsupported operating system: $OS. HealthAgent only supports AlmaLinux, Ubuntu and RHEL. Exiting."
exit 0
fi
Comment on lines +47 to +50
else
echo "Cannot detect the operating system. Exiting."
exit 0
fi
Comment on lines +82 to +85
else
echo "Unsupported operating system: $OS $VERSION_ID"
exit 0
fi
Comment on lines +160 to +164
systemctl daemon-reload
systemctl restart nvidia-dcgm
echo "export DCGM_VERSION=$DCGM_VERSION" >> $VENV_DIR/bin/activate
echo "export HEALTHAGENT_DIR=$HEALTHAGENT_DIR" >> $VENV_DIR/bin/activate
}
Comment on lines +176 to +184
[Service]
Environment="DCGM_VERSION=$DCGM_VERSION"
Environment="HEALTHAGENT_DIR=$HEALTHAGENT_DIR"
WorkingDirectory=$HEALTHAGENT_DIR
ExecStart=$VENV_DIR/bin/python3 $VENV_DIR/bin/healthagent
Restart=always
User=root
Group=root
WatchdogSec=600s
Comment on lines +48 to +51
if [ -f "$HEALTHAGENT_DIR/.install" ]; then
# Source the file to load HEALTHAGENT variable
source "$HEALTHAGENT_DIR/.install"
if [ "$HEALTHAGENT_INSTALLED_VERSION" == "$HEALTHAGENT_VERSION" ]; then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants