© 2020 The original authors.
1. Provisioning WildFly with Galleon
As opposed to a using traditional WildFly zip installation that installs it all (all default server configurations and all JBoss modules), using Galleon tooling you can choose to install a complete or customized WildFly server.
More information on Galleon features and tooling can be found in the Galleon docs.
1.1. Download and Installation of the Galleon Command Line Tool
Releases of the Galleon command line tool are available on the Galleon releases page.
Download and unzip the release zip and add the bin
dir to your system path. Use galleon.sh
or galleon.bat
to launch the tool.
1.2. WildFly Galleon feature-packs
WildFly provides a Galleon feature-pack maven artifact (a zipped file that contains everything needed to dynamically provision a server). This feature-pack, as well as the feature-packs on which its depends, are deployed in public maven repositories.
When Galleon is used to install WildFly, WildFly feature-packs are retrieved and their content is assembled to create an installation.
1.3. Installing WildFly using Galleon
The Galleon maven plugin or Galleon CLI are used to install WildFly. The latest CLI and documentation can be downloaded from the Galleon releases page.
To install the latest final version of WildFly into the directory my-wildfly-server call:
galleon.sh install wildfly:current --dir=my-wildfly-server
Once installed, the directory my-wildfly-server contains all that is expected to run a complete WildFly server. By default, all standalone and domain configurations are installed.
Append the release version to install an identified release, for example:
|
1.4. Selecting the configurations to install
Galleon allows you to specify only a subset of the default configurations to be installed.
To only install the standalone.xml configuration call:
galleon.sh install wildfly:current --dir=my-wildfly-server --default-configs=standalone/standalone.xml
To install multiple configurations, a comma separated list of default configurations can be provided, for example:
galleon.sh install wildfly:current --dir=my-wildfly-server --default-configs=standalone/standalone.xml,domain/domain.xml
A default configuration is identified by <configuration model>/<configuration name>. WildFly defines standalone and domain models. The configuration name is the XML configuration file name (e.g.: standalone.xml, domain.xml, standalone-ha.xml). |
1.5. WildFly Galleon layers
WildFly Galleon feature-packs expose some Galleon layers. A layer identifies one or more server capabilities that can be installed on its own or in combination with other layers. For example, if your application (e.g. a microservice) is only making use of JAX-RS, Eclipse MicroProfile Config and CDI server capabilities, you can choose to only install the jaxrs, microprofile-config and cdi layers. The standalone.xml configuration would then only contain the required subsystems and their dependencies.
The benefit to installing WildFly using Galleon layers, in addition to configuration trim down, is that Galleon only installs the needed content (JBoss Modules modules, scripts, etc.)
To install a server only configured with the JAX-RS and CDI capabilities call:
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=cdi,jaxrs
Once installed, the directory my-wildfly-server contains all that is expected to deploy an application that depends on JAX-RS and CDI.
Some layers optionally depend on other layers; i.e. the features provided by layer can and by default do make use of those from another layer, but if those are not present things will still work fine. In such a case if you do not want the optional capabilities you can exclude the optional layer by prefixing its name with a '-'. For example to exclude the optional CDI dependency on Bean Validation:
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=cdi,jaxrs,-bean-validation
|
1.5.1. WildFly Layers
In the tables below we provide basic information about all of the layers WildFly provides.
Besides the layer names and a brief description of each, the tables below detail the various dependency relationships between layers. If the capabilities provided by a layer A require capabilities provided by another layer B, then layer A will depend on layer B. If you ask for layer A, then Galleon will automatically provide B as well. In some cases A’s dependency on B can be optional; that is A typically comes with B, but can function without it. In this case if you ask for A by default Galleon will provide B as well, but you can tell Galleon to exclude B.
Some layers are logical alternatives to other layers. If two layers are alternatives to each other they both provide the same general capabilities, but with different implementation characteristics. For example a number of layers provide the capability to cache different types of objects. These layers typically come in pairs of alternatives, where one alternative provides local caching, while the other provides distributed caching. If a layer you want has an optional dependency on a layer that has an alternative, you can exclude that dependency and instead specify the alternative. If a layer has an alternative the Description column in the tables below will identify it.
If the elytron layer is present, security will be handled by the elytron subsystem. The undertow and ejb subsystems are configured with an other application-security-domain that references the Elytron ApplicationDomain security domain. |
Foundational Galleon layers
A single Galleon layer can provide a relatively small set of capabilities, but most users will want to start with a broader set of capabilities without having to spell out all the details. To help with this WildFly provides a few foundational layers all of which provide typical core WildFly capabilities like the logging subsystem and a secure remote management interface.
You don’t have to base your WildFly installation on one of these foundational layers, but doing so may be more convenient.
Name | Description | Dependencies |
---|---|---|
A servlet container with support for datasources. |
core-server |
|
An extension of datasources-web-server with support for JAX-RS, CDI and JPA. |
bean-validation (optional) |
|
An extension of jaxrs-server to address common cloud requirements. |
ee-security (optional) |
|
A typical manageable server core. This layer could serve as a base for a more specialized WildFly that doesn’t need the capabilities provided by the other foundational layers. |
core-management (optional) |
Basic Galleon Layers
Name |
Description |
Dependencies |
Security realm meant for securing applications. |
||
Empty runnable server. |
git-history (optional) |
|
Support for Jakarta Batch. |
||
Support for Jakarta Bean Validation. |
base-server |
|
Support for Jakarta Contexts and Dependency Injection. |
base-server |
|
An aggregation of some basic layers to address cloud use cases. |
bean-validation (optional) |
|
Support for server management services. |
||
Support for core Application and Management security realms. |
application-security-realm (optional) |
|
Support for jboss-cli, add-user and elytron-tool launch scripts and configuration files. |
management (optional) |
|
Support for datasources. |
||
Support for deployment directory scanning. |
||
Support for discovery. |
||
Support for common functionality in the Jakarta EE platform. |
||
Support for EE Security. |
||
Support for Jakarta Enterprise Beans, excluding the IIOP protocol. |
ejb-lite |
|
Infinispan-based distributed cache for stateful session beans. |
||
Support for Jakarta Enterprise Beans Lite. |
ejb-local-cache (optional) |
|
Infinispan-based local cache for stateful session beans. |
||
Support for Elytron security. |
||
Support for using git for configuration management. |
||
Support for an H2 datasource |
||
Support for an H2 datasource set as the ee subsystem default datasource. |
||
Support for the H2 JDBC driver. |
||
Support for XNIO workers and buffer pools. |
||
Support for JAXRS. |
||
Support for the JBoss Diagnostic Reporting (JDR) subsystem. |
base-server |
|
Deprecated - use messaging-activemq. |
||
Support for registration of Management Model MBeans. |
||
Support for a JMX remoting connector. |
jmx |
|
Support for JPA (using the latest WildFly supported Hibernate release). |
bean-validation (optional) |
|
Support for JPA with a distributed second level cache. |
bean-validation (optional) |
|
Support for Jakarta Server Faces. |
bean-validation (optional) |
|
Support for JSON Binding (JSON-B) provisioning the JSON-B API and Implementation modules. |
||
Support for JSON Processing (JSON-P) provisioning the JSON-P API and Implementation modules. |
||
Support for remote access to management interfaces secured with the core ManagementRealm. |
||
Support for inbound and outbound JBoss Remoting connections, secured using legacy security realms. |
||
Support for legacy Picketbox-based web security. |
||
Support for the logging subsystem. |
||
Support for Jakarta Mail. |
||
Support for remote access to management interfaces secured using Elytron. |
||
Security realm meant for securing server management interfaces. |
||
Support for connections to a remote JMS broker. |
||
Support for MicroProfile Config. |
||
Support for MicroProfile Fault Tolerance. |
||
Support for MicroProfile Health. |
||
Support for MicroProfile JWT. |
||
Support for MicroProfile Metrics. |
||
Support for MicroProfile OpenAPI. |
||
Support for available MicroProfile platform specifications. |
microprofile-config (optional) |
|
Support for JNDI. |
||
Support for MicroProfile monitoring features. |
microprofile-config (optional) |
|
Support for MicroProfile OpenTracing. |
||
Support for legacy JBoss Microcontainer applications. |
||
Support for connections to a remote Apache Activemq Artemis JMS broker. |
||
Support for inbound and outbound JBoss Remoting connections, secured using Elytron. |
||
Support for request management |
||
Support for deployment of JCA adapters. |
||
Support for SAR archives to deploy MBeans. |
||
Support for applying security manager permissions to applications. |
||
Support for transactions. |
||
Support for the Undertow HTTP server. Provides servlet support but does not provide typical EE integration like resource injection. Use web-server for a servlet container with EE integration. |
||
Support for the Undertow HTTPS server secured using the legacy security ApplicationRealm. |
||
Support for Undertow configured as a load balancer. |
||
Support for Picketbox security vaults. |
||
Infinispan-based web session clustering. |
||
Support for loading the HAL web console from the /console context on the HTTP management interface. Not required to use a HAL console obtained independently and configured to connect to the server. |
||
A servlet container. |
deployment-scanner (optional) |
|
Support for Jakarta XML Web Services |
ejb-lite (optional) |
1.5.2. Galleon CLI recipes
Using the Galleon CLI tool, you can provision WildFly installations based on a set of layers.
In order to exclude an optional layer prefix its name with '-', for example: '-jpa' to exclude the jpa layer. |
Installation of a cloud-server
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=cloud-server
Installation of a cloud-server with support for https (using legacy core ApplicationRealm)
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=cloud-server,undertow-legacy-https
Installation of a cloud-server and ejb with ejb-dist-cache as an alternative to ejb-local-cache
This is done by excluding the ejb layer’s optional ejb-local-cache dependency and specifying its ejb-dist-cache alternative:
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=cloud-server,ejb,-ejb-local-cache,ejb-dist-cache
Installation of a jaxrs-server with jpa-distributed as an alternative to jpa
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=jaxrs-server,-jpa,jpa-distributed
Installation of jaxrs, cdi, elytron and logging
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=jaxrs,cdi,elytron,logging
Installation of a servlet container with main core functionalities
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=web-server,core-server
Installation of a servlet container with support for https (using legacy core ApplicationRealm)
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=web-server,undertow-legacy-https
Installation of a core server
galleon.sh install wildfly:current --dir=my-wildfly-server --layers=core-server