Oracle WebLogic Resources
- 1 Objective
- 1.1.1 Checklist
- 1.2 Create WebLogic Project using Blueprint
- 1.2.1 General Configuration
- 1.2.1.1 Project Info
- 1.2.2 Source Control
- 1.2.2.1 Inputs Info
- 1.2.3 Gather Build and Deployment Information
- 1.2.3.1 Target Properties
- 1.2.4 Confirmation Popup
- 1.2.5 Summary
- 1.2.5.1 General Configuration
- 1.2.5.2 Build and Deploy Workflows
- 1.2.5.3 Source Control
- 1.2.5.4 Branch Name
- 1.2.5.5 Target Properties
- 1.2.6 Build Execution
- 1.2.1 General Configuration
Objective
You have a given WebLogic Resource properties file stored in a Git repository. This properties file will define several data sources we want to deploy to a WebLogic server. The WebLogic servers we will be using in this tutorial are running Oracle SOA Suite, but this tutorial can be used for all WebLogic servers, regardless of installed technology. The goal of the tutorial is to automate the deployment of the configuration across multiple environments. This automation will include:
Cloning the properties from a Git repository
Deploying the configuration to multiple environments
Utilizing property replacement to adjust environment-specific passwords as deployments progress through the environments
We will walk through each of the FlexDeploy features that will be created/configured to accomplish this goal and have the resources deployed in a very short amount of time.
The tutorial does not cover every feature or configuration option available in FlexDeploy.
Checklist
Checklist | Description |
---|---|
WebLogic Admin User | Admin user name for WebLogic server. |
WebLogic Admin Password | Weblogic Admin User password for WebLogic server. |
Oracle WebLogic Home (WL_HOME) | WebLogic Home Directory. (e.g. /u01/oracle/products/fmw/wlserver) |
WebLogic Domain Name | WebLogic Domain Name. |
WebLogic Admin Listener Address | The listener address of the WLS admin server. (e.g. localhost) |
WebLogic Application Name | The name of the application (EAR or WAR) to be deployed. |
WebLogic Server or Cluster Name(s) | WebLogic Server or Cluster name to deploy application. |
WebLogic Domain Directory | Weblogic Domain Directory. (e.g. /u01/oracle/config/domains/soa_domain) |
WebLogic Node Manager Host | The host for Node Manager connection. |
WebLogic Node Manager Port | The port for the WLS Node Manager. |
WebLogic Node Manager User | The user id for the WLS Node Manager. |
WebLogic Node Manager Password | The password for the user id of WLS Node Manager. |
Hostname for WebLogic Admin Server | The hostname for WebLogic Admin Server |
User Id which runs Admins Server (e.g. Oracle) | FlexDeploy will connect to target server using this user. |
Password for user Id |
|
JDK Home for Admin Server Node | Recommended JDK used by Oracle WebLogic. |
Base Directory (working directory with at least 4GB space) | Minimum of 4GB space on each WebLogic node. Avoid /tmp and /var/tmp as Linux processes may clean up files automatically and conflict with FlexDeploy. |
Create WebLogic Project using Blueprint
The assumption is that you have FlexDeploy installed and ready for use. After logging in to FlexDeploy, click on the + icon on the top and click Create Project.
The screen displays the list of technologies supported by FlexDeploy blueprints. Select the blueprint from the list or search for it in the search input. In our case, we will select the Oracle WebLogic Configurations blueprint.
General Configuration
Scroll through this guide to fill in the blueprint properties. Name the Project well to describe what configurations you are managing.
Project Info
Property Name | Value for this tutorial | Description |
---|---|---|
Project Name | HRWLSConfigurations | The name of the project for WebLogic Configurations. |
WebLogic Configs Description | Order | Brief description of the project for WebLogic Configurations. |
Oracle WebLogic Install Name | SOAHR | This value will provide an environment independent name for SOA install (eg. SOA, SOAHR ). |
The Build and Deploy options are auto-selected.
Source Control
Click on the source repository dropdown. If you have already created a connection to your source code repository, select it from the list.
Otherwise, add one by clicking on Create new Source Repository.
Inputs Info
Field | Required | Description |
---|---|---|
Name | Yes | A descriptive name for this SCM instance. |
Code | Yes | A technical code for the instance, without any spaces. The codes are available as variables to shell and Groovy scripts, and therefore need to comply with limitations. |
Source Control Type | Yes | Type of source control management system. We will use Git for this tutorial. Supported source control management systems are:
|
Description | No |
|
SCM Properties | Yes | The remaining properties are specific to the selected SCM. For Git:
|
We selected the SCM type as GIT. The properties related to the GIT source control management will be displayed on the screen.
Click on Create New Credential to create a new credential for your GIT password or API token. Enter the credential name, which is a unique name to identify the password. In the secret text, enter the password/API token, then click Save.
Next, do a Test Connection. The green color ticket mark will show that the connection is successful, or an error message will be displayed if FlexDeploy is unable to connect. After testing the connection and reviewing all details, click Save on the SCM instance.
Next on the blueprint, enter the sparse checkout folder value. This is only needed if you want to check out only part of the repository.
Gather Build and Deployment Information
Enter values for any workflow properties which are required for the build and deploy. No properties are required for this build. Select the target endpoint that the build and deploy should execute on. Click Confirm.
Target Properties
Property Name | Values for this Tutorial | Description |
---|---|---|
WebLogic Domain Directory | /u01/oracle/config/domains/soa_domain | The WebLogic Domain Directory for managed servers. |
WebLogic Home Directory | /u01/oracle/products/fmw/wlserver | Weblogic Home Directory. Subfolders such as ‘common’, ‘modules’, and ‘server’. |
Domain Name | soa_domain | The WebLogic Domain Name. |
Oracle MiddleWare Home (MW_HOME) | /u01/oracle/products/fmw | The oracle middleware home (which has subfolders such as oracle_common, wlserver, coherence*, etc.) |
Admin Server Listen Address | soalt03.flexagon | The listener address for the WLS Admin Server. |
Admin Server Listen Port | 7001 | The port for the WLS Admin Server. |
Admin User | weblogic | The admin username for the WLS Admin Server. |
Admin Password | locate this value from your WLS admin server. | The admin password for the WLS Admin Server. |
Confirmation Popup
The Project name is HRWLSConfigurations.
The Folder path is auto-updated to FlexDeploy/WebLogic, but can be adjusted as needed.
Click Create.
After creation, the Project is opened automatically. We can see the folder hierarchy on the Project.
Summary
Review all Project details below and adjust as necessary.
General Configuration
Build and Deploy Workflows
Source Control
Branch Name
Change the branch name to match the branch you want to build from in your Git repository. Click Save.
Target Properties
Select Topology from the menu and choose a Target Group on the left. You will see a list of Environments on the right with colored circles representing each Target.
Color coding represents:
RED - The Endpoint is not configured
YELLOW - some of the required properties are not set
GREEN - all required properties are set and the Endpoint is configured
Clicking the Environment row for Development allows modifying the Endpoint and properties.
Build Execution
FlexDeploy is configured with everything that is required to execute a build and deploy request for the ADF application, so we can now execute the first build. On the Project, select the Execution tab and select the Build button.
The build request form will appear and we need to:
Select the Environment we want to build the application in. All active environments that have been marked as build Environments will appear in the dropdown.
Select the SCM branch that was configured on the project. This will be defaulted to the main branch.
Submit the request. This will initiate the Build WebLogic Configurations workflow.
Upon submission, the build workflow is initiated and the workflow steps are executed on the SOA instance in the Dev environment utilizing the SOADEV endpoint. Upon completion of the workflow, the execution status will be shown as successful or failed.
With the successful execution of the build, a few property file artifacts are created, stored in the artifact repository and marked with the Project Version. Every build will generate a new Project Version. The generated properties artifact can be viewed from the Execution Id link and the Artifacts tab.
Navigate to the Steps tab in order to view the workflow steps, and optionally follow the links for each step to view the plugin logs.
Before deploying the properties artifact to the environment, we will define any workflow properties we want to use. Click to open the Configuration tab. Beside the deploy workflow, click on the arrow to navigate to the deploy workflow.
These properties will be replaced in the properties file we check out from Git. This allows us to use a single property file and change it for each environment, rather than having multiple files for every environment. Using these properties inside of the properties files also allows us to build the project once, then deploy those files to each environment without having to build again.
We're going to be creating WebLogic datasources, EIS, and JMS configurations. Some of the values that are required to create them are passwords. It would be much too insecure to store these passwords in plaintext in the properties file we check out from Git. That's where FlexDeploy's workflow properties come in. We can create a property to store the password encrypted in FlexDeploy, then use a placeholder in the file for FlexDeploy to replace with the password during the deployment. This is useful not only for security, but also for any values that may change across environments (e.g. server names).
We'll start by creating a workflow property for the datasource password.
Go back to the Properties tab of the Workflow
Click the Create button to add a new property
Provide a unique code for the new property
Provide a name for the property. A property display name does not have to be unique and can contain spaces
Mark the property as required
Select the property scope. This defines where the property will be configured. We're using Target because this property will be different for each environment
This property is a password, so we'll check encrypted. This will store the property value in encrypted format and keep the value hidden from screens and logs
With the Datasource Password property created, we will also need to create one more property – SOA_TARGET. This property will be used as the target for the datasource FlexDeploy creates. We will create it the same way as the last property, except this time we can leave encrypted unchecked and set the type as Text Field. If you have many plain text values that differ between environments, you can also use folders stored in Git to handle them.
Make sure to save the workflow after adding the properties.
Setting the Newly Added Target Properties
Select Topology from the menu and then find and select your deploy Target Group. Select the DEV Environment to configure the deploy target. Provide values for the newly added properties - DataSource Password and SOA Target.
Now the properties artifacts can be deployed to the Development environment by going back to the Project and selecting the deploy icon as shown in the below screenshot.
The deploy request form will appear and we need to:
Select the Project Version. The form will default to the latest Project Version but the dropdown will contain all previously created Project Versions.
Select the Environment that the deployment will be executed in.
Select the Deploy Target Group(s). Deployments can happen on multiple Target Groups.
Submit the request, which will initiate the Deploy Config Configurations workflow.
Upon submission, the deploy workflow is initiated and the workflow steps are executed on the SOA target group in the Dev environment, utilizing the SOADEV endpoint. Upon completion of the workflow, the execution status will be successful or failed.
The Execution Id is a link to all of the execution data related to each request, such as
The workflow execution steps
The logs for each workflow step
The artifact, which can be downloaded
The Project and Target property values at the time of execution
Congratulations! You have successfully completed the WebLogic Resource tutorial.
Now that you have configured FlexDeploy for one WebLogic Configuration, it is extremely easy to add more configurations. Simply use the Copy Project feature and a new project will be created with all of the configuration completed already. Just name the new project and select the appropriate FlexDeploy application. With everything copied, you can make minor adjustments to the configuration as needed and be ready to build/deploy in minutes.
- style