In OBIEE 11g the deployment procedure of RPD is handling by the Enterprise manager, but while doing the deployment of RPD using Enterprise Manager( to see how to deploy RPD using EM click here) I feel it is more time consuming as some time enterprise manager takes time to load the graphics.
To over come from such situation the OBIEE provides WLST(Weblogic Scripting tool), so I thought I can pulled the hand completed, by launching the WLST and then running the RPD deployment script.then question arises can we call the WLST and the command related to WLST in shell script and I crested the following script
echo "Enter user : "
read user
echo "Enter password : "
read password
echo "Enter host(ex. adminAddress:adminPort) : "
read host
echo "Enter RPD Path and Name (ex. /~/rpd_name.rpd) : "
read rpd_path
echo "Enter RPD Password : "
read rpd_password
/export/home/oracle/
read user
echo "Enter password : "
read password
echo "Enter host(ex. adminAddress:adminPort) : "
read host
echo "Enter RPD Path and Name (ex. /~/rpd_name.rpd) : "
read rpd_path
echo "Enter RPD Password : "
read rpd_password
/export/home/oracle/
connect(user,password,host)
domainCustom()
cd('oracle.biee.admin')
# Lock
print 'Obtaining lock...'
cd('oracle.biee.admin:type=
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
try:
invoke('lock', objs, strs)
except:
print 'Already locked'
# Lock Complete
cd('..')
# Upload
print 'Uploading repository...'
cd('oracle.biee.admin:type=
params = jarray.array([rpd_path,rpd_
sign = jarray.array(['java.lang.
invoke( 'uploadRepository', params, sign)
# Upload Complete
cd('..')
# Commit
print 'Applying changes...'
cd('oracle.biee.admin:type=
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
try:
invoke('commit', objs, strs)
except:
print 'Not Locked'
#Commit Complete
exit()
/export/home/oracle/
echo OPMNCTL Starting.......
/export/home/oracle/
/export/home/oracle/
But I want to pull out hands so it is necessary to deploy the RPD and restart the services from shell script only, so I created two file once shell script and another is .PY as WLST accept only the jython.
Deploy.sh
echo "Enter the path (from current directory) of .py file: "
read pp
[weblogic_Home]/common/bin/wlst. sh $pp
[oracle_Home]/ instances/instance1/bin/ opmnctl stopall
echo OPMNCTL Starting.......
[Oracle_Home]/ instances/instance1/bin/ opmnctl startall
read pp
[weblogic_Home]/common/bin/wlst.
[oracle_Home]/
echo OPMNCTL Starting.......
[Oracle_Home]/
[Oracle_Home]/instances/instance1/bin/opmnctl status
RPD_Deployment.py
user = raw_input("Enter user : ")
password = raw_input("Enter password : ")
host = raw_input("Enter host(ex. adminAddress:adminPort) : ")
rpd_path = raw_input("Enter RPD Path and Name (ex. C:/~/rpd_name.rpd) ")
rpd_password = raw_input("Enter RPD Password : ")
connect(user,password,host)
password = raw_input("Enter password : ")
host = raw_input("Enter host(ex. adminAddress:adminPort) : ")
rpd_path = raw_input("Enter RPD Path and Name (ex. C:/~/rpd_name.rpd) ")
rpd_password = raw_input("Enter RPD Password : ")
connect(user,password,host)
domainCustom()
cd('oracle.biee.admin')
# Lock
print 'Obtaining lock...'
cd('oracle.biee.admin:type=
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
try:
invoke('lock', objs, strs)
except:
print 'Already locked'
# Lock Complete
cd('..')
# Upload
print 'Uploading repository...'
cd('oracle.biee.admin:type=
params = jarray.array([rpd_path,rpd_
sign = jarray.array(['java.lang.
invoke( 'uploadRepository', params, sign)
# Upload Complete
cd('..')
# Commit
print 'Applying changes...'
cd('oracle.biee.admin:type=
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
try:
invoke('commit', objs, strs)
except:
print 'Not Locked'
#Commit Complete
exit()
Now...I call the WLST launch command and all the function required to deploy the RPD through the shell script itself in Deploy.sh and provide the path of RPD_Deployment.py.
Note:To avoid the parameter pass on the shell we can also create parameter and there values in to the separate the script and use the values of them in RPD_Deployment.py
No comments:
Post a Comment