Oracle ADF

Objective

You have a given ADF application that was developed in JDeveloper and the source code is managed in a GIT repository.  The goal of the tutorial is to automate the deployment of the application across multiple environments.  This automation will include:

  • cloning the ADF application code from a GIT repository

  • compiling and packaging the application into an EAR file

  • deploying the EAR file to multiple environments

We will walk through each of the FlexDeploy features that will be created/configured to accomplish this goal and have the composite deployed in a very short amount of time.

The tutorial does not cover every feature or configuration option available in FlexDeploy.

ADF Build (JDeveloper) Checklist

Checklist

Description

Checklist

Description

JDeveloper Install Home

The JDeveloper installation directory on server with JDeveloper is installed. Build of ADF application requires JDeveloper. Make sure to install proper version of JDeveloper as required to build your ADF applications.

Hostname for JDeveloper endpoint

This is the endpoint where JDeveloper is installed. FlexDeploy will connect to this endpoint to build the EAR/WAR file.Location to Oracle SOA Home i.e. indicates where SOA Suite is installed.

User Id for JDeveloper endpoint

FlexDeploy will connect to target server using this user. User must have access to JDeveloper installation

Password for user id

Password for user Id for JDeveloper endpoint.

JDK home for JDeveloper endpoint

JDK path used by JDeveloper.

Base Directory on each WebLogic Node

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.

WebLogic (Java/ADF Application) Checklist

Checklist

Description

Checklist

Description

Oracle WebLogic Home (WL_HOME)

WebLogic Home Directory. (e.g. /u01/oracle/products/fmw/wlserver)

WebLogic Domain Name

WebLogic Domain Name.

WebLogic Admin Listen Address

The listener address of the WLS admin server. (e.g. localhost)

WebLogic Admin Listen Port

The port of the WLS admin server. (e.g. 7001)

WebLogic Admin User

The user name for the WLS admin server.

WebLogic Admin Password

The password for Weblogic Admin User.

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 for managed servers.

WebLogic Node Manager Host

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 WLS Node Manager.

WebLogic Admin Server Host

The host name for WebLogic Admin Server.

User Id which runs Admin Server (e.g. oracle)

The User Id which runs Admin Server.

Password for user Id

The password for user Id which runs Admin Server.

Create ADF 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 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 ADF Application blueprint.

General Configuration

Scroll through this guide to fill in the blueprint properties. The Build and Deploy options are auto-selected.

Project Info

Property Name

Value for this tutorial

Description

Property Name

Value for this tutorial

Description

Composite Name

HRSOAService

Name of the composite that is being built and deployed.

SOA Partition

Order

SOA Partition / Folder should this composite be deployed to.

Jdeveloper .jws Name

HRSOAService

Brief description of the custom module.

SOA Install Name

SOA1

This value will provide environment independent name for SOA install (eg. SOA, SOAHR ).

The default is SOA.

Composite Description

Creating SOA project using Blueprints

Brief description of the composite.

 

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

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:

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

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

Property Name

Values for this Tutorial

Description

WebLogic Server/Cluster

FlexDeploy_Server1

The weblogic server or cluster where application should be deployed.

WebLogic Home Directory

locate this value from your server.

The Port number of the SOA Server.

Domain Name

fd_domain

The WebLogic Domain Name.

Application Installation Directory

locate this value from your server.

The base directory to install the weblogic deployments from.

For example: /oracle/middleware/product/user_projects/applications

Admin Server Listen Address

localhost

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 WorkBetterFaces since it takes the value same as Application Name.

The Folder path is auto updated to FlexDeploy/JAVA/ and click on “Create”.

We can see the Folder hierarchy on the top of the project.

Summary

General Configuration

Build and Deploy Workflows

Project Properties

Select the Project Properties tab.  These properties are project-scoped resources and are changed per project.  The plugin operations that were added to the workflows determine the available project properties that can be configured.

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 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 DEV 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, 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:

  1. select the environment we want to build the application in, the environments that had the Build Environment checkbox will appear in the dropdown.

  2. select the SCM Branch that was configured on the project, this will be pre-populated if there is only one configured Branch.

  3. submit the request, this will initiate the applicationBuild workflow.

Upon submission, the build workflow is initiated and the workflow steps are executed on the ADF instance in the Build environment, utilizing the JDEV endpoint.  Upon completion of the workflow, the execution status will be successful.

With the successful execution of the build, an EAR file artifact is created, stored in the artifact repository and marked with the Project Version.  Every build will generate a new Project Version.  The generated EAR 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.

Now the composite 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:

  1. Select the Project Version. The form will default to the latest Project Version but the dropdown will contain all previously create 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 can happen on multiple instances.

  4. Submit the request, which will initiate the application Deploy workflow.

Upon submission, the deploy workflow is initiated and the workflow steps are executed on the ADF instance in the Dev environment, utilizing the ADFDEV endpoint. Upon completion of the workflow, the execution status will be successful. With the successful execution of the deploy, the SAR file artifact will be deployed to the Dev environment.

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, which can be viewed by clicking on the link under the step

  3. the artifact, which can be downloaded

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

Congratulations! You have successfully completed the Oracle ADF tutorial.

Now that you have configured FlexDeploy for one ADF application, it is extremely easy to add more applications.  Simply use the Copy Project feature or repeat the blueprint creation process and a new project will be created with all of the configuration completed already. With everything copied, you can simply change the configuration as needed and be ready to build/deploy in minutes. If you have completed the blueprint once, many of the values will be pre-selected the second time. Only values that change often like the application name need to be filled in.

 

The following macros are not currently supported in the footer:
  • style