此内容没有您所选择的语言版本。
24.8. Clustered Managed Domains
This topic covers the steps required to launch a clustered JBoss EAP 6 managed domain on a Red Hat AMI (Amazon Machine Image).
Prerequisites
- A suitable Red Hat AMI. Refer to Section 24.1.6, “Supported Red Hat AMIs” .
Procedure 24.14. Launch a Cluster Domain Contoller
- Create an elastic IP for this instance.
- Select an AMI.
- Go to Security Group and allow all traffic (use Red Hat Enterprise Linux's built-in firewall capabilities to restrict access if desired).
- Choose "running" in the public subnet of the VPC.
- Choose a static IP (e.g.
10.0.0.5
). - Put the following in the User Data: field:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For Production Instances
For a production instance, add the following line beneath theUSER_SCRIPT
line of theUser Data
field, to ensure security updates are applied on boot.yum -y update
yum -y update
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
yum -y update
should be run regularly, to apply security fixes and enhancements.- Launch the Red Hat AMI instance.
A clustered JBoss EAP 6 managed domain is configured and launched on a Red Hat AMI.
This topic covers the steps required to launch one or more instances of JBoss EAP 6 to serve as cluster host controllers on a Red Hat AMI (Amazon Machine Image).
Prerequisites
- Configure and launch the cluster domain controller. Refer to Section 24.8.1, “Launch an Instance to Serve as a Cluster Domain Controller” .
Procedure 24.15. Launch Host Controllers
- Select an AMI.
- Define the desired number of instances (the number of slave host controllers).
- Select the VPC and instance type.
- Click on Security Group.
- Ensure that all traffic from the JBoss EAP 6 cluster subnet is allowed.
- Define other restrictions as desired.
- Add the following into the User Data field:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For Production Instances
For a production instance, add the following line beneath theUSER_SCRIPT
line of theUser Data
field, to ensure security updates are applied on boot.yum -y update
yum -y update
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
yum -y update
should be run regularly, to apply security fixes and enhancements.- Launch the Red Hat AMI instance.
The JBoss EAP 6 cluster host controllers are configured and launched on a Red Hat AMI.
24.8.3. Test the Clustered JBoss EAP 6 Managed Domain 复制链接链接已复制到粘贴板!
This topic covers the steps required to test the clustered JBoss EAP 6 managed domain on a Red Hat AMI (Amazon Machine Image).
Prerequisites
- Configure and launch the cluster domain controller. See Section 24.8.1, “Launch an Instance to Serve as a Cluster Domain Controller” .
- Configure and launch the cluster host controllers. See Section 24.8.2, “Launch One or More Instances to Serve as Cluster Host Controllers” .
Procedure 24.16. Test the Apache HTTP server instance
- Navigate to
http://ELASTIC_IP_OF_APACHE_HTTP_SERVER
in a browser to confirm the web server is running successfully.
Procedure 24.17. Test the Domain Controller
- Navigate to
http://ELASTIC_IP_OF_DOMAIN_CONTROLLER:9990/console
- Log in using the username
admin
and the password specified in the User Data field for the domain controller. Once logged in, the administration console landing page for a managed domain should appear (http://ELASTIC_IP_OF_DOMAIN_CONTROLLER:9990/console/App.html#server-instances
). - Click the Server label at the top right side of the screen. Select any of the host controllers in the Host dropdown menu at the top left side of the screen.
- Verify that this host controller has two server configurations called
server-one
andserver-two
and verify that they both belong to theother-server-group
.
Procedure 24.18. Test the Host Controllers
- Navigate to
http://ELASTIC_IP_OF_APACHE_HTTP_SERVER/cluster-demo/put.jsp
in a browser. - Verify that one of the host controllers logs the following message:
Putting date now.
- Stop the server instance that logged the message in the previous step (see Stop a Server Using the Management Console).
- Navigate to
http://ELASTIC_IP_OF_APACHE_HTTP_SERVER/cluster-demo/get.jsp
in a browser. - Verify that the time shown is the same as the time that was
PUT
usingput.jsp
in Step 2. - Verify that one of the running server instances logs the following message:
Getting date now.
- Restart the stopped server instance (see Section 2.3.2, “Start a Server Using the Management Console”)
- Connect to the Apache HTTP server instance.
ssh -L7654:localhost:7654 ELASTIC_IP_OF_APACHE_HTTP_SERVER
$ ssh -L7654:localhost:7654 ELASTIC_IP_OF_APACHE_HTTP_SERVER
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Navigate to
http://localhost:7654/mod_cluster-manager
to confirm all instances are running correctly.
The JBoss EAP 6 web server, domain controller, and host controllers are running correctly on a Red Hat AMI.