oracle adf architecture tv - deployment - deployment options
Post on 18-Oct-2014
315 views
DESCRIPTION
Slides from Oracle's ADF Architecture TV series covering the Deployment phase of ADF projects, considering your deployments options for deploying ADF applications. Like to know more? Check out: - Subscribe to the YouTube channel - http://bit.ly/adftvsub - Deployment Playlist - http://www.youtube.com/playlist?list=PLJz3HAsCPVaTFLxxO8qwwZqk7mpEcXOwG - Read the episode index on the ADF Architecture Square - http://bit.ly/adfarchsquareTRANSCRIPT
1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Deployment Options
ORACLE PRODUCT
LOGO
Real World ADF Design & Architecture Principles
15th Feb 2013 v1.0
3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Learning Objectives
• At the end of this module you should be able to:
– Understand what application deployment models WLS supports – What prerequisites you must put in place before deploying an
application to WLS – What options you have for deploying ADF applications to WLS
Image: imagerymajestic/ FreeDigitalPhotos.net
4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Prerequisites & Presentation Scope Before considering deployment you need to understand "building" ADF applications. Ensure you've viewed the sister PPT first.
Primary focus of this PPT is the tools for deploying ADF applications, not the "methodology" and associated processes and literature on build & deployment automation, that's up to you to define.
5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" Console – weblogic.Deployer – WLST
6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
WLS Supported Deployment Units
• WLS supports several different Java EE deployment units • Relevant to ADF applications:
– Enterprise Applications (EARs) Suitable for ADF Applications – Web Applications (WARs) – Shared Java EE Libraries (JARs) Suitable for ADF Libraries
• An EAR can comprise your Web Application (WAR) and ADF Libraries • Or the ADF Libraries can be separately deployed as Shared Libraries
7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Image: imagerymajestic/ FreeDigitalPhotos.net
Exercise
Hmm, what are the advantages and disadvantages of using
WLS shared libraries?
8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Exercise
Image: imagerymajestic/ FreeDigitalPhotos.net
If we're talking about deployment, surely this is a discussion about ojdeploy?! Can't ojdeploy deploy our software to our servers?
10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
ojdeploy for Deployment?
• The use of the terms "build" and "deployment" are subjective • In this training
– To "Build" the software • Is to compile the source and create the JAR/WAR/EAR • This is what ojdeploy does • The original ojdeploy authors subjectively called this the act of "deploying"
– To "Deploy" the software • Is to install the JAR/WAR/EAR in the Java EE server • For the definition of this training, this isn't what ojdeploy does
• This presentation focuses on how to deploy to the server
11 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Exercise
Image: imagerymajestic/ FreeDigitalPhotos.net
What are the prerequisites for deploying an ADF
application to a server?
13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
ADF Deployment Prerequisites • JAR/WAR/EAR is available to deploy
– Via JDeveloper you've previously created a deployment profile – Generated JAR/WAR/EAR via the deployment profile and build tools
• ADF runtime libraries already installed & targeted to WLS managed servers – These must match the version of JDev/ADF your application was built on – And version of WLS the ADF runtimes are supported on – Ensure to read Oracle Support notes on installing ADF runtimes – Unofficial summary of ADF Runtime install instructions (courtesy Timo Hahn)
• http://tompeez.wordpress.com/2011/09/14/jdeveloper-versions-vs-weblogic-server-versions/
• Other software deployments may need to be completed beforehand – e.g. database changes, system patches etc
14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Exercise
Image: imagerymajestic/ FreeDigitalPhotos.net
One of my "previous" developers botched the deployment of an application to
production, it cost us $1000s to rectify.
He now works in HR.
What choices do we have for deploying ADF applications? Which options can be
automated?
16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Options in Deploying ADF Applications
• Manually deploy via – JDeveloper IDE – WLS console – Oracle Enterprise Manager "FMW Control" console
• Automated deploy via – weblogic.Deployer – WLST – Maven WLS Deployment Plug In
17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Image: Ambro / FreeDigitalPhotos.net
The key to a stress-free, efficient & error free deployment is to remove humans from the process as much as possible,
and automate all the way.
18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Deployment Op,ons: JDeveloper WLS console FMW control weblogic.Deployer WLST
Interface IDE
Manual/Automated Manual
Start from source code or JAR/EAR Source
Suitable for development server Yes
Suitable for test/produc=on servers
Apply WLS deployment plans Yes
Apply ADF/MBean run=me changes
Supports WLS produc=on redeployment
20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
WLS Console
• Web based console • Administrate WLS servers and their applications in a WLS domain
• Treats all applications as generic Java EE applications • Has no intelligence built administrating ADF or FMW applications
28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Deployment Op,ons: JDeveloper WLS console FMW control weblogic.Deployer WLST
Interface IDE Web
Manual/Automated Manual Manual
Start from source code or JAR/EAR Source JAR/EAR
Suitable for development server Yes Yes
Suitable for test/produc=on servers Yes
Apply WLS deployment plans Yes Yes
Apply ADF/MBean run=me changes
Supports WLS produc=on redeployment Yes
29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
FMW Control
• Web based console • Extension of Oracle Enterprise Manager for FMW • For administrating FMW applications and infrastructure
• Has intelligence built-in for administrating ADF or FMW applications • ADF specific:
– Configure ADF Business Component parameters – Configure connection parameters
39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Deployment Op,ons: JDeveloper WLS console FMW control weblogic.Deployer WLST
Interface IDE Web Web
Manual/Automated Manual Manual Manual
Start from source code or JAR/EAR Source JAR/EAR JAR/EAR
Suitable for development server Yes Yes Yes
Suitable for test/produc=on servers Yes Yes
Apply WLS deployment plans Yes Yes Yes
Apply ADF/MBean run=me changes Yes
Supports WLS produc=on redeployment Yes
40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
44 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 44 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
45 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 45 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
46 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 46 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
47 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 47 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
48 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
49 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
weblogic.Deployer
• Command line deployment utility • Provided in default WLS install
50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Deployment Op,ons: JDeveloper WLS console FMW control weblogic.Deployer WLST
Interface IDE Web Web Command line, OS scripts, or Ant
Manual/Automated Manual Manual Manual Both
Start from source code or JAR/EAR Source JAR/EAR JAR/EAR JAR/EAR
Suitable for development server Yes Yes Yes Yes
Suitable for test/produc=on servers Yes Yes Yes
Apply WLS deployment plans Yes Yes Yes Yes
Apply ADF/MBean run=me changes Yes
Supports WLS produc=on redeployment Yes Yes
51 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
weblogic.Deployer Command Line Example
// All on one line java -classpath <wls_home>/wlserver_10.3/server/lib/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7101 -username weblogic -password weblogic1 -name MyApp -deploy /Dev/MyApp/deploy/MyApp.ear -targets DefaultServer
01 02 03 04 05 06 07 08
52 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
weblogic.Deployer ANT Example <path id="wldeploy.classpath"> <fileset dir="${wls_home}/wlserver_10.3/server/lib"> <include name="*.jar"/> <exclude name="jrmp.jar"/> <exclude name="jrmpclient.jar"/> </fileset> </path> <taskdef name="wlsdeploy" classpathref="wldeploy.classpath" classname="weblogic.ant.taskdefs.management.WLDeploy"/> <target name="deploy"> <wlsdeploy action="deploy" upload="true" verbose="true" usenonexclusivelock="true" name="MyApp" source="/Dev/MyApp/deploy/MyApp.ear" adminurl="t3://localhost:7101" user="weblogic" password="weblogic1" targets="DefaultServer"/> </target>
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19
53 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
54 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
WLST
• Command line WLS scripting tool • Amongst other operations supports deployment • Provided in default WLS install
55 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 55 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Deployment Op,ons: JDeveloper WLS console FMW console weblogic.Deployer WLST
Interface IDE Web Web Command line, OS scripts, or Ant
Command line, OS scripts, or Ant
Manual/Automated Manual Manual Manual Both Both
Start from source code or JAR/EAR Source JAR/EAR JAR/EAR JAR/EAR JAR/EAR
Suitable for development server Yes Yes Yes Yes Yes
Suitable for test/produc=on servers Yes Yes Yes Yes
Apply WLS deployment plans Yes Yes Yes Yes Yes
Apply ADF/MBean run=me changes Yes Yes
Supports WLS produc=on redeployment Yes Yes Yes
56 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
WLST Command Line Example
// Run WLST via command line – open the WLST command line console ./<jdev_home>/oracle_common/common/bin/wlst.cmd // Following can be saved as a Python script to be reexecuted connect('weblogic','weblogic1','t3://localhost:7101') edit() startEdit() deploy('MyApp','/Dev/MyApp/deploy/MyApp.ear', targets='DefaultServer') save() activate() startApplication('MyApp')
01 02 03 04 05 06 07 08 09 10 11
57 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
WLST ANT Example <path id="wlst.classpath"> <fileset dir="${wls_home}/wlserver_10.3/server/lib"> <include name="*.jar"/> <exclude name="jrmp.jar"/> <exclude name="jrmpclient.jar"/> </fileset> </path> <taskdef name="wlst" classname="weblogic.ant.taskdefs.management.WLSTTask" classpathref="wlst.classpath"/> <target name="deploy"> <wlst debug="true" failonerror="true" classpathref="wlst.classpath"><script> connect('weblogic','weblogic1','t3://localhost:7101') edit() startEdit() deploy('MyApp','/Dev/MyApp/deploy/MyApp.ear', targets='DefaultServer') save() activate() startApplication('MyApp') </script></wlst> </target>
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
58 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Program Agenda
• WLS Supported Deployment Units • ojdeploy vs Deployment • Deployment Prerequisites • Deployment Options
– JDeveloper IDE – WLS Administration Console – Oracle Enterprise Manager "FMW Control" console – weblogic.Deployer – WLST – Maven WLS Deployment Plug-In
59 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Maven WLS Deployment Plug In
• Previous automated options via Ant can be integrated into your CI engine • WLS also provides Maven a Deployment Plug In • Allows via pom.xml a WLS deployment to be a Maven goal
• (More info pending dependent on research into the plug-in’s capabilities)
60 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Conclusion
• Automate, automate, automate
61 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Further Reading
• Deployment Automation Patterns http://bit.ly/VGOfdh
• FMW Admin Guide http://bit.ly/TFRu73 • FMW Admin Guide for ADF http://bit.ly/VJCiE8
• WLST Guide http://bit.ly/TW8pRz • weblogic.Deployer Guide http://bit.ly/XdzMrg • Maven WLS Deploy Plug-in http://bit.ly/1f1oMV5
• WLS production redeployment http://bit.ly/WnuVBc
62 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.