Masterclass: WebLogic Server Simon Haslam Veriton Limited Veriton Oracle Partner, established 13 years Demanding web & call-centre applications Oracle Application Server & WebLogic Server (clusters, JEE, ADF, SSO, OID, Reports, etc) Database & related technologies (Solaris/Linux, load balancers, firewalls, ) 1 (1.0h) 2 (1.0h) Agenda 1. Concepts & Architecture 2. Configuration 3. Application Deployment 4. Setting up a Web-Tier Demonstrations 1) Install WLS + Create domain + Start Admin Server & Managed Server 2) Extend Domain for EM/JRF etc + Show deployments + Config pooled data source 3) Deploy ADF App + Record some WLST 4) (if time) Install Web Tier (e.g. OHS + OPMN) + Config instance + Config plug-in NOT TIME TO DEAL WITH SECURITY! 3 (1.0h) 4 (1.0h) Installers Used for Demo Demo was run on 32-bit OEL R5 WebLogic oepe111130_wls1032_linux32.bin ADR ofm_appdev_generic/disk1/runinstaller Web-tier ofm_webtier/disk1/runinstaller http://www.oracle.com/technology/software/products/ middleware/htdocs/fmw_11_download.html WebLogic Terms Domain abstract level grouping of WL resources single set of administrators Admin Server controls a domain (one per domain, with backup) Managed Server an instance controlled by an Admin Server Clusters can be set up across multiple Managed Servers Machine use Node Manager to manage WL managed s (& cross domain) 5 (1.0h) 6 (1.0h) 1
What s in a Domain? Typical examples: config. logs managed s config. deployed apps logs all held under one directory (managed by admin. ) separate from binaries ❶ app requests domain Example Architecture web plug-in machine managed managed machine managed node manager admin node manager admin console 7 (1.0h) 8 (1.0h) Comparison of Terms WebLogic Server domain (farm still in OFM) cluster contains several instances machine instance (one JVM) node manager Oracle Application Server ~farm ~application * OC4J instance (one or several JVMs) OPMN ❶ Licensing Note! WebLogic Server Basic WebLogic Server Suite See Appendix A: Oracle Fusion Middleware Licensing Information in OFM 11g documentation http://download.oracle.com/docs/cd/e12839_01/ doc.1111/e14860/wls_basic.htm#i1055058 Analysis see my blog: http://www.veriton.co.uk/roller/ fmw/entry/ofm_11g_licence_upgrade_options * you typically, but not always, have one OAS installation per, 9 (1.0h) 10 (1.0h) Installation Running Installer New style installer (10g R3 had rebadged BEA installer) MW_HOME (was BEA_HOME) directory ~ ORACLE_BASE Graphical: Linux example export DISPLAY (if reqd) chmod a+x./oepe111130_wls1032_linux32.bin WL_HOME ~ ORACLE_HOME registry.xml ~ the Oracle Inventory beahomelist ~ orainst.loc Command line: -mode=console Silent: -mode=silent -silent_xml=<path_to_silent.xml> 11 (1.0h) 12 (1.0h) 2
Comparison of Installers Installation Types WebLogic Server Graphical Text Mode Silent BEA_HOME one install per product/version WL_HOME Oracle Application Server Graphical Silent (ORACLE_BASE) arbitrary no. of installs ORACLE_HOME Complete WLS, OEPE/Workshop for WL, examples Sun JDK, JRockit JDK Custom option of remote installs on headless s 13 (1.0h) 14 (1.0h) Demo 1a: Summary Getting Started Installed WLS Created basic domain, with managed machine Default AdminServer WebLogic home page http://<host>:7001 or (https: 7002) admin console: http://<host>:7001/console http://<host>:7001/em default username/pass: <set during install> Comparing with OAS: http://<host>:7777 (https: 4443) via OHS/WC admin console: http://<host>:1156 (10.1.2/4) http://<host>:7777/em (10.1.3) default username ias_admin/<password set during install> 15 (1.0h) 16 (1.0h) Demo 1b: Summary Configuration Control Started Admin Server Quick tour of WL console Started Node Manager Started Managed Server Development or Production Set at domain level Differences: Development: polls for apps to deploy (e.g. changes), Production: configuration lock, history, rollback, etc.... and more. 17 (1.0h) 18 (1.0h) 3
Extending the Domain Demo 2a: Summary In theory optional, but modern approach (e.g. for sets of shared libraries) Install into domain or home (note common rejig in PS1) Extend domain to use Need to apply extension to specific Managed Servers See also: domain templates Domain Configuration Tool Logged into EM Apply JRF to Managed Server using EM (could have used WLST) 19 (1.0h) 20 (1.0h) ❷Server States & Admin Channel!! Server STANDBY STARTING ADMIN RESUMING RUNNING App STATE_PREPARED STATE_ADMIN STATE_ACTIVE Domain Log File all managed s write back to Admin Server domain log file except when in MSI mode (of course) 21 (1.0h) 22 (1.0h) Configuring JDBC Demo 2b: Summary Data sources Multi-data sources XA Created Data Source Customised connection retry interval Tested Applied to target Connection testing Failure conditions 23 (1.0h) 24 (1.0h) 4
❸ Deploying Apps ❸ WebLogic Scripting Tool Hot deployment: multiple versions within same compare to rolling upgrade of instances using mod_oc4j routing within an OAS cluster Staged deployment to support deploy/test/publish model! Admin mode wlst.sh sets environment Initializing WebLogic Scripting Tool (WLST)... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline> exit() 25 (1.0h) 26 (1.0h) Demo 3: Summary What is the Web-Tier? Loaded from an EAR file Can use our own deployment plan Assigned to a target Managed Server Stop/Start One or both of: Oracle HTTP Server Oracle Web Cache OPMN Note: like OAS all components are installed but you choose the ones to run 27 (1.0h) 28 (1.0h) Demo 4a: Summary Oracle Homes & Instances Installed JRF now differentiate the installation from the config (like DB or WLS) database binaries vs oradata wls_ vs domains oracle_wt1 vs oracle_wt1/instance/ this is a good thing separation of installation from config/logs simplifies cloning, finding logs, etc 29 (1.0h) 30 (1.0h) 5
Demo 4b: Summary What have we done? Created instance OPMN, startup etc Configured OHS mod_wls_ohs plug-in WLS Install (cf OAS Java Tier install) Web-Tier Install (cf OAS Web Tier install) Deployed an ADF app NB: security not considered (see OPSS) 31 (1.0h) 32 (1.0h) Summary References WLS different but the same Install WL then Web-Tier if nec. Deploy apps on Managed Servers Lots of nice tools, e.g. Powerful WLST scripting environment Check your licence though! Useful config. management features OFM 11g documentation set Robert Patrick et al book Admin in 4-5 out of 15 chapters (see review on my blog) WebLogic only (obviously!) 33 (1.0h) 34 (1.0h) Thank you for listening! OFM blog: simonhaslam.co.uk 35 (1.0h) 6