Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 3.28 KB

index.md

File metadata and controls

76 lines (51 loc) · 3.28 KB

Building a WildFly server for the cloud

In order to provision a WildFly server for the cloud, you have first to integrate the WildFly Maven plugin into the pom.xml file of your project.

The package goal of the plugin allows you to:

  • Provision a WildFly server tailored to your needs.
  • Incorporate custom content (keystores, properties files, etc).
  • Execute CLI scripts.
  • Deploy your application.

The generated server is then ready to be installed inside Docker or Podman container image to be deployed in your cluster.

Provisioning with the cloud feature-pack

The cloud feature-pack is to be provisioned along with WildFly Galleon feature-pack. This is configured in the feature-packs configuration option of the WildFly Maven plugin.

For example:

<feature-packs>
  <feature-pack>
    <location>org.wildfly:wildfly-galleon-pack:${version.wildfly}</location>
  </feature-pack>
  <feature-pack>
    <location>org.wildfly.cloud:wildfly-cloud-galleon-pack:${version.wildfly.cloud.galleon.pack}</location>
  </feature-pack>
</feature-packs>

For a complete plugin configuration see this example.

Building a WildFly Image

Building an application image from a local execution of the WildFly Maven plugin

Once the Maven plugin has been configured (see a complete example), calling mvn clean package will output a WildFly server containing your deployment in <project>/target/server directory.

This server has then to be installed into the WildFly runtime image (JDK11 or JDK 17).

Use this Dockerfile example to build an application image using Docker or Podman.

With JDK 11 runtime image:

docker build -t my-application-jdk11:latest .

With JDK 17 runtime image:

docker build --build-arg runtime_image="quay.io/wildfly/wildfly-runtime-jdk17:latest" -t my-application-jdk17:latest .

Building an image in the cluster thanks to the WildFly S2I Builder image and Helm charts

Using WildFly Helm charts is the simplest way to initiate the build of your application image in the cloud.

JDK 11 or JDK 17 WildFly S2I Builder images can be configured in your helm chart to build and deploy an application image.

These examples will guide you step by step in order to deploy your application image in the cloud.

Specifics of the wildfly-cloud-galleon-pack

When using the cloud galleon feature-pack, the following content will get provisioned:

  • Server startup scripts.
  • Automatic adjustment of WildFly Galleon layers to cope with the cloud execution environment.
  • Automatic provisioning of the health subsystem allowing for server state monitoring (Liveness and Readiness probes).
  • Automatic routing of server logs to the console.