Hello there,
I am trying to move several devices from balenaCloud to an openBalena instance that I have running. The devices are deployed and provisioned with balenaCloud currently, balenaOS version 2.43.0+rev1, production OS variant.
openBalena instance is up and running, DNS is setup and I can access it and deploy devices that were provisioned directly with openBalena, however I have some issues regarding moving existing devices provsioned with balenaCloud. I’m aware that there’s a balena join command in the CLI, but if I understood the documentation correctly, that can only be used on local devices, not those that are remote.
There seems to be a way of doing this by SSHing to the devices, however as far as I know you can’t SSH to production versions of the OS.
Which steps should I take to be able to gracefully migrate devices from balenaCloud to openBalena or am I better off with reprovisioning the devices with openBalena, starting the whole process from the beginning?
It is possible to SSH into production versions of the OS, by adding your own keys public identity to the /mnt/boot/config.json configuration file, specifically in an os object within it:
{"os": {"sshKeys": ["key1", "key2"]}}
This will then require a reboot, but you should be able to then SSH with your own keys as well as via balena Dashboard/balena-cli.
I’d stress though, that this process, especially the modification of the config.json carries some risk so if potential loss of a remote device isn’t acceptable, then reprovisioning them against the openBalena instance might be a better way to go.
It is possible to SSH into production versions of the OS, by adding your own keys public identity to the /mnt/boot/config.json configuration file, specifically in an os object within it:
{"os": {"sshKeys": ["key1", "key2"]}}
This will then require a reboot, but you should be able to then SSH with your own keys as well as via balena Dashboard/balena-cli.
I’ve managed to do that, so the SSH works great. However, on the matter of leave/join, I’ve decided to just reprovission with openBalena.
Thanks for your help with the matter with the SSH.