Click here to load reader

Red Hat JBoss Enterprise Application Platform 7.1 Red Hat ... · PDF fileGuide to developing with Red Hat JBoss Enterprise Application Platform for ... HornetQ is only supported

  • View
    242

  • Download
    0

Embed Size (px)

Text of Red Hat JBoss Enterprise Application Platform 7.1 Red Hat ... · PDF fileGuide to developing...

  • Red Hat JBoss Enterprise ApplicationPlatform 7.1

    Red Hat JBoss Enterprise ApplicationPlatform for OpenShift

    Guide to developing with Red Hat JBoss Enterprise Application Platform forOpenShift

    Last Updated: 2018-04-12

  • Red Hat JBoss Enterprise Application Platform 7.1 Red Hat JBossEnterprise Application Platform for OpenShift

    Guide to developing with Red Hat JBoss Enterprise Application Platform for OpenShift

  • Legal Notice

    Copyright 2018 Red Hat, Inc.

    The text of and illustrations in this document are licensed by Red Hat under a Creative CommonsAttributionShare Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA isavailable athttp://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you mustprovide the URL for the original version.

    Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.

    Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinitylogo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and othercountries.

    Linux is the registered trademark of Linus Torvalds in the United States and other countries.

    Java is a registered trademark of Oracle and/or its affiliates.

    XFS is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United Statesand/or other countries.

    MySQL is a registered trademark of MySQL AB in the United States, the European Union andother countries.

    Node.js is an official trademark of Joyent. Red Hat Software Collections is not formally related toor endorsed by the official Joyent Node.js open source or commercial project.

    The OpenStack Word Mark and OpenStack logo are either registered trademarks/service marksor trademarks/service marks of the OpenStack Foundation, in the United States and other countriesand are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed orsponsored by the OpenStack Foundation, or the OpenStack community.

    All other trademarks are the property of their respective owners.

    Abstract

    Guide to using Red Hat JBoss Enterprise Application Platform for OpenShift

  • . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    Table of Contents

    CHAPTER 1. INTRODUCTION1.1. WHAT IS RED HAT JBOSS ENTERPRISE APPLICATION PLATFORM (JBOSS EAP)?1.2. HOW DOES JBOSS EAP WORK ON OPENSHIFT?1.3. COMPARISON: JBOSS EAP AND JBOSS EAP FOR OPENSHIFT1.4. VERSION COMPATIBILITY AND SUPPORT1.5. TECHNOLOGY PREVIEW FEATURES

    Automated Transaction Recovery

    CHAPTER 2. BUILD AND RUN A JAVA APPLICATION ON THE JBOSS EAP FOR OPENSHIFT IMAGE2.1. PREREQUISITES2.2. PREPARE OPENSHIFT FOR APPLICATION DEPLOYMENT2.3. IMPORT THE LATEST JBOSS EAP FOR OPENSHIFT IMAGE STREAMS AND TEMPLATES2.4. DEPLOY A JBOSS EAP SOURCE-TO-IMAGE (S2I) APPLICATION TO OPENSHIFT2.5. POST DEPLOYMENT TASKS

    CHAPTER 3. CONFIGURING THE JBOSS EAP FOR OPENSHIFT IMAGE FOR YOUR JAVA APPLICATION3.1. HOW THE JBOSS EAP FOR OPENSHIFT S2I PROCESS WORKS3.2. CONFIGURING JBOSS EAP FOR OPENSHIFT USING ENVIRONMENT VARIABLES3.3. BUILD EXTENSIONS AND PROJECT ARTIFACTS

    3.3.1. S2I Artifacts3.3.1.1. Modules, Drivers, and Generic Deployments

    3.3.2. Runtime Artifacts3.3.2.1. Datasources3.3.2.2. Resource Adapters

    3.4. DEPLOYMENT CONSIDERATIONS FOR THE JBOSS EAP FOR OPENSHIFT IMAGE3.4.1. Scaling Up and Persistent Storage Partitioning3.4.2. Scaling Down and Transaction Recovery

    CHAPTER 4. TROUBLESHOOTING4.1. TROUBLESHOOTING POD RESTARTS4.2. TROUBLESHOOTING USING THE JBOSS EAP MANAGEMENT CLI

    CHAPTER 5. ADVANCED TUTORIALS5.1. EXAMPLE WORKFLOW: AUTOMATED TRANSACTION RECOVERY FEATURE WHEN SCALING DOWN ACLUSTER

    5.1.1. Prepare for Deployment5.1.2. Deployment5.1.3. Using the JTA Crash Recovery Application

    CHAPTER 6. REFERENCE INFORMATION6.1. PERSISTENT TEMPLATES6.2. INFORMATION ENVIRONMENT VARIABLES6.3. CONFIGURATION ENVIRONMENT VARIABLES6.4. APPLICATION TEMPLATES6.5. EXPOSED PORTS6.6. DATASOURCES

    6.6.1. JNDI Mappings for Datasources6.6.1.1. Database Drivers6.6.1.2. Datasource Configuration Environment Variables6.6.1.3. Examples

    6.6.1.3.1. Single Mapping6.6.1.3.2. Multiple Mappings

    6.7. CLUSTERING

    4444555

    666789

    101011111212131415161617

    181818

    20

    20202123

    2626262730313131323234343435

    Table of Contents

    1

  • 6.7.1. Configuring KUBE_PING6.7.2. Configuring DNS_PING

    6.8. SECURITY DOMAINS6.9. HTTPS ENVIRONMENT VARIABLES6.10. ADMINISTRATION ENVIRONMENT VARIABLES6.11. S2I

    6.11.1. Custom Configuration6.11.1.1. Custom Modules

    6.11.2. Deployment Artifacts6.11.3. Artifact Repository Mirrors6.11.4. Scripts6.11.5. Environment Variables

    6.12. SSO6.13. TRANSACTION RECOVERY

    6.13.1. Unsupported Transaction Recovery Scenarios6.13.2. Manual Transaction Recovery Process

    6.13.2.1. Caveats6.13.2.2. Prerequisite6.13.2.3. Procedure

    6.13.2.3.1. Resolving In-doubt Branches6.13.2.3.2. Extract the Global Transaction ID and Node Identifier from Each XID6.13.2.3.3. Obtain the List of Node Identifiers of All Running JBoss EAP Instances in Any Cluster that CanContact the Resource Managers6.13.2.3.4. Find the Transaction Logs6.13.2.3.5. Cleaning Up the Transaction Logs for Reconciled In-doubt Branches

    6.14. INCLUDED JBOSS MODULES

    353637383838383939394040414242434344444546

    48484950

    Red Hat JBoss Enterprise Application Platform 7.1 Red Hat JBoss Enterprise Application Platform for OpenShift

    2

  • Table of Contents

    3

  • CHAPTER 1. INTRODUCTION

    1.1. WHAT IS RED HAT JBOSS ENTERPRISE APPLICATIONPLATFORM (JBOSS EAP)?

    Red Hat JBoss Enterprise Application Platform 7 (JBoss EAP) is a middleware platform built on openstandards and compliant with the Java Enterprise Edition 7 specification. It provides preconfiguredoptions for features such as high-availability clustering, messaging, and distributed caching. It includes amodular structure that allows you to enable services only when required, which results in improvedstartup speed.

    The web-based management console and management command line interface (CLI) make editing XMLconfiguration files unnecessary and add the ability to script and automate tasks. In addition, JBoss EAPincludes APIs and development frameworks that allow you to quickly develop, deploy,