ansible-role-docker icon indicating copy to clipboard operation
ansible-role-docker copied to clipboard

Either check if on arm platform and redirect to docker_arm, or make role work on ARM

Open geerlingguy opened this issue 4 years ago • 4 comments

I've had a number of issues on this project lately asking about ARM installation issues... since the ARM setup process is different enough, I maintain a separate role (https://github.com/geerlingguy/ansible-role-docker_arm) for ARM devices. I should add a task to this role that checks the current platform, and if it's ARMv7/ARM64, it fails and directs the user to use the docker_arm role instead.

geerlingguy avatar Aug 12 '21 20:08 geerlingguy

From my experience since I recently used this role to provision a Raspi (and only knew the "main role" and did not know about a special docker-arm-role 🙈 ): the only difference is to figure out which architecture you have to set for docker and for docker-compose (since they differ, which is more of a problem on Docker side (imho)):

docker_compose_arch: armv7
docker_apt_arch: armhf

with this, everything went super smooth and I have a nice and cozy with all the features of the "main role" :)

Not sure how hard adding or detecting arm defaults to this role would be?

If this is too hard (e.g. too many different variables to consider) maybe it's enough to just print this as a notification when arm architecture is detected (e.g. "arm architecture detected which is not officially supported by this role - consider switching to geerlingguy.docker_arm") and not fail hardcoded?

j-koehler avatar Aug 02 '22 18:08 j-koehler

At this point (about a year later), it seems like the Docker repos support ARM more easily, and it might be okay to put the arm-based role back into this one, if a custom installation isn't needed.

I'd have to do more testing, but that would be desirable as this role has some features the arm one is lacking. Plus it's used more widely.

geerlingguy avatar Aug 02 '22 19:08 geerlingguy

about a year later

Yeah no worries, I just checked the issues with "planned" label assuming this would be "next". :slightly_smiling_face:

I'd have to do more testing, but that would be desirable as this role has some features the arm one is lacking. Plus it's used more widely.

Yes, my thoughts exactly. This is why I was a bit of "oh no" when I read you planned to enforce the docker_arm role :wink:

j-koehler avatar Aug 03 '22 07:08 j-koehler

Heh... "planned" just means (for me, at least) I 'plan' on doing something with the issue, and I don't want it to auto-close :)

geerlingguy avatar Aug 03 '22 14:08 geerlingguy

See: https://github.com/geerlingguy/ansible-role-docker/pull/376

geerlingguy avatar Sep 26 '22 22:09 geerlingguy

Deprecation issue for the docker_arm role: https://github.com/geerlingguy/ansible-role-docker_arm/issues/38

geerlingguy avatar Sep 26 '22 22:09 geerlingguy