Beta #1: Oracle SOA 11g Build tool, OSBS

1:51 pm in SOA Infrastructure by admin

A beta version of the build tool is now available.

Introduction
A few years ago, when Oracle had only the BPEL component, deployment was rather complex. Therefore I create my own build tool, replacing the obant tool and ignoring the existing build.xml files, supplied within your JDeveloper project. Now with Oracle 11g the SCA composite is introduced and we are running on the Oracle Weblogic Server.

It took me some time to upgrade the Oracle SOA Build Server to the 11g version. Many new features have been added:

  • Supports Oracle SOA 10g (from 10.1.3.5.1)
  • Supports Oracle SOA 11g (from 11.1.1.1.x)
  • Deploy/Undeploy SCA composites
  • runs also on windows (via MS Power Shell)
  • Restructured project directory
  • Restructured environment properties
  • Updated documentation
  • Reference example application
  • Deploy/Undeploy of ADFBC (SDO) (not in this beta, wip)
  • Added support for AIA 3.0 (not in this beta, wip)
  • Run custom ant & wlst scripts (not in this beta, wip)

Overview
The default tools of SOA 10g SOA 11g, is only focussing on deployment of a single component (BPEL / ESB / SCA). While in real life, more components are involved with a deployment. You can think on Java application; data-model changes, etc. To overcome this issue, and create a mechanism to deploy multiple type of components, a general “build.xml” that is able to compile and deploy components.

The solution described in the next paragraphs will take this into account.

Functionality
The build tool covers the following features and can be easily change and extended to customer requirements:

  • Using full ANT tasks features, Ant 1.7 + Ant-Contrib tasks
  • Support of Multiple environments; Dev / Test / Acceptance / Production / …
  • Compiling BPEL processes
  • Deploy SCA composites
  • Undeploy SCA components
  • UnDeploy BPEL processes
  • Deploy BPEL processes
  • UnDeploy BPEL processes
  • Register ESB services
  • Unregister ESB services
  • Integration with SubServersion; download latests or tags
  • Stand-alone tool ; not depending on Oracle installation
  • Compile and Deploy Java programs
  • Supporting ‘MakeAll’

Configuration
To use the build tool some configuration must be made. Most of all settings are located in properties files. Configure the build tool configuration file to prepare the deployment for this release. Edit the following file:

$BUILD_TOOL/build.env

In build.env, edit ANT_HOME and ANT_JAVA_EXTENSIONS, change the first part of the path to where the package was copied to ($BUILD_TOOL). Also change LOG_DIR in build.env, log files will go to this directory.

An example of this file is here

JAVA_HOME=/app/oracle/product/10.1.3/soa/jdk
ANT_HOME=/app/projects/svn/aia/src/tools/build/ant/lib/apache-ant-1.7.0
ANT_JAVA_EXTENSIONS=/app/projects/svn/aia/src/tools/build/ant/lib
LOG_DIR=/tmp/aia/svn_tmp/log

Manual Deployment

Download
Download the latest version of your project. Example for SystemTest environment:

obbuild.sh -e test Download

Note: it will use the file test/replace_.properties to execute the find and replace for the endpoints.

Example for tag 2.0.23 being the current version for acceptance:

obbuild.sh -e acc Download 2.0.22

Note: it will use the file test/replace_.properties to execute the find and replace for the endpoints.

The replace.properties file is used for a general replacement of tokens in your projects. The file describes how tokens can be replaced in one or
all BPEL processes, ESB services.

Syntax:

find..name=[all|]
[all|]..find.value=
[all|]..replace.value=

Example:
Replace in all the files localhost:9700 into 127.0.0.1:8888

find.1.name=all
all.1.find.value=localhost:9700
all.1.replace.value=localhost:8888

Example:
Replace in HellWorld bpel process the default domain and the hostname

find.1.name=HelloWorld
HelloWorld.1.find.value=localhost:9700
HelloWorld.1.replace.value=192.168.0.1:8888

find.2.name=HelloWorld
HelloWorld.2.find.value=/orabpel/default
HelloWorld.2.replace.value=/orabpel/systest


Deploy generic SCA composite
Deploy each BPEL process separately. Example for Test environment:

For example: Compile and Deploy Helloworld 1.0 to the default domain

obbuild.sh -e test CompileSCA HelloWorldSCA
obbuild.sh -e test DeploySCA HelloWorldSCA 1.0

Deploy generic ESB service
Note that before deploying the ESB service, the services will be undeployed. Based on the property file esb_guid.properties. The GUID is read from this file. If the ESB service exists in this property it will be undeployed. Maintain this file if any new ESB services are added to the system

Deploy each ESB service separately, if they exists. Example for Test environment:

obbuild.sh -e test DeployESB HelloWorldEBS

Deploy generic BPEL process
Deploy each BPEL process separately. Example for Test environment:

For example: Compile and Deploy Helloworld 1.0 to the default domain

obbuild.sh -e test CompileBPEL HelloWorld
obbuild.sh -e test DeployBPEL HelloWorld 1.0 default

For example: Compile and Deploy Helloworld 1.1 to the MyDomain domain

obbuild.sh -e prod Compile HelloWorld
obbuild.sh -e prod DeployBPEL HelloWorld 1.1 MyDomain

Deploy Java WebService
Deploy each Java process separately. Example for Test environment:

obbuild.sh -e test DeployJava HelloJavaWorld

Note: default-application.xml must be included in source code.

Automatic Deployment
To deploy the whole system at once, use the task ‘MakeAll’.

obbuild.sh -e test MakeAll

Note: This target is using the ‘makeall_test.properties’ that describes the correct sequence of all the AIA components (Java, BPEL, and ESB) that will be built and deployed. The next table shows an example of the ‘makeall.properties’ file.

makeall.properties
#
# SCA
#
sca.make.100=HelloWorldSCA

#
# Java
#
java.make.100=HelloJavaWorld
#
# BPEL
#
bpel.make.200=HelloBPELWorld
bpel.make.210=HelloWorld
#
# AIA BPEL
#
aiabpel.make.300=HelloBPELWorldProvABCSImpl
aiabpel.make.310=HelloWorldProvABCSImpl
#
# AIA ESB
#
aiaesb.make.400=SalesOrderEBS
aiaesb.make.410=SalesOrderOrchastrationEBS

Command line interface
The command line interface of the obbuild tool is as follows:

obbuild.sh -?obbuild.sh [-[hvtV] [-e environment] [-f build-file][-r replace-file] [task] [arg1] [arg2] .. [arg6]]

 -h   Shows this help -V   Show the version of this program -t   Show all the tasks in the build file -e   Select envirnonment property file,default 'dev', reading dev.properties -f   Read a specific build file, default is build.xmlin current directory -r   Read a specific replacement file,use for promoting BPEL process to other environments. -v   Show verbose output task    The task to be executed, default is main arg1..6 Optional arguments passed to the build fileas properties ANT.ARG1..ANT.ARG6

The tasks the build tool can execute:

obbuild.sh -tobbuild.sh: Tasks in ./build.xml       CompileBPEL - Compile one or all BPEL processes (                                          [arg=bpel-process-name] arg2=version])                            Download - Download latest source code                                                  [arg=tagged-version | rev number]                                     main - Default task                                                       Promote - Find/Replace on one or more BPEL processes, see replace.properties     DeployAIABPEL - Deploy one or all AIA BPEL processes to a domain on a remote server                     [arg1=[Bpel-process|all] arg2=version arg3=domain]                        DeployBPEL - Deploy one or all BPEL processes to a domain on a remote server                     [arg1=[Bpel-process|all] arg2=version arg3=domain]         DeployESB - Deploy one or all ESB services to a system on a remote server                     [arg1=[ESB-process|all] [arg2=system]]       CompileJava - Compile Java files                     [arg1=name of the application]         CreateWar - Create WAR file from class files                     [arg1=name of application]         CreateEar - Create EAR file from WAR file                     [arg1=name of application]        DeployJava - Deploy an EAR file to                     [arg1=name of the application]      UndeployJava - Undeploy an application from target                     [arg1=name of the application]           MakeAll - Create a new set of the application                     [arg1=[bpel/esb version] [arg2=BPEL domain] [arg3=ESB-system]      DeployAIAESB - Deploy one or all AIA ESB services to a system on a remote server                     [arg1=[ESB-process|all] [arg2=system]]          SendMail - Send a mail                     [arg1=to arg2=subject arg3=text]         DeployXSD - Deploy the XSD files: creating a ZIP file                     [arg1=Name]   DeployAIAConfig - Deploy the AIA configuration file      UndeployBPEL - Undeploy a BPEL process                     [arg1=processname [arg2=version] [arg3=domain]]       UndeployESB - Undeploy one or all ESB services to a system on a remote server                     [arg1=[ESB-process|all] [arg2=system]]        DeployXref - Deploy all or single XREF table files to the server                     [arg1=[XREF name|all]]         DeployDVM - Deploy all or single dvm table files to the server                     [arg1=[DVM name|all]]         ExportDVM - Deploy all dvm table files from the server        CompileSCA - Compile SCA composite                     [arg=sca-composite-name]         DeploySCA - Deploy SCA composite                     [arg=composite-name] | [arg=version|1.0]       UndeploySCA - Undeploy SCA composite                     [arg=sca-composite-name] arg=[revision|1.0]

You can download the zip file here as is.

There is no support from Oracle or myself and I expect that you have the proper Oracle licences to use the Oracle software.