Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
stylenone

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.
It is assumed that you are using managed server or cluster of same name in various environments.

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 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.

...

The assumption is that you have FlexDeploy installed and ready for use. When logged into the FlexDeploy, you will see the Home page. Click After logging in to FlexDeploy, click on the + icon on the top and click “Create Project” to create a new project Create Project.

...

The screen displays the list of blueprints technologies supported by the FlexDeploy blueprints. Select the blueprint from the list or you can search for the blueprint it in the search filter present in the topinput. In our case, we will select the Oracle WebLogic Configurations blueprint.

...

Scroll through this guide to fill in the blueprint properties. Name the Project well to describe what configurations you are managing.

...

Property Name

Value for this tutorial

Description

Project Name

HRWLSConfigurations

The name for of the project for WebLogic Configurations.

WebLogic COnfigs 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  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  The codes are available as variables to shell and Groovy scripts, and therefore needs need to comply with their limitations. 

Source Control Type

Yes

Type of Source Control Management Systemsource control management system.  We will use Git for this tutorial.

Supported Source Control Management Systems source control management systems are:

  • Subversion

  • Git

  • Microsoft TFS Version Control

  • PVCS

  • CVS

  • Perforce

  • File System

Description

No

 

SCM Properties

Yes

The remaining properties are specific to the selected SCM.

For Git:

  • Git URL

  • Git User

  • Git Password

  • Git Timeout (optional)

  • Git File Content (optional)

  • Git File Content Commit URL (optional)

...

Click on Create New Credential to create a new credential password for your GIT password or API token. Enter the credential Name name, which is a unique name to identify the password. In the secret text, enter the password and /API token, then click on Save.

...

Next, do a Test Connection. The green color ticket mark will show that the connection is successful.

...

Enter , 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 only 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.   In the image below, no No properties are required for this build. Select the target endpoint that the build and deploy should execute on. Click on “Confirm”Confirm.

...

Target Properties

Property Name

Values for this Tutorial

Description

WebLogic Domain Directorylocate this value from your server.

/u01/oracle/config/domains/soa_domain

The WebLogic Domain Directory for managed servers.

WebLogic Home Directorylocate this value from your server.

/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)

locate this value from your server./u01/oracle/products/fmw

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.

Confirmation Popup

 The The Project Name 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 folder hierarchy on the top of the projectProject.

...

Summary

Review all Project details below and adjust as necessary.

General Configuration

...

Build and Deploy Workflows

...

Change the branch name to match the git repositories branch namebranch you want to build from in your Git repository. Click on 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 Environment row for DEV Development allows modifying the Endpoint and properties.

...

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 build request form will appear and we need to:

  1. select Select the environment Environment we want to build the application in, the environments that had the Build Environment checkbox . All active environments that have been marked as build Environments will appear in the dropdown.

  2. select Select the SCM Branch branch that was configured on the project, this will be pre-populated if there is only one configured Branch.submit the request, this . This will be defaulted to the main branch.

  3. 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  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 the Steps tab in order to view the workflow steps. Click on the link , 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 workflow properties we want to use. Click on back and to open the configuration screen Configuration tab. Beside the deploy workflow, click on the arrow to navigate to the deploy 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 values that may change across environments (e.g. server names).

We'll start by creating a Workflow Property workflow property for the datasource password.

  1. Go back to the Main Properties tab of the Workflow

  2. Under Workflow Properties, choose open the Add men.

  3. From the Add menu, we can add an existing property, or create a new one. Select New Property

  4. Properties must each have a unique code, give a meaningful code Click the Create button to add a new property

  5. Provide a unique code for the new property

  6. Provide a name for the 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

  7. Mark the property as required

  8. Select the property scope, this . This defines where the property will be configured. We're using Target because this property will be different for each environment

  9. This property is a password, so we'll set Encrypted to Yescheck 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 set to No, because we don't need to encrypt the server nameencrypted 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 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.

...

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 an the Development environment by going back to the Project and selecting the deploy icon as shown in the below screenshot.Image Removed

...

The Deploy Request Form deploy request form will appear and we need to:

  1. Select the Project Version. The form will default to the latest Project Version but the dropdown will contain all previously create created Project Versions.

  2. Select the Environment that the deployment will be executed in.

  3. Select the Deploy Instance, which will be defaulted from the Project configuration.  Deployments Target Group(s). Deployments can happen on multiple instancesTarget Groups.

  4. 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 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

  1. The workflow execution steps

  2. The logs for each workflow step, click on the link under step

  3. The artifact, which can be downloaded

  4. The project Project and environment instance Target property values at the time of execution

...

Now that you have configured FlexDeploy for one WebLogic Configuration, it is extremely easy to add more configurations.  Simply  Simply use the Copy Project feature and a new project will be created with all of the configuration completed already.  Just  Just name the new project and select the appropriate FlexDeploy application.  With  With everything copied, you can simply change make minor adjustments to the configuration as needed and be ready to build/deploy in minutes.