continuous integration im umfeld der oracle soa suite 11g

31
2011 © Trivadis BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN Continuous Integration im Umfeld der Oracle SOA Suite 11g DOAG Konferenz 2011 Markus Heinisch Markus Zehnder Trivadis GmbH Nov. 2011, Nürnberg Datum Continuous Integration im Umfeld der Oracle SOA Suite 11g 1

Upload: trankhanh

Post on 31-Dec-2016

227 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN

ContinuousIntegration im Umfeld der Oracle SOA Suite 11g

DOAG Konferenz 2011

Markus HeinischMarkus ZehnderTrivadis GmbH

Nov. 2011, Nürnberg

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

1

Page 2: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Trivadis Facts & Figures

DatumTrivadis – das Unternehmen

2

11 Trivadis Niederlassungen mit über 550 Mitarbeitern

Finanziell unabhängig und nachhaltig profitabel

Kennzahlen 2010

� Umsatz CHF 101 / EUR 73 Mio.

� Dienstleistungen für über 700 Kunden in mehr als 1‘800 Projekten

� Über 170 Service Level Agreements

� Mehr als 5'000 Trainingsteilnehmer

� Forschungs- und Entwicklungs-budget: CHF 5.0 / EUR 3.6 Mio.

Hamburg

Düsseldorf

Frankfurt

Stuttgart

MünchenFreiburg

Wien

Basel

Bern

Zürich

Lausanne~350 MA

~180 MA

~20 MA

Datum

2

Page 3: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Das Besondere

DatumTrivadis – das Unternehmen

3

Kundenindividuelle Lösungskompetenz und

Herstellerunabhängigkeit

� bietet fundierte Methodenkenntnisse und eigenentwickelte Vorgehensweisen

� garantiert wiederholbare Qualität und Realisierungssicherheit

Technologiekompetenz � hat über 17 Jahre Expertise in Oracle und Microsoft

� verfügt über ein eigenes Technology Center und setzt auf technologische Exzellenz

Lösungs- und Integrations-Know-how

� hat eine breite, branchenübergreifende Kundenbasis und jährlich über 1800 Projekte

� verbindet technologisches Spezialistenwissen mit dem Verständnis für die Business-Spezifika des Kunden

Begleitung über den gesamten IT-Projekt-

Lifecycle

� begleitet den gesamten IT-Projekt-Lifecycle mit einem modularen Dienstleistungsportfolio

� bietet für jeden „Reifegrad“ die passende Dienstleistungs- und Lösungskombination

Datum

3

Page 4: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

AGENDA

1. Why CI?

2. CI Environment

3. CI for SOA

4. Conclusion and what‘s next

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

4

Page 5: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Integration is hard!

� Development on your own is nice and easy while integration is hard

� You already knew that! :-)

� Effort increase exponentially with � Number of bugs� Number of components � Time since last integration

� Ideally, we would like to avoid it!

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

5

time

effort

Page 6: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

What is Continuous Integration (CI)?

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

6

http://geekandpoke.typepad.com

Page 7: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

What is Continuous Integration (CI)?

� Continuous Integration is a software development practice

� Members of a team integrate their work frequently � Each person integrates at least daily � Leading to multiple integrations per day

� Each integration is verified by an automated build (including test) to � Detect integration errors as quickly as possible

� Many teams find that this approach leads to � Significantly reduced integration problems � Allows a team to develop cohesive software more rapidly

� CI was introduced with XP � Term introduced by Martin Fowler� http://www.martinfowler.com/articles/continuousIntegration.html

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

7

Page 8: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Developer’s Workflow

1. Checkout/Update from SCM

2. Do your coding� Update/create unit tests

3. Run automated build on my machine � Repeat steps 2-3 until tests pass!

4. Merge with latest changes from SCM� Fix and rebuild until tests pass!

5. Commit to SCM

6. Run a build on a clean machine � Immediately fix bugs and integration issues!

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

8

Commitchanges

Build Script

RuntimeEnvironment

DeployPoll

SCM CI Server

FeedbackMechanismDeveloper

Notebooks

Page 9: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Benefits

� Continuous, significant and rapid feedback on development progress

� Finding bugs is easier � Early detection of conflicts � Self-testing builds� Diff debugging� Less cumulative bugs

� Reduced risks � Easier predictions � Avoid blind spots in the project� When you do not know how long it will take to fix all open bugs

� Developers concentrate on coding

� Encourage more frequent deployments� Leads to “Continuous Delivery”

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

9

Page 10: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

AGENDA

1. Why CI?

2. CI Environment

3. CI for SOA

4. Conclusion and what‘s next

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

10

Page 11: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

CI @ Trivadis Trusted Cloud

� Trivadis Trusted Cloud is a separated platform for development, testing or customer hosting purposes

� 145 active VMs

� Every single VM or bundled Project VMs will be separated by private VLANs

� VMware, vSphere Life Cycle Manager

� 7 Blades, 2 CPUs (4 Cores) and 144 GB Memory on board per Blade� SAN Storage 80-100 TB

� Continuous Integration is part of the Trivadis Trusted Cloud

� IT Services provides VM templates for CI for Java and CI for SOA

� Soon available: CI for DB-Dev

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

11

Page 12: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Trivadis Trusted Cloud

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

12

VM Templates

Windows VMs

SUSE VMs

RedHat VMs

CI Java

Project X CI

Hudson

Nexus

Sonar

DB

Project X

RuntimeEnviron-ment

Project Y

Project Z

Project …

Subversion

TFS

Nexus

JIRA

TrivadisTrustedCloud

Trivadis Network

Lifecycle Manager

CI SOA

Page 13: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Trivadis Trusted Cloud

� The Cloud is divided in two types of objects

1. The shared services� Available for all projects and supported by IT Trivadis� Subversion, full-featured version control system� JIRA, Issue tracking and project tracking for software development teams� Nexus, Maven Repository for libraries� Microsoft Team Foundation Server, (pretty useless for Java development ☺)

2. The vertical components� Operating System Template VMs� Responsibility IT Services

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

13

Page 14: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Trivadis Trusted Cloud

2. The vertical components� CI Template VMs- Master installations for the Continuous Integration environment

- All necessary components for the CI are installed, partially configured and ready to run

- All the projects which need an CI environment receive a copy of this VM

- Responsibility Trivadis CI-Support Team

� Project VM- Specific for a project

- Every Java project needs and uses its own components

- Responsibility Project Team

� Project CI VM- Copy from the Master CI VM

- Administrator of the CI environment for the java project still has toconfigure the various components specifically for his project

- Responsibility Project Team

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

14

Page 15: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

AGENDA

1. Why CI?

2. CI Environment

3. CI for SOA� Goals� Components� WebLogic Automation� OSB Build & Deployment� SOA Suite Composites Build & Deployment

4. Conclusion and what‘s next

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

15

Page 16: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

CI for SOA Goalswhat do we want to achieve?

� Automate everything� Environment

� WLS Domain creation and configuration

� Schema repository creation

� Startup and shutdown of admin- / managed servers

� OSB & SOA artifacts build & deployment� soapUI integration testing

� Maven lifecycle and Hudson build server integration� Separate build and deployment

� Build task: Perform build and unit tests then store artifact in Maven repository

� Deploy task: Retrieve artifact from Maven repository and deploy to specified environment

� Foundation for continuous delivery

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

16

Page 17: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

TrivadisTrusted

Cloud

Component-Architecture of the CI for SOA

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

17

CI for SOA VM

Tomcat

Project VM

ArtifactRuntimeEnviron-

ment

HudsonNexus

WebLogicApplication

Server

Developer Notebook

Dev Tools (Maven, SVN

client)

IDE(Eclipse, JDev)

Browser

Subversion Jira

Tools:JDK, MVN, Ant, NodeManager,

RCU, OSB OEPE, soapUI

OSB Suite

SOA Suite

Integration DB

Integration WLS

Oracle XE

OSB Suite

SOA Suite

OSB/SOA

Sonar

Page 18: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Components of the VM CI for SOA

� Nexus Repository, V 1.9� Archive for Maven artifacts, libraries and licensed software

� Hudson, V 2.1� CI Server, builds, tests and deploys software

� Oracle Software� OSB 11g including Oracle Enterprise Pack for Eclipse (OEPE)� SOA Suite 11g� Oracle Repository Creation Utility (RCU)� Oracle XE Universal for meta data repositories

� Basic Components� Java 1.6, JRockit, Maven 2.2.1, Ant 1.8.2, Tomcat 6, soapUI 4

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

18

Page 19: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

WebLogic Automation (1/2)

� WebLogic Scripting Tools (WLST)� Command-line scripting environment� Based on Jython, a Java implementation of Python� Supports standard Jython features� Ability to use or extend existing Java classes� Enhanced with WebLogic specific scripting commands

Continuous Integration with Oracle Service Bus and SOA Suite19

Page 20: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

WebLogic Automation (2/2)

� Domain Templates� Defines the full set of resources within a domain� Visual Domain Template Builder utility� Usable with WLST and Configuration Wizard� Great for cloning & duplicating existing domains

� RCU� Command line mode is not really made for automation!� Linux solution: Expect scripting language� Considered the better option than manually backup & restore DB schema

Continuous Integration with Oracle Service Bus and SOA Suite20

Page 21: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

OSB Projects – Automatic Build & Deployment

Continuous Integration with Oracle Service Bus and SOA Suite21

Develop Check-in Build Package Deploy Test

Development Continuous Integration

SVN

WLS WLS

Nexus

OSB OSB

Build trigger

mvn-deploy

Eclipse

OEPErun export

<target name="exportFromWorkspace"><java dir="${eclipse.home}" fork="true" failonerror="true" maxmemory="768m"jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher_

${equinox.launcher.version}.jar"><jvmarg line="-XX:MaxPermSize=256m"/><arg line="-data ${build}"/><arg line="-application com.bea.alsb.core.ConfigExport"/><arg line="-configProject ${config.project}"/><arg line="-includeDependencies true"/><arg line="-configJar ${config.jar}"/><sysproperty key="weblogic.home" value="${weblogic.home}"/><sysproperty key="osb.home" value="${osb.home}"/><sysproperty key="osgi.bundlefile.limit" value="500"/><sysproperty key="harvester.home" value="${osb.home}/harvester"/><sysproperty key="osgi.nl" value="en_US"/><sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true"/>

</java></target>

Page 22: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

OSB - Automatic Build & Deployment

� Generate Configuration.jar� Not a simple jar, war or ear build� Run Eclipse OEPE in cmd-line mode, in WLS-OSB environment !!!

� Export & Edit Customization.xml� Export initial Customization.xml from OSB� Customize service-endpoints etc. for tests and different environments

� Import Configuration.jar & Customization.xml� Use WLST import script within ant-task� Apply environment specific customization file

� Parameterized deployment� Which artifact version?� To which environment?

Continuous Integration with Oracle Service Bus and SOA Suite22

Page 23: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

SOA Suite - The SCA Build Process

Continuous Integration with Oracle Service Bus and SOA Suite23

� SCA builds are performed using a set of ANT build files and tasks� Also used by JDeveloper� Or from the command line without JDeveloper!� Easy to integrate in Maven lifecycle� Files are located under: Middleware_Home\SOA_Suite_Home\bin

ant-sca-compile.xml

ant-sca-package.xml

ant-sca-deploy.xml

ant-sca-test.xml

� Compiles a composite project

� Packages a composite project (into a SAR)

� Deploys a composite project (a SAR)

� Tests a composite

Page 24: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

SOA Suite - Automatic SCA Build & Deployment

Continuous Integration with Oracle Service Bus and SOA Suite24

Develop Check-in Build Package Deploy Test

Development Continuous Integration

Build trigger

Rename & mvn-deploy

Page 25: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Testing with soapUI

� JUnit compatible test results

� Headless command line test runner� Easy to integrate with Ant task

� Too many issues with soapUI Maven plugin repository!

� Mock services

� Scripting with Groovy

� Pro version recommended� Data Sources and SQL BuilderVery useful for load tests

� Convenient form editor

Continuous Integration with Oracle Service Bus and SOA Suite25

Page 26: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Hudson Integration

Continuous Integration with Oracle Service Bus and SOA Suite26

Page 27: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

AGENDA

1. Why CI?

2. CI Environment

3. CI for SOA� Goals� Components� WebLogic Automation� OSB Build & Deployment� SOA Suite Composites Build & Deployment

4. Conclusion and what‘s next

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

27

Page 28: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

Conclusion

� In use by a large internal reference project� Project team couldn’t live without it anymore ☺

� Not as «plug and play» as CI for Java, but:� A huge initial time saving for new projects� Standard set of scripts for many scenarios� Not re-inventing the wheel in every project� Improved support and troubleshooting� Continuously enhanced

� By-products:� Developer VM (Ubuntu based, cloneable to bare metal HW)� Enhanced Trivadis Toolbox TVD-BasEnv™ with WebLogic support

Continuous Integration with Oracle Service Bus and SOA Suite28

Page 29: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

What’s next?

� Planned enhancements� Hudson Build Slaves� Fully script based configuration of JCA adapters� ADF with OJDeploy (e.g. Human Task)

� The future – inspired by Oracle’s Fusion build system ☺� Dependency and impact analysis� Dynamically setting service endpoints� Extract metrics

Continuous Integration with Oracle Service Bus and SOA Suite29

Page 30: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

References

� „Continuous Integration with Hudson“, Carlo Bonamico 2007

� http://www.martinfowler.com/articles/continuousIntegration.html

� “Continuous Integration: Improving Software Quality and Reducing Risk”, Paul M. Duvall, Steve Matyas, Andrew Glover

� Hudsonhttp://hudson-ci.org

� Nexushttp://nexus.sonatype.org

� soapUIhttp://www.soapui.org/

� RedStack bloghttp://redstack.wordpress.com

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

30

Page 31: Continuous Integration im Umfeld der Oracle SOA Suite 11g

2011 © Trivadis

BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN

Trivadis GmbH

Markus Heinisch

Lehrer-Wirth-Str. 481829 München

Tel. +49 162 2959616Fax +49 89 99275959

[email protected]

DatumContinuous Integration im Umfeld der Oracle SOA Suite 11g

31

DEN TRIVADIS-STAND FINDEN SIE AUF

EBENE 3, STAND NR. 304

Trivadis AG

Markus Zehnder

Papiermühlestrasse 73CH-3014 Bern

Tel. +41 31 928 0960Fax +41 31 928 0964