Hi WildFly community,
We would like to advertise the existence of the WildFly Glow
<
https://github.com/wildfly/wildfly-glow>project.
WildFly Glow is an evolution of the WildFly Galleon
<
https://docs.wildfly.org/galleon/>provisioning tooling.
It is currently an Alpha, and getting feedback from the community at
this point would be very valuable!
The goal of this project is to offer some tooling to identify the set of
Galleon feature-packs and layers that are required by your application.
The entry-point of this discovery being the application deployment.
Automatic identification of WildFly Galleon layers
Today, in order to trim a WildFly server to fit the application
requirements, you have to first identify the set of WildFly Galleon
layers
<
https://docs.wildfly.org/30/Galleon_Guide.html#wildfly_galleon_layers>to
use.
WildFly Glow identifies the layers for you by scanning your application
war (jar or ear) files.
This application to Galleon layers mapping is based on rules contained
in WildFly Galleon layers (starting WildFly 29).
These rules express the Java types, annotations and files (XML
descriptors, properties files, ...)
that are bound to the usage of a given Galleon layer. An example of
rules can be found in the jaxrs
<
https://github.com/wildfly/wildfly/blob/main/ee-feature-pack/galleon-shar....
In this example we look for REST API usage and a servlet class located
in a web.xml file.
Once the layers are identified, the Galleon feature-packs that define
them are selected and included.
Centralized knowledge of WildFly Galleon feature-packs
You can today extend a WildFly server at provisioning time by the means
of extra Galleon feature-packs. For example, some feature-packs exist to
connect to databases, to enable a gRPC endpoint, to enable the Keycloak
SAML protocol, to replace the JSF implementation with myFaces, to
integrate resteasy-spring features into WildFly, etc (non exhaustive list).
WildFly Glow has, per WildFly version, the knowledge of compatible
Galleon feature-packs. It offers a centralized view on extra features
you can add to your WildFly server.
Going beyond discovered Galleon layers
WildFly Glow does more than identifying Galleon feature-packs and layers.
Provisioning
WildFly Glow tooling allows you to provision a WildFly server or a
WildFly Bootable JAR or produce a Docker image.
WildFly additional features discovery
Not all WildFly server features can be discovered by scanning your
application deployment. A good example is the usage of SSL to secure the
http server access. Another one is the need for WildFly tooling (e.g.
WildFly CLI, elytron tooling, ...).
WildFly Glow allows you to include, according to what has been
discovered in the deployment, a set of additional WildFly features
called `add-ons` that makes sense for your application. Implementation
wise, such add-ons are Galleon layers. For example, the SSL add-on is
implemented by the undertow-https
<
https://github.com/wildfly/wildfly/blob/main/ee-feature-pack/galleon-shar....
Connection to databases
WildFly Glow detects that your application requires a datasource and
will suggest you with database `add-ons` to be included in order to
connect to the DB of your choice (postgresql, mysql, ...). The
Datasources feature-pack layers implement these add-ons. For example,
the postgresql
<
https://github.com/wildfly-extras/wildfly-datasources-galleon-pack/blob/m....
High Availability profile handling
Currently, to provision an HA WildFly server using galleon layers, you
need to exclude the non HA Galleon layers and include their HA
counterparts (e.g.: ‘jpa-distributed
<
https://github.com/wildfly/wildfly/blob/main/ee-feature-pack/galleon-shar...
layer used instead of the ‘jpa’
<
https://github.com/wildfly/wildfly/blob/main/ee-feature-pack/galleon-shar...,
‘ejb-dist-cache
<
https://github.com/wildfly/wildfly/blob/main/ee-feature-pack/galleon-shar...
instead of the ‘ejb-local-cache
<
https://github.com/wildfly/wildfly/blob/main/ee-feature-pack/galleon-shar...).
When the HA profile is enabled, WildFly Glow handles the correct
inclusions and exclusions of layers.
WildFly Glow tooling
WildFly Glow offers currently 2 main usages:
* A Command Line interface (`wildfly-glow` CLI) that scans your
deployment and can provision a WildFly server, a WildFly Bootable JAR and
a Docker image (to be deployed on Kubernetes). From the CLI you can
discover the list of available `add-ons` and enable them. WildFly Glow
currently supports Wildfly 29 and 30. The latest WildFly major
(currently 30.0.0.Final) is the default when no WildFly version is
specified.
* An integration with the WildFly Maven plugin (Starting 5.0.0.Alpha2)
`package` goal, to provision a WildFly server without specifying
feature-packs and layers.
Current status
We are currently at an Alpha level and working to reach a Beta level of
quality. We have a draft PR
<
https://github.com/wildfly/wildfly/pull/17153>that updates the WildFly
integration testsuite to use the WildFly Glow arquillian Maven plugin
(that scans arquillian test deployments) instead of relying on hard
coded Galleon layers. 100% of the tests that use Galleon provisioning
have been updated.
We plan to put in place a WildFly quickstarts
<
https://github.com/wildfly/quickstart>preview branch that updates all
quickstarts to rely on WildFly Glow.
We also plan to integrate more feature-packs inside the WildFly Galleon
feature-packs
registry
<
https://github.com/wildfly/wildfly-galleon-feature-packs/tree/release>.
Some candidates for which we have Proof of Concept integrations are:
keycloak
<
https://github.com/jfdenise/keycloak/tree/layers_metadata_final>,
myfaces
<
https://github.com/wildfly-extras/wildfly-myfaces-feature-pack>,
graphql
<
https://github.com/jfdenise/wildfly-graphql-feature-pack/tree/layers_meta...;,
resteasy-spring
<
https://github.com/jfdenise/resteasy-spring/tree/galleon-layer>.
BTW: if you are defining Galleon feature-packs for WildFly that would be
helpful for the community, we should get in touch.
A good way to get started with WildFly Glow is by downloading the latest
CLI (1.0.0.Alpha7) from here
<
https://github.com/wildfly/wildfly-glow/releases>and scan your deployments.
Feel free to provide us with your feedback!
Thank-you.
JF Denise