Multiplatform packages, Docker and ARM supervisor


#1

Hello everyone,

I’ve been planning to start a home lab setup cluster, which would involve Raspberry Pis with Docker, basically.

Habitat seems really neat, and considering it is written in Rust, I thought it would be nice to run them on the Pis.
Unfortunately, I’m not seeing any links or docs suggesting support to ARM Linux builds.

The closer I got was this thread.
On the Build tutorial, there is a small note regarding Linux Images, but no detail about which architecture to use:

Habitat Builder currently publishes only Linux-based containers. You can still complete this demo even if your system cannot run a Linux container, but you will not be able to run the app locally.

I also would like to be able to distribute my binaries, libs and services for multiple platforms.
When writing a Rust service, I will most likely have it built for different platforms, in order to run them on the Pi Cluster. I haven’t seen much information around plan.sh support for different architectures under the same platform.

Looking at tutorials, precompiled distributions seems to be really well supported, but they are always referring to it as Linux only, no architecture mentioned.

So I have a few questions:

  • Is there a precompiled Habitat Supervisor for ARM?
  • Is there a Dockerized supervisor for ARM to use?
  • Would I be able to write .hart package and plan.sh that supports different architectures?
  • Can I package more than one platform and archtecture on a .hart or should there be one package for each?
    • Lets say: Windows, Linux x86 and ARMv6 all living together or as one package each.

Thanks for the great work. Looking forward auto-updateable services :slight_smile:


#2

There is also this issue

(but I can’t publish it together on the previous post as Discourse didn’t allow)


#3
  • Is there a precompiled Habitat Supervisor for ARM?

Not yet but we are making steady progress towards the necessary pieces for our kit to be able to support this. There’s still a bit of work involved in getting ARM supported but we’ve been implementing some primitives that are going to be necessary foundational tech to be able to move forward with something like bootstrapping ARM.

  • Is there a Dockerized supervisor for ARM to use?

There isnt (because of the current lack of ARM support) but I can say once the platform is bootstrapped if the libraries for docker can be compiled for ARM then the supervisor will be able to run inside a container on ARM. The supervisor right now could actually probably be compiled for ARM given a little effort but there are some other things we would need to be able to handle deterministic

  • Would I be able to write .hart package and plan.sh that supports different architectures?

Yes! (Eventually). While it’s not an actual different architecture we’ve been playing with various package targets recently for folks that have very old linux kernels. It’s hard to say much definitively on the subject but I think with the changes we’ve made recently for that support, the architecture is now wired through in a way that should make this possible.

  • Can I package more than one platform and archtecture on a .hart or should there be one package for each?

I don’t know that we can answer this one. You would likely (mind you this is all theoretical right now) have a single plan that would compile for two different architectures giving you two packages a plan that sources another plan.

  • Lets say: Windows, Linux x86 and ARMv6 all living together or as one package each.

Right now the API between Windows and Linux is different because the plans for windows are .ps1
files, but for our Linux x86 and Linux-2 x86 (which is kernel v2.X) these plans live side by side in a single repo. Effectively one of the plans has all of the logic and the kernel 2 plan sources that plan and makes platform specific changes.

All of this to say a few things - YES we definitely want to get ARM support in there. I will say it’s not likely to happen this year as we’re pushing as hard as we can to get all APIs stabilized and into a 1.0 state. But once that happens we’re going to have a lot more room for things like adding ARM!


#4

Thanks for the great reply @eeyun!

I’ve searched a bit more and I found a mention on multi-arch builds on this blog post and a couple of issues tracking the progress of the goal.

Thanks for taking the time to reply. Now that I better understand Habitat I can’t wait to have ARM support landed to experiment on the homecluster I’m building.

I’ll keep following on Github and see if there is something I can help.


#5

Awesome! I’ll try to remember to update this thread when the time comes. In the meantime I think we even had an ARM channel in the community slack. It would be great to have more arm-knowledgable folks involved!


#6

I’ll join there, but I’ll probably be just lurking. Slack demands a lot of sync attention hehe

I don’t know much about ARM, but as I keep walking toward a small Pi cluster I keep stumbling into new things. If there are any easy Rust tasks or scripts needed o the project to help with I could try to help tho.