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

Support of the session engine with Redis #49

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

khaledk2
Copy link
Contributor

@khaledk2 khaledk2 commented Feb 6, 2024

This PR adds the support of the session engine with Redis for the Omero web role
It includes an example of deploying the web client with the Redis session engine in the readme file.

@sbesson
Copy link
Member

sbesson commented Feb 6, 2024

In general big 👍 for adding Redis to the example. See also #43 for a possible alternative approach usingomero-web[redis]

What puzzles me though is that the IDR deployment playbook seems to install django-redis without any extra task. So far I cannot find where the installation happens

@pwalczysko
Copy link
Member

where the installation happens

We have a specific redis role, so maybe that is how ? At least this is how (via the role) I install redis in the learning playbook.

@joshmoore
Copy link
Member

@sbesson
Copy link
Member

sbesson commented Feb 6, 2024

We have a specific redis role, so maybe that is how ? At least this is how (via the role) I install redis in the learning playbook.

The ome.redis role installs the Redis server but that's not sufficient to install the Redis backend for Django sessions.

After a bit of searching, I think I identified how the installation of django-redis happens: omero-mapr depends on omero-web[redis]>=5.14.0 which will install django-redis - https://github.com/ome/omero-mapr/blob/9631b155c44fcec9986b03315dd9f5c5c64aa7eb/requirements.txt#L2.
That's very fragile at best, I completely support bringing this installation at the level of the role, possibly using an variable if we want to make optional.

@pwalczysko
Copy link
Member

The ome.redis role installs the Redis server but that's not sufficient to install the Redis backend for Django sessions.

After a bit of searching, I think I identified how the installation of django-redis happens: omero-mapr depends on omero-web[redis]>=5.14.0 which will install django-redis - https://github.com/ome/omero-mapr/blob/9631b155c44fcec9986b03315dd9f5c5c64aa7eb/requirements.txt#L2. That's very fragile at best, I completely support bringing this installation at the level of the role, possibly using an variable if we want to make optional.

Understood and makes sense, thanks for explanation.

@jburel
Copy link
Member

jburel commented Feb 6, 2024

@pwalczysko that will make sense especially if we want to decommission mapr

@khaledk2
Copy link
Contributor Author

khaledk2 commented Feb 6, 2024

I have added a variable to control adding the support of the Redis session engine, i.e. omero_web_setup_redis_session. The variable default is false, so you may not change any of the current installation ansible-playbooks which install the package.
What do you think?

Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can definitely see how to consume these changes in the IDR deployment playbooks. I'll leave @pwalczysko and @jburel to comment on the UoD deployment side.

Copy link
Member

@jburel jburel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposing to merge and tag as 5.1.0
Any objections @pwalczysko?

@jburel jburel merged commit 500e9ef into ome:master Feb 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants