ros-realtime / ros-realtime-rpi4-image

An image for the Raspberry Pi 4 with ROS 2 and Linux RT preinstalled
Apache License 2.0
224 stars 41 forks source link

Evaluate packer #29

Closed carlossvg closed 2 years ago

carlossvg commented 2 years ago

We have been told there is a tool, packer, which can be used to build images. We could evaluate packer and see if we could leverage an existing tool to create our ROS 2 image builder.

@shuhaowu Are you familiar with this tool?

Resources:

razr commented 2 years ago

https://github.com/marketplace/actions/packer-github-actions

shuhaowu commented 2 years ago

Yes. When I built this tool originally, I evaluated Packer. Maybe I'm not an expert user, but it failed my requirements on two accounts:

  1. I couldn't figure out how to pause and cross compile.
  2. Packer doesn't allow the for interrupt and resume as far as I saw. That kind of system is very tedious to work with (as I have a lot of experience doing that kind of work), as any minor typo requires a complete restart of the build, which with qemu can take upwards of 20 min depending on what you're doing. As I do this work outside of primary work hours, I don't have the time to wait, so I built the system as is to shorten the development time.

There are also some annoyances in having to write shell scripts in JSON, and not be able to easily test incrementally. As a result, I just wrote my own because it's not that hard to do (basically chroot + run scripts..).

carlossvg commented 2 years ago

@shuhaowu Ah, that makes a lot of sense. My understanding is that packer would be use to parametrize the image building. For example, this would be useful in case we want to support many SBCs, OS, kernel versions, etc. I don't think this will be the case for us the short-middle term. If that's the case in the far future that would be good news.

I suggest to close the issue for the moment.

FYI @LanderU @razr

shuhaowu commented 2 years ago

Sounds good.

As a minor note, the builder I have, especially with the ini files, will allow for multiple SBC, OS, kernel versions as well to be parameterized.