sample wlst script for cluster configuration
Below wlst script can be used to
– Configure the Administration Server and SSL port.
– Define the default user password
– Applying JRF Extension Template
– Applying Generic Extension Template
– Create the Managed Servers and configure
– Create and Configure a Cluster and assian the Managed Servers to that cluster
– set FrontendHost, FrontendHTTPPort and FrontendHTTPSPort
readTemplate('/share/app/wlserver_10.3/common/templates/domains/wls.jar') #Configure the Administration Server and SSL port. cd('Servers/AdminServer') set('ListenAddress','machine1') set('ListenPort', 7001) create('AdminServer','SSL') cd('SSL/AdminServer') set('Enabled', 'True') set('ListenPort', 7002) #Define the default user password cd('/') cd('Security/base_domain/User/weblogic') cmo.setPassword('weblogic1') #Save the domain setOption('OverwriteDomain', 'true') writeDomain('/share/mycluster/domains/wls_scripts') #Close the current domain template closeTemplate() import sys from java.lang import System readDomain('/share/mycluster/domains/wls_scripts') print 'Applying JRF Extension Template...' addTemplate('/share/app/oracle_common/common/templates/applications/jrf_template_11.1.1.jar') applyJRF('AdminServer','/share/mycluster/domains/wls_scripts', true) print 'JRF Extension Template and EM Extension Template applied...' print 'Applying Generic Extension Template...' addTemplate('/share/app/oracle_common/common/templates/applications/oracle.em_11_1_1_0_0_template.jar') print 'Generic Extension Template Applied...' # Create the Managed Servers and configure cd('/') create('managedserver1','Server') cd('Server/managedserver1') set('ListenPort',8002) set('ListenAddress','machine1') create('managedserver1','SSL') cd('SSL/managedserver1') set('Enabled', 'True') set('ListenPort', 8003) cd('/') create('managedserver2','Server') cd('Server/managedserver2') set('ListenPort',8004) set('ListenAddress','machine2') create('managedserver2','SSL') cd('SSL/managedserver2') set('Enabled', 'True') set('ListenPort', 8005) cd('/') create('proxyserver','Server') cd('Server/proxyserver') set('ListenPort',8008) set('ListenAddress','machine1') create('proxyserver','SSL') cd('SSL/proxyserver') set('Enabled', 'True') set('ListenPort', 8009) #Create and Configure a Cluster and assian the Managed Servers to that cluster cd('/') create('cluster1','Cluster') assign('Server', 'managedserver1,managedserver2','Cluster','cluster1') cd('Clusters/cluster1') #set the HTTPProxy on the cluster set('FrontendHTTPSPort',8009) set('FrontendHost','techpaste.com') set('FrontendHTTPPort',8008) set("ClusterMessagingMode", "unicast") set('ClusterAddress','machine1:8002,machine2:8004') #Write the domain and Close the domain template updateDomain() closeDomain() #Exit WLST exit()
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.