Repository navigation
fix(pi): run one novaGround unit per environment so the backend port … - #14
Merged
Merged
Conversation
…follows the stack Refactor novaGround service management and upload functionality - Remove the old novaGround.service file and replace it with a new template service file (novaGround@.service) that supports multiple environments (prod and dev). - Update run.sh to allow selection of the environment and ensure proper configuration loading from environment-specific files. - Enhance data_file_controller to log upload results and check backend health in a separate thread. - Modify upload_file function to return detailed upload results, including HTTP status and error messages. - Improve start.sh to validate environment and configuration before execution, preventing conflicts between prod and dev instances.
…use wildcard for WiringPi deb package
Awesome-Ace22
marked this pull request as draft
October 24, 2026 14:34
Awesome-Ace22
marked this pull request as ready for review
October 24, 2026 14:50
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.
What and why
This pull request introduces a major refactor of how novaGround is configured and run on the Pi, moving from a single systemd service and config file to a per-environment (prod/dev) model. It also adds a timer-based reporting mechanism for Pi status and clarifies the configuration and operation in the documentation and scripts.
fixes UTATRocketry/Nova-Collected#29
The most important changes are:
Systemd Service Architecture and Configuration:
novaGround.servicewith a template unitnovaGround@.service, allowing separate instances for prod and dev environments. Each instance reads its settings from/etc/nova/pi.env(Pi identity and binary) and/etc/nova/novaGround-<env>.env(broker/backend, written by the ops PC), preventing accidental misconfiguration and making switching environments explicit. [1] [2] [3] [4] [5] [6] [7] [8]Bench Session Handling and Environment Selection:
run.shto select the environment (--env prod|dev), read settings from the correct files, and refuse to run if either service is active, eliminating conflicts and making bench work safer and more predictable.Automated Pi State Reporting:
nova-pi-report.serviceandnova-pi-report.timer, which periodically (every 15s) report the Pi’s state (including which novaGround is running, backend status, and last upload) to the Nova Console, improving fleet monitoring and diagnostics. [1] [2] [3]Installer and Workflow Updates:
install.shto only ask for Pi identity and target binary, delegating broker/backend configuration to the ops PC. The installer now registers both prod and dev services, and documents the migration path from the old single-service setup. [1] [2] [3] [4]Documentation and Housekeeping:
README.mdanddocs/setup.mdto reflect the new multi-environment setup, clarify troubleshooting, and document the new configuration and reporting mechanisms. Also adds.timerto.gitattributesfor proper line endings. [1] [2] [3] [4] [5]These changes modernize the deployment, make environment switching robust, and improve observability of Pi status.
How was this tested?
Hardware impact
hardware-risklabel; a lead must approve!, link the matching PRs:impacts deployment, releasing, and data saving
UTATRocketry/Nova-Collected/pull/#36
Checklist
dev(ormainfor a release/hotfix, or with a reason given above).envfiles or build output committed