Red Hat

WildFly 20 S2I images have been released on quay.io

WildFly 20 S2I Docker images

The WildFly S2I (Source-to-Image) builder and runtime Docker images for WildFly 20 have been released on quay.io/wildfly.

Changes since the last release:

  • Upgraded Keycloak client adapters to version 10.0.2.

  • Reduced the size of the image generated during s2i chained build template (image named <app>-build-artifacts).

For a complete documentation on how to use these images using S2I, OpenShift and Docker, refer to the WildFly S2I README.

Adding the imagestreams and template to OpenShift

At some point the new images will be made available from the OpenShift catalog and image repository. But you can already use these images by adding them yourselves to your OpenShift cluster.

  • WildFly S2I builder image stream:

oc create -n myproject -f https://raw.githubusercontent.com/wildfly/wildfly-s2i/wf-20.0/imagestreams/wildfly-centos7.json
  • WildFly runtime image stream:

oc create -n myproject -f https://raw.githubusercontent.com/wildfly/wildfly-s2i/wf-20.0/imagestreams/wildfly-runtime-centos7.json
  • Chained build template:

oc create -n myproject -f https://raw.githubusercontent.com/wildfly/wildfly-s2i/wf-20.0/templates/wildfly-s2i-chained-build-template.yml

NB: If you import the image streams into your project, be sure to set the ImageStreams Namespace (IMAGE_STREAM_NAMESPACE argument) to your project namespace in the template. openshift being the default namespace.

Eclipse Microprofile OpenAPI example

Since version 19, WildFly implements a support for the Microprofile OpenAPI specification.

We are here deploying the WildFly microprofile-openapi quickstart inside OpenShift.

In order to tailor WildFly to our use-case (jaxrs service) we are using WildFly Galleon Layers during s2i build to construct a WildFly server composed of jaxrs and Microprofile OpenAPI (plus their required dependencies).

Build and run the application

The quickstart is a jaxrs service that exposes a set of operations to manage a store inventory. We are retrieving the service interface (HTTP operations, URL paths and data types) through the openapi endpoint that WildFly exposes in the root context (eg: http://127.0.0.1:8080/openapi).

  • Build the application image:

oc new-app wildfly-s2i-chained-build-template -p APPLICATION_NAME=openapi-app \
      -p GIT_REPO=https://github.com/wildfly/quickstart \
      -p GIT_CONTEXT_DIR=microprofile-openapi \
      -p GIT_BRANCH=20.0.0.Final \
      -p GALLEON_PROVISION_LAYERS=jaxrs,microprofile-openapi \
      -p IMAGE_STREAM_NAMESPACE=myproject \
      --build-env=MAVEN_ARGS_APPEND="-Dcom.redhat.xpaas.repo.jbossorg"
  • Create an application from the application image:

oc new-app myproject/openapi-app
  • Expose the service:

oc expose svc/openapi-app
  • The OpenAPI service definition is exposed at the following well known location: <application route>/openapi

  • From the service definition we can retrieve the HTTP operations and URL paths that the service supports. For example, the HTTP GET sent to <application route>/fruit returns a JSON array containing the fruits present in the inventory.

Enjoy the Apples and Pineapples!

Jean-François Denise

Jean-François is a senior software engineer at Red Hat. He is the lead of the WildFly and Galleon command line tools and in charge of the WildFly S2I images.

Location:  France

Occupation:  Software Engineer

Latest News

back to top