initial commit to refactor cluster init#70
Draft
aditigaur4 wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
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.shscript that performs venv creation, package install, optional DCGM/cuda-bindings setup, and systemd service configuration. - Simplifies
00-install.shto only handle jetpack checks/downloads and then delegate tosetup-healthagent.sh. - Introduces
.installversion 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.