After poking around, I found that you can call the catalog manager form the command line, and along with WLST scripting, you can do a fully automated web catalog deployment.
After the jump is a script which can be used to do OBIEE 11g web catalog deployments. This script assumes you have setup ssh keys on the various servers so you can login without typing a password (http://www.linuxproblem.org/art_9.html).
At a high level, the script will
- Perform either a full deployment or an incremental deployment
- Remotely connects to the destination, and SCPs the web catalog
- When doing an incremental deployment
- it skips all user folders (and any other folders you specify)
- it creates a diff of the new catalog and the currently deployed catalog
- it creates a patch file based on the diff
- it applies the patch to the currently deployed catalog
- When doing a full deployment
- Call WLST with a custom script to lock, update the web catalog path, commit the changes, and restart the BI server
- Performs a resync of user GUIDs after the deployment
#!/bin/bash ###### # deployWebCat.sh # Created by Ben Mackin (bmackin@gmail.com) # # This script will check the diffs on the currently deployed webcat and a new web cat and deploy only the changes. # Note: This script ignores the user folders, and doesn't attempt to migrate any user reports. That has to be done manually. ###### set -o pipefail checkStatus () { if [ $1 -ne 0 ]; then if [ "${3-zz}" != "zz" ]; then exec $3 fi echo -e "\n`date +[%H:%M:%S]` ###### FAILED ######\n\n" | tee -a $LOGFILE echo "The deploy failed: $2" | mutt -a $LOGFILE -s "$SUBJECT - FAILED" $EMAIL exit 1 fi echo -e "`date +[%H:%M:%S]` ## Success\n" | tee -a $LOGFILE return 0 } # If there are less than 1 parameters, then show help and exit if [ $# -lt 1 ]; then echo -e "\nUsage: deployWebCat.sh deploymentLoc\n\t Where deploymentLoc is DEV|SIT|PATCH|QA|PROD\n" exit -1 fi FULL_DEPLOY=0 if [ "$2" = "FULL" ]; then FULL_DEPLOY=1 echo -e "`date +[%H:%M:%S]` ## Performing a Full Deploy\n" | tee -a $LOGFILE fi if [ "$1" = "DEV" ]; then SERVERHOST=appobid WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 elif [ "$1" = "SIT" ]; then SERVERHOST=appobisit WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 elif [ "$1" = "PATCH" ]; then SERVERHOST=appobipat WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 elif [ "$1" = "PROD" ]; then SERVERHOST=appobiprod WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 elif [ "$1" = "QA" ]; then SERVERHOST=appobiqa WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 else echo -e "\n`date +[%H:%M:%S]` ###### FAILED ######\n\n" echo "The deployment failed: $1 is undefined." exit 1 fi SUPPORT_LOC=~/support SVN_LOC=~/svnget # change this to the location where the webcat to deploy is PRE_DEPLOY_LOC=/tmp/bmackin/deploy FMWHOME=/apps/applobi/OBIEE11g # change this to the fusion middleware home OBI_INSTANCE=${FMWHOME}/instances/instance1 WEB_CAT_NAME=EnterpriseBusinessAnalytics7963_Extn # change this to the name of the web catalog folder PRE_DEPLOY_LOC=/tmp/predeploy # this folder gets created below WEB_CAT_PARENT_DIR=${OBI_INSTANCE}/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1 LOGFILE=~/logs/${SERVERHOST}_webcatdeploy_$(date +%y%m%d_%H%M%S).log EMAIL=null@null.com DATE=`date +%y%m%d_%H%M%S` SUBJECT="OBIEE Web Cat Deployment on $SERVERHOST - `date +%m/%d/%Y` @ `date +%H:%M:%S`" echo -e "`date +[%H:%M:%S]` ## Doing Web Catalog deployment to $SERVERHOST\n" | tee -a $LOGFILE ## # Use SVN to get the web cat ## ## # Stop services and backup the deployed web cat ## if [ $FULL_DEPLOY = 0 ]; then echo -e "`date +[%H:%M:%S]` ## Stop services and backup the currently deployed web cat \n" | tee -a $LOGFILE ssh $SERVERHOST "'$OBI_INSTANCE'/bin/opmnctl stopall" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The deployment failed: ssh $SERVERHOST \"'$OBI_INSTANCE'/bin/opmnctl stopall\"" ssh $SERVERHOST "rm '$WEB_CAT_PARENT_DIR'/catalog/'$WEB_CAT_NAME'.zip" 2>&1 | tee -a $LOGFILE ssh $SERVERHOST "cd '$WEB_CAT_PARENT_DIR'/catalog; zip -q -r '$WEB_CAT_NAME' '$WEB_CAT_NAME'; mv '$WEB_CAT_NAME'.zip '$WEB_CAT_NAME'_'$DATE'.zip" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The deployment failed: ssh $SERVERHOST \"cd '$WEB_CAT_PARENT_DIR'/catalog; zip -q -r '$WEB_CAT_NAME' '$WEB_CAT_NAME'; mv '$WEB_CAT_NAME'.zip '$WEB_CAT_NAME'_'$DATE'.zip\"" echo -e "`date +[%H:%M:%S]` ## Move the file to the pre-deployment directory\n" | tee -a $LOGFILE ssh $SERVERHOST "rm -rf '$PRE_DEPLOY_LOC'" 2>&1 | tee -a $LOGFILE ssh $SERVERHOST "mkdir -p '$PRE_DEPLOY_LOC'" 2>&1 | tee -a $LOGFILE scp $SVN_LOC/$WEB_CAT_NAME.zip $SERVERHOST:$PRE_DEPLOY_LOC/$WEB_CAT_NAME.zip 2>&1 | tee -a $LOGFILE checkStatus "$?" "The deployment failed: scp $SVN_LOC/$WEB_CAT_NAME.zip $SERVERHOST:$PRE_DEPLOY_LOC/$WEB_CAT_NAME.zip" echo -e "`date +[%H:%M:%S]` ## Unzip the new catalog\n" | tee -a $LOGFILE ssh $SERVERHOST "cd '$PRE_DEPLOY_LOC'; unzip -q '$WEB_CAT_NAME'.zip" 2>&1 | tee -a $LOGFILE echo -e "`date +[%H:%M:%S]` ## Success\n" | tee -a $LOGFILE echo -e "`date +[%H:%M:%S]` ## Create a DIFF file for two webcats\n" | tee -a $LOGFILE ### IMPORTANT: Any folders you want skipped when doing the comapre must be specified. ### Otherwise, if the folder doesn't exist in the development but in the destination it will be removed. ssh $SERVERHOST "'$WEB_CAT_PARENT_DIR'/catalogmanager/runcat.sh -cmd diff -baseline '$WEB_CAT_PARENT_DIR'/catalog/'$WEB_CAT_NAME' -latest '$PRE_DEPLOY_LOC'/'$WEB_CAT_NAME' -outputFile /tmp/web_cat_diff_'$DATE'.txt -verbosity detail -skipFolder /shared/\!TROUBLESHOOTING:/shared/Project Shared" 2>> $LOGFILE 1>/dev/null checkStatus "$?" "The deployment failed: $WEB_CAT_PARENT_DIR/catalogmanager/runcat.sh -cmd diff -baseline $WEB_CAT_PARENT_DIR/catalog/'$WEB_CAT_NAME' -latest '$PRE_DEPLOY_LOC'/'$WEB_CAT_NAME' -outputFile /tmp/web_cat_diff_$DATE.txt -verbosity detail -skipFolder /shared/\!TROUBLESHOOTING:/shared/Project Shared" "ssh $SERVERHOST \"rm /tmp/web_cat_diff_'$DATE'.txt\"" scp -q $SERVERHOST:/tmp/web_cat_diff_$DATE.txt /tmp/$1_web_cat_diff1_$DATE.txt checkStatus "$?" "The deployment failed: scp -q $SERVERHOST:/tmp/web_cat_diff_$DATE.txt /tmp/$1_web_cat_diff1_$DATE.txt" echo -e "##### Results" | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'Total objects reported' | tee -a $LOGFILE echo "#" | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'Num of objects NOT in BASE' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'Num of objects NOT in LATE' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'Num of objects NOT in PROD' | tee -a $LOGFILE echo "#" | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'Num of objects changed' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'TYPE : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'ATTRIBUTES : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'OWNER : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'ACL : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'PROPERTIES : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'CREATOR : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'MODIFIER : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'CONTENT : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_diff1_$DATE.txt | grep 'MSG : ' | tee -a $LOGFILE echo -e "#####\n" | tee -a $LOGFILE ####### Currently if a folder exists in PROD but not in Latest, the folder is being removed. echo -e "`date +[%H:%M:%S]` ## Create a patch file based on DIFF\n" | tee -a $LOGFILE ssh $SERVERHOST "'$WEB_CAT_PARENT_DIR'/catalogmanager/runcat.sh -cmd createPatch -inputFile /tmp/web_cat_diff_'$DATE'.txt -outputFile /tmp/web_cat_patch_'$DATE'.txt -production '$WEB_CAT_PARENT_DIR'/catalog/'$WEB_CAT_NAME' -winsConflict latest" 2>> $LOGFILE 1>/dev/null # latest # production # blendThenLatest # blendThenProduction checkStatus "$?" "The deployment failed: $WEB_CAT_PARENT_DIR/catalogmanager/runcat.sh -cmd createPatch -inputFile /tmp/web_cat_diff_$DATE.txt -outputFile /tmp/web_cat_patch_$DATE.txt -production $WEB_CAT_PARENT_DIR/catalog/'$WEB_CAT_NAME' -winsConflict latest" "ssh $SERVERHOST \"rm /tmp/web_cat_patch_'$DATE'.txt\"" scp -q $SERVERHOST:/tmp/web_cat_patch_$DATE.txt /tmp/$1_web_cat_patch1_$DATE.txt checkStatus "$?" "The deployment failed: scp -q $SERVERHOST:/tmp/web_cat_patch_$DATE.txt /tmp/$1_web_cat_patch1_$DATE.txt" echo -e "##### Results" | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'Total objects reported' | tee -a $LOGFILE echo "#" | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'Num of objects NOT in BASE' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'Num of objects NOT in LATE' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'Num of objects NOT in PROD' | tee -a $LOGFILE echo "#" | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'Num of objects changed' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'TYPE : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'ATTRIBUTES : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'OWNER : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'ACL : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'PROPERTIES : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'CREATOR : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'MODIFIER : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'CONTENT : ' | tee -a $LOGFILE cat /tmp/$1_web_cat_patch1_$DATE.txt | grep 'MSG : ' | tee -a $LOGFILE echo -e "#####\n" | tee -a $LOGFILE echo -e "`date +[%H:%M:%S]` ## Apply the patch file\n" | tee -a $LOGFILE ssh $SERVERHOST "'$WEB_CAT_PARENT_DIR'/catalogmanager/runcat.sh -cmd applyPatch -inputFile /tmp/web_cat_patch_'$DATE'.txt -outputFile /tmp/web_cat_patch_'$DATE'.log" 2>> $LOGFILE 1>/dev/null checkStatus "$?" "The deployment failed: $WEB_CAT_PARENT_DIR/catalogmanager/runcat.sh -cmd applyPatch -inputFile /tmp/web_cat_patch_$DATE.txt -outputFile /tmp/web_cat_patch_$DATE.log" "ssh $SERVERHOST \"rm /tmp/web_cat_patch_$DATE.log\"" echo -e "`date +[%H:%M:%S]` ## Web Cat Patch Log:\n" | tee -a $LOGFILE scp -q $SERVERHOST:/tmp/web_cat_patch_$DATE.log /tmp/$1_web_cat_patch1_$DATE.log cat /tmp/$1_web_cat_patch1_$DATE.log | tee -a $LOGFILE echo -e "\n`date +[%H:%M:%S]` ## Success\n" | tee -a $LOGFILE ## # Cleanup and email success ## ssh $SERVERHOST "rm /tmp/web_cat_diff*" ssh $SERVERHOST "rm /tmp/web_cat_patch*" rm /tmp/$1_web_cat_patch* rm /tmp/$1_web_cat_diff* echo -e "`date +[%H:%M:%S]` ## Cleanup the pre-deploy folder\n" | tee -a $LOGFILE ssh $SERVERHOST "rm -rf '$PRE_DEPLOY_LOC'" 2>&1 | tee -a $LOGFILE echo -e "`date +[%H:%M:%S]` ## Success\n" | tee -a $LOGFILE echo -e "`date +[%H:%M:%S]` ## Restart the OBIEE processes\n" | tee -a $LOGFILE ssh $SERVERHOST "'$OBI_INSTANCE'/bin/opmnctl startall" 2>&1 | tee -a $LOGFILE ############################################################################################ ## This ends the incremental migration. Below the else statement is the FULL migration tasks else ## We are doing a full deploy ############################################################################################ echo -e "`date +[%H:%M:%S]` ## We are about to do a full catalog replacement/deploy. If this is not" | tee -a $LOGFILE echo -e "`date +[%H:%M:%S]` ## what you intended, kill this session." | tee -a $LOGFILE read -p "Pausing until [Enter] is hit..." echo -e "`date +[%H:%M:%S]` ## Delete the current $WEB_CAT_NAME if it exists in the deployment directory on $SERVERHOST\n" | tee -a $LOGFILE ssh $SERVERHOST "rm -rf '$WEB_CAT_PARENT_DIR'/catalog/'$WEB_CAT_NAME'" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The deployment failed: ssh $SERVERHOST \"rm -rf '$WEB_CAT_PARENT_DIR'/catalog/'$WEB_CAT_NAME'\"" echo -e "`date +[%H:%M:%S]` ## Move the catalog to the deployment directory on $SERVERHOST\n" | tee -a $LOGFILE scp $SVN_LOC/$WEB_CAT_NAME.zip $SERVERHOST:$WEB_CAT_PARENT_DIR/catalog/$WEB_CAT_NAME.zip 2>&1 | tee -a $LOGFILE checkStatus "$?" "The deployment failed: scp $SVN_LOC/$WEB_CAT_NAME.zip $SERVERHOST:$WEB_CAT_PARENT_DIR/catalog/$WEB_CAT_NAME.zip" echo -e "`date +[%H:%M:%S]` ## Unzip the new catalog\n" | tee -a $LOGFILE ssh $SERVERHOST "cd '$WEB_CAT_PARENT_DIR'/catalog; rm -rf '$WEB_CAT_NAME'; unzip -q '$WEB_CAT_NAME'.zip; rm '$WEB_CAT_NAME'.zip" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The deployment failed: Unzipping the new catalog" echo -e "`date +[%H:%M:%S]` ## Do weblogic scripting to deploy the file\n" | tee -a $LOGFILE /apps/applobi/OBIEE11g/Oracle_BI1/common/bin/wlst.sh $SUPPORT_LOC/wlstDeployCatalog.py -u $WEBLOGIC_USER -p $WEBLOGIC_PASS -h $SERVERHOST -o 7001 -w $WEB_CAT_NAME 2>&1 | tee -a $LOGFILE checkStatus "$?" "The deployment failed: /apps/applobi/OBIEE11g/Oracle_BI1/common/bin/wlst.sh $SUPPORT_LOC/wlstDeployCatalog.py -u $WEBLOGIC_USER -p $WEBLOGIC_PASS -h $SERVERHOST -o 7001 -w $WEB_CAT_NAME" fi ## # Correct the user GUIDs. ## ./resyncUserGUIDs.sh $1 ## # Check status and send email. ## echo -e "`date +[%H:%M:%S]` ## Deployment to $SERVERHOST was successfull." > obi_status.tmp ssh $SERVERHOST '/apps/applobi/OBIEE11g/instances/instance1/bin/opmnctl status' >> obi_status.tmp cat obi_status.tmp | tee -a $LOGFILE cat obi_status.tmp | mutt -a $LOGFILE -s "$SUBJECT - SUCCESSFULL" $EMAIL rm obi_status.tmp
Click me to view wlstDeployCatalog.py
import sys import os from java.lang import System import getopt def usage(): print "Usage:" print "wlstDeployCatalog.py -u user -p password -h host -o port -w webcatname" try: opts, args = getopt.getopt(sys.argv[1:], "u:p:h:o:w:", ["user=", "password=", "host=", "port=", "webcatname="]) except getopt.GetoptError, err: print str(err) usage() sys.exit(2) user = '' password = '' host = '' port = '' webcatname = '' for opt, arg in opts: if opt == "-u": user = arg elif opt == "-p": password = arg elif opt == "-h": host = arg elif opt == "-o": port = arg elif opt == "-w": webcatname = arg if user == "": print "Missing \"-u user\" parameter." usage() sys.exit(2) elif password == "": print "Missing \"-p password\" parameter." usage() sys.exit(2) elif host == "": print "Missing \"-h host\" parameter." usage() sys.exit(2) elif port == "": print "Missing \"-o port\" parameter." usage() sys.exit(2) elif webcatname == "": print "Missing \"-w webcatname\" parameter." usage() sys.exit(2) connect(user, password, host+":"+port) # Be sure we are in the root cd("..\..") print(host + ": Connecting to Domain ...") try: domainCustom() except: print(host + ": Already in domainCustom") print(host + ": Go to biee admin domain") cd("oracle.biee.admin") # go to the server configuration print(host + ": Go to BIDomain.BIInstance.ServerConfiguration MBean") cd("oracle.biee.admin:type=BIDomain.BIInstance.PresentationServerConfiguration,biInstance=coreapplication,group=Service") # Lock the System print(host + ": Calling lock ...") cd("..") cd("oracle.biee.admin:type=BIDomain,group=Service") objs = jarray.array([], java.lang.Object) strs = jarray.array([], java.lang.String) try: invoke("lock", objs, strs) except: print(host + ": System already locked") cd("..") # go to the server configuration cd("oracle.biee.admin:type=BIDomain.BIInstance.PresentationServerConfiguration,biInstance=coreapplication,group=Service") print(host + ": Configuring WebCatalog Path") WebCatalogSharedLocation = get("WebCatalogSharedLocation") print(host + ": old WebCatalogSharedLocation = " + WebCatalogSharedLocation) newWebCatalogSharedLocation = "$ORACLE_INSTANCE/bifoundation/OracleBIPresentationServicesComponent/$COMPONENT_NAME/catalog/" + webcatname set("WebCatalogSharedLocation",newWebCatalogSharedLocation) WebCatalogSharedLocation = get("WebCatalogSharedLocation") print(host + ": new WebCatalogSharedLocation = " + WebCatalogSharedLocation) # Commit the system print(host + ": Commiting Changes") cd("..") cd("oracle.biee.admin:type=BIDomain,group=Service") objs = jarray.array([], java.lang.Object) strs = jarray.array([], java.lang.String) try: invoke("commit", objs, strs) except: print(host + ": System not locked") # Restart the system print(host + ": Restarting OBIEE processes") cd("..\..") cd("oracle.biee.admin") cd("oracle.biee.admin:type=BIDomain.BIInstance,biInstance=coreapplication,group=Service") print(host + ": Stopping the BI instance") params = jarray.array([], java.lang.Object) signs = jarray.array([], java.lang.String) invoke("stop", params, signs) BIServiceStatus = get("ServiceStatus") print(host + ": BI ServiceStatus " + BIServiceStatus) print(host + ": Starting the BI instance") params = jarray.array([], java.lang.Object) signs = jarray.array([], java.lang.String) invoke("start", params, signs) BIServerStatus = get("ServiceStatus") print(host + ": BI ServerStatus " + BIServerStatus)
Click me to view resyncUserGUIDs.sh
#!/bin/bash ###### # resyncUserGUIDs.sh # Created by Ben Mackin (bmackin@gmail.com) # # This script will resync the user GUIDs in the OBIEE web catalog ###### set -o pipefail checkStatus () { if [ $1 -ne 0 ]; then echo -e "\n`date +[%H:%M:%S]` ###### FAILED ######\n\n" | tee -a $LOGFILE echo "The resync failed: $2" | mutt -a $LOGFILE -s "$SUBJECT - FAILED" $EMAIL exit 1 fi echo -e "`date +[%H:%M:%S]` ## Success\n" | tee -a $LOGFILE return 0 } if [ $# -ne 1 ]; then echo -e "\nUsage: resyncUserGUIDs.sh host\n\t Where host is DEV|SIT|PATCH|QA|PROD\n" exit -1 fi if [ "$1" = "DEV" ]; then SERVERHOST=appobid WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 elif [ "$1" = "SIT" ]; then SERVERHOST=appobisit WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 elif [ "$1" = "PATCH" ]; then SERVERHOST=appobipat WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 elif [ "$1" = "PROD" ]; then SERVERHOST=appobiprod WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 elif [ "$1" = "QA" ]; then SERVERHOST=appobiqa WEBLOGIC_USER=biadmin WEBLOGIC_PASS=oracle01 else echo -e "\n`date +[%H:%M:%S]` ###### FAILED ######\n\n" echo "The resync failed: $1 is undefined." exit 1 fi DATE=`date +%y%m%d_%H%M%S` FMWHOME=/apps/applobi/OBIEE11g # change this to the fusion middleware home OBI_INSTANCE=${FMWHOME}/instances/instance1 LOGFILE=~/logs/${SERVERHOST}_resyncguids_$(date +%y%m%d_%H%M%S).log EMAIL=null@null.com SUBJECT="Resync User GUIDs on $SERVERHOST - `date +%m/%d/%Y` @ `date +%H:%M:%S`" echo -e "`date +[%H:%M:%S]` ## Resyncing User GUIDs on $SERVERHOST\n" | tee -a $LOGFILE echo -e "\n`date +[%H:%M:%S]` ## Stop the BI Presentation Server and the BI Server\n" | tee -a $LOGFILE ssh $SERVERHOST "$OBI_INSTANCE/bin/opmnctl stopproc ias-component=coreapplication_obips1" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: $OBI_INSTANCE/bin/opmnctl stopproc ias-component=coreapplication_obips1" sleep 5 ssh $SERVERHOST "$OBI_INSTANCE/bin/opmnctl stopproc ias-component=coreapplication_obis1" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: $OBI_INSTANCE/bin/opmnctl stopproc ias-component=coreapplication_obis1" sleep 5 ssh $SERVERHOST "$OBI_INSTANCE/bin/opmnctl stopproc ias-component=coreapplication_obis1" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: $OBI_INSTANCE/bin/opmnctl stopproc ias-component=coreapplication_obis1" sleep 5 echo -e "\n`date +[%H:%M:%S]` ## Update the NQSConfig.INI file to set FMW_UPDATE_ROLE_AND_USER_REF_GUIDS = YES;\n" | tee -a $LOGFILE ssh $SERVERHOST "cat '$OBI_INSTANCE'/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI | sed -e 's/FMW_UPDATE_ROLE_AND_USER_REF_GUIDS = NO;/FMW_UPDATE_ROLE_AND_USER_REF_GUIDS = YES;/' > /tmp/NQSConfig.INI" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: Failed on NQSConfig.INI update" ssh $SERVERHOST "mv '$OBI_INSTANCE'/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI '$OBI_INSTANCE'/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI_'$DATE'" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: Failed on NQSConfig.INI update" ssh $SERVERHOST "mv /tmp/NQSConfig.INI '$OBI_INSTANCE'/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: Failed on NQSConfig.INI update" echo -e "\n`date +[%H:%M:%S]` ## Update the instanceconfig.xml file to set the UpdateAccountGUIDs\n" | tee -a $LOGFILE ssh $SERVERHOST "cat '$OBI_INSTANCE'/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml | sed -e 's/<\/UpgradeAndExit>/<\/UpgradeAndExit>\nUpdateAndExit<\/UpdateAccountGUIDs>/' > /tmp/instanceconfig.xml" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: Failed on instanceconfig.xml update" ssh $SERVERHOST "mv '$OBI_INSTANCE'/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml '$OBI_INSTANCE'/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml_'$DATE'" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: Failed on instanceconfig.xml update" ssh $SERVERHOST "mv /tmp/instanceconfig.xml '$OBI_INSTANCE'/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: Failed on instanceconfig.xml update" echo -e "\n`date +[%H:%M:%S]` ## Start the BI Presentation Server and the BI Server\n" | tee -a $LOGFILE ssh $SERVERHOST "'$OBI_INSTANCE'/bin/opmnctl startproc ias-component=coreapplication_obis1" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: $OBI_INSTANCE/bin/opmnctl startproc ias-component=coreapplication_obis1" sleep 20 ssh $SERVERHOST "'$OBI_INSTANCE'/bin/opmnctl startproc ias-component=coreapplication_obips1" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: $OBI_INSTANCE/bin/opmnctl startproc ias-component=coreapplication_obips1" sleep 20 echo -e "\n`date +[%H:%M:%S]` ## Revert the NQSConfig.INI and instanceconfig.xml files\n" | tee -a $LOGFILE ssh $SERVERHOST "rm '$OBI_INSTANCE'/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: rm $OBI_INSTANCE/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI" ssh $SERVERHOST "mv '$OBI_INSTANCE'/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI_'$DATE' '$OBI_INSTANCE'/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: mv $OBI_INSTANCE/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI_$DATE $OBI_INSTANCE/config/OracleBIServerComponent/coreapplication_obis1/NQSConfig.INI" ssh $SERVERHOST "rm '$OBI_INSTANCE'/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: rm $OBI_INSTANCE/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml" ssh $SERVERHOST "mv '$OBI_INSTANCE'/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml_'$DATE' '$OBI_INSTANCE'/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: mv $OBI_INSTANCE/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml_$DATE $OBI_INSTANCE/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml" echo -e "\n`date +[%H:%M:%S]` ## Restart the BI Services\n" | tee -a $LOGFILE ssh $SERVERHOST "'$OBI_INSTANCE'/bin/opmnctl stopall" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: $OBI_INSTANCE/bin/opmnctl stopall" ssh $SERVERHOST "'$OBI_INSTANCE'/bin/opmnctl startall" 2>&1 | tee -a $LOGFILE checkStatus "$?" "The resync failed: $OBI_INSTANCE/bin/opmnctl startall" echo -e "`date +[%H:%M:%S]` ## Resync of User GUIDs on $SERVERHOST was successfull." > obi_status.tmp ssh $SERVERHOST '/apps/applobi/OBIEE11g/instances/instance1/bin/opmnctl status' >> obi_status.tmp cat obi_status.tmp | tee -a $LOGFILE cat obi_status.tmp | mutt -a $LOGFILE -s "$SUBJECT - SUCCESSFULL" $EMAIL rm obi_status.tmp
Hey hi,
ReplyDeleteI'm currently working on Webcat's Automation Script in Window's Platform. I have seen your scripts here which are for Linux Platform. Can you please help me out with a script that can be deployed in Window's Platform too.
Thanks and Regards,
Sandeep Savaram.
Did you get the windows version of the scripts for webcat automation
DeleteRegards
DP
Hi Sandeep,
DeleteWere you able to complete the presentation catalogue automation script on a Windows platform?
Hi
ReplyDeleteI'm using the scrip for our deployment. It's ivin an error when comparing the catalogs.
The following command always fail. throwing a NO SUCH DIRECTORY error.
ssh $SERVERHOST "'$WEB_CAT_PARENT_DIR'/catalogmanager/runcat.sh -cmd diff -baseline '$WEB_CAT_PARENT_DIR'/catalog/'$WEB_CAT_NAME' -latest '$PRE_DEPLOY_LOC'/'$WEB_CAT_NAME' -outputFile /home/oracle/webcat/web_cat_diff_$DATE.txt -verbosity detail "
Please help,
Thanks
Monwabisa
Hi,
ReplyDeleteAm new to OBIEE admin, i have reviewed the above script,, but am getting lot of confuse, could you please share if you have any documentation for this and our application is hosted in Linux environment