此内容没有您所选择的语言版本。

24.4. Non-clustered Instances


24.4.1. Launch a Non-clustered JBoss EAP 6 Instance

Summary

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

Procedure 24.1. Launch a Non-clustered Instance of JBoss EAP 6 on a Red Hat AMI (Amazon Machine Image)

  1. 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 user admin has been set to adminpwd.
    JBOSSAS_ADMIN_PASSWORD=adminpwd
    JBOSS_IP=0.0.0.0 #listen on all IPs and interfaces
    
    # In production, access to these ports needs to be restricted for security reasons
    PORTS_ALLOWED="9990 9443"
    
    cat> $USER_SCRIPT << "EOF"
    
    # 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 
    
    # Create a file of CLI commands to be executed after starting the server
    cat> $USER_CLI_COMMANDS << "EOC" 
    # deploy /usr/share/java/jboss-ec2-eap-applications/<app name>.war
    EOC
    
    EOF
    
    Copy to Clipboard Toggle word wrap
  2. For Production Instances

    For a production instance, add the following line beneath the USER_SCRIPT line of the User Data field, to ensure security updates are applied on boot.
    yum -y update
    Copy to Clipboard Toggle word wrap

    Note

    yum -y update should be run regularly, to apply security fixes and enhancements.
  3. Launch the Red Hat AMI instance.
Result

A non-clustered instance of JBoss EAP 6 has been configured, and launched on a Red Hat AMI.

Summary

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 the User Data field:
      # Deploy the sample application from the local filesystem
      deploy --force /usr/share/java/jboss-ec2-eap-samples/hello.war
      
      Copy to Clipboard Toggle word wrap

      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 user admin has been set to adminpwd.
      JBOSSAS_ADMIN_PASSWORD=adminpwd
      JBOSS_IP=0.0.0.0 #listen on all IPs and interfaces
      
      # In production, access to these ports needs to be restricted for security reasons
      PORTS_ALLOWED="9990 9443"
      
      cat> $USER_SCRIPT << "EOF"
      
      # Create a file of CLI commands to be executed after starting the server
      cat> $USER_CLI_COMMANDS << "EOC" 
      
      # Deploy the sample application from the local filesystem
      deploy --force /usr/share/java/jboss-ec2-eap-samples/hello.war
      EOC
      
      EOF
      
      Copy to Clipboard Toggle word wrap
    • Deploy a Custom Application

      Add the following lines to the User Data field, configuring the application name and the 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 Toggle word wrap

      Example 24.3. Example User Data Field with Custom Application

      This example uses an application called MyApp, and includes basic configuration for a non-clustered JBoss EAP 6 instance. The password for the user admin has been set to adminpwd.
      JBOSSAS_ADMIN_PASSWORD=adminpwd
      JBOSS_IP=0.0.0.0 #listen on all IPs and interfaces
      
      # In production, access to these ports needs to be restricted for security reasons
      PORTS_ALLOWED="9990 9443"
      
      cat> $USER_SCRIPT << "EOF"
      
      # Get the application to be deployed from an Internet URL
      mkdir -p /usr/share/java/jboss-ec2-eap-applications
      wget https://PATH_TO_MYAPP/MyApp.war -O /usr/share/java/jboss-ec2-eap-applications/MyApp.war 
      
      # Create a file of CLI commands to be executed after starting the server
      cat> $USER_CLI_COMMANDS << "EOC" 
      deploy /usr/share/java/jboss-ec2-eap-applications/MyApp.war
      EOC
      
      EOF
      
      Copy to Clipboard Toggle word wrap
  1. Launch the Red Hat AMI instance.
Result

The application has been successfully deployed to JBoss EAP 6.

24.4.3. Test the Non-clustered JBoss EAP 6 Instance

Summary

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

  1. Determine the instance's Public DNS, located in the instance's details pane.
  2. Navigate to http://<public-DNS>:8080.
  3. 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”.
  4. Click on the Admin Console hyperlink.
  5. Log in:
  6. Test the Sample Application

    Navigate to http://<public-DNS>:8080/hello to test that the sample application is running successfully. The text Hello World! should appear in the browser. If the text is not visible, refer here: Section 24.11.1, “About Troubleshooting Amazon EC2”.
  7. Log out of the JBoss EAP 6 Admin Console.
Result

The JBoss EAP 6 instance is running correctly.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat