What about an utility to export/import that yaml from/to the
standard
configuration file (standalone.xml) ?
That is one idea. However, note there still would be issues that need to be solved:
1) Any change you make to the yaml file would require the user to run the export/import
tool again - is that going to be annoying to the user? Are they even going to know they
have to run a tool after editing a configuration file? That seems to be annoying to add a
second step (1. modify the yaml file 2) run a tool to export the config into
standalone.xml). People will most likely forget to do 2.
2) This means our export/import tool needs to be smart enough to know how to transform the
standalone.xml when the agent configuration is not there yet AND when there is already
agent configuration there. We'd need to do something similar to what the agent
installer does, which is not trivial.
3) Still doesn't solve the security problems (passwords unencrypted, how to define and
reference security realms) - unless we add the security realms in the yaml and have the
export/import tool modify the standalone.xml so it modifies the proper security-realms
section in standalone xml, too.
4) Still doesn't solve the "no write-back" to the yaml. If you change or add
a config setting via the JBoss CLI, it will get persisted to standalone.xml, but it will
NOT be persisted to the yaml file. The yaml file essentially becomes stale and you can no
longer refer to it and be guaranteed it contains the most up-to-date config. If you run
the export/import tool on the stale yaml, you have essentially overwritten the current
config in standalone.xml with stale config.