Using resin to deploy bazel built containers

Hi all,

I was wondering if it was possible to use the power of bazel to deploy fast, correct containers to my array of embedded devices that I have laying around. Turns out, you can, but there are a few limitations currently.

I’ve set up a project that has all the necessary components:

  • simple hello world cpp project
  • dockerhub maintained bazel base images
  • bazel rules for creating hermetic docker images for my software
  • bazel crosstool defined for armv7 (raspberry pi2 cpu) allowing cross compilation
  • resin_deploy script for automating the build/deploy to resin

My blog post goes into more details. Feel free to use/contribute. I plan on adding more crosstool definitions in the future so I can use bazel to cross compile to more resin maintained devices.

Repository
Blog post

1 Like

Hi @murtis, this is really cool, thanks for sharing and blogging about your project!

We’d love to send you some resin.io swag as a thank you :slight_smile:

A couple notes as well:

  • Since you mention multicontainer in the blog post: we’re actually getting ready to release support for multiple containers in the next week or two - you can read more about our progress here.

  • Since you mention that it would be useful to have a tool for rapid local development when building & testing: we do have a feature called local mode, which gets you part of the way there (we’re still working on the GitHub issue you link to in the post).

Awesome, thanks! I’ll be keeping an eye on your progress, I’m a huge fan of the resin project and pretty sure a bazel build system combined with resin can make deploying software to my embedded devices extremely manageable.

I have desires to be testing resin a lot in the future and this was just the first step along the way. I’ll post my projects as I write about them!