此内容没有您所选择的语言版本。
24.4. Non-clustered Instances
24.4.1. Launch a Non-clustered JBoss EAP 6 Instance 复制链接链接已复制到粘贴板!
This topic covers the steps required to launch a non-clustered instance of JBoss EAP 6 on a Red Hat AMI (Amazon Machine Image).
Prerequisites
- A suitable Red Hat AMI. Refer to Section 24.1.6, “Supported Red Hat AMIs”.
- A pre-configured Security Group which allows incoming requests on at least ports 22, 8080, and 9990.
Procedure 24.1. Launch a Non-clustered Instance of JBoss EAP 6 on a Red Hat AMI (Amazon Machine Image)
- Configure the
User Data
field. The configurable parameters are available here: Section 24.10.1, “Permanent Configuration Parameters”, Section 24.10.2, “Custom Script Parameters”.Example 24.1. Example User Data Field
The example shows the User Data field for a non-clustered JBoss EAP 6 instance. The password for the useradmin
has been set toadminpwd
.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 non-clustered instance of JBoss EAP 6 has been configured, and launched on a Red Hat AMI.
This topic covers deploying an application to a non-clustered JBoss EAP 6 instance on a Red Hat AMI.
Deploy the Sample Application
Add the following lines to theUser Data
field:Deploy the sample application from the local filesystem
# Deploy the sample application from the local filesystem deploy --force /usr/share/java/jboss-ec2-eap-samples/hello.war
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 24.2. Example User Data Field with Sample Application
This example uses the sample application provided on the Red Hat AMI. It also includes basic configuration for a non-clustered JBoss EAP 6 instance. The password for the useradmin
has been set toadminpwd
.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Deploy a Custom Application
Add the following lines to theUser Data
field, configuring the application name and the URL:Get the application to be deployed from an Internet URL
# Get the application to be deployed from an Internet URL mkdir -p /usr/share/java/jboss-ec2-eap-applications wget https://<your secure storage hostname>/<path>/<app name>.war -O /usr/share/java/jboss-ec2-eap-applications/<app name>.war
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 24.3. Example User Data Field with Custom Application
This example uses an application calledMyApp
, and includes basic configuration for a non-clustered JBoss EAP 6 instance. The password for the useradmin
has been set toadminpwd
.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Launch the Red Hat AMI instance.
The application has been successfully deployed to JBoss EAP 6.
24.4.3. Test the Non-clustered JBoss EAP 6 Instance 复制链接链接已复制到粘贴板!
This topic covers the steps required to test that the non-clustered JBoss EAP 6 is running correctly.
Procedure 24.2. Test the Non-clustered JBoss EAP 6 Instance is Running Correctly
- Determine the instance's
Public DNS
, located in the instance's details pane. - Navigate to
http://<public-DNS>:8080
. - Confirm that the JBoss EAP home page appears, including a link to the Admin console. If the home page is not available, refer here: Section 24.11.1, “About Troubleshooting Amazon EC2”.
- Click on the Admin Console hyperlink.
- Log in:
- Username:
admin
- Password: Specified in the
User Data
field here: Section 24.4.1, “Launch a Non-clustered JBoss EAP 6 Instance”.
Test the Sample Application
Navigate tohttp://<public-DNS>:8080/hello
to test that the sample application is running successfully. The textHello World!
should appear in the browser. If the text is not visible, refer here: Section 24.11.1, “About Troubleshooting Amazon EC2”.- Log out of the JBoss EAP 6 Admin Console.
The JBoss EAP 6 instance is running correctly.