Bookmark this page

Configuring Server Groups

Objectives

  • Configure a server group within a managed domain.

  • Identify the different options available to create and manage server groups.

  • Identify the different attributes of a server group that are configured in the domain.xml file of the domain controller.

Server Groups

A server group is a logical grouping of servers in a Red Hat JBoss Enterprise Application Platform (JBoss EAP) managed domain. You manage the server group as a single unit. The server groups are defined and managed by the domain controller, but each individual server is managed by the respective host controllers. Each secondary host controller communicates with the domain controller, and ensures that all the servers within a managed domain have the same configuration.

Each server group is assigned a unique profile. A profile consists of a list of JBoss EAP subsystems and their configuration.

Server groups are configured in the domain.xml file on the domain controller. Red Hat recommends creating and managing the server groups by using the JBoss EAP management console or the management CLI.

Configuring Server Groups by Using the Management Console

You can create server groups in a managed domain in the Runtime section of the management console.

Figure 5.5: Server groups view in the Runtime page

You must provide the following three key attributes to add a new server group:

  • A unique Name for the server group.

  • A valid Profile from the list of profiles defined in the domain.xml configuration file.

  • A Socket Binding Group which defines a set of network ports used by servers running within the server group.

Figure 5.6: Creating a server group

To remove a server group, ensure that there are no servers assigned to the server group. If there are servers assigned, stop them, and then remove the servers from the server group. Finally, remove the server group.

Figure 5.7: Removing a server group

Configuring Server Groups by Using the Management CLI

You can create server groups by using the JBoss EAP management CLI.

The server groups are configured in the /server-group namespace of the management CLI. The management CLI implements commands to create, view, modify, and remove server groups in this namespace. To add a new server group, run the following command:

[domain@workstation:9990 /] /server-group=Group1:add\
(profile=full,socket-binding-group=full-sockets)
{
    "outcome" => "success",
    ...
}

You can verify the existing server groups by using the read-resource operation in the management CLI:

[domain@workstation:9990 /] /server-group=Group1:read-resource
{
    "outcome" => "success",
    "result" => {
        "management-subsystem-endpoint" => false,
        "profile" => "default",
        "socket-binding-default-interface" => undefined,
        "socket-binding-group" => "standard-sockets",
        "socket-binding-port-offset" => 0,
        "deployment" => undefined,
        "deployment-overlay" => undefined,
        "jvm" => undefined,
        "system-property" => undefined
    }
}

To remove a server group, ensure that there are no servers assigned to the server group. Then run the following command:

[domain@workstation:9990 /] /server-group=Group1:remove()
{
    "outcome" => "success",
    ...
}

Note

Regardless of which technique is used to modify a configuration setting, all changes are synchronized to the domain.xml configuration file. For example, if you modify a setting by using the management console, then the underlying domain.xml file is updated, and the management CLI immediately becomes aware of the change.

Server Group Configuration

You define server groups in a managed domain in the domain.xml configuration file of the domain controller by using the <server-groups> element. The child element <server-group> within the <server-groups> parent element can be used to define a server group. For example:

<server-groups>
  <server-group name="main-server-group" profile="default"> 1 2
      <jvm name="default"> 3
        ...
      </jvm>
      <socket-binding-group ref="standard-sockets"> 4
      <deployments> 5
        ...
      </deployments>
  </server-group>
</server-groups>

1

The name attribute is required and must be unique in the managed domain. When defining a server in host.xml, the server references this name attribute.

2

The profile attribute is also required and references the name of a <profile> defined in the domain configuration file.

3

The jvm name attribute references a <jvm> memory configuration for all the servers in this server group. In addition, the server group's settings for the JVM can be overridden by the server in host.xml. JVM memory allocation in JBoss EAP is discussed later in the course.

4

The socket-binding-group attribute references the name of a socket binding group defined in this domain configuration file. This setting can be overridden by the server in host.xml.

5

The <deployments> section lists the applications deployed on every server in the group. Do not add <deployment> entries manually; deploy the applications by using the management console or the management CLI.

References

For more information about server groups in JBoss EAP domain mode, refer to the Configure Server Groups section in the Configuration Guide in the Red Hat JBoss EAP documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html-single/configuration_guide/index#configuring_server_groups

Revision: ad248-7.4-18a9db2