Viriiguy
Posts: 13
Joined: Sun Jul 17, 2016 2:26 pm

Remotely update Pi's from Master image?

Fri Dec 08, 2017 2:53 pm

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

User avatar
RaTTuS
Posts: 10460
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Remotely update Pi's from Master image?

Fri Dec 08, 2017 3:01 pm

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...
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Viriiguy
Posts: 13
Joined: Sun Jul 17, 2016 2:26 pm

Re: Remotely update Pi's from Master image?

Fri Dec 08, 2017 3:13 pm

Ohhh... I knew it had to be stupid simple! I could kiss you!

Let me go play with this!

User avatar
RaTTuS
Posts: 10460
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Remotely update Pi's from Master image?

Fri Dec 08, 2017 3:20 pm

there are pitfalls etc.....
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Viriiguy
Posts: 13
Joined: Sun Jul 17, 2016 2:26 pm

Re: Remotely update Pi's from Master image?

Fri Dec 08, 2017 3:35 pm

I kind of expected as much. I'll see what I can come up with this weekend.

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Remotely update Pi's from Master image?

Fri Dec 08, 2017 11:38 pm

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).

Viriiguy
Posts: 13
Joined: Sun Jul 17, 2016 2:26 pm

Re: Remotely update Pi's from Master image?

Thu Dec 14, 2017 9:40 am

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.

rln
Posts: 174
Joined: Wed Apr 09, 2014 1:43 pm
Location: Sweden
Contact: Website

Re: Remotely update Pi's from Master image?

Thu Dec 14, 2017 12:36 pm

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/
Author of the robust Nard distro http://www.nard.se

rduo
Posts: 4
Joined: Fri Dec 14, 2018 11:42 pm

Re: Remotely update Pi's from Master image?

Fri Dec 14, 2018 11:45 pm

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

hommar
Posts: 172
Joined: Sat Mar 25, 2017 1:55 pm
Location: Russia, Yekaterinburg

Re: Remotely update Pi's from Master image?

Sat Dec 15, 2018 11:44 pm

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

Return to “Advanced users”