14
Technical Design Document (Java) Oracle SOA Build System

Java Technical Design Document

Embed Size (px)

Citation preview

Page 1: Java Technical Design Document

Technical Design Document

(Java)

Oracle SOA Build System

Page 2: Java Technical Design Document

i | P a g e

T a b l e o f C o n t e n t s INTRODUCTION ..................................................................................................................................................... 1

Requirements of this Document ............................................................................................................... 1 Audience ................................................................................................................................................... 1 Document Reference ................................................................................................................................ 1

DESIGN .................................................................................................................................................................. 2 Requirements ............................................................................................................................................ 2 Platform Independent ............................................................................................................................... 2 Independent of existing software installations ........................................................................................ 2 Deploy to multiple environments ............................................................................................................. 2 Handle the following components ............................................................................................................ 2 Easy to use ................................................................................................................................................ 3

Command line interface ......................................................................................................................................... 3 Web Interface ........................................................................................................................................................ 3

Technology ................................................................................................................................................ 3 Design Assumptions and Decision ............................................................................................................ 3

ORACLE SOA BUILD SERVER DESIGN ...................................................................................................................... 4 Technical Structure ................................................................................................................................... 4 OSBS - Shell Script ..................................................................................................................................... 5 OSBS - build.xml ........................................................................................................................................ 6 OSBS - tasks ............................................................................................................................................... 7

CompileJava ........................................................................................................................................................... 7 CreateWar ............................................................................................................................................................. 7 DeployAIAPEL ......................................................................................................................................................... 7 DeployAIAESB ........................................................................................................................................................ 7 DeployAIAXSD ........................................................................................................................................................ 8 DeployBPEL ............................................................................................................................................................ 8 DeployDVM ............................................................................................................................................................ 8 DeployESB .............................................................................................................................................................. 8 DeployJava ............................................................................................................................................................. 8 DeployXref ............................................................................................................................................................. 9 Download ............................................................................................................................................................... 9 EarJava................................................................................................................................................................... 9 WarJava ................................................................................................................................................................. 9 MakeAll ................................................................................................................................................................ 10 Promote ............................................................................................................................................................... 10 SendMail .............................................................................................................................................................. 10 UndeployBPEL ...................................................................................................................................................... 11 UndeployESB ........................................................................................................................................................ 11

OSBS - Web Interface .............................................................................................................................. 11

Note: It is intended that this template be used in conjunction with the Requirements Definition Document template.

Page 3: Java Technical Design Document

Technical Design Document

ii | P a g e

REVISION HISTORY

Date Author Version Change Summary Reference to Section

08-28-2013 Deborah Obasogie 0.1 New

Page 4: Java Technical Design Document

Technical Design Document

1 | P a g e

I n t r o d u c t i o n

This document describes how the Oracle SOA Build system is designed. It describes to structure of the

tool and how it integrates with the different technologies. After reading the document the reader

should be able to maintain this tool to make changes and fix bugs.

Requirements of this Document This is a technical document that describes the design of the Oracle SOA Build System. The document

refers to various technologies. Readers should be aware of the following technologies and

terminologies:

Java

Ant

Oracle SOA Suite

Unix scripting

Perl

Audience This document is targeted for technical readers that will maintain the Oracle SOA Build System. It is

expected that the reader has some technical background related to the technologies mentioned in the

previous paragraph.

Document Reference

Ref # Document Name URL

1 Java http://java.sun.com

2 Ant http://ant.apache.org

3 Oracle SOA Suite http://www.oracle.com/technology/soa/index.html http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/deployproc.htm http://www.oracle.com/technology/tech/soa/soa-suite-best-practices/auto-deploy.html

4 Unix scripting http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html

5 Perl http://www.perl.org

6 OSBS User Guide UsingANTinSOAEnvironment_v??.doc

Page 5: Java Technical Design Document

Technical Design Document

2 | P a g e

D e s i g n The goal for this design is to design a system that will automate the deployment of SOA components to

various environments; development, test, production etc.

Requirements The system must be design and implemented on the following business requirements:

Platform independent

Independent of existing software installations

Deploy to multiple environments

Handle the following components,

o BPEL

o ESB

o Human Workflow

o Java

o AIA

Integrate with a source control system

Easy to use

Platform Independent The system should run on any platform; Linux, Windows or any other Unix system.

Independent of existing software installations The system should not depend on a particular software installation of a vendor. This means that the

system can be installed on any server or workstation in the network infrastructure. The system should

be run standalone.

Deploy to multiple environments Every project has multiple environments that implements an application, for example development,

test, acceptance and production environment. These are the most common used environments. The

OSBS should handle any environment.

Handle the following components OSBS should deploy and undeploy any component in a SOA project; BPEL, ESB, Human workflow. While

a project consists also of non SOA components, it should anticipate also on this, like Java or AIA

components.

Page 6: Java Technical Design Document

Technical Design Document

3 | P a g e

Easy to use The OSBS should be easy to use. Any complexity on the usages should be hidden from the user;

Command line interface

Web Interface

Command line interface

A simple command line interface must be provided to execute all the tasks of OSBS.

Web Interface

An even simpler interface should be provided to execute common tasks to users via a web browser.

Technology The system must be implemented based on following Oracle technology:

Oracle Application Server

Oracle SOA Suite

Oracle AIA Framework

The system must be implemented based on following non-Oracle technology:

Apache ANT – as core build system

Perl – for the web interface

(L)inux scripting – for the command line interface on Unix like O/S.

Windows scripting – for Windows platform

Design Assumptions and Decision

Assumptions

Linux is used as platform for development.

Design decisions

SubVersion is used as source control system for integration with OSBS.

Page 7: Java Technical Design Document

Technical Design Document

4 | P a g e

O r a c l e S O A B u i l d S e r v e r D e s i g n

This diagram shows an overview of the OSBS. The core application is in the middle and exists only in a

build.xml file. This file is an ANT project file. In this project file all tasks of OSBS are defined. From this

project file the various environments are being called. This depends on various property files. Runtime

libraries, supplied with OSBS, are used to make the OSBS independent of existing software installations.

The project file is called via the command line shell script or via the web interface written in Perl.

Technical Structure The implementation of the OSBS is as follows:

Page 8: Java Technical Design Document

Technical Design Document

5 | P a g e

A script is executed, obbbuild.sh, that will parse the command line arguments and read the runtime

libraries. After the check on the syntax the project file of ant, build.xml, is called via Java and Ant

runtime libraries with the supplied arguments. The ant project file will execute the specific task. The

web interface, based on a Perl script, will collect the arguments from the HTTP request and transform

those into a command line argument. So the Perl script calls the obbuild.sh script.

OSBS - Shell Script The shell script is used to verify the syntax of the command line parameters. It should provide initial

feedback if the syntax is not correct. It should also provide help information on the usage of the tool.

Initially the tool is written for Unix like operating system using the Kourne shell. The following functions

should be executed in the shell script:

Read environment settings to execute Java and ANT

Shows help information

Show the version of OSBS

Page 9: Java Technical Design Document

Technical Design Document

6 | P a g e

Show all the tasks that OSBS can execute

Set generic the parameters for the various environments

Verbose output option

Pass the correct parameters to the ANT build project file.

Set the correct classpath for the used technologies; Oracle SOA; AIA; SVN, etc.

OSBS - build.xml The structure of the OSBS build file is as follows:

The build file starts with an initialization part. In this part additional ANT tasks and functionality is added.

This is based on the libraries that were defined by the classpath in the shell script. Then there is a part of

‘hidden’ tasks. These are tasks that are used internally and should not be exposed to the user when it

asks of ‘help’ via the command line. The tasks are often used by other tasks to make the build file

maintainable. At last the various definitions of each task are defined. Each tasks runs on his own. A task

can call others tasks.

Page 10: Java Technical Design Document

Technical Design Document

7 | P a g e

OSBS - tasks The OSBS must be able to execute the different tasks.

CompileJava

Compile Java files for a specific application.

Input

The Java source code of the application

Output

The compiled classes of the application

Arguments

Environment setting, name-of the java application

CreateWar

Create a WAR file containing all the JAR files of the BPEL processes.

Input

The name of the file

Output

The EAR file for this application

Arguments

Environment setting, name-for-the-war file

DeployAIAPEL

Deploy an AIA BPEL processes to a domain on a remote application server on which AIA is configured.

Input

The compiled JAR file of the BPEL process

Output

The JAR file is deployed to the application server and registered to AIA

Arguments

Environment setting, name-of the BPEL process, version

DeployAIAESB

Deploy an AIA ESB service to an esb-system on a remote application server on which AIA is configured.

Input

The ESB service definition

Output

The ESB service is deployed to the application server and registered to AIA

Arguments

Environment setting, name-of the ESB service

Page 11: Java Technical Design Document

Technical Design Document

8 | P a g e

DeployAIAXSD

Deploy the AIA XSD/WSDL definitions to the remote application server on which AIA is configured.

Input

A pointer location where the AIA XSD/WSDL files are located

Output

A zip file containing the XSD and WSDL files of AIA

Arguments

Environment setting

DeployBPEL

Deploy a BPEL processes to a domain on a remote application server.

Input

The name of the BPEL process

Output

A JAR file with the compiled BPEL process

Arguments

Environment setting, Name of the BPEL process, version, domain

DeployDVM

Deploy all or single domain value map (DVM) table files to the server

Input

The name of the DVM

Output

DVM is loaded into the application server

Arguments

Environment setting, Name of the domain value map

DeployESB

Deploy an ESB service to a system on a remote application server.

Input

The name of ESB Service

Output

The ESB service is registered in the application server

Arguments

Environment setting, Name of the ESB service, esb-system

DeployJava

Deploy an EAR file to application server.

Input

The name of the Java application

Page 12: Java Technical Design Document

Technical Design Document

9 | P a g e

Output

The EAR file, from the CreateEAR task, is deployed to the application server

Arguments

Environment setting, Name of the Java Application

DeployXref

Deploy single XREF table files to the server

Input

The name of the XREF

Output

XREF is loaded into the application server

Arguments

Environment setting, the XREF name

Download

Download latest or a specific version of the source code.

Input

Source control system

Output

The source code is exported from source control into a temporary staging area.

Arguments

Environment setting, the source code version or the latest

EarJava

Create BPEL an EAR file for a Java application.

Input

The WAR file created from the WarJava task for this application

Output

The EAR file for this application

Arguments

Environment setting, name-of the java application

WarJava

Create a WAR file for a Java application

Input

The compiled classes from the CompileJava task for this application

Output

The EAR file for this application

Arguments

Page 13: Java Technical Design Document

Technical Design Document

10 | P a g e

Environment setting, name-of the java application

MakeAll

Execute all the tasks that is needed to create a complete new set of the application. This means that all

the components of the application, like BPEL; ESB; Java, are being compiled and deployed to the

application server in the correct sequence. The task should be aware of the chicken-egg issue in

BPEL/ESB.

Chicken-egg issue: A process A could call another process B that is not yet deployed, while the process B

is calling process A.

Input

The source code of the application

Output

Compiled version of BPEL / ESB / Java / etc have been created and deployed to the application

server.

Arguments

Environment setting, bpel version, bpel domain, ESB system

Promote

The promote task is use to change the source code for a particular environment (development /

acceptance / etc). This means that end-points; URL’s or any other code that need to be changed for

specific environment should be replaced. In general this is more or less a find and replace on source

code. The promotion should take place on the whole source tree or on a single component.

Input

The source code of the application downloaded from source control

Output

The source code has been updated on end-points, URL’s or any other code that need to be

replaced.

Arguments

Environment setting, name of the component or everything

SendMail

Send an email.

Input

-

Output

A email is send.

Arguments

Page 14: Java Technical Design Document

Technical Design Document

11 | P a g e

Environment setting, to-address, subject, message

UndeployBPEL

Undeploy a BPEL process from an application server.

Input

The name of the BPEL process to be undeployed

Output

The BPEL process is undeployed from the application server

Arguments

Environment setting, name of the BPEL process

UndeployESB

Undeploy an ESB service from the application server.

Input

The name of the ESB service to be undeployed

Output

The ESB service is undeployed from the application server

Arguments

Environment setting, name of the ESB service

OSBS - Web Interface A simple web interface should be provided. This interface must act as a shell around the command line

script. The web interface encapsulates the command line interface to a web interface in which the user

can execute a selection of the tasks. The web interface must be implemented in Perl. In the web

interface the user should be able to select;

The environment for which the OSBS is working.

A list of tasks that can be selected; for example Compile BPEL, Deploy Deploy ESB, Download from source control.

The object that belongs to the task.