Hi,
We are in the process of migrating a Jakarta 8 application from running on WebLogic to Wildfly, with the goal of running on Kubernetes. The application is set up as a multi-module Maven build, with one jar module, one ejb module and three war modules, all packaged as an ear. Crucially, we need to get shared session state working, which I think that galleon feature packs and layers can provide.
We have the application working on a manually-provisioned Wildfly server, and are now working on the Maven build to output a Docker image. We're attempting to use Galleon using the Wildfly Maven plugin, but are getting stuck. The main things that are tripping us up are installing the Oracle driver + datasource, and adding jdbc security realm.
In order to configure the server (adding a JDBC realm), you have the ability to excute WildFly CLI scripts during build (after the server has been provisioned).
Add this xml content (adjust to use your own script file) to the wildfly-maven-plugin configuration:
<packaging-scripts>
<cli-session>
<scripts>
<script>configure-server.cli</script>
</scripts>
</cli-session>
</packaging-scripts>
Your CLI script would contain the CLI commands needed to
configure the server (as you could find in this documentation:
https://docs.wildfly.org/27/WildFly_Elytron_Security.html#configure-authentication-with-a-database-identity-store)
We're using the datasources and cloud Galleon feature packs, and installing the oracle-datasource. It looks like that sort-of works, but it also looks like it's deploying the Oracle driver once for every module, which doesn't seem right. In the end, the application won't start because of a missing security domain (and thus rollback the entire deployment), which bring me to that issue.
There is no feature pack or layer that allows me to configure a JDBC security realm. There is the add-resource goal, but that seems to only deploy to a running server, which is not the case when I'm provisioning a new one. Also, for some reason I can't get the admin web-console working on the provisioned installation except by manually editing the resulting XML, which makes observing results harder.
I can find no way to achieve this using just galleon and the Maven plugin, but all documentation points to that approach.
What's the best way to set up provisioning/application build that allows us to create docker images containing our application on Wildfly that will run in the cloud?
--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/8179fa3f-d488-4d3d-91f3-d51967a874d1n%40googlegroups.com.
Hi,
Hi,
Thanks for you reply and sorry for my late reaction.I can no longer reproduce the behaviour where it deploys multiple data sources. If I run into the situation again I'll be sure to save logs and how to reproduce it.
Meanwhile, do you have any tips for getting the security domain provisioned? It would also help us with troubleshooting if we could find a way to have the administration console enabled when using wildfly:run.
For the JDBC realm, you would need to define a CLI script to execute commands to set it up (we have some documentation there: https://docs.wildfly.org/27/WildFly_Elytron_Security.html#configure-authentication-with-a-database-identity-store)
For the web-console, you could create a profile "dev" that will
provision the "web-console" layer in addition to of the configured
layers.
In order to allow to connect to the web console, you need a user, you can execute these CLI commands to add an initial user (during plugin execution in a packaging script):
https://gist.github.com/jfdenise/e38d0f2c0b60728194c88cd045b023bb
Hope that helps.
JF
On Friday, March 31, 2023 at 4:16:42 PM UTC+2 Jean Francois Denise wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/afd54ea0-6606-4b2d-bbec-67d9ebb4d8b8n%40googlegroups.com.