Add Apptainer remote sensor node deployment - #108
Conversation
13605f7 to
e33b95f
Compare
|
Thanks for putting this together. Here's my quick AI response to all this without fully digging into everything. The things written in here are not fully where I stand on this, but I think it's a good starting point for conversation/modifications. Please respond with questions or comments and let me know if you need help developing any of this or if you want to keep working away on your own... I spent some time working through what the intended Sensor Node deployment model should be and how this should fit with the installer work already in FISSURE. The remote deployment capability is valuable, particularly the SSH orchestration, privilege handling, host inspection, file transfer, progress reporting, and ability to provision a headless machine without requiring someone to manually log in and perform each step. I would like to preserve that work. The main concern is avoiding multiple places that define how a Sensor Node is built and installed. The existing FISSURE installer and the files under Ideally, this utility should become a remote orchestration layer around the existing installer rather than a separate deployment architecture. It should invoke the existing Sensor Node mode and reuse the current Apptainer and autostart logic wherever possible. I would prefer small refactors to expose that functionality rather than a major redesign of the installer. For a new remote machine, I do want the deployer to be capable of preparing a mostly blank host. It should detect what is already installed, reuse compatible software, and install anything that is missing. Internet-based installation can be the easiest/default path when connectivity is available, but it would be useful to support offline packages later for systems that cannot or should not reach the internet. It should also be possible to skip host preparation when the host and hardware support are already configured. For the SIF, the normal long-term order will probably be:
At the moment, building still needs to be supported because I do not yet host official images. The official Sensor Node SIF will likely contain some extra user-space software rather than being aggressively hardware-specific, since most hardware integration is handled at the host level and the additional container packages are usually not the largest problem. SSH deployment should be treated as one provisioning method, not the required installation model for all Sensor Nodes. For many field systems, I will still prepare a known-good installation locally, clone or transfer an SD card, and then adjust the configuration. The SSH workflow is useful for truly remote, network-reachable computers, but deployment should not assume the node has permanent internet access or that a multi-gigabyte SIF will always be transferred over the operational network. The deployment process also should not depend on a running Dashboard or HIPRFISR instance. A node should be able to be installed and staged independently, and then automatically connect to its configured HIPRFISR endpoint when both sides are available. A heartbeat check could be an optional diagnostic when HIPRFISR is running, but I would not make it a required deployment success condition. Seeing the node appear later in the Tactical tab or node-selection interface is sufficient operational confirmation. The HIPRFISR address should be explicitly configurable. Inferring it from the SSH connection can be a useful default for a simple LAN, but the SSH management route and the FISSURE communications route may be different in VPN, cellular, mesh, NAT, or multi-hop deployments. I would also prefer the deployer to use the existing FISSURE autostart implementation rather than introduce a separate authoritative service configuration. I test the current autostart behavior across several types of systems, and remote Sensor Node installations generally should enable it by default. Mutable FISSURE data should remain on the host rather than being written into a general persistent overlay. This includes:
The SIF should remain replaceable without losing those files. For plugin updates, I would avoid trying to intelligently merge conflicting files. The utility can preserve the existing remote It would also be useful for the same command-line utility to support lighter operations after the initial installation, such as:
Existing user data should be preserved by default, with explicit cleanup options. Timestamped artifacts and recordings are straightforward to remove when requested. Plugins and source directories should only be replaced when the operator explicitly selects that behavior. Certificate handling also needs some refinement. Keeping certificates outside the SIF is correct, but copying the same certificate directory to every machine is only a temporary solution. The installation process should use the existing FISSURE certificate-generation approach and eventually perform a secure exchange or enrollment so each node can receive the correct keys without transferring unnecessary private key material. I am not looking to add a full release-management and rollback framework at this stage. FISSURE does not currently maintain formal releases, migrations, or compatibility rules across the host software, SIF, source, plugins, and configuration, so transactional rollback could become difficult to maintain. A simple backup of the previous SIF, config, or plugin directory is fine if it remains isolated and low-maintenance, but I would not make versioned releases and automatic rollback central to the deployment model. In summary, I think the remote deployment work is useful and worth continuing. The desired direction would be:
That should let this become a useful remote frontend for the existing FISSURE installation process without creating parallel systems that have to be maintained separately. |
I agree with everything else, but I would like to push back slightly on this point. For a remotely deployed, headless Sensor Node, I think the host’s init system should provide the user-facing process management interface. Once the installation succeeds, the operator’s next questions are usually: Is the node running? How do I stop or restart it? Will it start after a reboot? Where are its logs? On a systemd-based distribution, a unit file provides standard and immediately discoverable answers through systemctl and journalctl. I understand the concern about creating two authoritative startup configurations, and I do not think the deployer should independently reimplement FISSURE’s startup behavior. A better approach may be for the deployer to install a thin systemd unit that invokes the existing FISSURE autostart entry point or uses configuration generated by the existing implementation. FISSURE would remain authoritative for application startup configuration, while systemd would handle operating-system-level supervision and lifecycle management? What do you think ? My main concern is that a remote headless installation should expose a conventional service-management interface and enable it by default, rather than requiring the operator to understand FISSURE’s internal startup mechanism. |
I may be missing part of this requirement. What I have not provided is a way to specify a custom Apptainer definition file. Is that what you intended?, or does the existing SIF selection cover this |
This makes sense I made an issue for this that proposes a first pass solution for this. |
f48f0c2 to
fbc9e28
Compare
|
Thanks for the updates. I went back through the current implementation and your responses, and I think this is getting very close to something I am ready to merge and start testing. The overall direction looks good now. I like the SSH/SCP deployment flow, persistent state handling, source/plugin sync, update operations, health checks, and the use of systemd for a headless Sensor Node. I would like to try the systemd approach on both a normal Ubuntu system and an Ubuntu-based Raspberry Pi or similar ARM SBC. If it works reliably on both, I am comfortable moving toward that as the normal service model. There are a few things I would like to tighten up before merging:
I am not looking for another major redesign. Most of the remote deployment subsystem looks useful and I think you are on the right track. The main thing I want before merging is to make sure the remote workflow cleanly reuses the FISSURE installation and host-preparation logic we already have, while keeping the genuinely new remote orchestration pieces separate. Once those boundaries are cleaned up, I am basically ready to merge this and start exercising it on real Ubuntu systems and ARM hardware. |
Summary
SensorNodeinstall mode instead of maintaining a second dependency list--health-onlydiagnosticReviewer feedback addressed
Installer/ModesSensorNode path and retain the upstream setuid Apptainer package behavior--buildfrom remote--deployso a supplied SIF can be deployed without rebuilding it--hiprfisr-addressso the intended endpoint can be supplied explicitly--sync-pluginsand--sync-sourceactions--update-config,--update-image,--restart, and category-specific--clear-dataactionsManual test plan
Review-driven CLI options
--buildbuilds locally without opening an SSH connection.--deploydeploys a supplied SIF without starting a local build.--update-configchanges only the active configuration and preserves mutable state.--update-imagechanges only the active SIF and preserves configuration and mutable state.--restartrestarts and validates the existing service without changing deployed files.--clear-data=logsremoves only core and plugin logs.--clear-data=artifactsremoves only artifact data.--clear-data=recordingsremoves only archive and recording data.--sync-pluginsadds and updates plugins without deleting remote-only files.--sync-sourceupdates the host source tree without deleting remote-only files or copying excluded state.--hiprfisr-addresswrites the requested endpoint into the deployed Sensor Node configuration.Fresh deployment
--build; confirm no SSH connection is made andapptainer testpasses.--deployand an explicit--hiprfisr-addresswhile Dashboard and HIPRFISR are stopped.--health-onlyobserves a fresh heartbeat.--clear-datacategory and confirm only the selected data is removed.Validation
systemd-analyze verifybash -nFollow-ups
Notes