Deploy applications on the managed domain.
| Resources | |
|---|---|
| Files: |
|
Outcomes
You should be able to deploy applications on a managed domain.
Before beginning the guided exercise, run the following command to prepare the environment:
[student@workstation ~]$ lab start domainconf-deployment
The /home/student/AD248/labs/domainconf-deployment 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 the following elements:
The Group1 and Group2 server groups
Four servers that use 100, 200, 300, and 400, as port offset: server-one, server-two, server-three, and server-four
In this exercise you deploy applications to both server groups.
Instructions
Start the domain and hosts controllers on the workstation machine.
Use the following commands to start the domain controller:
[student@workstation ~]$cd /opt/jboss-eap-7.4/bin[student@workstation bin]$./domain.sh \-Djboss.domain.base.dir=\/home/student/AD248/labs/domainconf-deployment/machine1/ \--host-config=host-master.xml
Open a new terminal window and start the host2 host controller by using the following commands:
[student@workstation ~]$cd /opt/jboss-eap-7.4/bin[student@workstation bin]$./domain.sh \-Djboss.domain.base.dir=\/home/student/AD248/labs/domainconf-deployment/machine2/ \--host-config=host-slave.xml \-Djboss.domain.master.address=172.25.250.9
You can safely ignore the following output:
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.wildfly.extension.elytron.SSLDefinitions (jar:file:/opt/jboss-eap-7.4/modules/system/layers/base/.overlays/layer-base-jboss-eap-7.4.11.CP/org/wildfly/extension/elytron/main/wildfly-elytron-integration-15.0.26.Final-redhat-00001.jar!/) to method com.sun.net.ssl.internal.ssl.Provider.isFIPS() WARNING: Please consider reporting this to the maintainers of org.wildfly.extension.elytron.SSLDefinitions WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release
Open a new terminal window and start the host3 host controller by using the following commands:
[student@workstation ~]$cd /opt/jboss-eap-7.4/bin[student@workstation bin]$./domain.sh \-Djboss.domain.base.dir=\/home/student/AD248/labs/domainconf-deployment/machine3/ \--host-config=host-slave.xml \-Djboss.domain.master.address=172.25.250.9
Wait for the domain controller and the two host controllers to start before proceeding.
Deploy an application to the Group1 server group.
On the workstation machine, open the management console by pointing a web browser to 172.25.250.9:9990.
Use admin as the username, and redhat123 as the password.
Click at the top of the page and then click in the first column.
Click the plus icon button, and select .
Then, click and select the /home/student/AD248/labs/domainconf-deployments/greeter.war file.
Click .
On the step, leave the and as greeter.war, and then click .
Click and then click in the second column. Then, click the dropdown menu next to , and select the option.
Select Group1 to deploy greeter.war to the Group1 server group.
Click :
![]() |
Verify the Deployment
Navigate to server-one at http://172.25.250.9:8180/greeter/ and server-three at http://172.25.250.9:8380/greeter/ .
The greeter application initial page is displayed.
Navigate to server-two at http://172.25.250.9:8280/greeter/ and server-four at http://172.25.250.9:8480/greeter/ .
A 404 HTTP error is displayed, because the greeter application is not deployed on Group2 server group.
Open the /home/student/AD248/labs/domainconf-deployment/machine1/configuration/domain.xml file.
Notice that greeter.war displays as an available deployment in the <deployments> section. Also notice that greeter.war is displayed in the <deployments> section of the Group1 in the <server-group> section.
Deploy an application to the Group2 server group.
Go back to the page of the management console of your domain. Click . Then click the plus icon and select .
Click and select the /home/student/AD248/labs/domainconf-deployments/temperature-converter.war file.
Click .
On the step, leave the and as temperature-converter.war, and then click .
Click and then click in the second column. Then, click the dropdown menu next to , and select the option.
Select Group2 to deploy temperature-converter.war to the Group2 server group.
Then click .
Verify the Deployment.
Navigate to server-two at http://172.25.250.9:8280/temperature-converter/ and server-four at http://172.25.250.9:8480/temperature-converter/.
The temperature converter application initial page is displayed.
Navigate to server-one at http://172.25.250.9:8180/temperature-converter/ and server-three at http://172.25.250.9:8380/temperature-converter/ .
A 404 HTTP error is displayed.
Undeploy the applications.
In the management console navigate to the page.
Click the tab in the first column.
Notice the deployed applications are listed by server group.
Click Group1 in the column.
Click greeter.war in the list of , click the arrow next to and select to disable the application.
![]() |
Navigate to the greeter.war application on server-one at http://172.25.250.9:8180/greeter/, and verify that you now get a 404 error.
Click the same arrow in the column and select .
The deployment is no longer deployed to the Group1 server group, although it is still in the domain content repository.
Follow the same steps to disable and remove temperature-converter.war from the Group2 server group.
To verify, try navigating to http://172.25.250.9:8280/temperature-converter/ for server-two and to http://172.25.250.9:8480/temperature-converter/ for server-four.
You get 404 errors.
Remove Deployments from the managed domain content repository.
Click in the page.
Select greeter.war in the list, and click the arrow next to .
Select .
Click when the confirmation window is displayed.
Similarly, remove temperature-converter.war from the .
Press Ctrl+C in each terminal window to stop the domain controller and the two host controllers.