Page 1 of 1

Remotely update Pi's from Master image?

Posted: Fri Dec 08, 2017 2:53 pm
by Viriiguy
Hello,

I currently have 135 Raspberry Pi's deployed throughout our company. Almost all of them are setup identically, with the exception of one file. What I would like to do, is find a way that I can push updates to them all at once, from a master img that I maintain. This way we don't have to manually update them all whenever a change is made to the master file.

Surely there is a way to do this, But I have yet to find it. Has anyone else done something similar?

Thanks!
Randy

Re: Remotely update Pi's from Master image?

Posted: Fri Dec 08, 2017 3:01 pm
by RaTTuS
enable root ssh and
rsync -a --exclude /full/path/to/file source/image root@remote.pc:/

or have similar on the machine to rsync from a master image on boot up or regular times etc...

Re: Remotely update Pi's from Master image?

Posted: Fri Dec 08, 2017 3:13 pm
by Viriiguy
Ohhh... I knew it had to be stupid simple! I could kiss you!

Let me go play with this!

Re: Remotely update Pi's from Master image?

Posted: Fri Dec 08, 2017 3:20 pm
by RaTTuS
there are pitfalls etc.....

Re: Remotely update Pi's from Master image?

Posted: Fri Dec 08, 2017 3:35 pm
by Viriiguy
I kind of expected as much. I'll see what I can come up with this weekend.

Re: Remotely update Pi's from Master image?

Posted: Fri Dec 08, 2017 11:38 pm
by mfa298
Viriiguy wrote:
Fri Dec 08, 2017 2:53 pm
I currently have 135 Raspberry Pi's deployed throughout our company. Almost all of them are setup identically, with the exception of one file. What I would like to do, is find a way that I can push updates to them all at once, from a master img that I maintain. This way we don't have to manually update them all whenever a change is made to the master file.
The standard way to handle this would be through an automation/devops tool such as ansible, chef, puppet, salt. These generally work by having a set of rules / sets of instructions for configuring a system which are run regularly, by updating rules you can update all systems (or sets of them).

Re: Remotely update Pi's from Master image?

Posted: Thu Dec 14, 2017 9:40 am
by Viriiguy
Yea, Rsync is likely not going to work. We looked into PiNet, but we can't PXE boot off wifi and to go wired would be a MONSTROUS Project. Which is too bad, PiNet would have been pretty much perfect.

I am now looking into Ansible, or rolling my own APT server.

Re: Remotely update Pi's from Master image?

Posted: Thu Dec 14, 2017 12:36 pm
by rln
Viriiguy wrote:
Fri Dec 08, 2017 2:53 pm
Surely there is a way to do this, But I have yet to find it. Has anyone else done something similar?
One can use a distro specifically designed for this kind of task. My Nard SDK project keeps 99.99% of the distributed Pi's identical, only a few files make them unique and those are preserved during upgrades.

http://www.nard.se/

Re: Remotely update Pi's from Master image?

Posted: Fri Dec 14, 2018 11:45 pm
by rduo
You can also use a dedicated OTA updates tool for this for more safety (rollback support) and control (grouping, deployment logs etc).
Mender recently added official support for Raspbian: https://hub.mender.io/t/raspberry-pi-3- ... b-raspbian

Re: Remotely update Pi's from Master image?

Posted: Sat Dec 15, 2018 11:44 pm
by hommar
I think good idea use squashfs and overlayfs (see team "readonly rootfs" on this forum for example)

and every boot as first boot with load configs from fat partition

And when need update you download new squash file