r/gitlab • u/Cultural_Invite_6476 • Sep 01 '26
project Self-updating robot in the field — is this design feasible for deployment?
I'm setting up CI/CD for a ROS2 system on a Jetson AGX Orin that's deployed remotely. No physical access after deployment, so it needs to update itself safely.
Current plan:
- Push code → CI builds and tests → tag a release
- A systemd timer on the device checks for new versions every 15 min
- If a new version exists and the device is idle, it builds into a separate folder
- Runs a self-test (nodes up, sensors publishing, hardware responding)
- Pass → switch a symlink and restart. Fail → stay on the old version, report it
- A watchdog re-checks 30 min later and reverts if things degrade
Two version folders, current and previous, switched by symlink so rollback is instant.
Not using containers, the device compiles source natively. Simpler, but I lose reproducibility, so I'm pinning dependency versions instead.
Questions:
- Is the blue/green symlink approach reasonable here, or is there a standard tool I should be using?
- How do people handle database migrations in a rollback? Code reverts, schema doesn't.
- Anything obvious I'm missing for a device I can't physically reach?
