While reviewed the configuration changes in https://github.com/ome/prod-playbooks/pull/332, we realised that our Ansible playbooks use very different styles for setting the OMERO.web app configuration:
The mixture of styles is particularly confusing. Deciding on the preferred style(s) and applying them systematically would certainly reduce maintenance.
A related issue highlighted by the progression https://github.com/ome/prod-playbooks/pull/332 is that extreme care should be put in the usage of the _append variables. The configuration files stored under /opt/omero/web/config are loaded as part of the omero-web service lifecycle. Internally omero config append includes some logic avoiding the duplication of a value in a configuration list. However, removing a value from a list e.g. unregistering a web app requires more thoughts
While reviewed the configuration changes in https://github.com/ome/prod-playbooks/pull/332, we realised that our Ansible playbooks use very different styles for setting the OMERO.web app configuration:
sls-gallery
andlearning
explicitly set the OMERO.web configuration using the primaryomero_web_config_set
- see https://github.com/ome/prod-playbooks/blob/d21c6f772469cbcbbbe9ff8dfabce350ed38f863/sls-gallery.yml#L81-L111 and https://github.com/ome/prod-playbooks/blob/d21c6f772469cbcbbbe9ff8dfabce350ed38f863/learning.yml#L82-L118ome-demoserver.yml
converts three Jinja template containing a series ofconfig append
andconfig set
subcommands into configuration files https://github.com/ome/prod-playbooks/blob/d21c6f772469cbcbbbe9ff8dfabce350ed38f863/ome-demoserver.yml#L213-L246nightshade-webclients.yml
uses a combination ofomero_web_apps_names
,omero_web_apps_packages
,omero_web_apps_top_links
,omero_web_apps_config_append
andomero_web_apps_config_set
- see https://github.com/ome/prod-playbooks/blob/d21c6f772469cbcbbbe9ff8dfabce350ed38f863/nightshade-webclients.yml#L113-L169omero/training-server/playbook.yml
copies a.omero
file containing a series ofomero config set
andomero config append
commands into the configuration directory - see https://github.com/ome/prod-playbooks/blob/d21c6f772469cbcbbbe9ff8dfabce350ed38f863/omero/training-server/playbook.yml#L182-L191For comparison, the IDR deployment playbooks use a style most closest to
nightshade-webclients
i.e. the built-inomero_web_apps*
variables supplemented byomero_web_apps_config_append
andomero_web_apps_config_set
-see https://github.com/IDR/deployment/blob/77b759ce21f2a165903aa5cbea7fcb673fcf55a8/ansible/group_vars/omero-hosts.yml#L162-L604The mixture of styles is particularly confusing. Deciding on the preferred style(s) and applying them systematically would certainly reduce maintenance.
A related issue highlighted by the progression https://github.com/ome/prod-playbooks/pull/332 is that extreme care should be put in the usage of the
_append
variables. The configuration files stored under/opt/omero/web/config
are loaded as part of theomero-web
service lifecycle. Internallyomero config append
includes some logic avoiding the duplication of a value in a configuration list. However, removing a value from a list e.g. unregistering a web app requires more thoughts