Developer and Fusion Middleware 1 | Mark Nelson | Continuous Integration for SOA BPM 11g.pdf

  • 1,560 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,560
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
108
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. <Insert Picture Here>Continuous Integration for Oracle SOA Suite and OracleUnified Business Process Management SuiteMark NelsonConsulting Solution ArchitectThe A-Team
  • 2. THE FOLLOWING IS INTENDED TO OUTLINE OUR GENERAL PRODUCTDIRECTION. IT IS INTENDED FOR INFORMATION PURPOSES ONLY, ANDMAY NOT BE INCORPORATED INTO ANY CONTRACT. IT IS NOT ACOMMITMENT TO DELIVER ANY MATERIAL, CODE, OR FUNCTIONALITY, ANDSHOULD NOT BE RELIED UPON IN MAKING PURCHASING DECISION. THEDEVELOPMENT, RELEASE, AND TIMING OF ANY FEATURES ORFUNCTIONALITY DESCRIBED FOR ORACLES PRODUCTS REMAINS AT THESOLE DISCRETION OF ORACLE. 2
  • 3. Who are the A-Team? 3
  • 4. We’rethese guys! 4
  • 5. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 5
  • 6. Continuous Integration •  Continuous Integration is a software engineering practice which attempts to improve quality and reduce time to deliver •  This is done by applying small, frequent quality control efforts Let’s see an example… 6ORACLE CONFIDENTIAL
  • 7. Without Continuous Integration ”HEAD”   1 We want to make some changes to an artifact in our project… 7ORACLE CONFIDENTIAL
  • 8. Without Continuous Integration ”HEAD”   1 Check  out   1 … so we check out the artifact from the version control system … 8ORACLE CONFIDENTIAL
  • 9. Without Continuous Integration ”HEAD”   1 Check  out   1 Change   1’ … and we make our changes. This may take several days … 9ORACLE CONFIDENTIAL
  • 10. Without Continuous Integration ”HEAD”   1 2 3 4 5 Check  out   1 Change   1’ … meanwhile, other developers have made changes too, and have checked them in to the version control system … 10ORACLE CONFIDENTIAL
  • 11. Without Continuous Integration ”HEAD”   1 2 3 4 5 6 Check  out   Integrate   1 Change   1’ … when we are ready to check our changes back in to the version control system (“integrate”) there is a big difference between our version and the HEAD version. This means integration will likely be difficult and time consuming … 11ORACLE CONFIDENTIAL
  • 12. Without Continuous Integration ”HEAD”   1 2 3 4 5 6 Build Check  out   Integrate   1 Change   1’ … it also means that when the next build happens, it is much more likely to have errors due to inconsistencies introduced by all these small changes made by different developers. 12ORACLE CONFIDENTIAL
  • 13. With Continuous Integration ”HEAD”   1 Build Check  out   1 With continuous integration, we build every time there is a commit to HEAD. When we want to make changes we check out from version control … 13ORACLE CONFIDENTIAL
  • 14. With Continuous Integration ”HEAD”   1 Build 2 Build Check  out   1 Change   1’ … and make our changes. We should make fewer changes between commits to minimize the integration burden. Other developers will still be making changes in parallel and we will build when they commit ... 14ORACLE CONFIDENTIAL
  • 15. With Continuous Integration ”HEAD”   1 Build 2 Build 3 Build 4 Check  out   Integrate   1 Change   1’ … so when we come to integrate our changes, there is (so the theory goes) less work for us to do. We will also know very quickly if we have broken the build (minutes instead of days/weeks). 15ORACLE CONFIDENTIAL
  • 16. Continuous Integration – Key Practices •  Continuous Integration is characterized by these key practices: •  Use of version control system •  All developers commit to the HEAD every day •  Build on every commit •  The build must be automated and fast •  Automated deployment to a production-like environment •  Automated testing •  Results of all builds are published (so everyone can see who broke the build) •  Deliverables are easily available (for developers, testers, other stakeholders) 16ORACLE CONFIDENTIAL
  • 17. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 17
  • 18. Building Blocks - Subversion •  We need a version control system and Subversion is arguably the best choice for us today •  It is widely used and understood •  It is well integrated with our other building blocks (Maven, Hudson) •  It is well integrated with JDeveloper •  It can be used with strong authentication and through proxies, VPNs, etc. 18ORACLE CONFIDENTIAL
  • 19. Building Blocks - Subversion •  Subversion is used to: •  Store our source artifacts •  Share them between developers •  Manage versions of artifacts 19ORACLE CONFIDENTIAL
  • 20. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 20
  • 21. Building Blocks - Maven •  Maven is a project management and build management system •  Project management in terms of: •  Managing naming and version numbering •  Managing dependencies •  Managing where source code is stored •  Managing where builds are stored •  Managing templates for project types •  Managing the release process 21ORACLE CONFIDENTIAL
  • 22. Building Blocks - Maven •  Maven is a project management and build management system •  Build management in terms of: •  How to execute the build •  What to do in each phase •  Parameterization of the build •  An extensible framework 22ORACLE CONFIDENTIAL
  • 23. Maven Build Lifecycle•  Maven is based around the central concept of a build lifecycle •  The process for building and distributing a particular artifact (project) is clearly defined •  Only necessary to learn a small set of commands to build any Maven project, the POM ensures the project is built correctly •  default, clean, site!•  Build lifecycles are further defined by a set of build phases •  A build phase represents a stage in the lifecycle •  Executed sequentially to complete the default lifecycle•  Build phase made up of goals •  Phases are composed of goals that perform actual tasks •  Default goal bindings for standard lifecycle phases •  Plugins contribute additional goals to project 23
  • 24. Maven Default Lifecycle test: test the compiled validate: ensure the source code using a project is correct and all compile: compile the suitable unit testing necessary information is source code of the project framework; tests should available not require the code be packaged or deployed integration-test: process package: take the verify: run checks to verify and deploy the package if compiled code and the package is valid and necessary into an package it in its meets quality criteria environment where distributable format, such integration tests can be run as a JAR, WAR, etc. deploy: for final release, install: install the package copies the final package to into the local repository, for the remote repository for use as a dependency in sharing with other other projects locally developers and projects. h"p://maven.apache.org/guides/introduc5on/introduc5on-­‐to-­‐the-­‐lifecycle.html   24
  • 25. The Maven Process: End-to-End Input   Output   Maven Plugins Project pom.xml Local Build Maven repository package Custom plugins 25
  • 26. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 26
  • 27. Building Blocks - Hudson•  Hudson is a common Continuous Integration server•  It is based around the concept of a ‘job’•  The Hudson dashboard displays status of all jobs 27
  • 28. Building Blocks - Hudson•  Builds can be automatically triggered from SCM changes•  Jobs can be created directly from a Maven project•  Can execute any combination of Maven goals 28
  • 29. Building Blocks - Hudson•  Allows automatic deployment to WLS and SOA on an SCM change•  Integration tests can be run against applications and composites on WLS/SOA•  Results reported in build status 29
  • 30. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 30
  • 31. Alternatives •  Version control •  git •  Allows distributed version control and offline commit •  Seen as becoming more popular •  Has some integration with JDeveloper too •  CVS •  Works fine, but recommend not using the SCM polling in Hudson/Jenkins with CVS due to CVS versioning model (every file) •  Continuous Integration •  Hudson/Jenkins •  Continuum 31ORACLE CONFIDENTIAL
  • 32. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 32
  • 33. The WebLogic Maven Plugin •  WebLogic Server 11g R1 (10.3.4) provides an official Maven plugin to perform application deployment operations •  Maven Mojo + WebLogic Deployer + WebLogic Client •  Supports the deployment of Maven projects to WebLogic Server directly from Maven •  No need to use console or command line deployment utility •  Can be wired into Maven lifecycle to automate deployment for specific goals 33
  • 34. WebLogic Maven Plugin Goals 34
  • 35. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 35
  • 36. The SCA build process •  SCA builds are done using a set of ANT build files and tasks •  Called ‘under the covers’ by JDeveloper •  Or from the command line (so they can be automated) 36ORACLE CONFIDENTIAL
  • 37. The SCA build process ant-sca-compile.xml, target: scac scac.input: The location of the composite.xml scac.application.home: The location of the Application directory ant-sca-package.xml, target: package compositeName: The name of the composite (will show up in EM) compositeDir: The directory containing the composite revision: The version number for the composite scac.application.home: The location of the Application directory 37ORACLE CONFIDENTIAL
  • 38. The SCA build process ant-sca-deploy.xml, target: deploy serverURL: The URL of the SOA instance user: The user to do the deployment password: The deploying users password sarLocation: The location of the SAR file overwrite: Overwrite existing deployments with same revision? forceDefault: Make this version the default version? partition: Which SOA partition to deploy into ant-sca-test.xml, target: test jndi.properties.input The name of the JNDI properties file scatest.input The name of the composite to test scatest.format The format for the results – “junit” scatest.result The relative path to store the results in 38ORACLE CONFIDENTIAL
  • 39. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 39
  • 40. Some service components depend on Metadata Services (MDS) •  For example: •  Human Tasks consume XSD from MDS •  Rules consume XSD from MDS •  You may also choose to deploy canonical data models, abstract service definitions, etc. to MDS •  Your project will need an MDS connection defined in adf-config.xml, either: •  File-based MDS, or •  Database MDS •  And you must specify scac.application.home 40ORACLE CONFIDENTIAL
  • 41. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 41
  • 42. Handling Task Forms •  To build task form UI projects, we need to use the ojdeploy utility which is part of JDeveloper •  This means the build servers need access to an installation of JDeveloper •  We call ojdeploy using the exec-maven-plugin and pass in: •  workspace The name of the JWS file •  Profile The name of the deployment profile •  Clean To rebuild all 42ORACLE CONFIDENTIAL
  • 43. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 43
  • 44. Putting it all together (without ADF) MDS refers to ADF config contains 44ORACLE CONFIDENTIAL
  • 45. Putting it all together (with ADF) 45ORACLE CONFIDENTIAL
  • 46. Agenda•  Introduction – What is Continuous Integration?•  Building Blocks •  Subversion •  Maven •  Hudson •  Alternatives•  The WebLogic Maven Plugin•  The SCA build process•  Handling MDS•  Handling Task Forms•  Putting it all together 46
  • 47. More information about Continuous Integration for Oracle Fusion Middleware is available on my blog: http://redstack.wordpress.com Watch the blog for more detail leading up to OpenWorld and also for coverage of other products – OSB, ADF, WebCenter… 47ORACLE CONFIDENTIAL
  • 48. Join us at Oracle OpenWorld 2011 •  Learn more about Continuous Integration for SOA/ BPM at Oracle Develop, including: •  Handling resources (JDBC, JMS, etc) •  Parameterization of the build •  Dependencies between projects •  Using Maven Archetypes •  Harvesting assets into OER 48ORACLE CONFIDENTIAL
  • 49. <Insert Picture Here>Continuous Integration for Oracle SOA Suite and OracleUnified Business Process Management SuiteMark NelsonConsulting Solution ArchitectThe A-Team