ome / infrastructure

A repository containing scripts for managing infrastructure
BSD 2-Clause "Simplified" License
20 stars 19 forks source link

Configuration changes don't reach the server #127

Closed hajaalin closed 6 years ago

hajaalin commented 8 years ago

Configuration changes made in Ansible do not seem to be propagated to an installed server. I installed a test server with training-server.yml, and afterwards set


---
  omero_dbpassword: "kukkuu"

and ran the playbook again. The change shows up in a config file, but not in "omero config"

(omego)[omero@omero ~]$ cat config/omero-base.config 
config set omero.db.host localhost
config set omero.db.user omero
config set omero.db.name omero
config set omero.db.pass kukkuu
config set omero.data.dir /OMERO

# Additional custom options
(omego)[omero@omero ~]$ omero config list
omero.data.dir=/OMERO
omero.db.host=localhost
omero.db.name=omero
omero.db.pass=omero
omero.db.user=omero

Looking at roles/omero-server/tasks/main.yml, it seems that only omego install and omego upgrade use this configuration. Maybe there could also be a handler to run omero config set when omero-base.config or omero-additional.config are changed?

manics commented 8 years ago

Hi @hajaalin, that's like a good suggestion. One reason I didn't originally do that is because omero-server and omero-web are using the same config, and I didn't want to restart the server (can take several minutes) for a web-only config change (should be quick), but now that there's some work on decoupling the omero.web installation this change should be fine. I'll open a PR later.

manics commented 8 years ago

Following up #119 There's a few issues to think about such as

hajaalin commented 8 years ago

Hi @manics, I'm now working on LDAP setup, and after those config changes it seems necessary to restart the server. I added a handler to do this using "service" module. I also added a handler to reset the old config, but I'm not sure how safe this is. If something goes wrong in the next handler that sets the new config, the server might be left without db connection settings for example.

Also related to LDAP, I added an option to set up trust store. This also needs a server restart to take effect.

manics commented 6 years ago

This should be handled in https://galaxy.ansible.com/openmicroscopy/omero-server/