forked from adis2hope/weblogic
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDomainCreation_EnvValues.py
More file actions
54 lines (48 loc) · 2.03 KB
/
DomainCreation_EnvValues.py
File metadata and controls
54 lines (48 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
###########################################################
# This script will dynamically create the domain as per your inputs
###########################################################
import os
WLHOME=os.environ['WL_HOME']
AdminName=os.environ['ADMIN_NAME']
AdminListenAdr=os.environ['ADMIN_LIST_ADD']
AdminListenPort=os.environ['ADMIN_LIST_PORT']
AdminUsrName=os.environ['ADMIN_USR_NAME']
AdminPassword=os.environ['ADMIN_PASS']
domainPath=os.environ['DOMAIN_PATH']
domainName=os.environ['DOMAIN_NAME']
#==========================================
# Create a domain from the weblogic domain template.
#==========================================
readTemplate(WLHOME+'/common/templates/wls/wls.jar')
cd('Servers/AdminServer')
#AdminName=raw_input('Please Enter Admin ServerName: ')
set('Name',AdminName)
#==========================================
# Configure the Administration Server
#==========================================
#AdminListenAdr=raw_input('Please Enter Admin Listen Address: ')
#AdminListenPort=input('Please enter Admin listen Port: ')
set('ListenAddress',AdminListenAdr)
AdminListenPort_int=int(AdminListenPort)
set('ListenPort', AdminListenPort_int)
#====================================================
# Define the password for user weblogic. You must define the password before you
# can write the domain.
#====================================================
cd('/')
cd('Security/base_domain/User/weblogic')
#usr=raw_input('Please Enter AdminUser Name: ')
set('Name',AdminUsrName)
#AdminPassword=raw_input('Please enter Admin password:')
cmo.setPassword(AdminPassword)
# - OverwriteDomain: Overwrites domain, when saving, if one exists.
setOption('OverwriteDomain', 'true')
#==============================================
# Write the domain, close template and finally exit from the WLST
#==============================================
#domainPath=raw_input('Enter the domain path: ')
#domainName=raw_input('Enter domain name: ')
print 'Given domain path, name : ', domainPath, domainName
writeDomain(domainPath+"/"+domainName)
closeTemplate()
exit()