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:
...
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 4G o 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. |
...
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.
Create WebLogic Project using Blueprint
...
Scroll through this guide to fill in the blueprint properties. It is a best practice to name the Project with the same name as the SOA Composite, a FlexDeploy property (ProjectName and FD_PROJECT_NAME) will be automatically set and can be utilized during the configuration.
...
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 ). |
...
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 will be auto updated to HRWLSConfigurations since it takes the value same as Application Nameis HRWLSConfigurations.
The Folder path is auto-updated to FlexDeploy/WebLogic/ and click on “Create”
Click Create.
...
We can see the Folder hierarchy on the top of the project.
...
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.
...
We're going to be creating WebLogic datasources, and more often than not require a password, 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.
...
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.