WebLogic plugin

35 minute readExtensibilityDeveloper productivity

Use the WebLogic plugin to interact with the Oracle WebLogic server for application and server management, interacting or editing existing applications, and deploying new applications. You can start and stop both the managed servers and the administration server using this integration. You can use Jython scripting to create script files or to enter a new embedded file.

Plugin version 4.0.0.2023101919

Revised on October 20, 2023

Overview

CloudBees CD/RO Integration to WebLogic

Use this plugin to interact with the Oracle WebLogic server for application and server management, interacting or editing existing applications, and deploying new applications. You can start and stop both the Managed Servers and the Administration Server using this integration. You can use Jython scripting to create script files or to enter a new embedded file.

Integrated Version

This plugin was developed and tested against following WebLogic Server Versions:

  • 12c (12.2.1.1.0) on Windows

  • 12c (12.2.1.1.0) on Linux

  • 11g (10.3.6.0) on Windows

  • 11g (10.3.6.0) on Linux

Updated Perl version required

This plugin uses an updated version of Perl, cb-perl shell (instead of legacy ec-perl). To run the plugin, a CloudBees CD/RO agent version 10.3 or later is required.

Plugin configurations

Plugin configurations are sets of parameters that can be applied across some, or all, of the plugin procedures. They can reduce the repetition of common values, create predefined parameter sets, and securely store credentials. Each configuration is given a unique name that is entered in the designated parameter for the plugin procedures that use them.

Creating plugin configurations

To create plugin configurations in CloudBees CD/RO, complete the following steps:

  1. Navigate to DevOps Essentials  Plugin Management  Plugin configurations.

  2. Select Add plugin configuration to create a new configuration.

  3. In the New Configuration window, specify a Name for the configuration.

  4. Select the Project that the configuration belongs to.

  5. Optionally, add a Description for the configuration.

  6. Select the appropriate Plugin for the configuration.

  7. Configure the parameters per the descriptions below.

Configuration procedure parameters

Parameter Description

Configuration name

WebLogic URL

URL of WebLogic Server (must include protocol, server and port). Two protocols are supported: t3 and t3s, e.g. t3://weblogic:7001.

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

JAVA_HOME

JAVA_HOME environment variable, i.e. path to bin, where Java executable is located. This variable will be set every time procedure runs for the job environment.

The behaviour of the procedure can become unpredictable, if the same resource is shared across multiple EF instances. If this option is set, JAVA_VENDOR should be also set.

JAVA_VENDOR

JAVA_VENDOR environment variable, use it to specify Java vendor. This variable will be set every time procedure runs for the job environment.

The behaviour of the procedure can become unpredictable, if the same resource is shared across multiple EF instances. If this option is set, the option JAVA_HOME should be also set.

MW_HOME

MW_HOME environment variable, use it to specify WebLogic Home directory. This variable will be set every time procedure runs for the job environment.

The behaviour of the procedure can become unpredictable, if the same resource is shared across multiple EF instances.

Login as

Username and password to connect to WebLogic server.

Enable named sessions?

If selected, each WebLogic edit session will have unique name assigned. Named sessions are not supported by WebLogic server prior to version 12. Defaults to false.

Test connection?

Check if connection should be established during config creation to validate credentials.

Test connection resource

A resource which is used for the testing connection.

Debug level

Debug level, higher debug level - more debug messages.

On debug level 10 and more, passwords will be revealed in a procedure logs.Verbosity level of output.

Plugin procedures

CreateCluster

Create a cluster.

CreateCluster parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary. NOTE: You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Cluster name

Name of the cluster to be created.

Multicast Address

Multicast IP Address.

Multicast Port

Multicast Port.

CreateDomain

Create a domain

CreateDomain parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

User Credentials

Credentials of the user (Username and password).

Domain Template

Name and location of the domain template from which you want to create a domain.

Domain Directory

Name of the directory to which you want to write the domain configuration information.

Listen Address

Server Listen Address.

Listen Port

Server Listen Port.

CreateManagedServer

Create a Managed Server.

CreateManagedServer parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Server name

Name of the managed server to be created.

Listen Address

Server Listen Address.

Listen Port

Server Listen Port.

AddServerToCluster

Add server to cluster.

AddServerToCluster parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Server name

Name of the server which is to be added to cluster.

Cluster name

Name of the cluster in which server is to be added.

DeleteCluster

Delete a cluster.

DeleteCluster parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Cluster name

Name of the cluster to be deleted.

DeleteManagedServer

Delete a Managed Server.

DeleteManagedServer parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Server name

Name of the managed server to be deleted.

StartAdminServer

Starts a WebLogic Admin Server

StartAdminServer parameters

Parameter Description

Script Location

Absolute path of the start WebLogic script, including filename and extension. For example, /path/to/startWebLogic.cmd. (Required)

Admin Server Instance name

Instance name of the Admin Server to start. For example, AdminServer. (Required)

Config name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Maximum elapsed time

Defines the maximum time in seconds that the job will try to check into the server. Note that the step has a Time Limit property, so if this property is set to less than the parameter it will abort the step early. Blank implies no wait time (URL only checked one time).

StartCluster

Starts a cluster

StartCluster parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Cluster name

Name of the cluster to start. For example, mycluster.

Timeout

Timeout in seconds for cluster start.

StartManagedServer

Starts a WebLogic Managed Server

StartManagedServer parameters

Parameter Description

Script Location

Absolute path of the start server script, including filename and extension. For example, /path/to/startManagedServer.cmd. (Required)

Instance name

Instance name of the Managed Server to start. (Required)

Config name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Admin Server URL

URL from the Admin Server (including protocol and port). (Required)

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Maximum elapsed time

Defines the maximum time in seconds that the job will try to check into the server. Note that the step has a Time Limit property, so if this property is set to less than the parameter it will abort the step early. Blank implies no wait time (URL only checked one time).

StartNodeManager

Start the WebLogic Node Manager

StartNodeManager parameters

Parameter Description

Node Manager Script Location

Absolute path of the startNodeManager script, including filename and extension. For example, /Oracle/Middleware/wlserver_10.3/server/bin/startNodeManager.cmd.

Maximum elapsed time

Defines the time in seconds that the job wait to test the status of the node manager. Note that the step has a Time Limit property, so if this property is set to less than the parameter it will abort the step early. Blank implies no wait time (URL only checked one time).

StopAdminServer

Stops a WebLogic Admin Server

StopAdminServer parameters

Parameter Description

Script Location

Absolute path of the stop WebLogic script, including filename and extension. For example, /path/to/stopWeblogic.cmd. (Required)

Config name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

StopCluster

Stops a cluster

StopCluster parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Cluster name

Name of the cluster to stop. For example, mycluster.

Shutdown Timeout

Timeout in seconds for cluster shutdown.

Force Shutdown?

Value specifying whether WLST should terminate a server instance or a cluster without waiting for the active sessions to complete. This argument defaults to false, indicating that all active sessions must complete before shutdown.

Ignore Sessions?

Value specifying whether WLST should drop all HTTP sessions immediately or wait for HTTP sessions to complete or timeout while shutting down. This argument defaults to false, indicating that all HTTP sessions must complete or timeout.

StopManagedServer

Stops a WebLogic Managed Server

StopManagedServer parameters

Parameter Description

Script Location

Absolute path of the stop server script, including filename and extension. For example, /path/to/stopManagedServer.cmd. (Required)

Instance name

Instance name of the Managed Server to stop. (Required)

Config name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

StopNodeManager

Stop the WebLogic Node Manager

StopNodeManager parameters

Parameter Description

Config name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Host name

Host name of Node Manager. This argument defaults to localhost.

Node Manager Port

Port number of Node Manager. This argument defaults to a value that is based on the Node Manager server type, for plain type, defaults to 5556. For rsh type, defaults to 514. For ssh type, defaults to 22. For ssl type, defaults to 5556.

Domain name

Name of the domain that you want to manage. This argument defaults to mydomain.

Domain Path

Path of the domain directory to which you want to save the Node Manager secret file (nm_password.properties) and SerializedSystemIni.dat file. This argument defaults to the directory in which WLST was started.

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Node Manage Type

Type of the Node Manager server. This argument defaults to ssl.

Maximum elapsed time

Defines the time in seconds that the job wait to test the status of the node manager. Note that the step has a Time Limit property, so if this property is set to less than the parameter it will abort the step early. Blank implies no wait time (URL only checked one time).

SuspendServer

Suspends the provided server

SuspendServer parameters

Parameter Description

Configuration

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Server name

Name of the server to suspend. (Required)

Ignore Sessions

Boolean value specifying whether WLST should drop all HTTP sessions immediately or wait for HTTP sessions to complete or time out while suspending. This argument defaults to false, indicating that HTTP sessions must complete or time out.

Timeout

Time (in seconds) the WLST waits for the server to complete in-process work before suspending the server. This argument defaults to 0 seconds, indicating that there is no timeout.

Force

Boolean value specifying whether WLST should suspend the server without waiting for active sessions to complete. This argument defaults to false, indicating that all active sessions must complete before suspending the server.

Block

Boolean value specifying whether WLST blocks user interaction until the server is started. This argument defaults to false, indicating that user interaction is not blocked. In this case, WLST returns control to the user after issuing the command and assigns the task MBean associated with the current task to a variable that you can use to check its status. If you are importing WLST as a Jython module, as described in Importing WLST as a Jython Module, block is always set to true.

ResumeServer

Resumes the provided server

ResumeServer parameters

Parameter Description

Configuration

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Server name

Name of the server to resume. (Required)

Block

Boolean value specifying whether WLST should block user interaction until the server is resumed. This argument defaults to false, indicating that user interaction is not blocked. In this case, WLST returns control to the user after issuing the command and assigns the task MBean associated with the current task to a variable that you can use to check its status. If you are importing WLST as a Jython module, as described in Importing WLST as a Jython Module, block is always set to true.

DeployApp

Deploys or redeploys an application or module

DeployApp parameters

Parameter Description

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Application name

Deployment name to assign to a newly-deployed application or standalone module. For example, webapp.

Is library?

Select this parameter if the application is library.

Application Path

Absolute path of the application to deploy. For example, /path/to/webapp.war or c:/mydir/webapp.war.

Targets

Targets on which to deploy the application or module (comma-separated list of the target servers, clusters, or virtual hosts).

Stage mode

Staging mode for the application you are deploying.

Possible values are: stage, nostage, and external_stage.

If not provided, default stage mode will be used.

Refer to Oracle documentation for details.

Deployment plan path

Path to read a deployment plan (if there is one) or to save a new one from the Deployment plan content parameter.

Plan version

Deployment plan version.

Deployment plan content

A WebLogic Server deployment plan is an XML document that you use to configure an application for deployment to a specific WebLogic Server environment.

Overwrite deployment plan?

If selected, deployment plan will be overwritten, if deployment plan content has been provided and deployment plan file already exists.

This option defaults to false.

Additional options

Comma-separated list of deployment options, specified as name-value pairs.

Refer to WLST deploy documentation (The options, which are not included in this form).

Archive version

Archive version number.

Is used for production redeployment, specifies the application version which is going to be retired, while versionIdentifier specifies a new version.

Archive version stays along with the new one.

Retire gracefully?

Retirement policy to gracefully retire an application only after it has completed all in-flight work.

This policy is only meaningful for stop and redeploy operations and is mutually exclusive to the retire timeout policy.

Retire timeout

Time (in seconds) WLST waits before retiring an application that has been replaced with a newer version.

This option defaults to -1, which specifies graceful timeout.

Version identifier

Version identifier that is being used by production redeployment. A string, that uniquely identifies the current application version across all versions of the same application.

Upload?

Optional. Boolean value specifying whether the application files are uploaded to the WebLogic Server Administration Server’s upload directory prior to deployment.

Use this option when you are on a different machine from the Administration Server and you cannot copy the deployment files by other means.

This option defaults to false.

Remote?

Boolean value specifying whether the operation will be remote from the file system that contains the source. Use this option when you are on a different machine from the Administration Server and the deployment files are

already at the specified location where the Administration Server is located. This option defaults to false.

UpdateAppConfig

Update a configuration of an already deployed app.

UpdateAppConfig parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Application name

Name of the application which is to be updated.

Application version

Application version to update.

Plan Path

Absolute path to the new deployment plan file.

Deployment Plan Content

Content of the deployment plan. Required, if the file mentioned in Plan Path doesn’t exist or empty.

Overwrite deployment plan?

If checked, deployment plan will be overwritten, if deployment plan content has been provided and deployment plan file already exists.

This option defaults to false.

Additional options

Comma-separated list of deployment options, specified as name-value pairs. For example: block=false,createPlan=true

UndeployApp

Stops the deployment unit and removes staged files from target servers.

UndeployApp parameters

Parameter Description

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Application name

Name of the application to undeploy. For example, webapp.

Retire Gracefully? (DEPRECATED)

Retirement policy to gracefully retire an application only after it has completed all in-flight work.

This policy is only meaningful for stop and redeploy operations and is mutually exclusive to the retire timeout policy.

*This parameter is DEPRECATED and will be removed in the next release.*

Application version

Specifies a single application version to undeploy. See Requirements and Restrictions for Production Redeployment for reference.

Additional options

Additional options for undeploy API call. (See deploy function for reference).

Give Up on Error?

If checked, any ambiguous situation will be treated as fatal error. Defaults to false.

UpdateApp (DEPRECATED)

Update an already deployed app. (DEPRECATED)

UpdateApp parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Application name

Name of the application which is to be updated.

Plan Path

Name of the new deployment plan file. The filename can be absolute or relative to the application directory.

Additional options

Comma-separated list of deployment options, specified as name-value pairs.

RunDeployer

Runs weblogic.Deployer in a free-mode.

RunDeployer parameters

Parameter Description

Command To Use

The weblogic.Deployer command to use. For example, -deploy, -undeploy, -stop or -listapps.

Java Parameters

Java parameters to pass. For example, -verbose.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Additional Commands

Additional commands to be entered for weblogic.Deployer.

Java Absolute Path

Absolute path of Java. For example, java, java.exe or /path/to/java.

Application name

Name of the application to manage. For example, webapp.

setDomainEnv Script Absolute Path

Absolute path of the setDomainEnv script, including filename and extension. For example, /path/to/setDomainEnv.sh or setDomainEnv.cmd.

weblogic jar Absolute Path

Absolute path of the WebLogic jar, needed to run the weblogic.Deployer in a free-mode. In Windows environments, if the jar is already added to the environment classpath variable, then is not necessary to include it. In Linux environments, you must include the path. For example, /path/to/weblogic.jar or /root/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar.

StartApp

Starts an application

StartApp parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Configuration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Application name

Name of the application to start. For example, webapp.

Application version

Specific application version to be started.

Additional options

Additional options for startApplication API. (See deploy function for reference).

StopApp

Stop an application

StopApp parameters

Parameter Description

WLST script absolute path

Absolute path to WLST. For example, /path/to/wlst.cmd or wlst.sh. Setting this path will make applying the equal param in procedures unnecessary.

You need to install the agent to the machine that has access to the WLST script at least.

Application nameConfiguration name

Name of the configuration to be used. URL, port, and credentials are retrieved from the given configuration.

Application name

Name of the application to start. For example, webapp.

Application version

Specific application version to be stopped.

Additional options

Additional options for stopApplication API. (See deploy function for reference).

CreateOrUpdateDatasource