[TEST] Image Raspbian Beta

:warning: Notice to Testers :warning:

In order to simplify the life of our servant @pierre-gilles and so that he can spend even more time on the code :wink:, the builds of the raspbian image can be automated.

I have therefore set up and configured pi-gen to build a Gladys image. (pi-gen is the official tool of the Raspberry Foundation).

I tested it on a rpi 3 B+ but I need volunteers!

The repository is on github => GitHub - VonOx/gladys-pi-gen: Gladys Assistant official Raspberry Pi OS image · GitHub

Build Information:

  • Kernel 4.19
  • Debian lite buster base
  • Openssh
  • Docker
  • Reduce (Removal of all man pages, doc and apt caches)

Image size 635MB

First Startup

  • SD card partition extended
  • Reboot
  • Loading of Watchtower and Gladys containers

Note:

  • It takes about 15 minutes during the first startup for the Gladys container to be available
  • When you first connect via SSH, you will need to change the password (default is gladys/raspberry)

Download:

The info file contains all the installed packages

I have uploaded the files to a OneDrive share.

Screenshot:

The build is from today :slight_smile:


Changelog:

2020-05-27 - New image => udev rules and 10MB max log for docker
2020-04-28 - New image with Docker images (docker save)
2020-04-21 - Code on Github
2020-04-16 - First release

Aaaah top! Well played!

Do you know if it would be possible to perform the processing you do at first boot earlier? I’m afraid this is a step that often fails for users (bad connection for example, the user has no idea when it will end…)

Provide the image with the created containers? Yes, that’s possible

Here I created a service (systemctl) that waits for the network to be up.
At each startup, it checks that the containers exist.

The advantage is that it always pulls the latest version.

In my opinion, the option or the image is only downloaded at boot, which is a very frustrating experience for users: impossible to know where it is at, if your connection is not great it will take 2 hours but you don’t know what’s happening.

After that, if we build the Raspbian image with each Docker image build, in the end it amounts to the same thing the image will always be up to date :slight_smile:

Yes, I see, it’s not a problem (I just got pissed off making a service :smiley: / no big deal I learned some stuff ^^).

I will therefore modify the build, the containers will already be created. I will also modify the service to « monitor » these containers and log in dmesg.

I pushed to Github, build in progress taking into account the changes

Wow, @VonOx that’s a great idea. I’ll try it and give you feedback soon.

I was exhausted last night, I didn’t upload the image, I’ll do that tonight for those who are interested.

I take back what I said, cross build doesn’t allow me to pull an image during the build because docker doesn’t know which architecture it’s running on.

level=error msg="failure getting variant" error="getCPUInfo for pattern: Cpu architecture: not found"

A possible workaround would be to save the image → docker image save | Docker Docs
And load it at firstboot → docker image load | Docker Docs

Not tested yet but it might be as slow because it’s a zip/unzip.

What do you think about it @pierre-gilles ?

I tried with the save/load

It’s awesome, 15 minutes to untar on a rpi b+

Oh damn, is there no way to work around it? Can’t you specify the architecture in the docker pull command?

I still prefer it over the download which depends on your connection. For a guy on ADSL, the download will be more like 1 hour, whereas untar will take a constant time :slight_smile:

I pushed to GitHub and made a new image available (+147 MB)

Nice! By the way, do you properly load the style:

docker load --input your-image.tar

Didn’t you compress the image? I’m saying this to see if we can’t save time. If it’s compressed, it takes longer to decompress in my opinion!

https://github.com/VonOx/gladys-pi-gen/blob/gladys/gladys/03-prepare-docker/00-run.sh

The docker save performs compression, no choice.

New build:

  • Log a 10MB max for gladys
  • First version of udev rules (on the host only / I’m looking for an elegant and safe way to do it in the docker image)

Looking forward to your feedback :wink:

Top! :clap:

For a slightly longer startup time on the first run, is there any way to perform the docker run in advance?

I don’t have a solution yet, the Docker daemon doesn’t know which architecture it is on (QEMU bug) the daemon is never launched during the build.

I’m not losing hope :sweat_smile:

What if we went through an image that doesn’t use the architecture? (I don’t know if that’s possible)

The issue isn’t even with the Docker image. I can’t run the Docker daemon from the Raspbian image during the build (chroot / QEMU), there’s a QEMU bug, it doesn’t provide information about the architecture, the Docker daemon crashes without this information.

To work around this, I save the image using the host’s Docker that builds the Raspbian image.

I don’t know if this is clear :sweat_smile:

Mmm ok, that’s a shame! I see :slight_smile:

I don’t know if you’ve seen it, but now the Raspberry Pi Foundation provides a 64-bit image ^^ We’ll have to build 2 images :sweat_smile: