Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM support #577

Open
rcarmo opened this issue Mar 9, 2017 · 21 comments
Open

ARM support #577

rcarmo opened this issue Mar 9, 2017 · 21 comments

Comments

@rcarmo
Copy link

rcarmo commented Mar 9, 2017

Although it would require bootstrapping a new set of base containers, it would be nice to have armhf support.

@denismakogon
Copy link
Contributor

Hello @rcarmo. Can you please elaborate which part IronFunctions you'd like to see supported on ARM?

@rcarmo
Copy link
Author

rcarmo commented Mar 9, 2017 via email

@denismakogon
Copy link
Contributor

@rcarmo ok, i see. But my question makes sense, because in repo we have couple projects like fn tool, API server, fnlb. But i do understand what you're saying. So, let's try to define list of smaller tasks we'd like to do in a pursuit of supporting ARM v5 (or greater). Would that make sense?

@denismakogon
Copy link
Contributor

Recently i tried to build project for ARMv5 and got this issue:

Deniss-MacBook-Pro-2:functions denismakogon$ GOARCH=arm GOARM=5 go build -o functions
# github.com/iron-io/functions/api/mqs
api/mqs/ironmq.go:117: constant 60000000000 overflows int

@jmank88
Copy link
Contributor

jmank88 commented Mar 13, 2017

@denismakogon That particular line is actually a bug anyways. A duration is passed (int(time.Minute)), but the method takes seconds, not nanoseconds. It has been fixed in #581.

@treeder
Copy link
Contributor

treeder commented Mar 14, 2017

@rcarmo this would be great, we've been talking with the https://www.packet.net/ guys about getting this running on their Type 2A server (96 physical cores), would love to make it happen. We could probably build in an ARM flag for the cli that built functions on the correct base images to make it pretty painless (thinking out loud).

cc @vielmetti

@vielmetti
Copy link

Thanks @treeder - there is also support in Docker manifests to have an image automatically select the right architecture based on the manifest (so called "fat manifest" or "multiarch" support). The one project that's gotten the furthest on this is portainer and their details on how they did multiarch are at portainer/portainer#285 using https://github.com/estesp/manifest-tool .

There's still the small matter of having an ARM build of iron/dind but once you have that the multiarch stuff lets you pick up the right architecture as you need it.

@denismakogon
Copy link
Contributor

@jmank88 can we extract fix for smaller patch to get build/release job for ARMv5 (or greater)?

@rcarmo
Copy link
Author

rcarmo commented Mar 15, 2017

@vielmetti I have a repo where I made a start at my build of dind: https://github.com/rcarmo/iron-io-dind-armhf
Haven't had much time to follow up on this because I keep moving around (need to pack a Pi 3 to go), but it doesn't seem impossible.

@denismakogon
Copy link
Contributor

So, @rcarmo @vielmetti we've fixed small issue and we were able to build binaries (API service) for ARM successfully.
There's PR i made to ensure that we are not breaking compatibility with ARM for server. The last thing we need to clarify that we can build fn tool too if it works fine i'll close this issue.
Thoughts?

cc @treeder

@vielmetti
Copy link

@denismakogon - this looks like good progress on armhf support. Full support for ARMv8 (aarch64, arm64) will require a parallel set of work, since ARM 32-bit binaries don't always run on 64-bit systems.

@denismakogon
Copy link
Contributor

@vielmetti actually I was able to build IronFunctions for all platforms that go cross-compiling supports including ARMv8 (arm64).

@rcarmo
Copy link
Author

rcarmo commented Mar 16, 2017

Wow, thanks, guys. How do you suggest I get started testing this? maybe we could hold the issue open while we tally any documentation/teething issues?

@denismakogon
Copy link
Contributor

@rcarmo you can pull latest master branch and build it with go flags like GOARCH, GOARM for specific ARM version including v8(arm64). I assume you're aware of how to build go code. Once you have binary I'd recommend to follow Getting started guide to try it out. If you're facing problems let me know.

@rcarmo
Copy link
Author

rcarmo commented Mar 16, 2017

@denismakogon Seems straightforward enough. I'll wipe a large SD card, grab the Go binaries and try it over the weekend.

@denismakogon
Copy link
Contributor

Please note that you need latest Go 1.8 binaries.

@treeder
Copy link
Contributor

treeder commented Mar 16, 2017

This is more than just building the functions binary, that part is easy. The hard part is enabling users to run their functions on an ARM machine which requires different images for their functions which I believe @rcarmo is referring to when he created this ticket.

Although it would require bootstrapping a new set of base containers, it would be nice to have armhf support.

Or maybe not? But we'd need to make it easy for users to create ARM functions regardless. It's possible to run functions without dind (mount the docker socket), but it would be nice to support it.

How does this look as a full checklist for what we need:

  • An ARM functions build - image name iron/functions:arm - preferably with dind support, but could start without dind
  • A set of ARM base default base images that fn tool can use.
  • Implement a --arm flag for the fn tool to build using the ARM base images - user/image:X.Y.Z-arm
  • Implement a --arm flag for fn push (?)
  • See if we could push multiple architectures at the same time to the Docker registry and use the multi-arch manifest support - see ARM support #577 (comment)

Does that sound like everything we'd need?

@treeder
Copy link
Contributor

treeder commented Mar 24, 2017

Official ARM images: https://hub.docker.com/u/aarch64/

@treeder
Copy link
Contributor

treeder commented Mar 24, 2017

And multi-arch issue: docker-library/official-images#2289

@rcarmo
Copy link
Author

rcarmo commented Mar 24, 2017 via email

@treeder
Copy link
Contributor

treeder commented Mar 24, 2017

Looks like we can do the same with armhf: https://hub.docker.com/u/armhf/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants