Followers

Tuesday, June 20, 2017

Domain creation in weblogic 12c

Weblogic domain is an administrative unit on Weblogic Platform.Each domain must have one Administration Server.Administration server will administrate the domain, all the field configurations and deployments will store under Administration server.
Other than administration server all other servers we called as Managed Servers.


Here is the script to create Weblogic Domain

step1: save the below script as domain_creation.py

step2: java $oracle_come/common/bin/wlst.sh domain_creation.py

Note: if java not setup please setup java calss path 

export PATH=java_home path


#=======================================================================================
# Usage: 
#      java weblogic.WLST <WLST_script> 
#
# Where: 
#      <WLST_script> specifies the full path to the WLST script.
#=======================================================================================

#=======================================================================================
# Open a domain template.
#=======================================================================================

readTemplate("/u02/jenkins/oracle12c_r2/mw_home/oracle_home/wlserver/common/templates/wls/wls.jar")

#=======================================================================================
# Configure the Administration Server and SSL port.
#
# To enable access by both local and remote processes, you should not set the 
# listen address for the server instance (that is, it should be left blank or not set). 
# In this case, the server instance will determine the address of the machine and 
# listen on it. 
#=======================================================================================

cd('Servers/AdminServer')
set('ListenAddress','aussoaditapp16.us.dell.com')
set('ListenPort', 25019)

create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled', 'True')
set('ListenPort', 25020)

#=======================================================================================
# Define the user password for weblogic.
#=======================================================================================

cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('jenkins@domain1')
# Please set password here before using this script, e.g. cmo.setPassword('value')

#=======================================================================================
# Create and configure a JDBC Data Source, and sets the JDBC user.
#=======================================================================================
#set('URL','jdbc:derby://localhost:1527/db;create=true')
#set('PasswordEncrypted', 'PBPUBLIC')
#set('UseXADataSourceInterface', 'false')
#create('myProps','Properties')
#cd('Properties/NO_NAME_0')
#create('user', 'Property')
#cd('Property/user')
#cmo.setValue('PBPUBLIC')

#cd('/JDBCSystemResource/myDataSource/JdbcResource/myDataSource')
#create('myJdbcDataSourceParams','JDBCDataSourceParams')
#cd('JDBCDataSourceParams/NO_NAME_0')
#set('JNDIName', java.lang.String("myDataSource_jndi"))

#cd('/JDBCSystemResource/myDataSource/JdbcResource/myDataSource')
#create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams')
#cd('JDBCConnectionPoolParams/NO_NAME_0')
#set('TestTableName','SYSTABLES')

#=======================================================================================
# Target resources to the servers. 
#=======================================================================================

#cd('/')
#assign('JMSServer', 'myJMSServer', 'Target', 'AdminServer')
#assign('JMSSystemResource.SubDeployment', 'myJmsSystemResource.myQueueSubDeployment', 'Target', 'myJMSServer')
#assign('JDBCSystemResource', 'myDataSource', 'Target', 'AdminServer')

#=======================================================================================
# Write the domain and close the domain template.
#=======================================================================================

setOption('OverwriteDomain', 'true')
writeDomain('/u02/jenkins/domains/jenkins_domain')
closeTemplate()

#=======================================================================================
# Exit WLST.
#=======================================================================================

exit()

No comments:

Post a Comment