Oracle WebLogic Resources
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 Admins 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. When logged into the FlexDeploy, you will see the Home page. Click on the + icon on the top and click “Create Project” to create a new project.
The screen displays the list of blueprints technologies supported by the FlexDeploy. Select the blueprint from the list or you can search for the blueprint in the search filter present in the top. 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 for 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 environment independent name for SOA install (eg. SOA, SOAHR ). |
The Build and Deploy options are auto-selected.
Source Control
Click on 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 needs to comply with their 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 password for GIT password. Enter the credential Name which is unique name to identify the password. In the secret text, enter the password and click on Save.
After saving the credential, click on Save again on the SCM instance. Do a Test Connection. The green color ticket mark will show that the connection is successful.
Enter the sparse checkout folder value, if you only want to check out part of the repository.
Gather Build and Deployment information
Enter values for any workflow properties which are required for the build and deploy. In the image below, no properties are required for this build. Select the target endpoint that the build and deploy should execute on. Click on “Confirm”.
Target Properties
Property Name | Values for this Tutorial | Description |
---|---|---|
WebLogic Domain Directory | locate this value from your server. | The WebLogic Domain Directory for managed servers. |
WebLogic Home Directory | locate this value from your server. | Weblogic Home Directory. Subfolders such as ‘common’, ‘modules’, and ‘server’. |
Domain Name | soa_domain | The WebLogic Domain Name. |
Oracle MiddleWare Home (MW_HOME) | locate this value from your server. | The oracle middleware home (which has subfolders such as oracle_common, wlserver, coherence*, etc.) For example: /u01/oracle/products/fmw |
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. |
The Project Name is HRWLSConfigurations.
The Folder path is auto-updated to FlexDeploy/WebLogic
Click Create.
We can see the Folder hierarchy on the top of the project.
Summary
General Configuration
Build and Deploy Workflows
Source Control
Branch Name
Change the branch name to match the git repositories branch name. Click on Save.
Target Properties
Select Topology from the menu and then select Topology Overview from the left menu. You will see a table that has Instances as the rows and Environments as the columns with colored circles representing the Environment Instance. Color coding represents:
RED - no required properties are set and/or the Endpoint is not configured
YELLOW - some of the required properties are set and/or the Endpoint is not configured
GREEN - all required properties are set and the Endpoint is configured
Selecting the GREEN circle for DEV will display the configurable properties/Endpoint and allows for the configuration of the properties.
Build Execution
FlexDeploy is configured with everything that is required to execute a build and deploy request for the ADF application, we can 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, the environments that had the Build Environment checkbox will appear in the dropdown.
select the SCM Branch that was configured on the project, this will be pre-populated if there is only one configured 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 successful.
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 steps tab in order to view the workflow steps. Click on the link to view the plugin logs.
Before deploying the properties artifact to the environment, we will define any Workflow Properties we want to use. Click on back and open the configuration screen. Beside the deploy workflow, click on the arrow to navigate to the workflow screen.
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 value 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 Main tab of the Workflow
Under Workflow Properties, choose open the Add men.
From the Add menu, we can add an existing property, or create a new one. Select New Property
Properties must each have a unique code, give a meaningful code for the new property
A property display name does not have to be unique and can contain spaces. This is the name that will be displayed on the Environment Instance screen
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 set Encrypted to Yes. This will 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 set to No, because we don't need to encrypt the server name. 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.
Set the newly added Target Properties
Select Topology from the menu and then select Topology Overview from the left menu. You will see a table that has Instances as the rows and Environments as the columns with colored circles representing the Environment Instance and select the YELLOW circle under the DEV environment.
Now the properties artifacts can be deployed to an environment by selecting the 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 create Project Versions.
Select the Environment that the deployment will be executed in.
Select the Deploy Instance, which will be defaulted from the Project configuration. Deployments can happen on multiple instances.
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 instance in the Dev environment, utilizing the SOADEV endpoint. Upon completion of the workflow, the execution status will be successful.
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, click on the link under step
The artifact which can be downloaded
The project and environment instance 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 simply change the configuration as needed and be ready to build/deploy in minutes.
- style