AntoninB
Posts: 1
Joined: Tue Apr 03, 2018 12:51 pm

Mass deployment on Raspberry Compute Module 3.0

Tue Apr 03, 2018 12:55 pm

I am looking for the easiest method to backup/restore/mass deploy the raspberry compute module. (1000+ pcs)

I though about creating an image with raspbian and opencv but I still need to connect the module one by one. Do you have any idea ?

Best regards, Antonin

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1306
Joined: Sat Sep 10, 2011 11:43 am

Re: Mass deployment on Raspberry Compute Module 3.0

Wed Apr 04, 2018 4:05 pm

The scriptexecutor buildroot is ideal for this sort of thing if you have an ethernet interface available on your target... Basically it is a buildroot configuration that you push over USB (using the standard rpiboot code) that boots up and gets an http link from the cmdline.txt file. It will then wget a script from that link and run it with sudo

If you can't do this, you could instead use the scriptexecutor example to modify it to get the code from USB mass storage instead.

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Empyreal
Posts: 10
Joined: Tue Jul 05, 2016 1:41 pm

Re: Mass deployment on Raspberry Compute Module 3.0

Wed Jun 27, 2018 3:06 am

Thanks, Gordon. This looks promising. My use-case is similar to OP's but with some potential wrinkles...

I'll have approx 3,000 CM3's in a slow-speed (100mbit max) network. Since the high-rev code iterations will mostly take place using Docker, I won't have to full-scale flash complete new OS images very often.

But sometimes, I will.

I was wondering if there might be a mechanism using ScriptExecutor to always run first and do a web get using the CPUID as a component of the URL, which hits a centralized image server, and if a certain result is returned (i.e. the full URL of a new image to load for that CPUID), it goes ahead and downloads that and reboots into it?

Can we create a staged boot + rewrite eMMC process such that the aforementioned simple config-mgmt process always runs after power on, and based on a certain return value (or branch in logic) will go ahead and boot into an existing OS image, or instead will download, uncompress, write and then reboot?

Thanks in advance!

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1306
Joined: Sat Sep 10, 2011 11:43 am

Re: Mass deployment on Raspberry Compute Module 3.0

Wed Jun 27, 2018 12:43 pm

All of the things you suggest are possible, but they will all require you to do a lot of stuff...

For example, you can make it always boot into a buildroot image at boot time, then pivot_root into a separate filesystem (i.e. a USB flash drive) Or you could just use a chroot to a secondary filesystem for your application.

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Empyreal
Posts: 10
Joined: Tue Jul 05, 2016 1:41 pm

Re: Mass deployment on Raspberry Compute Module 3.0

Wed Jun 27, 2018 4:32 pm

Thanks for that, Gordon. Am I incorrect in thinking that perhaps ScriptExecutor wouldn't have a part in that flow?

It almost seems as if I should probably build a custom uboot image, and have the upgrade/download logic in that bit, right?

Sorry if this seems like a newb question, it is... I haven't built a kernel since my days porting AT&T SVR4 to i386 and RISC machines.... ;-)

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1306
Joined: Sat Sep 10, 2011 11:43 am

Re: Mass deployment on Raspberry Compute Module 3.0

Wed Jun 27, 2018 7:23 pm

Not exactly as it is, but Scriptexecutor is a great example of a use of buildroot. You could use it to create your pre-boot system

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Empyreal
Posts: 10
Joined: Tue Jul 05, 2016 1:41 pm

Re: Mass deployment on Raspberry Compute Module 3.0

Wed Jun 27, 2018 9:12 pm

Got it. Thanks for the guidance. That's what I was kind of thinking. ScriptExecutor gives me a good paradigm to crib/copy from.

cheers!

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

Re: Mass deployment on Raspberry Compute Module 3.0

Mon Aug 20, 2018 11:48 am

Empyreal wrote:
Wed Jun 27, 2018 3:06 am
Can we create a staged boot + rewrite eMMC process such that the aforementioned simple config-mgmt process always runs after power on, and based on a certain return value (or branch in logic) will go ahead and boot into an existing OS image, or instead will download, uncompress, write and then reboot?
I suggest to always network boot the devices. Then you always run the latest version.
Author of the robust Nard distro http://www.nard.se

Empyreal
Posts: 10
Joined: Tue Jul 05, 2016 1:41 pm

Re: Mass deployment on Raspberry Compute Module 3.0

Mon Aug 20, 2018 3:31 pm

I suggest to always network boot the devices. Then you always run the latest version.
I can't really do that because I'll have about 3,000 nodes firing up fairly quickly on a low speed network :-/

Return to “Compute Module”

Who is online

Users browsing this forum: No registered users and 3 guests