<commit_before>[[Galleon_Provisioning]]
= Provisioning WildFly with Galleon

With the WildFly server being internally built using the https://github.com/wildfly/galleon[Galleon project], WildFly benefits +
from Galleon's provisioning capabilities. One of the main features that Galleon brings to WildFly is the ability
to install a complete or customized WildFly server using Galleon tooling.

More information on Galleon features and tooling can be found in the Galleon https://docs.wildfly.org/galleon/[docs].

== WildFly Galleon feature-packs

WildFly provides a Galleon feature-pack maven artifact (a zipped file that contains installation content). 
This feature-pack, as well as the feature-packs on which its depends (core and servlet feature-packs),
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.

== 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 https://github.com/wildfly/galleon/releases[page].

To install the latest final version of WildFly into the directory _my-wildfly-server_ call:

[source,options="nowrap"]
----
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.

[NOTE]
====

Append the release version to install an identified release, for example:
[source,options="nowrap"]
----
galleon.sh install wildfly:current#16.0.0.Final --dir=my-wildfly-server
----
Use _wildfly-core:current_ to only install a core server, for example:
----
galleon.sh install wildfly-core:current --dir=my-core-server
----
Use _wildfly-servlet:current_ to only install a servlet server, for example:
----
galleon.sh install wildfly-servlet:current --dir=my-servlet-server
----
====

== 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:

[source,options="nowrap"]
----
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:
[source,options="nowrap"]
----
galleon.sh install wildfly:current --dir=my-wildfly-server --default-configs=standalone/standalone.xml,domain/domain.xml
----

[NOTE]
====

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_).
====

== WildFly Galleon layers

WildFly Galleon feature-packs expose some link:++https://docs.wildfly.org/galleon/#_layers++[Galleon layers]. 
A layer identifies one or more server functionalities that can be installed on its own or 
in combination with other layers. For example, if your application (e.g.: microservice) 
is only making use of _jaxrs_ and _cdi_ server functionalities, you can choose to only install 
the _jaxrs_ 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 jaxrs and cdi functionalities call:

[source,options="nowrap"]
----
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 _jaxrs_ and _cdi_. 

[NOTE]
====

* Tools (jboss-cli, add-user, ...) are not installed when installing WildFly using layers. 
Only server launcher scripts are installed into the _bin_ directory. To include these tools include the _core-tools_ layer.
====

=== Defined Galleon layers

==== Note on layers and feature-pack dependencies

When installing a feature-pack, its own defined layers as well as the layers present in its dependencies 
can be combined to build a custom configuration. This means that core and servlet defined layers can be combined with 
WildFly defined layers to assemble a custom configuration. <<galleon-cli-recipes>> contains examples of such combination of layers.

==== WildFly layers

Basic layers:

* _cdi_: Support for cdi.
* _datasources_: Support for datasources.
* _ee-security_: Support for Jakarta EE Security API
* _jaxrs_: Support for jaxrs. Depends on _web-server_ (layer defined in the WildFly servlet feature-pack).
* _jms-activemq_: Support for connections to a remote jms broker. 
* _jpa_: Support for jpa (latest WildFly supported hibernate release).<commit_msg>Update galleon docs with microprofile-config and microprofile-metrics layers<commit_after>[[Galleon_Provisioning]]
= Provisioning WildFly with Galleon

With the WildFly server being internally built using the https://github.com/wildfly/galleon[Galleon project], WildFly benefits +
from Galleon's provisioning capabilities. One of the main features that Galleon brings to WildFly is the ability
to install a complete or customized WildFly server using Galleon tooling.

More information on Galleon features and tooling can be found in the Galleon https://docs.wildfly.org/galleon/[docs].

== WildFly Galleon feature-packs

WildFly provides a Galleon feature-pack maven artifact (a zipped file that contains installation content). 
This feature-pack, as well as the feature-packs on which its depends (core and servlet feature-packs),
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.

== 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 https://github.com/wildfly/galleon/releases[page].

To install the latest final version of WildFly into the directory _my-wildfly-server_ call:

[source,options="nowrap"]
----
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.

[NOTE]
====

Append the release version to install an identified release, for example:
[source,options="nowrap"]
----
galleon.sh install wildfly:current#16.0.0.Final --dir=my-wildfly-server
----
Use _wildfly-core:current_ to only install a core server, for example:
----
galleon.sh install wildfly-core:current --dir=my-core-server
----
Use _wildfly-servlet:current_ to only install a servlet server, for example:
----
galleon.sh install wildfly-servlet:current --dir=my-servlet-server
----
====

== 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:

[source,options="nowrap"]
----
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:
[source,options="nowrap"]
----
galleon.sh install wildfly:current --dir=my-wildfly-server --default-configs=standalone/standalone.xml,domain/domain.xml
----

[NOTE]
====

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_).
====

== WildFly Galleon layers

WildFly Galleon feature-packs expose some link:++https://docs.wildfly.org/galleon/#_layers++[Galleon layers]. 
A layer identifies one or more server functionalities that can be installed on its own or 
in combination with other layers. For example, if your application (e.g.: microservice) 
is only making use of _jaxrs_ and _cdi_ server functionalities, you can choose to only install 
the _jaxrs_ 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 jaxrs and cdi functionalities call:

[source,options="nowrap"]
----
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 _jaxrs_ and _cdi_. 

[NOTE]
====

* Tools (jboss-cli, add-user, ...) are not installed when installing WildFly using layers. 
Only server launcher scripts are installed into the _bin_ directory. To include these tools include the _core-tools_ layer.
====

=== Defined Galleon layers

==== Note on layers and feature-pack dependencies

When installing a feature-pack, its own defined layers as well as the layers present in its dependencies 
can be combined to build a custom configuration. This means that core and servlet defined layers can be combined with 
WildFly defined layers to assemble a custom configuration. <<galleon-cli-recipes>> contains examples of such combination of layers.

==== WildFly layers

Basic layers:

* _cdi_: Support for cdi.
* _datasources_: Support for datasources.
* _ee-security_: Support for Jakarta EE Security API
* _jaxrs_: Support for jaxrs. Depends on _web-server_ (layer defined in the WildFly servlet feature-pack).
* _jms-activemq_: Support for connections to a remote jms broker.
* _jpa_: Support for jpa (latest WildFly supported hibernate release).
* _microprofile-config_: Support for MicroProfile Config.
* _microprofile-metrics_: Support for MicroProfile Metrics.
{'fraction_non_alphanumeric': 0.07912003087610961, 'fraction_numerical': 0.0007719027402547279, 'mean_word_length': 4.729684908789387, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6742213', 'n_tokens_mistral': 2977, 'n_tokens_neox': 2809, 'n_words': 1214}