Red Hat Jboss Enterprise Application Platform 7.4 Getting Started with Jboss EAP for Openshift Container Platform
Total Page:16
File Type:pdf, Size:1020Kb
Red Hat JBoss Enterprise Application Platform 7.4 Getting Started with JBoss EAP for OpenShift Container Platform Guide to developing with Red Hat JBoss Enterprise Application Platform for OpenShift Last Updated: 2021-09-16 Red Hat JBoss Enterprise Application Platform 7.4 Getting Started with JBoss EAP for OpenShift Container Platform Guide to developing with Red Hat JBoss Enterprise Application Platform for OpenShift Legal Notice Copyright © 2021 Red Hat, Inc. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/ . In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide 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, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. 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 States and/or other countries. MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries. Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project. The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored 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 Table of Contents .P .R . O. V. .I D. .I N. .G . F. .E .E . D. .B . A. .C . K. O. .N . R. .E .D . .H . .A .T . .D . O. C. .U . M. E. .N . T. .A .T . I.O . .N . 5. .M . A. .K . I.N . .G . .O . P. .E . N. S. .O . U. .R . C. .E . .M . .O . R. .E . .I N. .C . L. .U . S. .I V. .E . 6. .C . H. .A . P. .T .E . R. 1.. .I .N . T. .R .O . .D . U. .C . T. .I O. N. 7. 1.1. WHAT IS RED HAT JBOSS ENTERPRISE APPLICATION PLATFORM (JBOSS EAP)? 7 1.2. HOW DOES JBOSS EAP WORK ON OPENSHIFT? 7 1.3. COMPARISON: JBOSS EAP AND JBOSS EAP FOR OPENSHIFT 7 1.4. VERSION COMPATIBILITY AND SUPPORT 8 JDK 8 Images 9 JDK 11 Images 9 Eclipse OpenJ9 Images 9 1.4.1. OpenShift 4.x Support 10 1.4.2. IBM Z Support 10 1.4.3. Upgrades from JBoss EAP 7.1 to JBoss EAP 7.4 on OpenShift 10 1.5. DEPLOYMENT OPTIONS 10 .C . H. .A . P. .T .E . R. 2. B. .U . I. L. D. A. .N . .D . .R . U. .N . .A . .J .A . V. .A . .A . P. .P . L. .I C. .A . T. .I O. .N . O. .N . .T . H. .E . .J . B. .O . S. .S . E. .A . P. F. .O . R. O. .P . E. .N . S. .H . I.F . T. I.M . .A . G. .E . .1 .1 . 2.1. PREREQUISITES 11 2.2. PREPARE OPENSHIFT FOR APPLICATION DEPLOYMENT 11 2.3. CONFIGURE AUTHENTICATION TO THE RED HAT CONTAINER REGISTRY 12 2.4. IMPORT THE LATEST JBOSS EAP FOR OPENSHIFT IMAGESTREAMS AND TEMPLATES 13 Import command for JDK 8 13 Import command for JDK 11 13 Import command for Eclipse OpenJ9 on IBM Z 13 Import command for templates 14 2.5. DEPLOY A JBOSS EAP SOURCE-TO-IMAGE (S2I) APPLICATION TO OPENSHIFT 14 2.6. POST DEPLOYMENT TASKS 17 2.7. CHAINED BUILD SUPPORT IN JBOSS EAP FOR OPENSHIFT 17 .C . H. .A . P. .T .E . R. 3. C. O. .N . F. .I G. U. .R . I.N . G. T. .H . E. J. .B . O. .S . S. E . A. .P . .F . O. .R . .O . P. .E . N. .S . H. .I F. .T . .I M. A. .G . E. F. .O . R. Y. .O . U. .R . .J . A. .V . A. A. .P . P. .L .I C. .A . T. .I O. N. 1.9 . 3.1. HOW THE JBOSS EAP FOR OPENSHIFT S2I PROCESS WORKS 19 3.2. CONFIGURING JBOSS EAP FOR OPENSHIFT USING ENVIRONMENT VARIABLES 20 3.2.1. JVM Memory Configuration 21 3.2.1.1. JVM Default Memory Settings 21 3.2.1.2. JVM Garbage Collection Settings 21 3.2.1.3. Resource Limits in Default Settings 22 3.2.1.4. JVM Environment Variables 22 3.3. BUILD EXTENSIONS AND PROJECT ARTIFACTS 29 3.3.1. S2I Artifacts 30 3.3.1.1. Modules, Drivers, and Generic Deployments 31 3.3.2. Runtime Artifacts 33 3.3.2.1. Datasources 33 3.3.2.2. Resource Adapters 34 3.4. RESULTS OF USING JBOSS EAP TEMPLATES FOR OPENSHIFT 35 3.5. SSO CONFIGURATION OF RED HAT JBOSS ENTERPRISE APPLICATION PLATFORM FOR OPENSHIFT IMAGES 36 3.6. DEFAULT DATASOURCE 36 .C . H. .A . P. .T .E . R. 4. .C . A. .P . A. .B . I.L .I .T .Y . .T . R. .I M. M. I.N . G. I. N. J. B. .O . .S . S. .E . A. .P . .F .O . .R . .O . P. .E . N. .S . H. .I F. .T . .3 . 7. 4.1. PROVISION A CUSTOM JBOSS EAP SERVER 37 4.2. AVAILABLE JBOSS EAP LAYERS 37 4.2.1. Base Layers 37 1 Red Hat JBoss Enterprise Application Platform 7.4 Getting Started with JBoss EAP for OpenShift Container Platform datasources-web-server 37 jaxrs-server 38 cloud-server 38 4.2.2. Decorator Layers 39 sso 39 observability 39 web-clustering 39 4.3. PROVISIONING USER-DEVELOPED LAYERS IN JBOSS EAP 39 4.3.1. Building Custom Layers for JBoss EAP 40 4.3.2. Custom Provisioning Files for JBoss EAP 41 4.3.3. Building an Application Provisioned with User-developed Layers 43 4.3.4. Providing custom Galleon feature pack support for your JBoss EAP S2I image. 44 4.3.5. Configure Galleon by using advanced environment variables 45 4.3.6. Custom Galleon feature pack environment variables 45 .C . H. .A . P. .T .E . R. 5. T. .R . O. .U . .B . L. E. .S . H. .O . O. T. I. N. .G . .4 . 7. 5.1. TROUBLESHOOTING POD RESTARTS 47 5.2. TROUBLESHOOTING USING THE JBOSS EAP MANAGEMENT CLI 47 .C . H. .A . P. .T .E . R. 6. .A . D. .V . A. .N . C. .E . D. T. .U . T. O. R. .I A. .L . S. .4 .9 . .C . H. .A . P. .T .E . R. 7. E. .A . P. O. .P . E. .R . A. .T . O. .R . .F . O. .R . .A . U. .T . O. .M . .A . T. .I N. .G . .A . P. .P . L. .I C. .A . T. .I O. .N . D. .E . P. L. .O . .Y .M . .E . N. .T . .O . N. .O . P. .E . N. .S . H. .I F. .T . .5 .0 . 7.1. INSTALLING EAP OPERATOR USING THE WEB CONSOLE 50 7.2. INSTALLING EAP OPERATOR USING THE CLI 52 7.3. THE EAP-S2I-BUILD TEMPLATE FOR CREATING APPLICATION IMAGES 53 7.4. BUILDING AN APPLICATION IMAGE USING EAP-S2I-BUILD TEMPLATE 53 7.5. DEPLOYING A JAVA APPLICATION ON OPENSHIFT USING THE EAP OPERATOR 55 7.5.1. Creating a Secret 58 7.5.2. Creating a ConfigMap 58 7.5.3. Creating a ConfigMap from a standalone.xml File 59 7.5.4. Configuring Persistent Storage for Applications 59 7.6. VIEWING METRICS OF AN APPLICATION USING THE EAP OPERATOR 59 7.7. UNINSTALLING EAP OPERATOR USING WEB CONSOLE 60 7.8. UNINSTALLING EAP OPERATOR USING THE CLI 61 7.9. EAP OPERATOR FOR SAFE TRANSACTION RECOVERY 61 7.9.1. StatefulSets for Stable Network Host Names 62 7.9.2. Monitoring the Scaledown Process 62 7.9.2.1. Pod Status During Scaledown 63 7.9.3. Scaling Down During Transactions with Heuristic Outcomes 63 7.9.4. Configuring the transactions subsystem to use the JDBC storage for transaction log 64 7.10. JAKARTA ENTERPRISE BEANS REMOTING ON OPENSHIFT 65 7.10.1. Configuring Jakarta Enterprise Beans on OpenShift 66 .C . H. .A . P. .T .E . R. 8. .R .E . F. .E . R. E. .N . C. .E . .I N. F. O. R. .M . A. .T . I.O . .N . .6 .8 . ..