ome / ansible-role-omero-web

Installs and configures OMERO.web and Nginx
BSD 2-Clause "Simplified" License
1 stars 14 forks source link

Update to Ubuntu 22.04 and RockLinux 9 #48

Closed khaledk2 closed 12 months ago

khaledk2 commented 1 year ago

This PR moves to use Rocky Linux 9 and Ubuntu 22.04. It has been passed for Rocky Linux 9 but not yet for Ubuntu 22.04 in https://github.com/khaledk2/ansible-role-omero-web/actions/runs/6494993388

khaledk2 commented 1 year ago

I have added the SELinux policyfor the omero-webservice. @pwalczysko Could you please test it? You should delete the current policy using the following command on the VM: sudo semodule -r django Then you should stop the Omero-web service, then you may rerun the installation playbook and see if it will add the policy and run the service without error.

pwalczysko commented 1 year ago

Willl do

pwalczysko commented 1 year ago

Test:

  1. Make sure webclient works as expected on 134.36.4.3
  2. sudo semodule -r django libsemanage.semanage_direct_remove_key: Removing last django module (no other django module exists at another priority).
  3. Observe that webclient on 134.36.4.3 is showing no css on login page
  4. Delete /opt/omero/web, disable the omero-web service
  5. Run the playbook
  6. Observe that all tasks from this PR like "register pp file" and "copy te file" are green (not desired, these should be changed ?)
  7. Go to the VM and delete /tmp/django* files
  8. Rerun the playbook again, again, some tasks are green, but the copy te file is yellow (changes).
  9. Nevertheless, the playbook fails on the enable and start web systemd step with the usual PID failure.
khaledk2 commented 1 year ago

@pwalczysko I have pushed a fix, could you please try again and let me know how is it going?

khaledk2 commented 1 year ago

I have fixed Ubuntu 22.04. The error was related to Omero web, it has this error zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Europe/London I have fixed it by installing the following Python package: tzdata I have added a custom policy to Ubuntu also. In addition, I have added a test to ensure that the policy has been instaled.

pwalczysko commented 1 year ago

I have fixed Ubuntu 22.04. The error was related to Omero web, it has this error zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Europe/London I have fixed it by installing the following Python package: tzdata I have added a custom policy to Ubuntu also. In addition, I have added a test to ensure that the policy has been instaled.

Thanks @khaledk2 - I have run the playbook with the changes here also against the RHEL 9 testing system (although not on a clean image). The test passed, see also below.


TASK [omero_web : omero web | install tzdata] ***********************************
changed: [134.36.4.3]

on the machine

(venv3) [pwalczysko@ome-ci-upgrade ~]$ pip freeze | grep tzdata
tzdata==2023.3
khaledk2 commented 1 year ago

I have updated the role to fix the Galaxy issue. It has passed the test. I have pushed the role successfully to Galaxy https://galaxy.ansible.com/ui/standalone/roles/khaledk2/omero_web/

pwalczysko commented 1 year ago

I have updated the role to fix the Galaxy issue. It has passed the test. I have pushed the role successfully to Galaxy https://galaxy.ansible.com/ui/standalone/roles/khaledk2/omero_web/

Using khaledk2.omero_web and pwalczysko.omero_server from Galaxy https://github.com/openmicroscopy/management_tools/pull/1710/commits/327efb93827132d073d6325094c0f7516b227210, on the branch https://github.com/openmicroscopy/management_tools/pull/1710 ("training" type of server) I was able to run successfully the playbook on RHEL9 134... testing server. Setup

  1. stop omero server and web, stop nginx
  2. uninstall postgres and nginx
  3. rm -rf /opt/omero
  4. rerun the playbook

Tests:

  1. connect using OMERO.web
  2. import image using insight and open it in iviewer
  3. import image using cli from local mac
  4. check that the /opt/omero... folder was re-created successfully

Everything works as expected.

jburel commented 1 year ago

@khaledk2 Could you fix the formatting issues see https://github.com/ome/ansible-role-omero-web/pull/48/files for details

pwalczysko commented 12 months ago

Do we want to merge&release this in order to enable the deployment of the server please ?