Bookmark this page

Guided Exercise: JBoss EAP Management Console

Configure and manage the installed JBoss EAP 7 server.

Resources
Files NA
Application URL http://localhost:9990

Outcomes

You should be able to login as an admin user and explore the various features of the administration console.

Run the following command to recreate the JBoss EAP installation at /opt/jboss-eap-7.4:

[student@workstation ~]$ lab start features-managing

Instructions

  1. Start the JBoss EAP 7 server as the jboss user:

    [student@workstation ~]$ sudo -u jboss /opt/jboss-eap-7.4/bin/standalone.sh
  2. Add a new admin user:

    1. In a new terminal window, run the add-user.sh script as the jboss user.

      [student@workstation ~]$ sudo -u jboss /opt/jboss-eap-7.4/bin/add-user.sh
    2. Create a new user based on the following criteria.

      Table 1.1. Administrative user creation

      FieldValue
      User Type Management User. Choose option a
      Username admin
      User 'admin' already exists and is disabled, would you like to…​ Choose option a
      Password redhat123
      Are you sure you want to use the password entered yes/no? yes
      Re-enter Password redhat123
      A List of groups that the user belongs to Press Intro
      Is this new user going to be used for one AS process to connect to another AS process? no

    3. Inspect the mgmt-users.properties file, which is used for defining users who need access to the JBoss EAP management console, either through the web interface, or by using the management CLI.

      Using a text editor, open the JBOSS_HOME/standalone/configuration/mgmt-users.properties file as the jboss user.

    4. Verify that you have a user named admin in this file, and the user has a hashed password.

    5. The same file is also available on the domain directory of the JBoss EAP 7 installation to secure the administrative console.

      Using a text editor, open the JBOSS_HOME/domain/configuration/mgmt-users.properties file as the jboss user.

      Verify that the admin user is also in this file. Notice that the same credentials are defined for both the standalone and the managed domain.

    6. Close the two mgmt-users.properties files.

  3. Log in to the management console:

    1. Point your web browser to http://localhost:9990/, which is the location of the management console. Log in as the admin user that you created in the previous step, with redhat123 as the password.

      You should see the home page of the JBoss EAP 7 management console:

  4. The Java Virtual Machine (JVM) is responsible for managing the amount of memory used by the application server and deployed applications, as well as to manage class loading. Read the metrics obtained from the JVM, by using the JBoss EAP management console.

    View the JVM Status page of the JBoss EAP management console. Navigate to RuntimeServerworkstation and click Status to view the JVM details.

  5. View the JBoss EAP server logs.

    The JBoss EAP server logs are stored in the local file system. Sometimes due to file system access restrictions, the administrator might need to access it via a web console.

    Navigate to RuntimeServerworkstation and click Log Files in the second column of the menu. Then, click server.log to view the log file.

  6. Change the deployment scanner interval.

    The JBoss EAP deployment scanner is a subsystem that periodically scans and detects new application deployments to the application server. In this step, you update the time interval which JBoss EAP scans for new files in the deployments directory.

    1. Navigate to ConfigurationSubsystemsDeployment Scanners. Then, click View to show the Deployment Scanners configuration page.

      Select the default scanner, and click Edit. Change the Scan Interval value from the default value of 5000 (5 seconds) to 8000 (8 seconds).

    2. Scroll down, and click Save.

  7. Verify Configuration Changes:

    1. Open the file JBOSS_HOME/standalone/configuration/standalone.xml in a text editor as the jboss user.

    2. Verify that the deployment-scanner subsystem reflects the changes you made via the administration console.

      ....
      <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
       <deployment-scanner path="deployments" relative-to="jboss.server.base.dir"
                           scan-interval="8000"
                           runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
      </subsystem>
      ....
    3. Launch the management CLI tool and verify that the configuration changes are visible.

      The CLI tool is presented later, but it uses an approach similar to a bash script to customize JBoss EAP configuration files. For example, to get information about the deployment scanner subsystem, open a terminal window, run the jboss-cli.sh script, and connect to the running instance of EAP using the following commands:

      [student@workstation ~]$ sudo -u jboss /opt/jboss-eap-7.4/bin/jboss-cli.sh \
      --connect
      [standalone@localhost:9990 /] /subsystem=deployment-scanner\
        /scanner=default:read-resource
      {
          "outcome" => "success",
          "result" => {
              "auto-deploy-exploded" => false,
              "auto-deploy-xml" => true,
              "auto-deploy-zipped" => true,
              "deployment-timeout" => 600,
              "path" => "deployments",
              "relative-to" => "jboss.server.base.dir",
              "runtime-failure-causes-rollback" => expression "${jboss.deployment.scanner.rollback.on.failure:false}",
              "scan-enabled" => true,
              "scan-interval" => 8000
          }
      }
    4. Exit the management CLI by running the exit command:

      [standalone@localhost:9990 /] exit
  8. Shut down JBoss EAP.

    1. Before moving on to the next lab, if EAP is running, then shutdown the JBoss EAP 7 server by pressing Ctrl+C in the terminal window where you started JBoss EAP 7.

Finish

On the workstation machine, use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish features-managing

Revision: ad248-7.4-18a9db2