Assign the domain controller and start it from the workstation machine.
| Resources | |
|---|---|
| Files: |
/home/student/AD248/labs/domain-assigning
|
| Application URL: | http://172.25.250.9:9990 |
Outcomes
You should be able to start a domain controller from the workstation VM.
Before beginning the guided exercise, run the following command to prepare the environment, and to download the files for the exercise:
[student@workstation ~]$ lab start domain-assigning
Instructions
Create a new domain base directory in the workstation machine.
Create the machine1/domain directory at /home/student/AD248/labs/domain-assigning/, and copy the /opt/jboss-eap-7.4/domain/configuration into it.
[student@workstation ~]$cd /home/student/AD248/labs/domain-assigning[student@workstation domain-assigning]$mkdir -p machine1/domain[student@workstation domain-assigning]$cp -r \ /opt/jboss-eap-7.4/domain/configuration \ machine1/domain/
In this exercise you are going to have a domain controller and two host controllers running on your student workstation.
In real scenarios, you run these three controllers on separate machines.
You are going to simulate separate machines by using subdirectories named machine1, machine2, and machine3.
In this lab, machine1 acts as the primary controller.
In the next lab, you create and configure machine2 and machine3 as secondary controllers connecting to machine1.
Configure files in machine1 for a domain controller.
Using the editor of your choice, open the host-master.xml file in the /home/student/AD248/labs/domain-assigning/machine1/domain/configuration directory.
This host configuration file configures a domain controller that does not manage any local servers.
Look at the following line at the beginning of the host-master.xml file:
<host xmlns="urn:jboss:domain:16.0" name="master">
Observe that this line configures the name of this host to be master.
Notice there is only one interface defined in host-master.xml, the management interface.
...
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
</interfaces>
...It is assumed that the host machine running the domain controller is not hosting servers; consequently it does not need to define a public network interface for the server instances to accept user requests.
Any secondary controller must be configured to point to the IP address of the domain controller.
The labs are going to simulate multiple machines, and the domain controller on the machine1 directory must use an IP from a public interface to be visible to the other machines.
We could specify the jboss.bind.address.management property for the startup script, but instead, manually edit the XML file.
Modify the management interface inet-address attribute to bind to the IP address of your workstation machine: (172.25.250.9).
The <interfaces> section of host-master.xml should appear as follows:
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:172.25.250.9}"/>
</interface>
</interfaces>Save your changes to host-master.xml and close the text editor.
Start the domain controller on the workstation machine.
In your terminal window, change to the /opt/jboss-eap-7.4/bin directory:
[student@workstation domain-assigning]$ cd /opt/jboss-eap-7.4/binTo start the master host controller using the host-master.xml file in your /home/student/AD248/labs/domain-assigning/machine1/domain/ directory, enter the following command:
[student@workstation bin]$ ./domain.sh -Djboss.domain.base.dir=\
/home/student/AD248/labs/domain-assigning/machine1/domain/ \
--host-config=host-master.xmlBecause you are starting a domain controller with no application server instances attached, it should start quickly. Look for the following output to confirm that the domain controller is running:
...output omitted...
[Host Controller] 04:55:48,601 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0062: Http management interface listening on http://172.25.250.9:9990/management and https://172.25.250.9:-1/management
[Host Controller] 04:55:48,602 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0053: Admin console listening on http://172.25.250.9:9990 and https://172.25.250.9:-1
...output omitted...This host controller instance is not using the default host.xml configuration tile, so the --host-config option is necessary.
The --domain-config option is not needed because it is using the default domain.xml managed domain configuration file.
Verify that the domain controller is running.
Open a web browser in the workstation machine, and point the browser to http://172.25.250.9:9990/ to access the JBoss EAP management console from the domain controller.
Use admin as the username, and redhat123 as the password
Explore the management console in domain mode.
Click . Then, in the column, click the category. Finally, in the column, click . As there are no servers running, and you have not defined and started any yet, the section only has information about the host.
Click the page, and then click . You can inspect some of the details of the profiles when you have a standalone server running.
![]() |
Recall that in a managed domain you can have multiple profiles defined, and each profile has a unique name. Contrast this to running JBoss EAP as a standalone server, where there is a single anonymous profile.
Stop the domain controller by pressing Ctrl+C in the terminal window.