Search This Blog

Wednesday, February 22, 2017

Restricted JRF WebLogic infrastructure domain configuration using WLST

While working on Fusion Middleware products we need to prepare the WebLogic restricted JRF domain, most of the time configuration Wizard leads to confusion and stuck with what to do for RCU configurations. Even when you need to create a domain for Collocated OHS Environment.

Pr-requisites
  1. Oracle JDK Installed
  2. Oracle Fusion Middleware Infrastructure 12.2.1 installed
  3. Environment setup with bash profile
Templates used for configuring the Restricted JRF domain

  1. JRF Restricted template - oracle.jrf_restricted_template.jar
  2. Enterprise Manager - oracle.em_wls_restricted_template.jar
  3. Coherence - wls_coherence_template.jar [default selected with above anyone of the template]


 Lets first create the properties file:

TEMPLATE=/u01/app/oracle/fmw1221/wlserver/common/templates/wls/wls.jar 
MW_HOME=/u01/app/oracle/fmw1221
ADMIN_LISTEN_ADDRESS=192.168.33.100
ADMIN_PORT=8001
ADMIN_USER=weblogic
ADMIN_PWD=Welcome1
DOMAIN_NAME=RestrictedJRF_Domain
DOMAIN_DIR=/u01/app/oracle/domains

Note: You could modifiy the MW_HOME  path

The WLST Script is  as follows:

def create_prod_domain():
 print "Reading base domain tempalte"
 readTemplate(TEMPLATE)
 cd('/')

 print "AdminServer settings"
 cmo.setName(DOMAIN_NAME)
 cd('Servers/AdminServer')
 cmo.setListenAddress(ADMIN_LISTEN_ADDRESS)
 cmo.setListenPort(int(ADMIN_PORT))
 cd( '/' )
 cd( 'Security/'+DOMAIN_NAME+'/User/' +ADMIN_USER)
 cmo.setPassword(ADMIN_PWD)
 cd('/')

 print "Production domain setup.."
 setOption("ServerStartMode", "prod")
 setOption("OverwriteDomain", "true")
 writeDomain( DOMAIN_DIR+'/'+DOMAIN_NAME )
 print "=============================================="
 print "Production domain created successfully..."
 print "=============================================="

 closeTemplate()


def apply_jrf2domain():
 # Apply the JRF Template.
 print "reading domain:"+DOMAIN_NAME
 readDomain(DOMAIN_DIR+'/'+DOMAIN_NAME )
 addTemplate(MW_HOME + '/oracle_common/common/templates/wls/oracle.jrf_restricted_template.jar')
 print "Adding Template :oracle.jrf_restricted_template.jar"

 # I'm including the EM template too.
 addTemplate(MW_HOME + '/em/common/templates/wls/oracle.em_wls_restricted_template.jar')
 print "Added Template :oracle.em_wls_restricted_template.jar"

 updateDomain()
 print "Updated the domain with Restricted JRF and Enterprise Manager templates"
 closeDomain()
 print "Close the domain"
 exit()

def main():
 print "=============================================="
 print "Welcome to Restricted JRF domain configuration"
 print "=============================================="

 create_prod_domain()
 print "Domain created successfully..."
 apply_jrf2domain()

main()

The script execution will be as follows:
wlst -loadProperties RestrictedJRF_domain.properties create_RestrictedJRF_domain.py

Note: wlst must be aliased to the Infrastructure installation wlserver path
Restricted JRF WebLogic infrastructure domain with EM template
 Advantage of this domain:
  • Enterprise Manager Fusion Middleware Control
  • Easy to work on FW products such as SOA, OSB, and Collocated OHS etc
Note that it will be consuming more memory foot print than regular base domain.

Start your Restricted JRF Domain and when you look into WebLogic Admin console deployments see the following:

WebLogic Restricted Domain deployment

No comments:

Facebook Blogger Plugin: By RNHckr.com

Post a Comment

Please write your comment here

Popular Posts