Tuesday, February 12, 2008

write small script to simplify deployment/bounce

Its good to automate all the process related to component bounce, application server bounce, deployment steps etc. It may look like a simple steps and need not require automation. But when we work on the same component for quite a long time we would have spent more time for just copy/pasting comments.

Making it as a simple script has several advanatges,
1. we dont need to remember each and individual commands and dont need to remember authentication details
2. all typo can be avoided
3. In the long run this can save lot of time
4. anyone can easily manage

example of scripting managed weblogic server:

startDemoApp1.sh

umask 002
WLS_USER=admin
WLS_PW=admin123
export WLS_USER
export WLS_PW
nohup ./startManagedWebLogic.sh demoapp1 t3://localhost:7200 $* > demoapp1.out 2>&1 &

stopDemoApp1.sh

./stopWebLogic.sh admin admin123 demoapp1 t3://localhost:7200