ReinerNippes / nextcloud_on_docker

Run Nextcloud in Docker Container on various Linux Hosts
MIT License
203 stars 48 forks source link

Broken App Install #101

Closed Darkknight33 closed 2 years ago

Darkknight33 commented 3 years ago

https://github.com/ArtificialOwl/files_fulltextsearch_tesseract/issues/38

This app hasn't been updated to 21, and causes the playbook to fail.

Edit: This is also covered in #100

ReinerNippes commented 2 years ago

any idea how to handle this in the playbook? if i would include version checking i would always have to catch up with all apps. that is to say if i would include a when-version-in-["x", "y", "z"] clause i would have to watch all app releases and edit these lines.

Darkknight33 commented 2 years ago

Is there a way to allow the playbook to continue installing even if the app install fails, and just report it at the end?

Was also thinking maybe include more refined app and container selections in the install file. Personally, I used a different OO container built without license restrictions.

So, default value would be whatever the official container is, if variable is not null then install that container.

ReinerNippes commented 2 years ago

hi @Darkknight33

Is there a way to allow the playbook to continue installing

yes. it would look like this:

- name: configure fulltextsearch app
  shell: '{{ docker_occ_cmd }} {{ item }}'
  loop:
    - config:app:set fulltextsearch search_platform --value "OCA\FullTextSearch_Elasticsearch\Platform\ElasticSearchPlatform"
    - config:app:set fulltextsearch app_navigation --value="1"
  ignore_errors: true

for more details: https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#ignoring-failed-commands

Was also thinking maybe include more refined app and container selections in the install file.

possible but tricky. because the installation of fulltext search is far from stable. imho. e.g.: https://github.com/nextcloud/fulltextsearch/issues/600 changing variable names like in this issue will kill any attempt to automate installation. and there happened to be some of this issues also in nextcloud and other apps. and i want to make as easy as possible to get a running nextcloud instance. so i want the inventory as simple as possible. those who want to enhance their installation would have to tweek the playbook.

nevertheless if you would like to share which image and installation way you are using i may have a look at it.

Darkknight33 commented 2 years ago

I ended up disabling the app & container installs in the playbook then executing the commands in the roughly the same way as the playbook, but by hand, both creating the containers I wanted and then running the OCC app install commands. I was trying to debug why it wasn't working, and didn't document my steps to get it working, unfortunately. Only noting that when the playbook fails at this stage, the easiest way to correct it was to rollback the VM to a pre-install snapshot and rerunning the playbook fresh. Running the playbook multiple times trying to find the error was creating unusual bugs, like NC saying it was in an install state but could not find a 'CAN_INSTALL' file. It quickly became unusable.

As for the container I'm using, I think it's better to just suggest if someone is interested in an unofficial OO build to search for it on dockerhub. Even though it's OSS, it might set a bad precedent to use the unofficial build by default or inadvertently create support issues for it's author by significantly widening it's install base through inclusion in this playbook. I guess I just felt like collecting the container names into the main install file would have made it easier from a user perspective for substituting a different container, rather than hunting down which task/variable file was needed. If it makes things more complicated or less reliable, then the better solution would probably be documenting in the install instructions where to find the needed variables to change for container substitution.

I think your instinct for making this as easy and reliable as possible for users is probably the right thing.

WilcoDan commented 2 years ago

Sorry for the newb question; the link referred to (wherever this may happen) is a broken link. The working link at this point in time is; [https://github.com/daita/files_fulltextsearch_tesseract/archive/refs/tags/v21.0.0.tar.gz] I have searched throughout the nextcloud_on_docker repository but could not find where to replace the link with the relevant one. Not sure how to do this and guidance would be greatly appreciated.

I have to add; thank you for your great work, it is much appreciated. With the structure utilised and the detailed thinking wrt backups etc this is a great end to end view of understanding Ansible and it's use turning a product into a repeatable and supportable solution. With this repo I am realising the value of Ansible. Thank you so much.

ReinerNippes commented 2 years ago

I think the tesseract app is installed here: https://github.com/ReinerNippes/nextcloud_on_docker/blob/master/roles/nextcloud_config/tasks/fulltextsearch.yml#L20 if it is ported already to nc21 it should work again now. or?

Darkknight33 commented 2 years ago

https://apps.nextcloud.com/apps/files_fulltextsearch_tesseract

Its not in the official app repository for v21, so the provided OCC command for app install will not work. NC is on v22 now, and it still hasn’t been updated. Is it even being maintained?

@ReinerNippes Speaking of v22, have you tested this playbook with that version yet?

WilcoDan commented 2 years ago

Yes it works very well 0n v22 so far. I really appreciate this playbook, thank you so much. It is helping me to get an understanding of Ansible and the intended use of providing a full environment around the solution wrt to performance, sustainability and supportability.

Great stuff, thank you.

My wish is that you don’t abandon this playbook :-) Any chance you will update letsencrypt/swag?

Kind regards, Wilco Kasselman

@.***

On 27 Sep 2021, at 17:05, Darkknight33 @.***> wrote:

https://apps.nextcloud.com/apps/files_fulltextsearch_tesseract https://apps.nextcloud.com/apps/files_fulltextsearch_tesseract Its not in the official app repository for v21, so the provided OCC command for app install will not work. NC is on v22 now, and it still hasn’t been updated. Is it even being maintained?

@ReinerNippes https://github.com/ReinerNippes Speaking of v22, have you tested this playbook with that version yet?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ReinerNippes/nextcloud_on_docker/issues/101#issuecomment-927964170, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATFKJ6VJ6LSJOJN54N6EAQLUECB5DANCNFSM47Q6TI2A.

WilcoDan commented 2 years ago

Hi,

Thank you for the response. Sorry, I was not clear; I am a newby to ansible and I am not a dev. So I take it that files_fulltextsearch_tesseract calls a procedure that downloads and installs the software? I am looking for the section/wget/sub where the link to download the app is captured so I can change it to download the newer app.

Not sure if I am totally missing the plot here but I want to learn so any help will be greatly appreciated.

Kind regards, Wilco Kasselman

@.***

On 27 Sep 2021, at 16:56, ReinerNippes @.***> wrote:

I think the tesseract app is installed here: https://github.com/ReinerNippes/nextcloud_on_docker/blob/master/roles/nextcloud_config/tasks/fulltextsearch.yml#L20 https://github.com/ReinerNippes/nextcloud_on_docker/blob/master/roles/nextcloud_config/tasks/fulltextsearch.yml#L20 if it is ported already to nc21 it should work again now. or?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ReinerNippes/nextcloud_on_docker/issues/101#issuecomment-927955216, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATFKJ6RWZB4VVYEL5ABJWCTUECAZLANCNFSM47Q6TI2A.

Darkknight33 commented 2 years ago

You should probably not include your cellphone number in your signature.

Ansible uses a nextcloud binary 'occ' to instruct nextcloud to download the app from the official NC app repository. If the app hasn't been updated there (it's hasn't) then there is nothing for NC to download. If the app author has updated the app in his GitHub repository, you are free to try to integrate that into NC yourself, but I'd assume that is probably out of scope for this playbook.

ReinerNippes commented 2 years ago

@WilcoDan a) You may look here. -> https://github.com/ArtificialOwl/files_fulltextsearch_tesseract/issues/42 b) I won't abandon this playbook. But a) is beyond my control c) What do you mean with: "update letsencrypt/swag"?

WilcoDan commented 2 years ago

Kind regards, Wilco Kasselman

On 29 Sep 2021, at 22:42, ReinerNippes @.***> wrote:

 @WilcoDan a) You may look here. -> ArtificialOwl/files_fulltextsearch_tesseract#42 b) I won't abandon this playbook. But a) is beyond my control c) What do you mean with: "update letsencrypt/swag"?

Reply;

a) Thank you

b) Much appreciated

c) In one of the responses you mentioned that you would look into all three options of doing the verification of letsencrypt so to have a choice. Apparently swag is a good option for automated SSL certs.

The reason for question c);

When I route via Nginx Proxy Manager (which I use for all my hosted apps and SSL offloading) I can set cloudflare to full(strict) end to end encryption but when I point my dns (cloudflare) straight to my nextcloud public IP I get an ssl cert error. Maybe it's just me but as of lately it has become more complex to get a letsencrypt cert working with full (strict) setting on cloudflare but somehow Nginx Proxy Manager (NPM) can still achieve that with my cloudflare registered email address and ports 80&443 open on the public IP.

I was planning on learning traefik as a reverse proxy but time is an issue and would much rather learn ansible especially since it seems NMP is quicker and easier to use and handling letsencrypt automatically.

I was hoping a simple update on letsencrypt or switching to swag would solve the problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Darkknight33 commented 2 years ago

Traefik also automatically handles Letsencrypt certs and renewal. I use a second traefik instance as a reverse proxy for the web server and I don’t have to bother with certs much. It’s all handled by traefik. Traefik has its own learning curve and quirks, but it works pretty well.

Also, I think your feature request should be moved into its own issue for proper tracking of issues. The tesseract app isn’t being updated on the Nextcloud side, so seems like that should be removed or commented out in the playbook until such time that it’s working again.

WilcoDan commented 2 years ago

Okay, I hear you. Not sure then why Traefik is not handling SSL for me to the point where I can switch cloudflare to full (strict) mode without using NPM as an additional reverse proxy to offload ssl.

No need to address my query on this matter further. Thank you.

On 30 Sep 2021, at 00:16, Darkknight33 @.***> wrote:

 Traefik also automatically handles Letsencrypt certs and renewal. I use a second traefik instance as a reverse proxy for the web server and I don’t have to bother with certs much. It’s all handled by traefik. Traefik has its own learning curve and quirks, but it works pretty well.

Also, I think your feature request should be moved into its own issue for proper tracking of issues. The tesseract app isn’t being updated on the Nextcloud side, so seems like that should be removed or commented out in the playbook until such time that it’s working again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.