![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | deploying to multiple servers I hope I can explain this. I have an application that uses BEA Weblogic. Currently I have to build the ear files, extract the jar file, delete the deployed applications through the BEA console, deploy the application through the BEA console, stop and start the services. I currently have a script that does all of this but they are not clustered and they are all on one server. I'm having trouble finding out how to deploy a cluster on several different servers. Currently I mark a box on the BEA console that has the cluster name under Clusters. Can anyone help me with this one? I have the current script below: I have another script that has the variables in it. Thanks in advance! DEPLOY SCRIPT @echo off rem Usage : application_deploy.cmd [ -build | -deploy ] Instance rem rem Description : rem This programme Builds and Deploys the application EAR Files into BEA Weblogic Server rem rem Steps rem - Calls the application EAR File Build Scripts/CMD Files rem - Calls the application Extractor Script/Command File (see script for details) rem - Undeploy and redeploy the application EAR File into BEA WebLogic rem - Stops the BEA Weblogic Server Instance rem - Starts the BEA Weblogic Server Instance rem - Stops the Reporting Engine (if required) - currently Actuate rem - Starts the Reporting Engine (if required) - currently Actuate rem rem Version 1.1b : Added a 30 wait timer between the Actuate PMD Stop and Start. This allows for rem (03/30/2006) Actuate to complete shutdown before we attempt to start it back up again. rem rem Version 1.2a : Added stub to a weblogic.Deployer -listapps to display all deployed applications rem (04/06/2006) for the application Instance. Requests user feedback to continue. rem set DEPLOY_ACTION=%0 %1 %2 %3 %4 %5 set DEPLOY_PATH=%~dp0 set DEPLOY_BUILDONLY=FALSE set DEPLOY_DEPLOYONLY=FALSE if "%1"=="" ( echo. echo !!! No Parameters Provided. Display Usage !!! goto USAGE ) if "%1"=="-build" set DEPLOY_BUILDONLY=TRUE && shift if "%1"=="-deploy" set DEPLOY_DEPLOYONLY=TRUE && shift if NOT EXIST %DEPLOY_PATH%\%1_env.cmd ( echo. echo !!! ERROR : %DEPLOY_PATH%\%1_env.cmd NOT FOUND !!! goto USAGE ) rem ******************************************************** rem ******** Setup the BEA WebLogic Environment ******** rem ******** Setup the application Instance Environment ******** rem ******************************************************** call %DEPLOY_PATH%\%1_env.cmd call %DEPLOY_WLS_PATH%\server\bin\setWLSEnv.cmd cls rem ******************************************************** rem ******** Display the DEPLOY Script Parameters ******* rem ******** and "asks" for confirmation to continue ******* rem ******************************************************** echo Using the following parameters ... echo. set | find /i "DEPLOY_" echo. set /p OPTION="Do you want to continue Building/Deploying "%1" (y/n) : " echo. if not %OPTION% == y echo Exiting Build/Deploy Process ... && GOTO END rem ******************************************************** rem ******** START Build and Deploy Processing ******** rem ******** MAIN PROGRAMME ******** rem ******************************************************** if %DEPLOY_DEPLOYONLY%==TRUE goto DEPLOY :BUILD rem *************************************************************** rem BUILD STEP #1 : Run the BUILD Scripts from Instance rem *************************************************************** for %%B in (%DEPLOY_EARS_BUILD%) do ( echo ######## BUILDING : %DEPLOY_WLS_INSTANCE% ... %%B ######## echo. cd /d %DEPLOY_MAXIMO_INSTANCE_PATH%\deployment call %%B.cmd echo. ) rem *************************************************************** rem BUILD STEP #2 : Extract and Add certain *.jar files rem See Script for details ... rem *************************************************************** if %DEPLOY_EARS_EXTRACTOR%==TRUE ( echo ######## EXTRACTING : %DEPLOY_WLS_INSTANCE% ...######## echo. call %DEPLOY_PATH%\application_extractor.cmd %DEPLOY_WLS_INSTANCE% echo. ) echo **************************************** echo !!! BUILD PROCESS COMPLETE !!! echo **************************************** echo. if %DEPLOY_BUILDONLY%==TRUE goto END EPLOYrem *************************************************************** rem DEPLOY STEP #1 : Deploy the application EAR Files rem *************************************************************** rem Need to add logic for cluster for %%E in (%DEPLOY_EARS%) do ( echo ######## DEPLOYING : %DEPLOY_WLS_INSTANCE% ... %%E ######## echo. java weblogic.Deployer -adminurl %DEPLOY_ADMIN_URL% -username %DEPLOY_ADMIN_USER% -password %DEPLOY_ADMIN_PASS% -name %DEPLOY_WLS_INSTANCE%_%%E -targets %DEPLOY_WLS_TARGET% -undeploy echo. java weblogic.Deployer -adminurl %DEPLOY_ADMIN_URL% -username %DEPLOY_ADMIN_USER% -password %DEPLOY_ADMIN_PASS% -name %DEPLOY_WLS_INSTANCE%_%%E -targets %DEPLOY_WLS_TARGET% -deploy "%DEPLOY_MAXIMO_INSTANCE_PATH%\deployment\default\%%E.ear" echo. ) echo ######## VALIDATION : %DEPLOY_WLS_INSTANCE% ... ######## echo. echo Querying WebLogic DEPLOYED Applications for "%DEPLOY_WLS_INSTANCE %" Instance echo. java weblogic.Deployer -adminurl %DEPLOY_ADMIN_URL% -username %DEPLOY_ADMIN_USER% -password %DEPLOY_ADMIN_PASS% -listapps | find /i "%DEPLOY_WLS_INSTANCE%" echo. echo ============================================================= echo !!! IMPORTANT !!! echo ============================================================= echo Ensure that the application Deployed Applications are accurate. echo IF this doesn't look right, please BREAK (Ctrl-C) at this echo point, debug the error condition(s) and retry the deployment echo operation ( %0 -deploy %DEPLOY_WLS_INSTANCE% ). echo pause echo. rem *************************************************************** rem DEPLOY STEP #2 : Stop the BEA Weblogic Server Service rem *************************************************************** echo Stopping the "%DEPLOY_WLS_SERVICE%" Service ... net stop "%DEPLOY_WLS_SERVICE%" rem *************************************************************** rem DEPLOY STEP #3 : Start the BEA Weblogic Server Service rem *************************************************************** echo Starting the "%DEPLOY_WLS_SERVICE%" Service ... net start "%DEPLOY_WLS_SERVICE%" rem *************************************************************** rem DEPLOY STEP #4 : Stop the Actuate PMD Service rem *************************************************************** if %DEPLOY_REPORT_RESTART%==TRUE ( echo Stopping the "%DEPLOY_REPORT_SERVICE%" ... net stop "%DEPLOY_REPORT_SERVICE%" echo Pausing for 60 secs. to allow %DEPLOY_REPORT_SERVICE% to completely shutdown ... echo (You can IGNORE any errors you might see while the service is stopping) echo. sleep 60 ) rem *************************************************************** rem DEPLOY STEP #5 : Start the Actuate PMD Service rem *************************************************************** if %DEPLOY_REPORT_RESTART%==TRUE ( echo Starting the "%DEPLOY_REPORT_SERVICE%" ... net start "%DEPLOY_REPORT_SERVICE%" ) echo. echo **************************************** echo !!! DEPLOY PROCESS COMPLETE !!! echo **************************************** echo. goto END :USAGE echo. echo Usage : %~nx0 [ -build ^| -deploy ] Instance echo. echo *Default Mode* : Perform the EAR File Build AND Deployment Processes echo -build : ONLY Perform the EAR File Build Process echo -deploy : ONLY Perform the EAR File Deployment Process echo Instance : application Name Instance i.e. MAXDEV, MAXCFG, MAXPROD etc. echo. :END set DEPLOY_BUILDONLY=FALSE set DEPLOY_DEPLOYONLY=FALSE echo. pause VARIABLE SCRIPT set DEPLOY_ADMIN_USER= user set DEPLOY_ADMIN_PASS= password set DEPLOY_ADMIN_URL=http://server.fhr.com:7010 set DEPLOY_MAXIMO_PATH=E:\application set DEPLOY_WLS_PATH=E:\application\bea\weblogic81 set DEPLOY_WLS_INSTANCE=maxbfx set DEPLOY_WLS_TARGET=MAXBFX set DEPLOY_WLS_SERVICE=beasvc mydomain_MAXBFX set DEPLOY_REPORT_SERVICE=Actuate Process Management Daemon 8 set DEPLOY_REPORT_RESTART=FALSE set DEPLOY_EARS=e-maximo fhr-mx-ocs-ecommerce maximohelp acweb set DEPLOY_EARS_BUILD=e-buildmaximoear buildhelpear buildacwebear set DEPLOY_EARS_EXTRACTOR=TRUE set DEPLOY_MAXIMO_INSTANCE_PATH=%DEPLOY_MAXIMO_PATH%\ %DEPLOY_WLS_INSTANCE% |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Uptime of multiple servers that are up | PowerShell | |||
| Exception Handling - Get-WmiObject on multiple servers | PowerShell | |||
| virtual server 2005 - deploying multiple vm's from sysprep image using Differencing Disks? | Virtual Server | |||
| Deploying using WDS | Vista installation & setup | |||
| Deploying Vista | Vista installation & setup | |||