Using WildFly core as management interface

WildFly core is the core runtime that is used by the Wildfly application server. It provides some minimal functionalities such as the classloader, JMX Api and the security framework (Elytron). Besides it, you can use it as Management endpoint. In this tutorial we will learn how to install it and use it as Management interface for remote WildFly servers.

The source code for WildFly core is available on GitHub at: https://github.com/wildfly/wildfly-core

From there, you can build it by simply running:

mvn install

If you don’t want to build it from the source, a quicker way to install WildFly core is through Galleon, which can provision different feature packs, including wildfly-core. In this tutorial we have discussed how to install Galleon and to use it to install Wildfly: Provisioning WildFly with Galleon

Once that you have downloaded Galleon, simply launch its shell with:

$ ./galleon.sh 

WildFly core is included in the list of feature-packs available:

[bin]$ list-feature-packs 
=============== ============== ============ 
Product         Update Channel Latest Build 
=============== ============== ============ 
wildfly         18.0/final     18.0.1.Final 
wildfly         current/final  18.0.1.Final 
wildfly         17.0/final     17.0.1.Final 
wildfly-core    current/final  10.0.3.Final 
wildfly-core    10.0/final     10.0.3.Final 
wildfly-core    9.0/final      9.0.2.Final  
wildfly-servlet 18.0/final     18.0.1.Final 
wildfly-servlet current/final  18.0.1.Final 
wildfly-servlet 17.0/final     17.0.1.Final 

In order to install the current version of WildFly core, simply run from the Galleon shell (adjust the –-dir path to the location where you want to install it):

[bin]$ install wildfly-core:current#10.0.3.Final --dir=/home/jboss/wildfly-core

Check that the output is successful:

Feature pack installed.d. 
============ ============ ============== 
Product      Build        Update Channel 
============ ============ ============== 
wildfly-core 10.0.3.Final current    

Great, WildFly core has been installed. As you can see from the following command, the size of the base installation is just 43MB:

$ du -hs /home/jboss/wildfly-core
43M	/home/jboss/wildfly

This is much smaller compared to the standard WildFly installation:

$ du -hs /home/jboss/wildfly-18.0.1.Final/
220M	/home/jboss/wildfly-18.0.1.Final/

Using WildFly core as management interface

So what can you do with just WildFly core? one use case could be using its CLI to manage other application servers. Within the bin folder, you can run the CLI as usual against local or remote application servers:

cd bin
$ ./jboss-cli.sh 
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect 192.168.10.1

Besides it, WildFly core includes JMX libraries, so you can perform basic deployments of MBeans on the top of it.

For example, you can try deploying the helloworld-mbean-service example (https://github.com/wildfly/quickstart/tree/master/helloworld-mbean) from WildFly quickstarts:

22:01:50,510 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "helloworld-mbean-service.sar" (runtime-name: "helloworld-mbean-service.sar")
22:01:50,580 INFO  [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0010: Deployed "helloworld-mbean-service.sar" (runtime-name : "helloworld-mbean-service.sar")
Found the article helpful? if so please follow us on Socials