dokku / ansible-dokku

Ansible modules for installing and configuring Dokku
MIT License
169 stars 44 forks source link

Running the install task on armhf - docker-ce not available. #142

Closed johnnye closed 1 year ago

johnnye commented 2 years ago

When running these playbooks on a clean install of raspian, or ubuntu server (20.x LTS) it appears that docker-ce is not available for these architectures. (see https://github.com/docker/for-linux/issues/1035).

The workaround is to have docker.io installed and this seems to allow the default install script to work from the docs.

ltalirz commented 2 years ago

Hi @johnnye , thanks for the report.

I'm a little surprised to see issues with ubuntu 20.x LTS - Ubuntu 20.04 is tested in continuous integration, see https://github.com/dokku/ansible-dokku/blob/7e047c63395bfca4ede366a8c1b59ceeda023472/.github/workflows/ci.yml#L54

Can the issue you mention be reproduced in CI?

We are using Jeff Geerling's docker role to install docker - is it possible you have an outdated version of this role installed (and we should add a minimal version in our dependencies?) https://github.com/dokku/ansible-dokku/blob/7e047c63395bfca4ede366a8c1b59ceeda023472/meta/main.yml#L29

P.S. We are using Jeff Geerling's docker images for testing and if someone is interested in adding support for a new OS in the role, I'd be happy to add another image in CI to make sure it continues working. There is, however, no raspian docker image as far as I can see https://github.com/geerlingguy?tab=repositories&q=docker-&type=&language=&sort=

josegonzalez commented 2 years ago

Raspbian is arm/arm64, and it seems Docker hasn't published docker-ce there.

ltalirz commented 2 years ago

Sorry - I overlooked the ARM bit from the title... ;-)

It appears you can use ansible_architecture variable to make decisions based on x86 vs ARM.

We could add something like when: ansible_architecture == 'x86_64' to https://github.com/dokku/ansible-dokku/blob/7e047c63395bfca4ede366a8c1b59ceeda023472/meta/main.yml#L29 and do the other thing for ARM.

Even better would be to fix it in geerlingguy's role, however

ltalirz commented 2 years ago

I see, there is the alternative role already https://github.com/geerlingguy/ansible-role-docker/issues/290

@johnnye would you be up for preparing a PR that switches to this role for the arm architecture?

josegonzalez commented 2 years ago

Can you do a conditional include of a role?

ltalirz commented 2 years ago

Just saw it here https://edunham.net/2015/09/10/ansible_conditional_role_dependencies.html

Didn't try it so far

johnnye commented 2 years ago

@ltalirz Happy to give it a stab and submit the pr this weekend.

ltalirz commented 1 year ago

In the meanwhile, ansible-role-docker added support for ARM https://github.com/geerlingguy/ansible-role-docker/pull/376, which means we should no longer need to change anything

@johnnye can you confirm that ansible-dokku works on ARM now?

ltalirz commented 1 year ago

Since I haven't heard back, I'm closing this for now. Feel free to reopen if related issues still exist