Is there a way to deploy modules to Wildfly via scripting (as in, without manually modifying XML files)? I know about the jboss-cli.sh
command to add module
but is there a way to either directly modify my standalone.xml
/domain.xml
or do some equivalent thing that will tell Wildfly to load the module?
Said another way...
I've discovered two ways to deploy modules:
1) Hot deploy a jar directly by copying it into $KEYCLOAK_HOME/standalone/deployments
(Per the README in that directory, this method is not recommended for production deployments but it works without any manual work afterward.)
2) run jboss-cli.sh --command="module add --name=com.example.MySpi"
then manually edit standalone.xml
(or domain.xml
) to have your module in the "providers" list, like so:
<subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">
<web-context>auth</web-context>
<providers>
...
<provider>module:com.example.MySpi</provider>
</providers>
...
</subsystem>
... and finally restart the server.
I'd like to use the recommended way, but without manually editing an XML file. Is there a recommended path for this?
<providers/>
tag is in or link to some documentation? More than likely you can add it via CLI with a management operation, but I'm not familiar with where that is located. – Pratincole