Scripted installation and configuration of weblogic clusters is actually quite easy. My normal approach is to create some configuration templates using the GUI wizard and then pack the resulting domains into template files.
The using WLST I can change the settings of the domain template to fit the environment I'm currently installing.
To do a scripted domain configuration, do the following steps:
In future posts I will give small examples of things you can do in WLST to change behavior of the domain. This post will serve as the starting point of those future posts.
The using WLST I can change the settings of the domain template to fit the environment I'm currently installing.
To do a scripted domain configuration, do the following steps:
- Create a domain template that is close the environment you want to build in the WebLogic Configuration Wizard.
# $MIDDLEWARE_HOME/wlserver_10.3/common/bin/config.sh
- Create the domain template file using the WebLogic pack script.
# $MIDDLEWARE_HOME/wlserver_10.3/common/bin/pack.sh -domain=[DOMAIN_HOME] -template=[Resulting template jar file] - template_name=[Name of template]
- Create WLST script to change the template.
# emacs domain_script.py
- A simple WLST script is shown below and can be used as a starting point for creating your own scripts:
readTemplate("[template.jar file]")
cd('/Servers/AdminServer')
set('ListenAddress', '')
set('ListenPort','7001')
setOption('OverwriteDomain','true')
writeDomain('[DOMAIN_HOME]')
closeTemplate()
exit() - Execute the script using the WebLogic wlst interpreter.
# . $MIDDLEWARE_HOME/wlserver_10.3/server/bin/setWLSEnv.sh
# java weblogic.WLST domain_script.py
In future posts I will give small examples of things you can do in WLST to change behavior of the domain. This post will serve as the starting point of those future posts.