Deployment
Step 1: Prepare execution location and codebase in the server where SOA is installed
We need to create a directory in the server location where SOA installed .From that directory we need to execute our deployment scripts.For example, I assume that directory as /app/deployment. Similarly for codebase we need to create another directory. I assume that directory as /app/codebase. We need to put our composite project source here (Not application file[.jws])
Step 2: Generate Configuration Plan:
Configuration plan is created based on composite.xml. This plan is used to modify server references in BPEL process.After developing SOA composites using JDeveloper , we need to generate configuration plan file by right clicking on the composite.xml file.
We can SFTP that Composite project folder including the configuration file to /app/codebase.
Step 3: Create Deployment Property file
We need to create a property file under /app/deployment directory. Sample Property file will look like below. Named the property file as deploy<BPEL Name>.properties.
- filenamewithpath=<SAR file location>
- oraclehome=<Oracle Home Location>
- apphome=<codebase location>
- processName=<Composite Name>
- configPlan=<Configuration plan location>
- description="BPEL process"
- serverurl=<admin server url>
- bpelversion=2.0
Note: we need to change the Property file name and its content for other BPEL process.
Step 4: Create Python Script
We need to create a python script file [/app/deployment/compileComposite.py] to compile BPEL source code and create SAR file. A sample python script is as below.
- import os
- if os.environ.has_key('wlsUserID'):
- wlsUserID = os.environ['wlsUserID']
- if os.environ.has_key('wlsPassword'):
- wlsPassword = os.environ['wlsPassword']
- sca_package(apphome,processName,bpelversion,oracleHome=oraclehome)
- exit()
to know more about sca_package () please find below link http://download.oracle.com/docs/cd/E12839_01/web.1111/e13813/custom_soa.htm
we need to create python script file [/app/deployment/soa_common_deployment.py] to deploy SAR files created from above python script after attaching configuration file created from above step.
A sample python script is as follows.
- import os
- if os.environ.has_key('wlsUserID'):
- wlsUserID = os.environ['wlsUserID']
- if os.environ.has_key('wlsPassword'):
- wlsPassword = os.environ['wlsPassword']
- connect( url='t3://cbicdg-pcp06:6001', adminServerName='soa_server1')
- print "server url[",serverurl,"] filename with path [",filenamewithpath,"] bpel version [",bpelversion,"] configPlan [",configPlan,"]"
- sca_attachPlan (filenamewithpath, configPlan,true,true)
- sca_deployComposite (serverurl,filenamewithpath,true)
- exit()
Note: Unlike property file we need not to change the python file for different BPEL processes.
To know more about sca_attachPlan(),sca_deployComposite() please visit below link http://download.oracle.com/docs/cd/E12839_01/web.1111/e13813/custom_soa.htm
Step 5 : Create Build [Shell] script
We need to create a shell script which will execute above python scripts recursively for all interfaces. Below shell script will ask for Interface name and based on given name it will load corresponding property file and execute python Scripts.
- while :
- do
- echo "Enter Process Name to be build and deploy[default none]: "
- read processName
- echo /app/deployment/deploy$processName.properties
- cp /app/oracle/product/wls1032/aia11g/aia_instances/aia11gdev/config/.adf/META-INF/adf-config.xml /app/codebase/$processName/SCA-INF/classes/META-INF
- export wlsttoolhome=(Location of wlst.sh script under SOA server installation normally it resides under wls1032/soa11g/common/bin)
- export wlsUserID=$1
- export wlsPassword=$2
- cd $wlsttoolhome
- pwd
- ./wlst.sh -loadProperties /app/deployment/deploy$processName.properties /app/deployment/compileComposite.py
- mv /app/codebase/$processName/deploy/sca\_$processName\_rev2.0.jar /app/codebase/$processName/deploy/sca_$processName.jar
- cp /app/codebase/$processName/deploy/sca_$processName.jar /app/deployment
- ./wlst.sh -loadProperties /app/deployment/deploy$processName.properties /app/deployment/soa_common_deployment.py
- done
- exit()
Note:
If your BPEL process refer MDS storage then we need to define that location in adf-config.xml file.So proper adf-config.xml will refer proper mds. So in above shell script we copy standard adf-config.xml which comes with AIA installation to our SOA project [Please refer Line 6]
Step 6 : Modify Configuration file:
We need to Modify generic auto generated configuration plan by including searchReplace components and use the targeted instance host name and port name in search and replace component like below.
Migration:
Here I assume migration happens from DEV to TEST so below places needs to changed from DEV references to TEST references.
1. In configuration file like above.
2. In property file the admin server references and Oracle home needs to be changed based on TEST server references
3. In build script below lines needs to be modified based on Test server references.
Execute WLST utility
Execute the build script from /app/deployment and pass weblogic admin userid and weblogic admin password as argument. Before execution please give chmod 755 to that build.sh (refer step 5). Sample command for executing python script as follows
./build.sh <weblogic userid > <password>
if prompted please give the SOA composite name.
Note: “Deploying composite success” confirms the successful deployment.
Migrating data is risky and complex if it is not planned well. Ilabs Technology Solutions has Microsoft certified engineers who has proved their capabilities and can assist in all stages of OS Migration process.
ReplyDeleteHi,
ReplyDeleteGreat work !!
can you also share WLST script for creating "configuration/customization file" and "building" SOA composite application (ie. BPEL process).
Please contact me on abhisheknegi684@gmail.com
Harrah's Resort Southern California Casino & Hotel - Mapyro
ReplyDeleteFree Parking near 광주 출장안마 Harrah's 구미 출장샵 Rincon 남양주 출장샵 Casino & Hotel, Funner. 김포 출장샵 Rental Options: $10, free cancellation 여수 출장샵 until 6 pm. Transportation. Nearby Restaurants.