Wednesday, February 8, 2017

Create an Oracle OSB Deploy Client (for 12cR2)

Are you trying to import an OSB project to a remote Oracle OSB 12c environment? The annoying part is that you have to have a full blown local copy of JDeveloper or OSB to do so.

These commands bring down the minimum 2.2GB to a workable 60MB of necessary JARs to allow you to do core OSB import and delete tasks.

--

These commands copy files from your local OSB 12.2.1 installation in $SOURCE to a $TARGET location which will be used as the middleware home for your deployments.

#----------------------------------------
# Extract only necessary JARs for SOA import/delete
#----------------------------------------
export SOURCE=/u01/app/oracle/middleware/products/fmw1221
export TARGET=/u02/osbdeploy/middleware
mkdir -p $TARGET/osb/tools/configjar
mkdir -p $TARGET/osb/lib/modules
mkdir -p $TARGET/oracle_common/common/bin
mkdir -p $TARGET/oracle_common/modules
mkdir -p $TARGET/wlserver/modules/features
mkdir -p $TARGET/wlserver/server/lib
mkdir -p $TARGET/coherence/lib
cp $SOURCE/osb/tools/configjar/wlst.sh $TARGET/osb/tools/configjar
cp $SOURCE/osb/lib/modules/oracle.servicebus.kernel-api.jar $TARGET/osb/lib/modules
cp $SOURCE/osb/lib/modules/oracle.servicebus.kernel-wls.jar $TARGET/osb/lib/modules
cp $SOURCE/osb/lib/modules/oracle.servicebus.configfwk.jar $TARGET/osb/lib/modules
cp $SOURCE/oracle_common/common/bin/wlst.sh $TARGET/oracle_common/common/bin
cp $SOURCE/oracle_common/common/bin/setHomeDirs.sh $TARGET/oracle_common/common/bin
cp $SOURCE/oracle_common/common/bin/commBaseEnv.sh $TARGET/oracle_common/common/bin
cp $SOURCE/oracle_common/modules/com.oracle.cie.config-security_8.4.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/org.glassfish.hk2.hk2-api.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.dependency_1.7.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.wizard_7.7.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/org.glassfish.hk2.hk2-locator.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.config-wls_8.4.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.config-wls-external_8.4.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.bea.core.utils.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.bea.core.i18n.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.config-wls-schema_8.4.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.config-external_8.4.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.service-table_1.4.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.comdev_7.7.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.config-owsm_8.4.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/org.glassfish.hk2.hk2-utils.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/javax.inject.javax.inject.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.cie.config_8.4.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.glcm.common-logging_1.5.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/oracle_common/modules/com.oracle.glcm.encryption_2.6.0.0.jar $TARGET/oracle_common/modules
cp $SOURCE/wlserver/modules/com.bea.core.management.jmx.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.encryption.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.server.stubs.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.store.admintool.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.diagnostics.accessor.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.weblogic.rmi.client.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.cluster.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.mbeanservers.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.descriptor.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.core.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.jndi.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.net.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.transaction.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.beangen.general.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.context.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.store.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.service.ffimpl.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.rmi.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.diagnostics.accessor.runtime.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.iiop-common.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.xml.beaxmlbeans.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.workarea.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.kernel.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.config.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.common.frag.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.utils.full.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.utils.classloaders.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.weblogic.security.ssl.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.jmx.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.common.internal.frag.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.core.nodemanager.client.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.timers.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.mbean.maker.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.base.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.weblogic.lifecycle.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.jndi.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.store.gxa.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.weblogic.security.digest.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.service.engapi.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.remote.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.management.core.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.core.base.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.iiop.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.service.sspi.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.service.ffapi.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.scripting.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.beanimpls.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.xml.xmlbeans.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.store.admintool-core.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.deploy.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.admin.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.weblogic.socket.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.core.nodemanager.common.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/javax.transaction.javax.transaction-api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.weblogic.workmanager.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.internal.thirdparty.jython.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.config.validators.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.package.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.logging.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.service.cssapi.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/features/wlst.wls.classpath.jar $TARGET/wlserver/modules/features
cp $SOURCE/wlserver/modules/com.oracle.weblogic.lifecycle.provisioning.wlst.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.crypto.utils.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.logging.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.deploy.beanapi.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.diagnostics.core.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/javax.enterprise.deploy.deployment-api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.utils.wrapper.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.jsr166e.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.bea.core.logging.debug.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/javax.security.jacc.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.management.security.api.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/modules/com.oracle.weblogic.security.subject.jar $TARGET/wlserver/modules
cp $SOURCE/wlserver/server/lib/weblogic.jar $TARGET/wlserver/server/lib
cp $SOURCE/coherence/lib/coherence.jar $TARGET/coherence/lib

Now that that's done, you simply now need to set your environment and point to the local copy of the minimal middleware home:

#----------------------------------------
# Files needed (contact Raastech for copy)
#----------------------------------------
# customize.xml
# envcode.properties
# osb_delete.py
# osb_import.py

#----------------------------------------
# Set Environment
#----------------------------------------
export DEPLOY_PATH=/u02/osbdeploy
export MW_HOME=/u02/osbdeploy/middleware
export OSB_HOME=$MW_HOME/osb
export CLASSPATH=""
export CLASSPATH=$OSB_HOME/lib/modules/oracle.servicebus.kernel-wls.jar:$CLASSPATH
export CLASSPATH=$MW_HOME/wlserver/modules/com.bea.core.utils.full.jar:$CLASSPATH
export CLASSPATH=$MW_HOME/wlserver/server/lib/weblogic.jar:$CLASSPATH
export CLASSPATH=$OSB_HOME/lib/modules/oracle.servicebus.kernel-api.jar:$CLASSPATH
export CLASSPATH=$OSB_HOME/lib/modules/oracle.servicebus.configfwk.jar:$CLASSPATH
# OSB 11g classpath
# export CLASSPATH=""
# export CLASSPATH=$MW_HOME/wlserver_10.3/server/lib/weblogic.jar:$CLASSPATH
# export CLASSPATH=$MW_HOME/Oracle_OSB1/lib/sb-kernel-impl.jar:$CLASSPATH
# export CLASSPATH=$MW_HOME/Oracle_OSB1/lib/sb-kernel-api.jar:$CLASSPATH
# export CLASSPATH=$MW_HOME/Oracle_OSB1/modules/com.bea.common.configfwk_1.9.0.0.jar:$CLASSPATH
# export CLASSPATH=$MW_HOME/modules/com.bea.core.utils.full_1.10.0.0.jar:$CLASSPATH

#----------------------------------------
# OSB Project Settings
#----------------------------------------
export CODE_PATH=/u02/osbdeploy/code
export CODE_PROJECT=HelloWorldOSB

#----------------------------------------
# OSB Import Command
#----------------------------------------
$MW_HOME/osb/tools/configjar/wlst.sh $DEPLOY_PATH/osb_import.py $DEPLOY_PATH/envcode.properties

#----------------------------------------
# OSB Delete Command
#----------------------------------------
$MW_HOME/osb/tools/configjar/wlst.sh $DEPLOY_PATH/osb_delete.py $DEPLOY_PATH/envcode.properties



Applicable Versions:
    • Oracle Service Bus 12c (12.2.1.x)



    No comments: