Bookmark this page

Managing JBoss EAP

Objectives

  • Describe the management options available for JBoss EAP

JBoss EAP 7 Management Options

JBoss EAP 7 is designed in a modular fashion, with multiple subsystems that you can customize to support Jakarta EE application requirements, such as database connectivity, batch processing, and integration tools. The subsystem configuration is maintained in the standalone.xml file for the standalone mode, and the domain.xml file for a managed domain mode.

These configuration files can be customized using three different approaches:

Management console

As a system administrator, you can manage most of the capabilities of your standalone or managed domain deployments by using a browser.

Management Command Line Interface(CLI)

By using a terminal window, the CLI offers a management model for viewing and modifying attributes and for performing operations, including batch operations, on a standalone server or a managed domain. The JBoss CLI includes user-friendly features like contextual auto-complete, built-in documentation of server configuration attributes, and command execution history.

Edit XML configuration files manually

The settings of a standalone server or a managed domain are maintained in XML-based configuration files, which can be modified directly.

Note

No matter which technique is used to modify a configuration setting, all changes are synchronized to the XML configuration files. For example, if you modify the settings by using the management console, then the underlying XML file immediately changes, and the management CLI has visibility of the change. However, the management console might not receive the latest updates made by the management CLI because of the web browser caching. The management console displays data that was cached in the browser and might display obsolete configuration data. A page refresh is needed to solve the problem.

Warning

Do not edit the XML configuration files manually when JBoss EAP is running. Any changes made to the XML file can be lost. Stop all JBoss EAP controllers and servers first, or use the management console or management CLI.

To access the JBoss EAP 7 management console, launch the web browser and navigate to http://localhost:9990.

By default, the JBoss EAP 7 management console is secured and you need to provide the username and password that you entered during the installation process: admin/redhat123.

Figure 1.15: The JBoss EAP 7 Management Console

To access the management CLI, launch a terminal, navigate to the JBOSS_HOME/bin directory, and run the jboss-cli.sh script. For example:

$ ./jboss-cli.sh --connect
[standalone@localhost:9990 /] :product-info 
{
    "outcome" => "success",
    "result" => [{"summary" => {
        "host-name" => "workstation.lab.example.com",
        "instance-identifier" => "cb96ecfd-6033-4595-bc80-dcbed3b79e30",
        "product-name" => "JBoss EAP",
        "product-version" => "7.4.11.GA",
        "product-community-identifier" => "Product",
        "product-home" => "/opt/jboss-eap-7.4",
        "last-update-date" => "6/29/23, 2:31 AM",
        "standalone-or-domain-identifier" => "STANDALONE_SERVER",
        "host-operating-system" => "Red Hat Enterprise Linux 9.0 (Plow)",
        "host-cpu" => {
            "host-cpu-arch" => "amd64",
            "host-core-count" => 2
        },
        "jvm" => {
            "name" => "OpenJDK 64-Bit Server VM",
            "java-version" => "11",
            "jvm-version" => "11.0.14.1",
            "jvm-vendor" => "Red Hat, Inc.",
            "java-home" => "/usr/lib/jvm/java-11-openjdk-11.0.14.1.1-6.el9.x86_64"
        }
    }}]
}

Enter 'quit' or 'q' to exit the management CLI.

If you invoke the management CLI without any arguments, then it starts in 'disconnected' mode. To connect to the server, use the --connect command option.

Another option to connect to a JBoss EAP 7 standalone server instance, or to a domain controller, is to use the connect <IPAddress> CLI command.

If the JBoss EAP instance, or the domain controller are running locally, then the management CLI does not prompt for credentials. Elsewhere in this course you learn to disable this automatic authentication for local access. If the JBoss EAP instance, or the domain controller are running in a different host, then the management CLI always asks for credentials.

Ultimately, the XML configuration file can be edited by using a text editor. For the standalone server, the file is available at JBOSS_HOME/standalone/configuration/standalone.xml.

<server xmlns="urn:jboss:domain:16.0">
    <extensions>
        <extension module="org.jboss.as.clustering.infinispan"/>
        ...
    </extensions>
    <management>
        ...
    </management>
    <profile>
        <subsystem xmlns="urn:jboss:domain:logging:8.0">
    ...

The file defines multiple <extension> tags. The extensions represent all the modules needed by JBoss EAP to start a subsystem. After the <extension> and the <management> tags, the file defines multiple <subsystem> tags. As a JBoss EAP system administrator, you manage and customize these subsystems to provide applications with the application server services.

Similarly, the managed domain also has the same set of configurations defined at JBOSS_HOME/domain/configuration/domain.xml. The structure, and differences, are discussed later in this course.

Creating Administrative Users

The JBoss EAP installer creates an administrative user during the installation process.

If additional administrative users are required, or if the installation was NOT done using the JBoss EAP installer, then you can create new users by using the add-user.sh script. This script is present in the JBOSS_HOME/bin directory.

You can add two different types of users:

  • The Management user type is responsible for accessing the administrative tools from JBoss EAP. The credentials are stored at the JBOSS_HOME/standalone/configuration/mgmt-users.properties file, with a encrypted password. The following is an example of using the JBOSS_HOME/bin/add-user.sh script to add a new management user:

[user@host jboss-eap-7.4]$ /opt/jboss-eap-7.4/bin/add-user.sh -u admin2 -p redhat123
Added user 'admin2' to file '/opt/jboss-eap-7.4/standalone/configuration/mgmt-users.properties'
Added user 'admin2' to file '/opt/jboss-eap-7.4/domain/configuration/mgmt-users.properties'
  • The Application user type is used by Jakarta EE applications. The contents are stored at the JBOSS_HOME/standalone/configuration/app-users.properties directory. The following is an example of using the JBOSS_HOME/bin/add-user.sh script to add a new application user:

[user@host jboss-eap-7.4]$ /opt/jboss-eap-7.4/bin/add-user.sh -a -u appuser -p apppwd123
Added user 'appuser' to file '/opt/jboss-eap-7.4/standalone/configuration/application-users.properties'
Added user 'appuser' to file '/opt/jboss-eap-7.4/domain/configuration/application-users.properties'

You do not need to restart a JBoss EAP server instance, or managed domain, when changing the user files. JBoss EAP automatically detects changes to these files. They are plain text files, and the passwords stored in them are hashed. Lines beginning with a pound sign, #, are comments.

The host controllers in a managed domain might need special users to connect to the domain controller. You can create those users by using the add-user.sh script. Later in this course you learn about these special users.

Note

By default, all management operations are available for all Management users, but JBoss EAP also supports the concept of Role Based Authentication Control (RBAC). RBAC requires some customization in order to be activated. RBAC allows configuring users who do not have full administrative privileges, only a subset of them, and only for a subset of the server instances in a managed domain.

References

For more information about JBoss EAP management, refer to the JBoss EAP Management chapter in the Configuration Guide in the Red Hat JBoss EAP 7 documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html-single/configuration_guide/index#jboss_eap_management

For more information about JBoss EAP CLI, refer to the Management CLI Guide in the Red Hat JBoss EAP 7 documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html-single/management_cli_guide/index

Revision: ad248-7.4-18a9db2