Weblogic

Executing deployments requiring a Weblogic Server.

Weblogic

Introduction to the WebLogic DeployHub Integration

The DeployHub WebLogic integration supports a WebLogic deployment using a Post Action at the Component level. This Post Action installs your WebLogic solution binaries (.ear, .jar, and .war files) by loading them into the correct WebLogic target. The process will first send your solution binaries to the the WebLogic Server. The Post Action performs the load into the target.

Creating the Weblogic Action

This process involves the creation of custom Procedures and a Post Action. For more information on creating Procedures and Actions see:

Once downloaded, you will need to Import them into DeployHub as the Procedures. To import these Procedures login to DeployHub and select the Func/Procs. From the list view select Import menu. Select your Domain, such as ‘Global Domain’ and upload the Procedure into the DeployHub.

Step 1 - Download and Import the WebLogic scripts as Procedures

Download the the most current DeployHub WebLogic Procedures from the Ortelius Git Repo. There will be two:

  • WeblogicCredential.re - This Procedure exposes the credential for the Weblogic Deploy Procedure.

  • WeblogicDeploy.re - This Procedure executes Ant against a dynamically created build.xml file to upload the classes to Weblogic.

Step 2 - Create your WebLogic Procedures

Once downloaded, you will need to Import the scripts into DeployHub as Procedures. To import these Procedures navigate to the Func/Procs Menu option on the left hand side of the DeployHub Main Menu panel. This will take you to the Functions and Procedures List View. From the Functions and Procedures List View select the Import option. The Import will bring you to your operating system “file open” dialog box for selecting the WeblogicCredential.re and WeblogicDeploy.re files.

Next, select your “Global,” or highest level, Domain and upload the Procedure into DeployHub. If you select a lower level Sub-Domain you will restrict access. By defining it to your highest level Domain, all Users will be able to see the Procedures. Once you have both imported, you are now ready to create your Action.

Step 3 - Create your Action for the WebLogic Procedure

Once you have imported your WeblogicCredential.re and WeblogicDeploy.re files as Procedures, you can define your WebLogic Action. Navigate to the Actions list view from the Actions menu option on the left hand side of the DeployHub Main Menu panel.

Use the +Add option to create your new Action. In the “Full Domain” field select your “Global” Domain. If you select a lower level Sub-Domain you will restrict access to this Custom Action. By defining it to your highest level Domain, all Users will be able to execute the process regardless of their Sub-Domain.

Name the new Action “WeblogicDeployAction” (no spaces).

Now we are going to customize this Action. On the right hand side, you will see a list of Functions and Procedures you can choose from. Navigate to your Domain to find the WeblogicCredential.re and WeblogicDeploy.re imported Procedures. Drag them onto the area under “Start”. When you drag the WeblogicCredential.re and WeblogicDeploy.re Procedures onto the area under “Start” a pop-up dialog box will open for you to complete the following parameters.

The order should be WeblogicCredential, and then WeblogicDeploy.

At this point the Action is ready to be used by anyone with access (based on Domain and security options). Each Component that uses the Action will need to define specific values. The Action can now be placed into the Post Action field of a Component as part of an Application deployed to a Weblogic region.

WeblogicCredential Parameters

Field Value Description
Credential Name ${WeblogicCredName} Name of the Credential to use for the Weblogic Deployment

WeblogicDeploy Parameters

Field Value Description
AdminUrl ${AdminUrl} Admin url for performing deployment on
WeblogicHome ${WeblogicHome} Home directory for Weblogic
UserName ${$WLUserName} Weblogic user name. This is passed to this Procedure from the WeblogicCredential Procedure.
Password ${$WLPassword} Weblogic password. This is passed to this Procedure from the WeblogicCredential Procedure.
Id ${WeblogicTaskId} Task identifier of a running deployment task
UserConfigFile ${WeblogicConfig} Config file to use
Action ${WeblogicAction} Action to perform
Name ${WeblogicAppName} Name of the application
Targets ${WeblogicTargets} Targets to perform deployment on
Plan ${WeblogicPlan} Deployment plan to use
Library ${WeblogicLibrary} identifies the deployment as a shared J2EE library or optional package
Source ${dep.files} Archive to deploy

Step 4 - Set Your Action to your Component

Place the Action within the Component’s Post Action field. When Application deploys its artifacts to the Weblogic server, and the Post Action at the Component level performs the installation into Weblogic Target.

For more information see:

Step 5 - Set Your Component Attributes_

The following variables must be added to the Attributes Section for all Components using the WeblogicDeployAction Post Action. The Attributes section can be found on the Component Dashboard. Use the +Add option in this section to add a row for the variable. You must use Save to commit the row to the table:

Variable Name Value Description
WeblogicCredName Name of the Credential to use for the Weblogic Deployment
AdminUrl Admin url for performing deployment on
WeblogicHome Home directory for Weblogic
WeblogicTaskId Task identifier of a running deployment task
WeblogicConfig Config file to use
WeblogicAction Action to perform
WeblogicAppName Name of the application
WeblogicTargets Targets to perform deployment on
WeblogicPlan Deployment plan to use
WeblogicLibrary identifies the deployment as a shared J2EE library or optional package