Oracle Weblogic Server Deployment Tools| Deployment Tools Of Weblogic Server

 Oracle Weblogic Server Deployment Tools| Deployment Tools Of Weblogic Server

* Several methods are available to deploy applications and shared libraries to the Oracle WebLogic Server,
    including:
              — Administration Console
              — weblogic.Deployer Java class
              — WebLogic Scripting Tool (WLST)
              – wldeploy Ant task
              – Autodeployment folder

1) Console Deployment Method:

Deploying with the console allows full administrator control:
•  Installation of an application from a location of your choice
•  Manual configuration of the application name
•  Targeting the application to individual servers or clusters, or both
•  Configuring the application without targeting it
•  Activating deployment when desired

2) Command-Line Deployment:

•  The weblogic.Deployer utility enables you to perform deployment operations similar to those
    available in the console.
•  weblogic.Deployer actions can also be scripted with the Ant task wldeploy.
   weblogic.Deployer Syntax:
  % java weblogic.Deployer [options]
      [-deploy|-undeploy|-redeploy|-start|-stop|-listapps]
      [file(s)]
 Prepare and deploy a new application:
    java weblogic.Deployer -adminurl t3://adminserver:7001
    -username system -password pwd123 -name TestApp
    -source /usr/TestApp.ear -targets Cluster1 -deploy
•  Redeploy an application:
    java weblogic.Deployer -adminurl t3://adminserver:7001
     -username system -password pwd123 –name TestApp
     -redeploy
•  Undeploy an application:
    java weblogic.Deployer -adminurl t3://adminserver:7001
     -username system -password pwd123 –name TestApp
     -undeploy
•  To list all deployed applications:
    java weblogic.Deployer -adminurl t3://localhost:7001
     -username system -password pwd123 -listapps
•  To list all deployment tasks:
    java weblogic.Deployer -adminurl t3://localhost:7001
     -username system -password pwd123 -listtask
•  To cancel a deployment task:
    java weblogic.Deployer -adminurl t3://localhost:7001
     -username system -password pwd123 -cancel -id tag

3) Deploying Applications with WLST:

     WLST provides a number of deployment commands. You can use these commands to:
•  Perform life-cycle operations on applications and stand-alone modules in an
    Oracle WebLogic Server instance:   
            –Deploy
            –Undeploy
            –Redeploy
•  Update an existing deployment plan
•  Start and stop a deployed application
Deploying an Application with WLST:

 — Deploy an application (deployapp.py):
########################################
# WLST script for Deploying J2EE Application #
########################################
## Connect to the server
print ‘Connecting to server  …. ‘
connect(‘system’,'password123′,’t3://localhost:7001′)
appname = “TestApp”
applocation = “c:/domains/SandBox/apps/TestApp”
# Start deploy
print ‘Deploying application ‘ + appname
deploy(appname, applocation, targets=’Cluster1′,
       planPath=’c:/myapps/plan/plan.xml’)
print ‘Done Deploying the application ‘+ appname
exit()
Prepare and deploy a new application, or redeploy an existing one:
connect(‘system’,'password123′,’t3://adminserver:7001′)
name = “TestApp”
location = “/usr/Applications/TestApp.ear”
deploy(name, location, targets=’Cluster1′)
Other WLST deployment commands:
distributeApplication(location, targets=’Cluster1′)
startApplication(name)
redeploy(name)
stopApplication(name)
listApplications()

4) Autodeployment:

•  By default, the autodeployment feature is enabled only if the domain is not running in production mode.
•  When enabled:
    –  The administration server monitors its “autodeploy” folder for new, updated, or removed applications
    –  Applications are targeted only to the administration server
    –  Developers can quickly test or experiment with an application
•  /user_projects/domains/domain/autodeploy
Autodeploying Using an Expanded Directory:
  If the following conditions are true, you are a candidate for autodeploy.
  Consider autodeploy if the application is:
•  In the development phase
•  Being updated frequently
•  Deploying to a single machine (for example, only the administration server)