weblogic.Deployer is a Java-based deployment tool that provides administrators and developers command-line based deployment operations.
Note: | See the WLST Command and Variable Reference for information about performing deployment operations using the WebLogic Scripting Tool (WLST). |
The following sections describe the weblogic.Deployer
utility:
To set up your environment to use the weblogic.Deployer utility:
PATH
. You can use the setWLSEnv.sh or setWLSEnv.cmd
script, located in the server/bin subdirectory of the WebLogic Server installation directory, to set the environment.weblogic.Deployer
. See
Configuring i
SSL in Managing WebLogic Security for instructions about configuring SSL.
java [SSL Arguments] weblogic.Deployer [Connection Arguments]
[User Credentials Arguments]COMMAND-NAME
command-options
[Common Arguments]
Command names and options are not case-sensitive. See Commands and Options for detailed syntax and examples of using weblogic.Deployer
commands.
java [-Dweblogic.security.TrustKeyStore=DemoTrust
]
[-Dweblogic.security.JavaStandardTrustKeystorePassPhrase=
password
]
[-Dweblogic.security.CustomTrustKeyStoreFileName=
filename
-Dweblogic.security.TrustKeystoreType=CustomTrust
[-Dweblogic.security.CustomTrustKeystorePassPhrase=
password
]
]
[-Dweblogic.security.SSL.hostnameVerifier=
classname
]
[-Dweblogic.security.SSL.ignoreHostnameVerification=true ]
weblogic.Deployer
[ User Credentials Arguments ]COMMAND-NAME
command-arguments
If you have enabled the domain-wide administration port, or if you want to secure your administrative request by using some other listen port that is secured by SSL, you must include SSL arguments when you invoke weblogic.Deployer
. Table A-1 describes all SSL arguments for the weblogic.Deployer
utility.
java [SSL Arguments] weblogic.Deployer
[-adminurlprotocol
://listen_address
:port_number
]
[User Credentials Arguments]COMMAND-NAME
command-options
[Common Arguments]
Most weblogic.Deployer
commands require you to specify the -adminurl
arguments described in Table A-2 to connect to an Administration Server instance.
To use a port that is not secured by SSL, the format is
-adminurl [ protocol ] Admin-Server-listen-address : port where t3 , http , iiop , and iiops are valid protocols.
In order to use an adminurl with the HTTP protocol, you must enable the HTTP tunneling option in the Administration Console. For more information, see Setting Up WebLogic Server for HTTP Tunneling in Designing and Configuring WebLogic Server Environments. For instructions on enabling HTTP tunneling in the Administration Console, see Configure HTTP protocol in Administration Console Online Help.
To use a port that is secured by SSL, the format is
-adminurl secure-protocol :// Admin-Server-listen-address : port where t3s and https are valid secure protocols.
|
java [ SSL Arguments ] weblogic.Deployer [Connection Arguments]
[ { -username username [-password password] } |
[ -userconfigfileconfig-file
[-userkeyfileadmin-key
] ] ]
COMMAND-NAME
command-options
[Common Arguments]
Most weblogic.Deployer
commands require you to provide the user credentials of a WebLogic Server administrator.
To avoid having the plain text password appear in scripts or in process utilities such as ps, first store the username and encrypted password in a configuration file using the STOREUSERCONFIG command with weblogic.Admin. Omit both the -username and -password options to weblogic.Deployer to use the values stored in the default configuration file. Before specifying the
-password password attribute, you must first generate the file using the WebLogic Scripting Tool (WLST) storeUserConfig command as described in the
WLST Command and Variable Reference.
|
|
Location of a user configuration file to use for the administrative username and password. Use this option, instead of the
-user and -password options, in automated scripts or in situations where you do not want to have the password shown on-screen or in process-level utilities such as ps . Before specifying the -userconfigfile attribute, you must first generate the file using the WebLogic Scripting Tool (WLST) storeUserConfig command as described in the
WLST Command and Variable Reference.
|
|
Specifies the location of a user key file to use for encrypting and decrypting the username and password information stored in a user configuration file (the
-userconfigfile option). Before specifying the -userkeyfile attribute, you must first generate the file using the WebLogic Scripting Tool (WLST) storeUserConfig command as described in the
WLST Command and Variable Reference.
|
java [ SSL Arguments ] weblogic.Deployer [Connection Arguments]
[ { -username username [-password password] } |
[ -userconfigfileconfig-file
[-userkeyfileadmin-key
] ] ]
COMMAND-NAME
command-options
[Common Arguments]
The common arguments described in Table A-4 can be used with any commands described in Commands and Options.
The following sections describe the weblogic.Deployer
commands and command options used to perform deployment tasks with WebLogic Server:
Note: | weblogic.Deployer commands are displayed in bold type to distinguish them from command options. |
Attempt to cancel a running deployment task.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-canceltask_id
[Common Arguments]
The following command starts a deployment operation and specifies the task identifier, myDeployment
:
java weblogic.Deployer -adminurl http://localhost:7001
-username weblogic -password weblogic
-deploy ./myapp.ear -id myDeployment
If the deployment task has not yet completed, the following command attempts to cancel the deployment operation:
java weblogic.Deployer -adminurl http://localhost:7001
-username weblogic -password weblogic
-cancel -id myDeployment
Deploys or redeploys an application or module.
Note: | The -ACTIVATE command, an alias for deploy, is deprecated. |
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-deploy [[-name]deployment_name
] [-source]file
[-planfile
] [-targetstarget_list
] [-submoduletargetstarget_list
]
[-upload]
[-stage | -nostage | -external_stage]
[-retiretimeoutseconds
]
[-library [-libspecverversion
] [-libimplverversion
]]
[-altappddfile
] [-altwlsappddfile
]
[-securityModel] [-enableSecurityValidation]
[-idtask_id
]
[Common Arguments]
Both the
-name option and deployment_name argument are optional, as described in the Syntax. If a deployment name is not explicitly identified with the deploy command, the name is derived from the specified deployment file or directory:
|
|
JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Transfers the specified deployment files, including deployment plans and alternate deployment descriptors, to the Administration Server. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server’s upload directory prior to distribution and deployment.
|
|
|
|
Number of seconds before WebLogic Server retires the currently-running version of this application or module. See Redeploying a New Version of an Application.
|
|
The deployment as a shared J2EE library or optional package. You must include the
-library option when deploying or distributing any J2EE library or optional package. See Deploying Shared Java EE Libraries and Dependent Applications.
|
|
Specification version of a J2EE library or optional package. This option can be used only if the library or package does not include a specification version in its manifest file.
-libversion can be used only in combination with -library . See Registering Libraries with WebLogic Server.
|
|
Implementation version of a J2EE library or optional package. This option can be used only if the library or package does not include an implementation version in its manifest file.
-libimplversion can be used only in combination with -library . See Registering Libraries with WebLogic Server.
|
|
Task identifier of a running deployment task. You can specify an identifier with the distribute,
deploy, redeploy, start, or undeploy commands, and use it later as an argument to the cancel or list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.
|
See the following sections for examples of using the -deploy command:
Prepares deployment files for deployment by copying deployment files to target servers and validating them.
A distributed application can be started quickly with the Start command. You can start the application in Administration mode, or make it available to Administration and client requests. While in Administration mode, the application can be accessed only by internal clients through a configured Administration port. External clients cannot access the application.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-distribute [[-name]deployment_name
] [-source]file
[-planfile
] [-targetstarget_list
] [-submoduletargetstarget_list
]
[-upload]
[-stage | -nostage | -external_stage]
[-library [-libspecverversion
] [-libimplverversion
]]
[-altappddfile
] [-altwlsappddfile
]
[-securityModel] [-enableSecurityValidation]
[-idtask_id
]
[Common Arguments]
Both the
-name option and deployment_name argument are optional, as described in the Syntax. If a deployment name is not explicitly identified, a name is derived from the specified deployment file or directory:
|
|
JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Transfers the specified deployment files, including any specified deployment plans, to the Administration Server before distribution. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server’s upload directory prior to distribution.
|
|
|
|
Identifies the deployment as a shared J2EE library or optional package. You must include the
-library option when deploying or distributing any J2EE library or optional package. See Deploying Shared Java EE Libraries and Dependent Applications.
|
|
Specification version of a J2EE library or optional package. This option can be used only if the library or package does not include a specification version in its manifest file.
-libversion can be used only in combination with -library . See Registering Libraries with WebLogic Server.
|
|
Implementation version of a J2EE library or optional package. This option can be used only if the library or package does not include a implementation version in its manifest file.
-libimplversion can be used only in combination with -library . See Registering Libraries with WebLogic Server.
|
|
Task identifier of a running deployment task. You can specify an identifier with the distribute,
deploy, redeploy, start, or undeploy commands, and use it later as an argument to the cancel or list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.
|
The distribute command operates similar to deploy, but WebLogic Server does not start the application or module on target servers. See the examples links for Deploy
command for more information.
Lists the deployment names for applications and stand-alone modules deployed, distributed, or installed to the domain.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-listapps
[Common Arguments]
See Displaying Version Information for Deployed Applications.
Displays the status of deployment tasks currently running in the domain.
java [SSL Arguments] weblogic.Deployer Connection Arguments
[User Credentials Arguments] <-list | -listtask> [task_id
]
[Common Arguments]
See Managing Long-Running Deployment Tasks.
Redeploys a running application or part of a running application.
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-redeploy [[-name]deployment_name
] {-sourcefile
|filelist
}
[-planfile
] [-targetstarget_list
] [-submoduletargetstarget_list
]
[-upload]
[-delete_files]
[-retiretimeoutseconds
] [-idtask_id
]
[-rmiGracePeriodseconds
]
[Common Arguments]
When used with the
redeploy command, the -source option specifies the location of new deployment files to redeploy, for example, when updating an application to a new version.
To specify multiple files for a partial redeployment, omit the
-source option and supply only a filelist .
|
|||||
One or more files to redeploy. If the
filelist specifies multiple files, the redeployment is treated as a partial redeployment of the specified files.
|
|||||
When redeploying an application, the
-plan option allows you to specify an updated configuration to use during the redeployment. If the revised deployment plan contains changes to resource bindings, WebLogic Server attempts to redeploy a new version of the application alongside an older version. See Updating the Deployment Configuration for an Application.
|
|||||
The
target_list argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1> ). This enables you to redeploy different modules of an Enterprise Application to different servers or clusters.
|
|||||
JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|||||
Transfers the specified deployment files, including deployment plans and alternate deployment descriptors, to the Administration Server. Use this option when you are on a remote machine and you cannot copy the deployment files to the Administration Server by other means. The application files are uploaded to the WebLogic Server Administration Server’s upload directory prior to distribution and deployment.
|
|||||
Removes static files from a server’s staging directory.
delete_files is valid only for unarchived deployments, and only for applications deployed using -stage mode. You must specify target servers when using this option, as shown in the following example:
java weblogic.Deployer -adminurl http://myserver:7001 -username weblogic
delete_files only removes files that WebLogic Server copied to the staging area during deployment. If you use the delete_files option with an application that was deployed using either -nostage or -external_stage mode, the command does not delete the files.
|
|||||
Number of seconds before WebLogic Server retires the currently-running version of this application or module. See Redeploying a New Version of an Application.
|
|||||
Task identifier of a running deployment task. You can specify an identifier with the deploy, redeploy
, or undeploy commands, and use it later as an argument to the cancel or list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.
|
See the following sections for examples of using the redeploy command:
Makes a stopped (inactive) application available to clients on target servers. The start command does not redistribute deployment files to target servers. Optionally, with the adminmode option, starts the application in Administration mode, which makes it available only via a configured Administration channel. In order to issue a start
command, the files must already be available through a deploy or distribute
command.
Note: | The activate command, an alias for start, is deprecated. |
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-start [-adminmode] [-name]deployment_name
[-appversionversion
] [-planversionversion
]
[-targetstarget_list
] [-submoduletargetstarget_list
]
[-retiretimeoutseconds
]
[-idtask_id
]
[Common Arguments]
The
target_list argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1> ). This enables you to deploy different modules of an Enterprise Application to different servers or clusters.
|
|
JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Number of seconds before WebLogic Server retires the currently-running version of this application or module. See Redeploying a New Version of an Application.
|
|
Task identifier of a running deployment task. You can specify an identifier with the distribute,
deploy, redeploy, start, or undeploy commands, and use it later as an argument to the cancel or list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.
|
See the following sections for examples of using the start command:
Makes an application inactive and unavailable administration and client requests. All of the application’s staged files remain available on target servers for subsequent start, deploy, redeploy, or undeploy actions. Optionally, choose to make the application unavailable to client requests by placing it in Administration mode with the adminmode option. While in Administration mode, the application be accessed only through a configured Administration channel.
Note: | The deactivate command, an alias for stop, is deprecated. |
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-stop [-adminmode] [-name]deployment_name
[-appversionversion
] [-planversionversion
]
[-targetstarget_list
] [-submoduletargetstarget_list
]
[-ignoresessions] [-graceful] [-rmiGracePeriodseconds
]
[-idtask_id
]
[Common Arguments]
The
target_list argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to deploy different modules of an Enterprise Application to different servers or clusters.
|
|
JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Stops the application after existing HTTP clients have completed their work. If you do not specify the
-graceful option, WebLogic Server immediately stops the application or module. See
Taking a Production Application Offline.
|
|
Task identifier of a running deployment task. You can specify an identifier with the distribute, deploy, redeploy, start, stop, or undeploy commands, and use it later as an argument to the cancel or list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.
|
See Stopping an Application to Restrict Client Access.
Stops the deployment unit and removes staged files from target servers.
Note: | The REMOVE command, an alias for undeploy, is deprecated. |
WARNING: | When you undeploy an application that contains application-scoped resources, the resources are deleted along with the application, which can potentially cause abandoned transactions or lost messages as a result of deleted JMS destinations. For more information, see Unregister Resource Grace Period in Programming WebLogic JTA. |
WARNING: | You should only undeploy applications that you are certain you want to completely remove; to temporarily stop client access to applications, use the stop command, described in Stop, instead. |
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-undeploy [-name]deployment_name
[-appversionversion
] [-planversionversion
]
[-targetstarget_list
] [-submoduletargetstarget_list
]
[-graceful] [-ignoresessions] [-rmiGracePeriodseconds
]
[-idtask_id
]
[Common Arguments]
|
|||
See Using Sub-Module Targeting with JMS Application Modules and
Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS.
|
|||
Stops the application after existing HTTP clients have completed their work. If you do not specify the
-graceful option, WebLogic Server immediately stops the application or module. See
Taking a Production Application Offline.
|
|||
Task identifier of a running deployment task. You can specify an identifier with the distribute,
deploy, redeploy, start, stop, or undeploy commands, and use it later as an argument to the cancel or list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.
|
See the following sections for examples of using the undeploy command:
Updates an application’s deployment plan by redistributing the plan files and reconfiguring the application based on the new plan contents.
Note: | update cannot be used to update an application’s resource bindings. To update the resource bindings for an application, you must use the Redeploy command. |
java [SSL Arguments] weblogic.Deployer
Connection Arguments [User Credentials Arguments]
-update -plan deployment_plan [-name]deployment_name
[-appversionversion
] [-planversionversion
]
[-targetstarget_list
] [-submoduletargetstarget_list
]
[-upload] [-idtask_id
]
[Common Arguments]
Deployment plan to use for updating the application’s configuration. The specified deployment plan must be valid for the application’s target servers. For example, the plan cannot contain null variables for required resources unless those resources were previously defined in the associated desrciptors.
|
|
Targets on which to distribute, deploy, redeploy, undeploy, start, or stop the application or module.
The
target_list argument is a comma-separated list of the target servers, clusters, or virtual hosts. Each target may be qualified with a J2EE module name (<module1>@<server1>). This enables you to deploy different modules of an Enterprise Application to different servers or clusters.
|
|
JMS Server targets for resources defined within a JMS application module. See Using Sub-Module Targeting with JMS Application Modules and Using WLST to Manage JMS Servers and JMS System Resources in Configuring and Managing WebLogic JMS. |
|
Task identifier of a running deployment task. You can specify an identifier with the distribute, deploy, redeploy, update, start, stop, or undeploy commands, and use it later as an argument to the cancel or list commands. Make sure that the identifier is unique to all other running deployment tasks. The system automatically generates a unique identifier if you do not specify one.
|
See Updating an Application to Use a Different Deployment Plan.
This section demonstrates an application’s config.xml
file and the corresponding weblogic.Deployer
command to deploy the application.
The application’s config.xml
file would contain:
<AppDeployment
Name="dd-remote-cluster"
SourcePath="./udd-debug-deployment-on-remote-cluster-jms.xml"
Targets="mycluster">
<SubDeployment Name="RemoteCluster" Targets="mycluster"/>
<SubDeployment Name="D1C2S2" Targets="D1C2S2"/>
<SubDeployment Name="RemoteClusterServers" Targets="D1C2S1,D1C2S2"/>
<SubDeployment Name="RemoteClusterJMSServers"
Targets="RemoteJMSServer1,RemoteJMSServer2"/>
<SubDeployment Name="RemoteQueue1" Targets="RemoteJMSServer1"/>
</AppDeployment>
The weblogic.Deployer
-deploy
command to deploy the application would be:
java weblogic.Deployer -adminurl t3://MySystem:10000 -username system
-password system -name dd-remote-cluster
-deploy "config\jms\udd-debug-deployment-on-remote-cluster-jms.xml"
-targets mycluster -submoduletargets RemoteCluster@mycluster,
D1C2S2@D1C2S2, RemoteClusterServers@D1C2S1,
RemoteClusterServers@D1C2S2, RemoteClusterJMSServers@RemoteJMSServer1,
RemoteClusterJMSServers@RemoteJMSServer2, RemoteQueue1@RemoteJMSServer1