Hi,
WildFly 26 development has started and we have made some significant updates for WildFly
provisioning and its use on the cloud.
This mail is an opportunity to showcase the upcoming features and give a taste of things
to come for WildFly users :)
This work is still in alpha/beta stage and is subject to change before their final
releases but the overall idea is already there.
The most important thing to explain is that we are leveraging the existing
wildlfy-maven-plugin to provision WildFly and build application images for WildFly on the
cloud.
This plugin now enables to provision and configure a WildFly runtime directly from the
application's pom.xml.
There are few steps required to use this new plugin.
Let's use our simple helloworld-rs quickstart for that
(
https://github.com/wildfly/quickstart/tree/main/helloworld-rs).
We can checkout this project with:
git clone
https://github.com/wildfly/quickstart.git
cd quickstart/helloworld-rs
To use the provisioning feature of the wildfly-maven-plugin, we need to use its
3.0.0.Alpha1 release that has just been released:
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>3.0.0.Alpha1</version>
<configuration>
<feature-packs>
<feature-pack>
<location>org.wildfly:wildfly-ee-galleon-pack:25.0.0.Final</location>
</feature-pack>
</feature-packs>
<layers>
<layer>jaxrs-server</layer>
</layers>
<runtime-name>ROOT.war</runtime-name>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
This plugin configuration will provision WildFly using its
org.wildfly:wildfly-ee-galleon-pack:25.0.0.Final feature pack and install the jaxrs-server
layer that contains all we need to run a Jakarta Restful application.
I can now run `mvn clean package` to package the application, provision WildFly, and
deploy the application in WildFly.
At the end of the execution, I have a WildFly 25.0.0.Final with the deployment in the
target/server directory of my application project.
I can run my application with a simple `./target/server/bin/standalone.sh`:
$ ./target/server/bin/standalone.sh
...
JBOSS_HOME: /Users/jmesnil/tmp/quickstart/helloworld-rs/target/server
...
09:10:25,564 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed
"helloworld-rs.war" (runtime-name : "ROOT.war")
...
09:05:37,099 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly EE
25.0.0.Final (WildFly Core 17.0.1.Final) started in 12290ms - Started 274 of 359 services
(138 services are lazy, passive or on-demand)
And I have now my application served by WildFly:
$ curl http://:8080/rest/json
{"result":"Hello World!"}
Using this new plugin mechanism to provision WildFly will have tremendous impact on
developing and running WildFly application:
* The application's pom.xml now can be the self-contained definition of the
application as a whole (including the WildFly runtime configuration to run the application
code)
* Arquillian tests can be run against a runtime consisting of the provisioned WildFly and
the deployed application. You can test your actual deployment and its runtime during the
application test phase.
* We are also developing new source-to-images (S2I) builder and runtime image that
leverages this new provisioning capability of the wildfly-maven-plugin. These images will
provide all the infrastructure to build application image that can be deployed on
Kubernete platforms.
We will have a serie of blog posts that provides more details on these new developments.
Best regards,
Jeff
--
Jeff Mesnil
Principal Software Engineer
Red Hat
http://jmesnil.net/