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

Proposal for refactoring ansible OMERO roles. #73

Merged
merged 2 commits into from
Apr 19, 2017

Conversation

manics
Copy link
Member

@manics manics commented Feb 6, 2017

No description provided.

@manics manics changed the title Add proposal for refactoring ansible OMERO roles. Proposal for refactoring ansible OMERO roles. Feb 6, 2017
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.

Overall, the proposal reads well and makes sense to me and mirrors the ongoing strategy of decoupling the server and the Web client to the deployment level. A couple of inline comments with regard to the proposed implementation.

Do we have concrete immediate use case where the proposed role decoupling might be beneficial and could help drive the next steps e.g. do we have need for a Web-only release?

This includes installing and configuring both OMERO.server and OMERO.web, and although OMERO.web can be disabled it is not possible to install OMERO.web only.

Further more this role bundles `omego` which could potentially be used independently of this role.
In addition Ansible 2.2 has a bug which means `omego` is installed into the wrong virtualenv, breaking the role.
Copy link
Member

Choose a reason for hiding this comment

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

👍 for decoupling omego which already has its own lifecycle in any case

### omero-common
- Create an `omero` system user
- Create `/opt/omero` as the parent directory for all OMERO components
- Possible: Include `omero` and `omero-web` restart handlers so other roles can restart the server or web.
Copy link
Member

Choose a reason for hiding this comment

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

Only concern here is that omero-common conflicts with the name of a components of OMERO.server. Alternative suggestions: omero-base, omero-server-base

Copy link
Member Author

Choose a reason for hiding this comment

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

Naming ... I think something that indicates it's not just for the -server would be good.

Copy link
Member

Choose a reason for hiding this comment

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

Definitely, esp. if we consider the case discussed in #73 (comment) i.e. that we could consider creating different users for different OMERO components

Copy link
Member Author

@manics manics Feb 7, 2017

Choose a reason for hiding this comment

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

If we've got separate users for each component I think that should be delegated to the role responsible for that component.

Copy link
Member

Choose a reason for hiding this comment

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

omero-component, omero-service, omero-instance, ...

Copy link
Member Author

Choose a reason for hiding this comment

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

Thinking about it, if web and server have separate users, and all components are decoupled so there's no point in having common variables, then maybe this common role isn't needed.


### omero-omego
- Install omego into a virtualenv: `/opt/omero/omego`
- Alternative: install `omego` globally and name this role `omego`
Copy link
Member

Choose a reason for hiding this comment

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

The latter would be my preference. Although it is absolutely correct that most of the development of omego has been driven in the context and for OMERO, I still believe some of its usage could be used outside it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree a global installation with pip is the easiest, especially if other people are expected to run it manually. The advantage of a virtualenv is it minimises the number of non-distribution-packaged python modules, especially if web runs from a virtualenv. Ice is probably the main exception.

- Alternative: install `omego` globally and name this role `omego`

### omero-web
- Parent directory: `/opt/omero/web`
Copy link
Member

Choose a reason for hiding this comment

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

Would that need a separate user or would this reuse the common role with the omero user.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. Reusing the omero user is convenient and what we currently use. From a security perspective it'd be more secure to run web as a different user since it shouldn't require access to omero.data.dir.

Copy link
Member

Choose a reason for hiding this comment

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

👍 for each component/service/whatever having its own user (if feasible)

@manics
Copy link
Member Author

manics commented Feb 7, 2017

There's an IDR-0.3.4 card for deploying web on a separate VM to see if that improves performance.

@manics
Copy link
Member Author

manics commented Feb 8, 2017

Updated following comments. One more thing that springs to mind: OMERO.py. We could have a role that installs it into /opt/omero/python and either adds it to a global PYTHONPATH or adds a .pth file.

@joshmoore
Copy link
Member

That won't suffice for the server but for the web and general use, but it's probably simplest to just let web install its own, and if we ever need a role for just omero-python it can be a good deal simpler (no user, etc)

@joshmoore
Copy link
Member

👍 for pushing through the implementation. It leaves a question for me of what to do with the design proposal. (i.e. should it have been merged before the implementation, etc)

@joshmoore
Copy link
Member

With tagging going on today, just making a call and merging this so it's in the history. We'll need to review that though as more designs are merged.

@joshmoore joshmoore merged commit 298fda1 into ome:master Apr 19, 2017
@manics manics deleted the ansible-omero-server branch April 19, 2017 14:32
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.

3 participants