EAS306 - Automating the Build and Deployment Process of EAServer - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

EAS306 - Automating the Build and Deployment Process of EAServer

Description:

Specialize in EAServer, PowerBuilder, and Java technologies, ... Camelback naming convention. 7. Automation Overview - Java. Build Server. Source Control ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 29
Provided by: martyjones
Category:

less

Transcript and Presenter's Notes

Title: EAS306 - Automating the Build and Deployment Process of EAServer


1
Automating the Build and Deployment Process of
EAServer Components
Marty Jones Senior Software Engineer Marty_Jones_at_
DailyAccess.com Doug Porter Programmer Doug_Porte
r_at_DailyAccess.com August 17, 2004
2
Who We Are
  • DailyAccess Corporation (www.dailyaccess.com) is
    a leading Third-Party RecordKeeper for retirement
    plans with holdings in excess of 2.1 Billion
  • Specialize in EAServer, PowerBuilder, and Java
    technologies, automating back-office aspects of
    mutual-fund trading, settlement, and management
  • Certified Developers on Staff
  • PowerBuilder
  • Java

3
Agenda
  • Automated Builds What? Why?
  • Project Scope and Expectations
  • Automation Overview
  • Setup Requirements
  • Build Process
  • Interactive Demonstration
  • Future Direction and Enhancements
  • References
  • Technologies Used
  • Questions?
  • Contact Information

4
Automated Builds What?
Typical EAServer Development Cycle
Design
Implementation
Fail
Build / Unit Test
Deploy
Q.A.
Pass
Integration Test
Production Release
5
Automated Builds Why?
  • Build Integrity
  • The build process will highlight any components
    affected by IDL changes in existing components
  • Consistency
  • Repeatable, consistent builds are critical for
    quality assurance
  • Integrated Unit Testing
  • Suites of Unit Tests can be applied as part of
    the build process to ensure source code
    correctness and prevent regression bugs
  • Time Savings
  • Saves an enormous amount of time building a
    complete server from a version control system
  • Allows for continuous integration periodic
    builds highlight integration issues early

6
Project Scope and Expectations
  • PowerBuilder source stored at PBL-level
    (StarTeam integration)
  • IDL is considered contractual design
  • No overloaded methods IDL-mangling discouraged
  • Camelback naming convention

Component Models
Supported
Not Supported
  • CORBA-Java
  • PowerBuilder NVO
  • Enterprise JavaBeans (EJB)
  • C
  • ActiveX

7
Automation Overview - Java
Build Server
Source Control
8
Automation Overview - PowerBuilder
Build Server
Source Control
Proxies and Stubs
9
Setup Requirements
  • EAServer Baseline build server
  • Clean copies of the following folders
  • ltEAServer Install Dirgt/Java/Classes
  • ltEAServer Install Dirgt/Repository/Component
  • ltEAServer Install Dirgt/Repository/Package
  • ltEAServer Install Dirgt/Repository/Server
  • ltEAServer Install Dirgt/Repository/IDL
  • These clean copies are used to revert the
    build server to a known good baseline
    installation.
  • Note Registry settings are not preserved as
    part of this clean server, and are not
    generally recommended for use in component
    development.

10
Setup Requirements (Cont.)
  • Source Control Folder Layout
  • Create a directory structure that will hold the
    package and component source to be retrieved from
    the version control system. Below is an example
    of this directory structure.

11
Build Process
  1. Define Master Component Processing File
  2. Establish baseline clean server
  3. Create IDL Definitions on EAServer
  4. Generate Stubs and PowerBuilder Proxy libraries
  5. Component Compilation and Deployment
  6. (Optional) Recreate IDL Definitions for
    correctness
  7. Re-deploy Component props (PB only)
  8. Synchronize build server to target deployment
    server

12
Build Process (Cont.)
  • Define Master Component Processing File
  • Create an XML file that contains the packages and
    components that are to be deployed to Jaguar.
  • This file is used for Stub generation as well as
    Package and Component generation.

13
Build Process (Cont.)
  • Establish baseline clean server
  • Shutdown the Build Jaguar server if it is
    currently running
  • Delete the following folders
  • ltEAServer Install Dirgt/java/classes
  • ltEAServer Install Dirgt/Repository/Server
  • ltEAServer Install Dirgt/Repository/Package
  • ltEAServer Install Dirgt/Repository/Component
  • ltEAServer Install Dirgt/Repository/IDL
  • Copy the following clean folders to the
    ltEAServer Install Dirgt
  • /java/classes
  • /Repository/Server
  • /Repository/Package
  • /Repository/Component
  • /Repository/IDL
  • Start Build Jaguar server.

14
Build Process (Cont.)
  • Create IDL Definitions on EAServer
  • Retrieve IDL files from Project in Version
    Control.
  • Use custom Ant task to define IDL within the
    Build Jaguar Server. This Ant task takes into
    account any IDL dependencies and will define all
    dependent IDL entities prior to defining the
    parent entity.
  • IDL dependencies are determined by parsing the
    parent IDL file and retrieving all the include
    directives.
  • For each dependency, the Repository is checked
    for its existence.
  • If no IDL exists for this dependency, then the
    task defines the IDL entity.

15
Build Process (Cont.)
  • Generate Stubs and PowerBuilder Proxy libraries
  • Use custom Ant task to iterate the Master
    Component Processing file.
  • Use custom Ant task to generate Java Stubs for
    each package entry that is found within the file.
    A custom Ant task is needed here because JagAnt
    does not support generating stubs from a Module
    entity type. The Java Stubs are compiled
    directly into the Build Jaguar Server.
  • Use custom Ant task to generate a PowerBuilder
    Proxy library.
  • Create temporary PowerBuilder library with an
    application object
  • Create proxy project object and import it into
    temporary PowerBuilder library file
  • Retrieve proxies from Build Jaguar Server into
    new PowerBuilder library by executing the proxy
    project object

16
Build Process (Cont.)
  • Component Compilation and Deployment
  • Use custom Ant task to iterate the Master
    Component Processing file.
  • Use JagAnt to create Package entities on Build
    Jaguar Server.
  • Java Components
  • Source code is retrieved from Version Control and
    compiled into the /java/classes folder of the
    Build Jaguar Server.
  • PowerBuilder Components
  • Source code is retrieved from Version Control.
  • Any project objects listed within the target are
    deployed using the OrcaScript
  • command interpreter (orcascr9.exe) to the Build
    Jaguar Server.

17
Build Process (Cont.)
  • (Optional) Recreate IDL Definitions for
    correctness
  • This step is only necessary if you deploy
    PowerBuilder component and care about keeping
    consistent IDL naming conventions
  • The deployment of PowerBuilder Components will
    change the IDL to have lower case method names
    and data types
  • Use custom Ant task to overwrite the current IDL
    for the package being processed.
  • This process occurs on a package level if a
    PowerBuilder component was processed within that
    package.
  • Re-deploy Component props (PB only)
  • Use JagAnt task to update components properties
  • Any user defined or system defined properties
    that are not supported by PowerBuilders
    deployment process. Ex Maximum number of pooled
    components property.

18
Build Process (Cont.)
  • Synchronize build server to target deployment
    server
  • Use custom Ant task to iterate the Master
    Component Processing file.
  • Use JagAnt task to synchronize each package
    within the Master Component Processing file.

19
Interactive Demonstration
  • Client
    EAServer

LoanProcessing/InterestCalculator (PB)
PowerBuilder Client
calculateInterest double principal double
duration
getRate
calculateInterest double principal double
duration
PowerBuilder Client used to determine total
interest on a loan. Client calls
calculateInterest method on LoanProcessing/Interes
tCalculator component passing loan principal and
duration. InterestCalculator component makes an
intercomponent call to Util/InterestRate
component getRate method to determine interest
rate of loan. Run Client
Util/InterestRate (Java)
getRate
20
Scenario 1
  • Client
    EAServer

LoanProcessing/InterestCalculator (PB)
PowerBuilder Client
calculateInterest double principal double
duration
getRate
calculateInterest double principal double
duration
Util/InterestRate getRate( ) method modified to
accept amount argument of type double. IDL and
implementation change. Outcome
LoanProcessing/InterestCalculator will raise
BuildException since intercomponent call in
LoanProcessing/InterestCalculator component
calculateInterest( ) method not updated to
reflect new argument.
Util/InterestRate (Java)
getRate double amount
21
Scenario 2
  • Client
    EAServer

LoanProcessing/InterestCalculator (PB)
PowerBuilder Client
calculateInterest double principal double
duration
getRate double amount
calculateInterest double principal double
duration
LoanProcessing/InterestCalculator
calculateInterest( ) method intercomponent call
to Util/InterestRate getRate( ) method updated to
match Util/InterestRate method signature. Outcome
Successful Server Components Build
Util/InterestRate (Java)
getRate double amount
22
Scenario 3
  • Client
    EAServer

LoanProcessing/InterestCalculator (PB)
PowerBuilder Client
calculateInterest double principal double
duration string frequency
getRate double amount
calculateInterest double principal double
duration
LoanProcessing/InterestCalculator
calculateInterest( ) method modified to accept
new frequency argument of type string. IDL and
implementation change. Outcome PowerBuilder
client will fail with BuildException
Util/InterestRate (Java)
getRate double amount
23
Scenario 4
  • Client
    EAServer

LoanProcessing/InterestCalculator (PB)
PowerBuilder Client
calculateInterest double principal double
duration string frequency
getRate double amount
calculateInterest double principal double
duration string frequency
PowerBuilder Client update call to
LoanProcessing/InterestCalculator component
calculateInterest( ) method to match component
method signature Outcome Successful Client
Build
Util/InterestRate (Java)
getRate double amount
24
Future Direction and Enhancements
  • Add support for EJBs
  • Add a user interface to allow a user to
    selectively choose a version / branch from source
    control for building
  • Add full integration testing support for
    components
  • PowerBuilder build local component as a
    Jaguar JAR
  • PowerBuilder option to generate pbd only
  • jagtool create stubs for Module entity type,
    not just Package and Component entity types
  • jagtool start server

25
References
  • Ant Web site
  • http//ant.apache.org
  • Orca SDK download
  • http//powerbuilder.codexchange.sybase.com/servlet
    s/ProjectDocumentList?folderID465
  • OrcaScript reference
  • http//sybooks.sybase.com/onlinebooks/group-pb/pbg
    0900e/pbug/_at_Generic__BookTextView/56982
  • Command-Line Deployment With OrcaScript article
  • http//www.samspublishing.com/articles/article.asp
    ?p98852seqNum4
  • Benefits of Continuous Integration (article by
    Martin Fowler)
  • http//www.martinfowler.com/articles/continuousInt
    egration.html

26
Technologies Used
  • Apache Ant 1.6.1
  • Open source Java-based build tool, similar to
    make
  • Sybase EAServer 5.1 Build 51016
  • jagtool Command-line deployment/development
    automation tool
  • jagant EAServer extensions to Ant, providing
    access to jagtool
  • Sybase PowerBuilder 9.01 Build 6533
  • pborc90.dll - native dll that exposes, via ORCA
    (Open Repository Case API), PowerBuilder IDE
    functionality that is not available via command
    line (import, export).
  • orcascr9.exe ORCAscript command processor which
    can sequentially process ORCA commands stored in
    a text file
  • Borland StarTeam 5.3 Build 214
  • Enterprise version control system
  • JDK 1.4.2_03

27
Questions?
  • Will you be releasing any of this as open-source?

28
Contact Information
  • Send E-mail and Questions to
  • marty_jones_at_dailyaccess.com
  • doug_porter_at_dailyaccess.com
  • Visit Our Website
  • www.dailyaccess.com
  • To download this presentation and related code
  • www.dailyaccess.com/corp/techwave2004.vm
Write a Comment
User Comments (0)
About PowerShow.com