Oracle fusionmiddlewarecontinuosintegration slideshare_v1

  • 333 views
Uploaded on

Document describes in detail - Oracle Fusion Middleware …

Document describes in detail - Oracle Fusion Middleware
SOA Artifcats Code Base Repository using Subversion
Continous Integration(Compile, Package, Deploy, Test) setup usisng Subversion Maven and Hudson

  • 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
333
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
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. ORACLE FUSION MIDDLEWARECONTINUOUS INTEGRATIONENTERPRISE DEPLOYMENT Version 1.0 Draft 24 Jan 2013 Prepared By – Rakesh B Gujjarlapudi Rakesh_gujj@yahoo.comCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 1
  • 2. Table of Contents1. INTRODUCTION .................................................................................................................................................................. 31.1 Continuous Integration ............................................................................................................................................... 31.2 Overview of the document ......................................................................................................................................... 42. INSTALL HUDSON ............................................................................................................................................................... 53. CONFIGURE HUDSON .......................................................................................................................................................... 64. INSTALL MAVEN - APACHE -MAVEN-3.0.4 ........................................................................................................................... 95. CONFIGURE MAVEN - APACHE-MAVEN-3.0.4...................................................................................................................... 96. INSTALLING SUBVERSION ................................................................................................................................................... 106.1 Install Apache Portable Runtime - APR-1.4.6............................................................................................................ 106.2 Install Expat - expat-2.1.0.......................................................................................................................................... 116.3 Install Oracle Berkeley DB – 5.3.21 ........................................................................................................................... 126.4 Install ZLIB - zlib-1.2.7 ............................................................................................................................................... 136.5 Install OpenSSL-1.0.1c ............................................................................................................................................... 146.6 Install PCRE - pcre-8.30 ............................................................................................................................................. 156.7 Install SQLITE - sqlite-autoconf-3071502.tar.gz ........................................................................................................ 156.8 Install NEON - neon-0.29.6.tar.gz ............................................................................................................................. 156.9 Install Apache Web Server 2.4.3 ............................................................................................................................... 166.10 Install APR-UTIL – 1.5.1 ............................................................................................................................................. 176.11 Install SUBVERSION subversion-1.7.8.tar.gz ............................................................................................................. 186.12 Subversion Configuration.......................................................................................................................................... 197. SUBVERSION CONFIGURATION FOR JDEVELOPER 11.1.1.6 ................................................................................................... 218. CHECK INTO SUBVERSION FROM JDEVELOPER ...................................................................................................................... 229. MAVEN POM.XML FOR SOA PROJECT ............................................................................................................................... 259.1 POM.xml.................................................................................................................................................................... 2610. MAVEN POM.XML FOR SOA PROJECT (MDS DEPENDENT) ........................................................................................... 2911. MAVEN POM.XML FOR SOA PROJECT (SCA TEST) ...................................................................................................... 3012. CONTINUOUS I NTEGRATION FOR OSB ............................................................................................................................ 3113. Appendix ................................................................................................................................................................... 32Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 2
  • 3. 1. INTRODUCTIONThis document describes in detail the Continuous Integration practice against SOA artifacts.Following components were installed and configured  Hudson 3.0.0 a continuous integration deployed on Oracle Web Logic Server 10.3.6.  Apache-maven-3.0.4 a software project management and comprehension tool which is based on the concept of a project object model (POM). Maven will be used to manage projects build, reporting and documentation from a central piece of information.  Subversion-1.7.8 a source code repository1.1 Continuous IntegrationContinuous Integration (CI) is a software engineering practice which attempts to improve quality and reduce time todeliver software by applying small, frequent quality control efforts. It is characterized by these key practices:  Use of a version control system  All developers commit to the ‘HEAD’ (main code line) every day  The product is built 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)Focus of CI will be around the use of Hudson, Maven and Subversion.Continuous Integration for Oracle Fusion MiddlewareCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 3
  • 4. 1.2 Overview of the document 1. Install and Configure Hudson. 2. Install and Configure Maven. 3. Install/Configure Subversion. 4. Use the sample SOA Project in JDeveloper 11.1.16(SOA Composite Editor and Subversion plugin) Create a Maven POM (pom.xml) so that Maven (and therefore Hudson) knows how to build the composite project. 5. Check in SOA Project from JDeveloper into source code control system (Subversion) 6. Create a Hudson Job. 7. Hudson Job (Maven Job) will automatically compile, package and deploy to SOA server. If anything goes wrong, an email is generated which lets us know what happened. SCA builds are performed using a set of ANT build files and tasks 8. Maven will run the ANT jobs that are included with Oracle SOA Suite 11g. 9. Hudson will monitor the Subversion repository and when it sees a change, it will perform a build (compile, package and deploy the composite). 10. All of the server components running on Oracle Linux 5.5, everything is 64-bit. Subversion Details http://pwesoa-svn:8080/svn/repos/ User name – pwesvnadmin Password – d0sage Hudson Details WebLogic Server – 10.3.6 User name – Weblogic Password - hudsonadmin1 http://pwesoa-svn:25001/console http://pwesoa-svn:25003/hudson-3.0.0/Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 4
  • 5. 2. INSTALL HUDSONDownload HudsonCreate weblogic.xml in WEB-INF Folder<?xml version="1.0" encoding="UTF-8"?><weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"> <container-descriptor> <prefer-application-packages> <package-name>org.apache.*</package-name> <package-name>org.dom4j.*</package-name> </prefer-application-packages> </container-descriptor></weblogic-web-app>Create application.xml in META-INF Folder<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" encoding="UTF-8"?><application xmlns="http://java.sun.com/xml/ns/javaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"version="5"><module id="hudson"><web><web-uri>hudson.war</web-uri><context-root>/hudson</context-root></web></module><application xmlns="http://java.sun.com/xml/ns/javaee"</module>Create weblogic-application.xml in META-INF Folder<?xml version="1.0" encoding="UTF-8"?><wls:weblogic-applicationxmlns:wls="http://www.bea.com/ns/weblogic/weblogic-application"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsdhttp://www.bea.com/ns/weblogic/weblogic-application ><!-- server-version: 10.3 --><wls:application-param><wls:param-name>webapp.encoding.default</wls:param-name><wls:param-value>UTF-8</wls:param-value></wls:application-param><wls:prefer-application-packages><wls:package-name>org.apache.*</wls:package-name><wls:package-name>javax.xml.stream.*</wls:package-name><wls:package-name>org.dom4j.*</wls:package-name></wls:prefer-application-packages></wls:weblogic-application>Deploy application on weblogic domain(hudson_domain – AS 25001, Managed Server 25003)http://pwesoa-svn:25003/hudson-3.0.0/Hudson is now installedCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 5
  • 6. 3. CONFIGURE HUDSON Configure JDK Configure ANT Configure Maven Configure Email Address Click SaveInstall Maven 3 and Subversion Plugins and restart the WebLogic Server on which Hudson is deployedCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 6
  • 7. Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 7
  • 8. Securing HudsonCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 8
  • 9. 4. INSTALL MAVEN - APACHE-MAVEN-3.0.4Download Maven http://maven.apache.org/download.cgiSoftware Location - /u02/svnSoftware File - /u02/svn/apache-maven-3.0.4-bin.tar.gzSoftware Folder - /u02/svn/apache-maven-3.0.4[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf apache-maven-3.0.4-bin.tar.gzSet Maven Home[aoracle@soadev03]$ export M2_HOME=/u02/svn/apache-maven-3.0.4Set Java Home[aoracle@soadev03]$ export JAVA_HOME=/u02/oracle/jdk1.6.0_34/binSet Path[aoracle@soadev03]$ export PATH=$PATH:$M2_HOME/binCheck Maven Version for validity[aoracle@soadev03 lib]$ mvn --versionApache Maven 3.0.4 (r1232337; 2012-01-17 02:44:56-0600)Maven home: /u02/svn/apache-maven-3.0.4Java version: 1.6.0_34, vendor: Sun Microsystems Inc.Java home: /u02/oracle/jdk1.6.0_34/jreDefault locale: en_US, platform encoding: UTF-8OS name: "linux", version: "2.6.18-238.5.1.0.1.el5", arch: "i386", family: "unix"5. CONFIGURE MAVEN - APACHE-MAVEN-3.0.4Setup Maven Plugin[aoracle@soadev03]$ cd <WL_HOME>/wlserver/server/lib[aoracle@soadev03]$ java -jar wljarbuilder.jar -profile weblogic-maven-pluginExtract the Maven pom.xml from weblogic-maven-plugin.jar META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml and place it in <WL_HOME>/wlserver/server/lib[aoracle@soadev03]$ mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=pom.xmlThe plugin will now be available for use. We can execute the ‘help’ goal to test it:[aoracle@soadev03]$ mvn com.oracle.weblogic:weblogic-maven-plugin:helpCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 9
  • 10. 6. INSTALLING SUBVERSION6.1 Install Apache Portable Runtime - APR-1.4.6The Apache Portable Runtime (APR) is a supporting library for the Apache web server. It provides a set of applicationprogramming interfaces (APIs) that map to the underlying Operating System (OS). Where the OS doesnt support aparticular function, APR will provide emulation. Thus programmers can use the APR to make a program portable acrossdifferent platforms.Software Location - /u02/svnSoftware File - /u02/svn/apr-1.4.6.tar.bz2Software Folder - /u02/svn/apr-1.4.6[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar –xjf apr-1.4.6.tar.bz2[aoracle@soadev03]$ cd /u02/svn/apr-1.4.6[aoracle@soadev03]$ ./configure --prefix=/u02/svn/apr --disable-static --with-installbuilddir=/u02/svn/apr/share/apr-1/build[aoracle@soadev03]$ make[aoracle@soadev03]$ make installAPR is now installed in /u02/svn/aprCommand Execution--disable-static: This stops it from compiling a static version of libapr-1.ContentsInstalled ComponentsInstalled Program:apr-1-configInstalled Library:libapr-1.soInstalled Directories/u02/svn/apr and /u02/svn/apr share/apr-1/buildShort Description  apr-1-config Is a shell script used to retrieve information about the apr library in the system. It is typically used to compile and link against the library.  libapr-1.so is the Apache Portable Runtime library.Package InformationDownload (HTTP): http://archive.apache.org/dist/apr/apr-1.4.6.tar.bz2Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 10
  • 11. 6.2 Install Expat - expat-2.1.0The Expat package contains a stream oriented C library for parsing XMLSoftware Location - /u02/svnSoftware File - /u02/svn/expat-2.1.0.tar.gzSoftware Folder - /u02/svn/expat-2.1.0[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf expat-2.1.0.tar.gz[aoracle@soadev03]$ cd /u02/svn/expat-2.1.0[aoracle@soadev03]$ ./configure --prefix=/u02/svn/expat[aoracle@soadev03]$ make[aoracle@soadev03]$ make installEXPAT is now installed in /u02/svn/expatCommand Execution--disable-static: This stops it from compiling a static version of libapr-1.ContentsInstalled Program:xmlwfInstalled Library:libexpat.{so,a}Installed Directory: /u02/svn/expatShort Description  xmlwf is a non-validating utility to check whether or not XML documents are well formed.  libexpat.{so,a} contains API functions for parsing XML.Package InformationDownload (HTTP): http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gzCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 11
  • 12. 6.3 Install Oracle Berkeley DB – 5.3.21The Oracle Berkeley DB family of open source, embeddable databases provides developers with fast, reliable, localpersistence with zero administration.Software Location - /u02/svnSoftware File - /u02/svn/db-5.3.21.tar.gzSoftware Folder - /u02/svn/db-5.3.21[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf db-5.3.21.tar.gz[aoracle@soadev03]$ cd /u02/svn/ db-5.3.21[aoracle@soadev03]$ cd build_unix[aoracle@soadev03]$ ../dist/configure --prefix=/u02/svn/berkeley --enable-compat185 --enable-dbm --disable-static --enable-cxx[aoracle@soadev03]$ make[aoracle@soadev03]$ make installBerkeley is now installed in /u02/svn/ berkeleyCommand Executioncd build_unix && ../dist/configure --prefix=/u02...: This replaces the normal ./configure command, as Berkeley DB comeswith various build directories for different platforms.--enable-compat185: This switch enables building the DB-1.85 compatibility API.--enable-cxx: This switch enables building C++ API libraries.--enable-dbm: Enables legacy interface support needed by some older packages.ContentsInstalled Programs:db_archive, db_checkpoint, db_deadlock, db_dump, db_hotbackup, db_load, db_log_verify,db_printlog, db_recover, db_replicate, db_stat, db_tuner, db_upgrade and db_verify.Installed Libraries:libdb.so and libdb_cxx.soInstalled Directory:/usr/share/doc/db-5.3.21Short Descriptiondb_archive prints the pathnames of log files that are no longer in use.db_checkpoint is a daemon process used to monitor and checkpoint database logs.db_deadlock is used to abort lock requests when deadlocks are detected.db_dump converts database files to a flat file format readable by db_load.db_hotbackup creates "hot backup" or "hot failover" snapshots of Berkeley DB databases.db_load is used to create database files from flat files created with db_dump.db_log_verify verifies the log files of a database.db_printlog converts database log files to human readable text.db_recover is used to restore a database to a consistent state after a failure.db_replicate is a daemon process that provides replication/HA services on a transactional environment.Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 12
  • 13. db_stat displays database environment statistics.db_tuner analyzes the data in a btree database, and suggests a page size that is likely to deliver optimal operation.db_upgrade is used to upgrade database files to a newer version of Berkeley DB.db_verify is used to run consistency checks on database filesPackage InformationDownload (HTTP): http://oracle.com6.4 Install ZLIB - zlib-1.2.7Software Location - /u02/svnSoftware File - /u02/svn/zlib-1.2.7.tar.gzSoftware Folder - /u02/svn/zlib-1.2.7[aoracle@soadev03]$ cd /u02/svn/zlib-1.2.7[aoracle@soadev03]$ tar zxvf zlib-1.2.7.tar.gz[aoracle@soadev03]$ cd /u02/svn/zlib-1.2.7[aoracle@soadev03]$ ./configure --prefix=/u02/svn/zlib[aoracle@soadev03]$ make[aoracle@soadev03]$ make installZLIB is now installed in /u02/svn/zlibCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 13
  • 14. 6.5 Install OpenSSL-1.0.1cThe OpenSSL package contains management tools and libraries relating to cryptography. These are useful for providingcryptography functions to other packages, such as OpenSSH, email applications and web browsers (for accessing HTTPSsites).Additional DownloadsRequired patch: http://www.linuxfromscratch.org/patches/blfs/svn/openssl-1.0.1c-fix_manpages-1.patchSoftware Location - /u02/svnSoftware File - /u02/svn/openssl-1.0.1c.tar.gzSoftware Folder - /u02/svn/openssl-1.0.1cPatch Location Software Folder - /u02/svn/openssl-1.0.1c-fix_manpages-1.patch[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf openssl-1.0.1c.tar.gz[aoracle@soadev03]$ cd /u02/svn/ openssl-1.0.1c[aoracle@soadev03]$patch -Np1 -i ../openssl-1.0.1c-fix_manpages-1.patch &&[aoracle@soadev03]$./config --prefix=/u02/svn/openssl zlib-dynamic --openssldir=/u02/svn/openssl shared &&[aoracle@soadev03]$ make[aoracle@soadev03]$ make installOPEN SSL is now installed in /u02/svn/opensslConfig Files/u02/svn/openssl/ssl/openssl.cnfCommand Executionshared: This parameter forces the creation of shared libraries along with the static libraries.zlib-dynamic: This parameter adds compression/decompression functionality using the libz library.ContentsInstalled Programs:c_rehash and openssl.Installed Libraries:libcrypto.{so,a}, libssl.{so,a}, and additional encryption libraries in /usr/lib/engines/ (lib4758cca.so,libaep.so, libatalla.so, libcapi.so, libchil.so, libcswift.so, libgmp.so, libgost.so, libnuron.so, libpadlock.so, libsureware.so,and libubsec.so).Short Descriptionc_rehash is a Perl script that scans all files in a directory and adds symbolic links to their hash values.Openssl is a command-line tool for using the various cryptography functions of OpenSSLs crypto library from the shell. Itcan be used for various functions which are documented in man 1 openssl.libcrypto.{so,a} implements a wide range of cryptographic algorithms used in various Internet standards.libssl.{so,a} implements the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols.Package InformationDownload (HTTP): http://www.openssl.org/source/openssl-1.0.1c.tar.gzCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 14
  • 15. 6.6 Install PCRE - pcre-8.30Software Location - /u02/svnSoftware File - /u02/svn/ pcre-8.30.tar.gzSoftware Folder - /u02/svn/ pcre-8.30[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf pcre-8.30.tar.gz[aoracle@soadev03]$ cd /u02/svn/ pcre-8.30[aoracle@soadev03]$ ./configure --prefix=/u02/svn/pcre[aoracle@soadev03]$ make[aoracle@soadev03]$ make installPCRE is now installed in /u02/svn/expat6.7 Install SQLITE - sqlite-autoconf-3071502.tar.gzSoftware Location - /u02/svnSoftware File - /u02/svn/sqlite-autoconf-3071502.tar.gzSoftware Folder - /u02/svn/sqlite-autoconf-3071502[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf sqlite-autoconf-3071502.tar.gz[aoracle@soadev03]$ cd /u02/svn/sqlite-autoconf-3071502[aoracle@soadev03]$ ./configure --prefix=/u02/svn/sqlite[aoracle@soadev03]$ make[aoracle@soadev03]$ make installSQLITE is now installed in /u02/svn/sqlite6.8 Install NEON - neon-0.29.6.tar.gzSoftware Location - /u02/svnSoftware File - /u02/svn/ neon-0.29.6.tar.gzSoftware Folder - /u02/svn/ neon-0.29.6[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf neon-0.29.6.tar.gz[aoracle@soadev03]$ cd /u02/svn/ neon-0.29.6[aoracle@soadev03]$ ./configure --prefix=/u02/svn/neon[aoracle@soadev03]$ make[aoracle@soadev03]$ make installNEON is now installed in /u02/svn/neonCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 15
  • 16. 6.9 Install Apache Web Server 2.4.3Software Location - /u02/svn/Software File - /u02/svn/ httpd-2.4.3.tar.gzSoftware Folder - /u02/svn/ httpd-2.4.3[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf httpd-2.4.3.tar.gz[aoracle@soadev03]$ cd /u02/svn/ httpd-2.4.3.tar.gz[aoracle@soadev03]$ export LD_LIBRARY_PATH=/u02/svn/berkeley/lib[aoracle@soadev03]$ ./configure --prefix=/u02/svn/apache[aoracle@soadev03]$ make[aoracle@soadev03]$ make install[aoracle@soadev02 bin]$ cd /u02/svn/apache/bin [aoracle@soadev02 bin]$ apachectl -f /u02/svn/apache/conf/httpd.conf -tSyntax OK[aoracle@soadev02 bin]$ ./apachectl -f /u01/Apache/apache2.2/conf/httpd.conf -k startCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 16
  • 17. 6.10 Install APR-UTIL – 1.5.1The Apache Portable Runtime Utility Library provides a predictable and consistent interface to underlying client libraryinterfaces. This application programming interface assures predictable if not identical behavior regardless of whichlibraries are available on a given platform.Software Location - /u02/svnSoftware File - /u02/svn/apr-util-1.5.1.tar.bz2Software Folder - /u02/svn/apr-util-1.5.1[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar –xjf expat-2.1.0.tar.gz[aoracle@soadev03]$ cd /u02/svn/ apr-util-1.5.1[aoracle@soadev03]$ export LD_LIBRARY_PATH=/u02/svn/berkeley/lib[aoracle@soadev03]$ ./configure --prefix=/u02/svn/apr-util --with-apr=/u02/svn/apr --with-gdbm=/u02/svn --with-berkeley-db=/u02/svn/berkeley/include:/u02/svn/berkeley/lib --with-openssl=/u02/svn/openssl[aoracle@soadev03]$ make[aoracle@soadev03]$ make installAPR-UTIL is now installed in /u02/svn/apr-utilCommand Execution--with-gdbm=/u02/svn: This option makes it compile the apr_dbm_gdbm-1.so plugin.--with-berkeley-db=/usr: If you have installed Berkeley DB-5.3.21 use this option to compile the apr_dbm_db-1.soplugin.--with-openssl=/u02/svn/openssl and --with-crypto: If you have installed OpenSSL-1.0.1c, use these options to compilethe apr_crypto_openssl-1.so plugin.ContentsInstalled Program:apu-1-configInstalled Library:libaprutil-1.soInstalled Directory:/usr/lib/apr-util-1Short Description  apu-1-config is a simple script that provides information about the installed APR-Util program.  libaprutil-1.so contains functions that provide a predictable and consistent interface to underlying client library interfaces.Package InformationDownload (HTTP): http://archive.apache.org/dist/apr/apr-util-1.5.1.tar.bz2Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 17
  • 18. 6.11 Install SUBVERSION subversion-1.7.8.tar.gzSubversion is a version control system that is designed to be a compelling replacement for CVS in the open sourcecommunity.Software Location - /u02/svnSoftware File - /u02/svn/ subversion-1.7.8.tar.gzSoftware Folder - /u02/svn/ subversion-1.7.8[aoracle@soadev03]$ cd /u02/svn/[aoracle@soadev03]$ tar zxvf subversion-1.7.8.tar.gz[aoracle@soadev03]$ cd /u02/svn/subversion-1.7.8[aoracle@soadev03]$ export LD_LIBRARY_PATH=/u02/svn/berkeley/lib[aoracle@soadev03]$ ./configure --prefix=/u02/svn/subversion --with-apxs=/u02/svn/apache/bin/apxs --with-apr=/u02/svn/apr --with-apr-util=/u02/svn/apr-util --with-zlib=/u02/svn/zlib --with-neon=/u02/svn/neon[aoracle@soadev03]$ make[aoracle@soadev03]$ make installSUBVERSION is now installed in /u02/svn/subversionCommand Execution--disable-static: This stops it installing static versions of the libraries.ContentsInstalled Programs:svn, svnadmin, svndumpfilter, svnlook, svnserve, svnsync and svnversionInstalled Libraries:libsvn*.so and optionally, a Java library, the mod_dav_svn.so, and mod_authz_svn.so Apache HTTPDSO modules and various Perl and Python modules.Short Description  svn is a command-line client program used to access Subversion repositories.  svnadmin is a tool for creating, tweaking or repairing a Subversion repository.  svndumpfilter is a program for filtering Subversion repository dumpfile format streams.  Svnlook is a tool for inspecting a Subversion repository.  svnrdump is a tool for dumping or loading a remote Subversion repository.  Svnserve is a custom standalone server program, able to run as a daemon process or invoked by SSH.  Svnsync is a Subversion repository synchronisation tool.  Svnversion is used to report the version number and state of a working Subversion repository copy.  libsvn_*.so are the support libraries used by the Subversion programs.  mod_authz_svn.so is a plug-in module for the Apache HTTP server, used to authenticate users to a Subversion repository over the Internet or an intranet.  mod_dav_svn.so is a plug-in module for the Apache HTTP server, used to make a Subversion repository available to others over the Internet or an intranet.Package InformationDownload (HTTP): http://archive.apache.org/dist/subversion/subversion-1.7.8.tar.bzCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 18
  • 19. 6.12 Subversion ConfigurationAdd this in /u02/svn/apache/conf/httpd.conf fileLoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.soMake sure you will add these lines after LoadModule dav_module modules/mod_dav.soCreate one repository with svnadmin command. Run this command inside your subversion folder.svnadmin create reposls reposconf dav db format hooks locks README.txtThis full path you have to specify in SVNPath.Then at the end of the httpd.conf file you have to add#for svn path<Location /svn/repos>DAV svnSVNPath /u02/svn/subversion/repos</Location>now restart apacheFor security purpose to give authentication to the user we have to create authentication file with the command,[aoracle@soadev03 bin]$ htpasswd -cm /u02/svn/subversion/svn-auth-file pwesvnadminNew password:Re-type new password:Adding password for user pwesvnadminAnd to specify which access you want to give the user, create svn-access-file inside /etc.Inside this file add code as,[/] * = rwThis will give authentication to every user specified in Require user inside location.You can specify this inside httpd.conf file as,Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 19
  • 20. <Location /svn/repos>DAV svnSVNPath /u02/svn/subversion/reposAuthzSVNAccessFile /u02/svn/subversion/svn-access-fileAuthType BasicAuthName “Subversion repository”AuthUserFile /u02/svn/subversion/svn-auth-fileRequire user user_name</Location>Subversion URLhttp://pwesoa-svn:8080/svn/repos/User name – pwesvnadminPassword – d0sageCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 20
  • 21. 7. SUBVERSION CONFIGURATION FOR JDEVELOPER 11.1.1.6Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 21
  • 22. 8. CHECK INTO SUBVERSION FROM JDEVELOPER Select Version Project Select SubversionCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 22
  • 23. Welcome screen Select DestinationCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 23
  • 24. Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 24
  • 25. 9. MAVEN POM.XML FOR SOA PROJECTIn JDeveloper,Create an Application to hold Project(s). There can be one or more projects in an application. Within the project, we aregoing to create a Maven POM so that Maven (and therefore Hudson) knows how to build our composite project.Look at the ANT jobs we will use. These are found in the SOA Suite installation under the Oracle_SOA1/bin directory:Scripts to compile, package and deploy our project.ant-sca-compile.xml Compiles a composite projectant-sca-package.xml Packages a composite project (into a SAR)ant-sca-deploy.xml Deploys a composite project (a SAR)Each script needs some variables/properties/arguments to tell it what to do:ant-sca-compile.xml, target: scac scac.input: The location of the composite.xmlant-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 compositeant-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 intoCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 25
  • 26. 9.1 POM.xmlpom.xml will be added into the project. It will be in the same place where the composite.xml is located.<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion><!-- Group ID is the Application Name --><groupId>SOASuiteSamples</groupId><!-- Artificat ID is the Project Name --><artifactId>HelloWorld</artifactId><version>1.0-SNAPSHOT</version><scm> <connection>scm:svn:svn://pwesvnadmin@pwesoa-svn/svn/repos/pweSOA/SOASuiteSamples/HelloWorld</connection> <developerConnection>scm:svn:svn://pwesvnadmin@pwesoa-svn/svn/repos/pweSOA/SOASuiteSamples/HelloWorld</developerConnection></scm><dependencies></dependencies><build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>sca-compile</id> <phase>compile</phase> <configuration> <target> <property name="scac.input" value="${basedir}/composite.xml" /> <ant antfile="/u02/oracle/Middleware/Oracle_SOA1/bin/ant-sca-compile.xml" dir="/u02/oracle/Middleware/Oracle_SOA1/bin" target="scac" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> <id>sca-package</id> <phase>package</phase> <configuration> <target> <property name="build.compiler" value="extJavac"/> <property name="compositeName" value="${project.artifactId}" /> <property name="compositeDir" value="${basedir}" /> <property name="revision" value="${project.version}" /> <ant antfile="/u02/oracle/Middleware/Oracle_SOA1/bin/ant-sca-package.xml" dir="/u02/oracle/Middleware/Oracle_SOA1/bin" target="package" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution>Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 26
  • 27. <execution> <id>sca-deploy</id> <phase>deploy</phase> <configuration> <target> <property name="serverURL" value="http://pwesoa1v:7001" /> <property name="user" value="weblogic" /> <property name="password" value="weblogic1" /> <property name="sarLocation" value="${basedir}/deploy/sca_${project.artifactId}_rev${project.version}.jar" /> <property name="overwrite" value="true" /> <property name="forceDefault" value="true" /> <property name="partition" value="default" /> <ant antfile="/u02/oracle/Middleware/Oracle_SOA1/bin/ant-sca-deploy.xml" dir="/u02/oracle/Middleware/Oracle_SOA1/bin" target="deploy" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <distributionManagement> <!-- use the following if youre not using a snapshot version. --> <repository> <id>local</id> <name>local repository</name> <url>file:///home/aoracle/.m2/repository</url> </repository> <!-- use the following if you ARE using a snapshot version. --> <snapshotRepository> <id>localSnapshot</id> <name>local snapshot repository</name> <url>file:///home/aoracle/.m2/repository</url> </snapshotRepository> </distributionManagement></project>First section is the Maven coordinates that will identify this project.groupId the name of your applicationartifactId the name of your project.<groupId>soaProject2</groupId><artifactId>soaProject2</artifactId><version>1.0-SNAPSHOT</version>Second section indicates details for our Subversion server.Maven will use the details here in the POM if we want to do a ‘release’ in Maven. The distributionManagement section(see above) is also provided for this purpose and so that Maven can archive our builds during deployment.<scm> <connection>scm:svn:svn+ssh://mark@ofm1.au.oracle.com/home/mark/svnrepos/soaProject2/trunk</connection> <developerConnection>scm:svn:svn+ssh://mark@ofm1.au.oracle.com/home/mark/svnrepos/soaProject2/trunk</developerConnection></scm>maven-antrun-plugin to execute the ANT tasks.Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 27
  • 28. You can see the configuration in the complete POM above. We will include the three separate ANT jobs (compile,package and deploy) in three phases of our Maven build. Basically, we create an execution, give it an id, assign it to aphase, and then we add inside the target section our property‘s and then run the ant task giving it the antfile, a directoryto run in, and a target to run. Here is the relevant section for the compile:<execution> <id>sca-compile</id> <phase>compile</phase> <configuration> <target> <property name="scac.input" value="${basedir}/composite.xml" /> <ant antfile="/home/mark/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-compile.xml" dir="/home/mark/Oracle/Middleware/Oracle_SOA1/bin" target="scac" /> </target>You can see the full POM above. One little trick to be aware of is that we need to add an extra property to the packagephase to make sure it uses the external JDK. If you don’t include this property, you will most likely get an error tellingyou ANT cannot find javac because it is pointing to a JRE, not a JDK.<property name="build.compiler" value="extJavac"/>Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 28
  • 29. 10. MAVEN POM.XML FOR SOA PROJECT (MDS DEPENDENT)MDS Location in Descriptors -> ADF META-INF -> adf-config.xml<?xml version="1.0" encoding="windows-1252" ?><adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:config="http://xmlns.oracle.com/bc4j/configuration" xmlns:adf="http://xmlns.oracle.com/adf/config/properties" xmlns:sec="http://xmlns.oracle.com/adf/security/config"> <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config"> <defaults useBindVarsForViewCriteriaLiterals="true"/> <startup> <amconfig-overrides> <config:Database jbo.locking.mode="optimistic"/> </amconfig-overrides> </startup> </adf-adfm-config> <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties"> <adf-property name="adfAppUID" value="SOASuiteSamples-4658"/> </adf:adf-properties-child> <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config"> <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore" credentialStoreLocation="../../src/META-INF/jps-config.xml"/> </sec:adf-security-child> <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config"> <mds-config xmlns="http://xmlns.oracle.com/mds/config"> <persistence-config> <metadata-namespaces> <namespace metadata-store-usage="mstore-usage_1" path="/soa/shared"/> </metadata-namespaces> <metadata-store-usages> <metadata-store-usage id="mstore-usage_1"> Replace File Based with DB Based MDS <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore"> <property value="${oracle.home}/integration" name="metadata-path"/> <property value="seed" name="partition-name"/> </metadata-store> <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore"> <property name="jdbc-userid" value="R6DEV_MDS"/> <property name="jdbc-password" value="c0aster"/> <property name="jdbc-url" value="jdbc:oracle:thin:@10.20.129.134:1521:SOAREP"/> <property name="partition-name" value="soa-infra"/> </metadata-store> </metadata-store-usage> </metadata-store-usages> </persistence-config> </mds-config> </adf-mds-config></adf-config>Include base directory in pom.xml in compile and package section<property name="scac.application.home" value="${basedir}/.." />Setting the scac.application.home is required when you use MDS-dependent components, as the build tasks will look fora configuration file called {scac.application.home}/.adf/adf-config.xml in order to find out where your MDS is located. Ifyou do not set this parameter, the (ANT) build tasks will not be able to find your MDS and the build will failCopyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 29
  • 30. 11. MAVEN POM.XML FOR SOA PROJECT (SCA TEST)Create Test Cases for the composite and include the following lines in pom.xml<execution> <id>sca-test</id> <phase>deploy</phase> <configuration> <target> <property name="jndi.properties.input" value=" /u02/oracle/Middleware/sca-test.jndi.properties" /> <property name="scatest.input" value="SCATestSample" /> <property name="scatest.format" value="junit" /> <property name="scatest.result" value="reports" /> <ant antfile=" /u02/oracle/Middleware/Oracle_SOA1/bin/ant-sca-test.xml" dir=" /u02/oracle/Middleware/Oracle_SOA1/bin" target="test" /> </target> </configuration> <goals> <goal>run</goal> </goals></execution>jndi.propertiesjava.naming.factory.initial=weblogic.jndi.WLInitialContextFactoryjava.naming.provider.url=t3://bpm.mark.oracle.com:7001/soa-infrajava.naming.security.principal=weblogicjava.naming.security.credentials=welcome1dedicated.connection=truededicated.rmicontext=trueCreate a NEW JOB in Hudson and select Build a free-style software projectIn the Build section, click on the Add build step button and choose Invoke top-level Maven targets. Enter clean deployas your Goals and set the POM to pom.xml.In the Post-build Actions section, check the option to Publish JUnit test result report and enter the location of reports (inYour report XMLs) as reports/*.xml. This tells Hudson to look for XML files in the reports directory. Recall that weconfigured this in our POM earlier.Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 30
  • 31. 12. CONTINUOUS INTEGRATION FOR OSBComing Soon…………..Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 31
  • 32. 13. Appendixhttp://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/Plugin version 1.7Copyright 2013, Rakesh Gujjarlapudi. All rights reserved. Page 32