Domain and Host Controller configuration on the EuroAP application server

Domain and Host Controller – configuration on the example of EuroAP application server

Using the EuroAP application server, we have the option of running the server (or servers) in Standalone or Domain mode. In today’s article, we will take a closer look at how to configure the Domain Controller and Host Controller to work together in the Managed Domain mode. We will focus on a practical example of such a configuration.

Using the EuroAP application server, we have the option of running the server (or servers) in Standalone or Domain mode. In today’s article, we will take a closer look at how to configure the Domain Controller and Host Controller to work together in the Managed Domain mode. We will focus on a practical example of such a configuration.

EuroAP is built on the basis of the JBoss EAP source code, therefore the following information also applies to this solution.

Configuration separation for individual servers

To illustrate the configuration of the Master-Slave relationship, we will use a simple structure consisting of two instances of Hosts. We will need two independent configurations:

  • Master (Domain Controller)
  • Slave (Host Controller).

In the example, we will use EuroAP application server in the latest (as of the date of writing the article) version 7.4.1.

Assuming that we have the application server already installed, we create two copies of the default domain server configuration, which are located in the EuroAP installation folder:

  • for Domain Controller – in the location /opt/domain-controller:
cp -a $EUROAP_HOME/domain/configuration /opt/domain-controller
  • for Host Controller – in the location /opt/host-controller:
cp -a $EUROAP_HOME/domain/configuration /opt/host-controller

Configuration

Before running the servers, it is necessary to configure them. Let’s use the default configuration files copied previously from the EuroAP instance. For Domain Controller, it will be /opt/domain-controller/configuration/host-master.xml, and for Host Controler/opt/host-controller/configuration/host-slave.xml.

host-master.xml stores the minimum configuration for the Domain Controller, without server instances. It defines only the Management Network Interface. This configuration cannot be used if the Domain Controller is to contain server instances – it is NOT a recommended solution.

host-slave.xml – configuration for Host Controller containing sample server instances and server groups (the same as in the case of the default host.xml file). This configuration uses the parameters jboss.domain.master.address and jboss.domain.master.port to specify the IP address of the Domain Controller and its port.

The default configuration of host-master.xml for our example today will suffice, however host-slave.xml will need some modification. Let`s get down to work.

We need to open our configuration file in a text editor. We used Vim in this article:

vim /opt/host-controller/configuration/host-slave.xml

Then, at the very beginning, we give a name to our host, e.g. myServerA:

Domain and Host Controller

Next, we need to indicate the IP address of the Domain Controller and specify the port on which it is running. For this purpose the parameters indicated in the screenshot below are used. The jboss.domain.master.address parameter is responsible for storing the Domain Controller address, and the jboss.domain.master.port parameter is responsible for storing the port. In our case the address is 127.0.0.1 or localhost, because we run the servers locally (this is the default value).

The port has been changed to 10990 (it`s set to 9990 by default), which will be explained during the servers’ startup.

Domain and Host Controller

Servers startup

When the configuration files are ready, it`s time to start our servers:

  • Domain Controller:
$EUROAP_HOME/bin/domain.sh -Djboss.management.http.port=10990  -Djboss.management.native.port=10999 -Djboss.domain.base.dir=/opt/domain-controller/ --host-config=host-master.xml
  • Host Controller:
$EUROAP_HOME/bin/domain.sh -Djboss.management.http.port=20990  -Djboss.management.native.port=20999 -Djboss.domain.base.dir=/opt/host-controller/ --host-config=host-slave.xml

A quick addition to the above commands and parameters:

  • $EUROAP_HOME/bin/domain.sh – the command executes the domain.sh script that starts the application server
  • -Djboss.management.http.port=10990  -Djboss.management.native.port=10999 – these two parameters are needed to indicate which ports the server will be running on. These are the key parameters when we want to run two hosts on the same machine. If we didn`t change these values, we would have a conflict as the servers would try to start on the same default port (9990), which is not possible
  • -Djboss.domain.base.dir=/opt/domain-controller/ – indicates where our configuration is located
  • --host-config=host-master.xml – indicates from which file the configuration is to be downloaded.

After correct startup of both servers, the Domain Controller logs should show information about the correct connection of Host Controller myServerA:

[Host Controller] 16:20:16,725 INFO  [org.jboss.as.domain.controller] (Host Controller Service Threads - 28) WFLYHC0019: Registered remote slave host "myServerA", JBoss EuroAP 7.4.1.GA (WildFly 15.0.4.Final-redhat-00001)

Console Overview

The result of the above operations is access to all Host Controllers that we connect to the Domain Controller from its graphical interface (address 127.0.0.1: 10990):

Domain and Host Controller

and JBoss CLI:

Domain and Host Controller

Thanks to this, in an effective and convenient way, we can manage our entire infrastructure from the level of the Domain Controller. In our example, we used only one Host Controller, but of course we can connect any number of them to our Domain Controller. The sample and very simplified structure may look like this:

Domain and Host Controller

Summary

As you can see in the example above, running and connecting Host Controller to Domain Controller doesn`t require digging through tons of configuration. The EuroAP application server contains a number of default configuration files that will help us configure our infrastructure efficiently.

Authors

The blog articles are written by people from the EuroLinux team. We owe 80% of the content to our developers, the rest is prepared by the sales or marketing department. We make every effort to ensure that the content is the best in terms of content and language, but we are not infallible. If you see anything that needs to be corrected or clarified, we'd love to hear from you.