Bookmark this page

Guided Exercise: Configuring Server Groups

Configure server groups in a managed domain using the JBoss EAP 7 management console.

Resources
Files /home/student/AD248/labs/domainconf-servergroups
Application URL http://172.25.250.9:9990

Outcomes

You should be able to configure and start a managed domain with two server groups.

Before beginning the guided exercise, run the following command to prepare the environment:

[student@workstation ~]$ lab start domainconf-servergroups

The /home/student/AD248/labs/domainconf-servergroups directory contains a configured Red Hat JBoss Enterprise Application Platform (JBoss EAP) domain controller in the machine1 subdirectory. The machine2, and machine3 subdirectories simulate two secondary host controllers. This JBoss EAP managed domain contains two server groups, and three servers.

Instructions

  1. Start the managed domain.

    1. Start the domain controller by using a new terminal window:

      [student@workstation ~]$ cd /opt/jboss-eap-7.4/bin
      [student@workstation bin]$ ./domain.sh \
      -Djboss.domain.base.dir=\
      /home/student/AD248/labs/domainconf-servergroups/machine1/ \
      --host-config=host-master.xml
      ...output omitted...
      [Host Controller] 04:58:06,010 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.4.11.GA (WildFly Core 15.0.26.Final-redhat-00001) (Host Controller) started in 4320ms - Started 80 of 81 services (22 services are lazy, passive or on-demand)
    2. Start the host controller on the machine2 directory.

      In a new terminal window on the workstation machine, run the following command from your /opt/jboss-eap-7.4/bin directory to start host2 by using the host-slave.xml configuration file:

      [student@workstation ~]$ cd /opt/jboss-eap-7.4/bin
      [student@workstation bin]$ ./domain.sh \
      -Djboss.domain.base.dir=\
      /home/student/AD248/labs/domainconf-servergroups/machine2/ \
      --host-config=host-slave.xml \
      -Djboss.domain.master.address=172.25.250.9
      ...output omitted...
      [Host Controller] 01:37:20,412 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0148: Connected to master host controller at remote+http://172.25.250.9:9990
      ...output omitted...

      Inspect the output in the domain controller terminal window, and find the message about the secondary controller connection:

      ...output omitted...
      [Host Controller] 01:37:20,403 INFO  [org.jboss.as.domain.controller] (Host Controller Service Threads - 3) WFLYHC0019: Registered remote slave host "host2", JBoss JBoss EAP 7.4.11.GA (WildFly 15.0.26.Final-redhat-00001)
      ...output omitted...
    3. Start the host controller on the machine3 directory.

      In a new terminal window on your workstation machine, run the following command from your /opt/jboss-eap-7.4/bin directory to start host3 by using the host-slave.xml configuration file:

      [student@workstation ~]$ cd /opt/jboss-eap-7.4/bin
      [student@workstation bin]$ ./domain.sh \
      -Djboss.domain.base.dir=\
      /home/student/AD248/labs/domainconf-servergroups/machine3/ \
      --host-config=host-slave.xml \
      -Djboss.domain.master.address=172.25.250.9

      Inspect the output in the domain controller terminal window, and find the message about the secondary controller connection:

      ...output omitted...
      [Host Controller] 02:46:04,462 INFO  [org.jboss.as.domain.controller] (Host Controller Service Threads - 25) WFLYHC0019: Registered remote slave host "host3", JBoss JBoss EAP 7.4.11.GA (WildFly 15.0.26.Final-redhat-00001)
      
      ...output omitted...

      You have now started a managed domain with the domain controller running on machine1, and two host2 and host3 secondary host controllers.

  2. Inspect the JBoss EAP domain by using the management console.

    1. Navigate to http://172.25.250.9:9990 and log in to the management console with admin as the username, and redhat123 as the password.

    2. Click Runtime in the top navigation bar.

    3. Click Hosts in the left navigation sidebar to view the hosts in the managed domain and verify that you can see three hosts called master, host2, and host3 respectively.

    4. Click Server Groups in the left navigation sidebar to view the server groups in the managed domain and verify that you can see two server groups named main-server-group and other-server-group.

  3. Delete the existing server groups.

    1. Click main-server-group in the Server Group column to view the servers in this group and verify that you can see a single server named server-one defined. Before deleting this server, you need to ensure that it is stopped. Click the drop-down button next to server-one and click Stop to stop this server.

    2. Click Yes in the confirmation dialog that shows. After a few seconds the server is stopped.

    3. Click the drop-down button next to server-one again and click Remove to remove this server. Click Yes in the confirmation dialog that shows. After a few seconds, the server is removed.

    4. Repeat this process to stop and remove server-two and server-three from the other-server-group. Note that you can stop the complete server group from the drop-down button next to the other-server-group. Ensure that there are no servers defined in a server group, before deleting them.

    5. To delete the main-server-group, click the drop-down button next to main-server-group and click Remove. Click Yes in the confirmation dialog that shows. After a few seconds, the server group is removed.

      Repeat the process to remove the other-server-group from the managed domain. You should now have no server groups or servers defined in the managed domain.

  4. Create the new server groups by using the management console.

    1. Click the Add Server Group plus icon in the Server Group column of the management console to add a new server group. The Create Server Group dialog window shows.

    2. To add a new server group, you must provide three key attributes as shown in the window.

      Add a new server group by using the following parameters:

      ParameterValue
      Name Group1
      Profile default
      Socket Binding Group standard-sockets

      Click Add to create the Group1 server group.

    3. You can create multiple server groups, with their own profile and socket binding.

      Create another Group2 server group by using the following parameters:

      ParameterValue
      Name Group2
      Profile full
      Socket Binding Group full-sockets

      You should now have two server groups called Group1 and Group2 defined in your managed domain.

  5. Press Ctrl+C in each terminal window to stop the domain controller and the two host controllers.

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 domainconf-servergroups

Revision: ad248-7.4-18a9db2