DOAG 2011 - Upgrade Guide for Oracle ADF on WebLogic Server

3,536 views

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,536
On SlideShare
0
From Embeds
0
Number of Embeds
653
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

DOAG 2011 - Upgrade Guide for Oracle ADF on WebLogic Server

  1. 1. Beratung Software Lösungen Andreas KoopUpgrade Guide for Consultant Oracle TechnologiesOracle ADF onWebLogic Server
  2. 2. Who I am  Andreas Koop  Consultant Oracle Technologies (Focus on: Oracle Fusion Middleware)  Oracle ADF Certified Implementation Specialist  Community  DOAG  Oracle ADF News Session  ADF Enterprise Methodology Group  XING Oracle ADF Community  Twitter: @multikoop  Blog  http://padora.blogspot.com (TEAM, de)  http://multikoop.blogspot.com (en)21.11.2011 © TEAM - Ihr Partner für IT 2
  3. 3. Agenda  Upgrade Challenge  Choose an Upgrade-Strategy  In-Place Upgrade  Out-of-Place Upgrade  Know the Upgrade-Tools  Demonstration  Conclusion21.11.2011 © TEAM - Ihr Partner für IT 3
  4. 4. Development Division There is a brand new JDeveloper/ADF-Version. 3 Bug-Fixes, 500 new Features ;) ADF-Developer We should urgently do an upgrade!21.11.2011 © TEAM - Ihr Partner für IT 4
  5. 5. Development Division Download- Server ADF-Developer Install21.11.2011 © TEAM - Ihr Partner für IT 5
  6. 6. Development Division ADF-Developers Maschine21.11.2011 © TEAM - Ihr Partner für IT 6
  7. 7. Development Division Let‘s migrate the „old“ ADF App ADF-Developer21.11.2011 © TEAM - Ihr Partner für IT 7
  8. 8. Development Division INFO: Migration successfully completed for the following file(s): C:akJDeveloperdoag2011-demodoag2011-demo.jws C:akJDeveloper...demo-modeldemo-model.jpr C:akJDeveloperdoag2011-demodemo-uidemo-ui.jpr [9:55:24 PM] Migration finished. It‘s so simple. It just works!ADF-Developer21.11.2011 © TEAM - Ihr Partner für IT 8
  9. 9. Development Division ADF-Developer21.11.2011 © TEAM - Ihr Partner für IT 9
  10. 10. Development Division OK, since everything is fine.Let‘s deploy the (next gen) app! ADF-Developer Work done!21.11.2011 © TEAM - Ihr Partner für IT 10
  11. 11. FMW Administration Here is an update. Please deploy ADF-Developer doag-demo.ear Admin OK, should be easy Take care. It is now based on ADF 11gR221.11.2011 © TEAM - Ihr Partner für IT 11
  12. 12. WTF!? Slow down please!Quelle:http://www.ps3blog.de/
  13. 13. Oracle ADF Upgrade Challenge – Versionsorgie Version 12.1.1?, WLS 12.? today 11.1.2 R2, WLS 10.3.5 11.1.1.5, PS4, WLS 10.3.5 11.1.1.4, PS3, WLS 10.3.4 11.1.1.3, PS2, WLS 10.3.3 11.1.1.2, PS1, WLS 10.3.2 11.1.1.1, R1, WLS 10.3.1 11.1.1.0 10g t out of focus21.11.2011 © TEAM - Ihr Partner für IT 13
  14. 14. ADF/WLS Versions you should know of ADF WebLogic Bemerkung 11.1.1.0 10.3.0 11.1.1.1 10.3.1 11.1.1.2 10.3.2 11.1.1.3 10.3.3 11.1.1.4 10.3.4 11.1.1.5 10.3.5 11.1.2.0 10.3.5, Sherman-Patch p12611176 , p12556632 via My Oracle Support 11.1.2.1 10.3.5, Sherman-Patch p12979653, p12917525 UPDATE1 via My Oracle Support !Don‘t try a „Cross-Version Deployment“!21.11.2011 © TEAM - Ihr Partner für IT 14
  15. 15. Know the possibly concerned components  Domainkonfiguration Web Cache  AdminServer OHS (mod_wl)  ManagedServer AdminServer  Cluster  Machine MS_App1  Konfiguration adfapp1.ear  Shared Libraries (JRF)  NodeManager  Application (EAR) DB  Meta Data Services MDS  Directory (LDAP) LDAP  DB Schema21.11.2011 © TEAM - Ihr Partner für IT 15
  16. 16. What should you be aware of?  WebLogic Server  Application Development Runtime  Domainkonfiguration (Parameter, Logging, etc)  Rechner, Nodemanager  AdminServer, ManagedServer1..n  Cluster/Verteilung  Identity Management (Benutzer/Gruppen)  Datenquellen  Metadata Service Repository  Webtier: OHS, WebCache  Neu ADF-Applikation, Andere ADF-Applikationen (die möglicherweise in alter Version erhalten bleiben sollen)21.11.2011 © TEAM - Ihr Partner für IT 16
  17. 17. Don‘t forget to TEST the Upgrade!“Oracle does not recommend upgrading anapplication environment that is currently deployed inproduction.Instead, you should upgrade your applicationenvironment while it is under development or test andexecute standardprocedures for quality assurance and performancetuning before promoting the upgraded environment toproduction.“ (p. 18, Upgrade Guide WLS10.3.5) p. 18, Upgrade Guide WLS10.3.5 21.11.2011 © TEAM - Ihr Partner für IT 17
  18. 18. Keep in mind your environments / different requirements Web Cache Web Cache OHS (mod_wl) OHS (mod_wl) Production (Cluster, HA) JDeveloper AdminServer AdminServer Test / Integration MS1_App1 MS_App1 Development AdminServer MS2_App1 adfapp1.ear adfapp1.ear adfapp1.ear MS1_App1 adfapp1.ear adfapp1.ear DB adfapp2.ear DB DB DB DB21.11.2011 © TEAM - Ihr Partner für IT 18
  19. 19. What is important to backup / what‘s not MW_HOMEwebtier common wl_home user_projects jdkhome home nodemanager adf_domain home instance_home AdminServer MS1 ohs1 webcache121.11.2011 © TEAM - Ihr Partner für IT 19
  20. 20. Wie wurde die ADF WLS Domain installiert? jdevstudio111Xinstall.bin wls103X_X.bin ofm_appdev_X.zip install install install Middleware Home Middleware Home Application Development Application Development EM Runtime Runtime WebLogic Server WebLogic Server configure configure ADF Domain ADF Domain adfapp1.ear deploy em.ear adfapp1.ear21.11.2011 © TEAM - Ihr Partner für IT 20
  21. 21. Agenda  Upgrade Challenge  Choose an Upgrade-Strategy  In-Place Upgrade  Out-of-Place Upgrade  Know the Upgrade-Tools  Demonstration  Conclusion21.11.2011 © TEAM - Ihr Partner für IT 21
  22. 22. Upgrade Roadmap  Prepare  Stop all servers  Backup!  MW_HOME, WL_HOME, DOMAIN_HOME, INSTANCE_HOME  Database Schema, Whole Database (falls notwendig)  other application specific files, file based mds repo  Better: Whole Machine! In times of virtualization and Cloud Computing no problem at all….  In-Place Upgrade or  Out-of-Place Upgrade21.11.2011 © TEAM - Ihr Partner für IT 22
  23. 23. In-Place Upgrade - Roadmap  Upgrade WebLogic Server to 10.3.5  p12395517_1035_LINUX.zip (only via MOS)  Upgrade ADF Runtime to 11.1.1.5  => app developer installer (+Patch)  (Upgrade MDS Repository (DB basierend))  => Patch Set Assistant  Upgrade FMW (Fusion Middleware) Configuration / Domain stuff  => WLST: upgradeJRF(..) upgradeOpss(..) upgradeADF(..) (Kann je nach Migrationspfad variieren!)  Redeploy ADF Applikation21.11.2011 © TEAM - Ihr Partner für IT 23
  24. 24. Know Oracles Upgrade and Patch Tools Werkzeug Einsatz Anmerkung WebLogic Upgrade Installer Update des WebLogic Servers Smart Update Utility Installation von ehemals BEA Smart Patches auf dem Update. Seit Juni 2011 WebLogic Servers kein Online Update mehr möglich. Patch Set Installer Patch WebTier Utilities Oracle HTTP Server (OHS), Web Cache Patch Set Assistant Patch Datenbank- hier: Falls MDS DB- Schemata basiert OPatch Installation von Hot- z.B. Sherman-Patch ADF Patches 11.1.2.x WebLogic Scripting Tool Post-Upgrade upgradeADF(..) Processing21.11.2011 © TEAM - Ihr Partner für IT 24
  25. 25. ADF 11.1.2.x - Characteristic Note - Oracle ADF 11.1.2.x Application Development Runtime is provided as a patch for Oracle ADF Runtime 11.1.1.5 and is available through Oracle Support.  Patch p<siehe MOS>_111150_Generic.zip on top of Oracle ADF Runtime 11.1.1.5 (ADF Runtime)  Patch p<siehe MOS>_111150_Generic.zip on top of Oracle ADF Runtime 11.1.1.5 (JSF 2)  wlst:/offline> upgradeADF(/DOMAIN_HOME)  ! Use the right wlst.sh (oracle_common vs. wl_server )21.11.2011 © TEAM - Ihr Partner für IT 25
  26. 26. Upgrade ADF Shared Libs, ADF Security Configuration  Mittels WLST (./oracle_common/common/bin/wlst.sh) Domäne mit den neuen ADF Bibliotheken ausstatten wls:/offline> applyJRF($DH)  Mittels WLST (./oracle_common/common/bin/wlst.sh) Security-Konfiguration aktualisieren wls:/offline> upgradeOpss(jpsConfig=$DH/config/fmwconfig/jps- config.xml, jaznData=$DH/config/fmwconfig/system- jazn-data.xml)21.11.2011 © TEAM - Ihr Partner für IT 26
  27. 27. Out-Of-Place Upgrade Roadmap  Parallel-Installation der neuen Version  Variante A (kein Enterprise Manager)  WebLogic Server inkl. Application Development Runtime aus dem JDeveloper Installer  Variante B (mit Enterprise Manager)  WebLogic Server  Application Development Runtime  OPatches  ADF Applikation bereitstellen  Domain erstellen und konfigurieren  Datenquelle anlegen  MDS Repository definieren  (Security-Provider / Testbenutzer konfigurieren )  ADF-Anwendung bereitstellen21.11.2011 © TEAM - Ihr Partner für IT 27
  28. 28. Die zwei Varianten im Überblick für ADF 11.1.2.{0|1} ofm_appdev_11115jdevstudio1112Xinstall.bin wls1035_X.bin X.zip install install Sherman-Patch install Middleware Home Middleware Home Application Development Application Development EM Runtime Runtime WebLogic Server WebLogic Server configure configure ADF Domain ADF Domain adfapp1.ear deploy em.ear adfapp1.ear21.11.2011 © TEAM - Ihr Partner für IT 28
  29. 29. Sherman „Post Patch Task“ patch-domain-sherman.pyimport os_DOMAIN_DIR = os.environ[MW_HOME] +"/user_projects/domains/" + os.environ[WLS_DOMAIN]# apply sherman patch on the given domainupgradeADF(domainPath=_DOMAIN_DIR)exit()$ . $PRJ_HOME/env/env.sh$ $MW_HOME/oracle_common/common/wlst.shpatch-domain-sherman.py21.11.2011 © TEAM - Ihr Partner für IT 29
  30. 30. Out-Of-Place Upgrade - ArchitekturWebTier webhost Web Cache OHS (mod_wl)AppTier AdminServer AdminServer MS_App1 MS_App1 apphost adfapp1.ear adfapp1.ear ADF11.1.1.2 Domain ADF11.1.2.x Domain DBTier DB 21.11.2011 © TEAM - Ihr Partner für IT 30
  31. 31. Configure new „adf domain“ (1/2)readTemplate(os.environ[WL_HOME] +/common/templates/domains/wls.jar)cd(/)cmo.setName(adf_new_domain)cd( "Servers/AdminServer" )cmo.setListenAddress( "All Local Addresses" )cmo.setListenPort( int(os.environ[WLS_ADMIN_PORT]) )cd( / )cd( Security/+_DOMAIN_NAME+/User/ + _WL_ADMIN_USER )cmo.setPassword( _WL_ADMIN_PWD )cd(/)setOption( JavaHome, os.environ[MW_JAVA_HOME] )setOption( "ServerStartMode", "prod")setOption( "OverwriteDomain", "true" )writeDomain( _DOMAIN_DIR )closeTemplate()21.11.2011 © TEAM - Ihr Partner für IT 31
  32. 32. Configure new „adf domain“ (2/2)# extend domain JRF templatereadDomain (_DOMAIN_DIR)addTemplate(_MW_HOME +/oracle_common/common/templates/applications/jrf_template_11.1.1.jar)updateDomain()closeDomain()exit()21.11.2011 © TEAM - Ihr Partner für IT 32
  33. 33. FMW Administration Out-Of-Place Upgrade Challenge I have optimized here, optimized there… set log rotating Admin Once more now? for every coming WLS Version?21.11.2011 © TEAM - Ihr Partner für IT 33
  34. 34. Automatisierung mit WLST-Skripten  Export (bestehende Domain)  Export Config => WLST-Skript  Export (Test)User/Gruppen => LDIF  Import (neue Domain)  WLST-Skript anpassen.  In neuer Installationsumgebung ausführen.  WLST-Skript  LDIF  Benefits (ggüb. manueller Neuinstallation)  Alle Einstellungen in der alten Domäne werden übernommen  Autom. ausführbar. (Test / Prod)21.11.2011 © TEAM - Ihr Partner für IT 34
  35. 35. Export Domain Config (1/3)wls:offline>configToScript(configPath=$DH,pyPath=config.mydomain.py)..def setAttributes_Log_61(): cd("/Servers/AdminServer/Log/AdminServer") print "setting attributes for mbean type Log" set("RotateLogOnStartup", "false") set("NumberOfFilesLimited", "true") set("FileCount", "3") set("RotationType", "bySize") set("FileMinSize", "3000") set("FileName", "logs/AdminServer.log")...21.11.2011 © TEAM - Ihr Partner für IT 35
  36. 36. Export Domain Config (2/3) – MDS, User/Groupswls:online>exportMetadata(application=doag-demo, server=AdminServer, toLocation=/tmp/exportmdswls:online> domainRuntime()cd(‘/DomainServices/DomainRuntimeService/DomainConfiguration/<domain>/SecurityConfiguration/<domain>/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator’)cmo.exportData(DefaultAtn, /export.ldif, Properties())21.11.2011 © TEAM - Ihr Partner für IT 36
  37. 37. Adopt exported WLST Skript for the new domain  Search&Replace <old version> => <new version>  Comment out most, keep the custom stuffdef initConfigToScriptRun(): execfile(connect.py)..#create_ShutdownClass_48("/", "DMSShutdown") create_JDBCSystemResource_52("/", "hrconn")create_Property_54("/JDBCSystemResources/hrconn/JDBCResource/hrconn/JDBCDriverParams/hrconn/Properties/hrconn","user") #setAttributesFor_AdminServer_1()setAttributes_Log_68()endTransaction() #deploy_FMW_Welc.....21.11.2011 © TEAM - Ihr Partner für IT 37
  38. 38. Configure new „adf domain“ (3/3)  Domain config  wlst.sh config.adf11112_migrate_domainsettings.py (JDBC, FileStore, AuthProvider, Logging, etc)  MDS  wlst.sh import-mds.py  Security  TEST-System: wlst.sh create-testusersgroups.py or wlst.sh import-usergroups.py  PROD-System: --- (no additional action)21.11.2011 © TEAM - Ihr Partner für IT 38
  39. 39. Demonstration Beratung Software Lösungen
  40. 40. Sample Output (in case the demo is not working)..Starting an edit session ...Started edit session, please be sure to save and activate yourchanges once you are done.creating mbean of type JDBCSystemResource ...creating mbean of type Property ...setting attributes for mbean type DefaultAuthenticatorsetting attributes for mbean type JDBCSystemResourcesetting attributes for mbean type JDBCPropertysetting attributes for mbean type JDBCDriverParamssetting attributes for mbean type JDBCDataSourcesetting attributes for mbean type JDBCDataSourceParamssetting attributes for mbean type Logsetting attributes for mbean type JDBCConnectionPoolParamssetting attributes for mbean type WebServerLogEnding transactionSaving all your changes ...Saved all your changes successfully.Activating all your changes, this may take a while ...21.11.2011 © TEAM - Ihr Partner für IT 40
  41. 41. OHS Proxy-Konfiguration OHS (mod_wl) <Location /adfapp> SetHandler weblogic-handler WebLogicHost apphost1 before WebLogicPort 8003 </Location> OHS (mod_wl) <Location /adfapp> SetHandler weblogic-handler WebLogicHost apphost1 WebLogicPort 8103 after </Location>21.11.2011 © TEAM - Ihr Partner für IT 41
  42. 42. Benefits Out-Of-Place Upgrade  Near No Risc (the old version is still available)  Near No Downtime (Worst Case: Session lost)  In case of more than one ADF application in a WLS Domain step-by-step migration possible.  In case you have no acceptance system, the migrated ADF Application can be tested through direct access on WLS Server  There is a great period of time you can switch back to the old version in case of problems.21.11.2011 © TEAM - Ihr Partner für IT 42
  43. 43. Conclusion and Recommendations  An easy upgrade is not always possible  => „Version mismatch of ADF vs. WLS“ since 11.1.2  Out-Of-Place-Upgrade is the better choice to go  Automate as much as possible by WLST  Creation, Configuration of „ADF-Domain“  Creation, Reconfiguration of DataSources  Configuration of Security-Provider, Testuser/groups, MDS- Repository  (Re)Deployment of ADF-Applikation WLST rulez, makes live easier21.11.2011 © TEAM - Ihr Partner für IT 43
  44. 44. Beratung Software Lösungen TEAM Partner für TechnologieThank you und angewandte Methoden der Informationsverarbeitung GmbHfor your attention! Hermann-Löns-Str. 88 33104 Paderborn Fon +49 5254 8008-0 Fax +49 5254 8008-19Any questions? Mail team@team-pb.de Web www.team-pb.de

×