diff --git a/vagrant-setup/weblogic/bashrc b/vagrant-setup/weblogic/bashrc new file mode 100644 index 0000000..7e13c2b --- /dev/null +++ b/vagrant-setup/weblogic/bashrc @@ -0,0 +1,6 @@ + +export MW_HOME=/u01/app/oracle/middleware +export WLS_HOME=$MW_HOME/wlserver +export WL_HOME=$WLS_HOME +export JAVA_HOME=/usr/java/default +export PATH=$JAVA_HOME/bin:$PATH \ No newline at end of file diff --git a/vagrant-setup/weblogic/create-domain.sh b/vagrant-setup/weblogic/create-domain.sh new file mode 100644 index 0000000..1fbcaae --- /dev/null +++ b/vagrant-setup/weblogic/create-domain.sh @@ -0,0 +1,13 @@ +export ADMIN_HOST=wlsadmin +export NM_PORT=5556 +export MS_PORT=7002 +export DEBUG_PORT=8453 +export CONFIG_JVM_ARGS=-Dweblogic.security.SSL.ignoreHostnameVerification=true +export DOMAIN_NAME=base_domain +export DOMAIN_HOME=/u01/oracle/user_projects/domains/base_domain +export ADMIN_PORT=7001 +export ADMIN_PASSWORD=welcome01 +export CLUSTER_NAME=Cluster +export debugFlag=true +export PRODUCTION_MODE=dev +export PATH='/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/u01/software/wls12210/oracle_common/common/bin/:/u01/weblogic/bin' diff --git a/vagrant-setup/weblogic/create_datasource.py b/vagrant-setup/weblogic/create_datasource.py new file mode 100644 index 0000000..b096a23 --- /dev/null +++ b/vagrant-setup/weblogic/create_datasource.py @@ -0,0 +1,73 @@ +from java.io import FileInputStream +import sys + + +propInputStream = FileInputStream(sys.argv[1]) +configProps = Properties() +configProps.load(propInputStream) +domainName=configProps.get("domain.name") +adminURL=configProps.get("admin.url") +adminUserName=configProps.get("admin.userName") +adminPassword=configProps.get("admin.password") + +dsName=configProps.get("datasource.name") +dsFileName=configProps.get("datasource.filename") +dsDatabaseName=configProps.get("datasource.database.name") +datasourceTarget=configProps.get("datasource.target") +dsJNDIName=configProps.get("datasource.jndiname") +dsDriverName=configProps.get("datasource.driver.class") +dsURL=configProps.get("datasource.url") +dsUserName=configProps.get("datasource.username") +dsPassword=configProps.get("datasource.password") +dsTestQuery=configProps.get("datasource.test.query") + +connect(adminUserName, adminPassword, adminURL) +edit() +startEdit() +cd('/') + +for dts in cmo.getJDBCSystemResources(): + if dts.getName()==dsName: + cmo.destroyJDBCSystemResource(dts) + +save() +activate() + +edit() +startEdit() +cd('/') + +cmo.createJDBCSystemResource(dsName) +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName) +cmo.setName(dsName) + +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDataSourceParams/' + dsName ) +set('JNDINames',jarray.array([String( dsJNDIName )], String)) + +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName ) +cmo.setUrl(dsURL) +cmo.setDriverName( dsDriverName ) +cmo.setPassword(dsPassword) + +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCConnectionPoolParams/' + dsName ) +cmo.setTestTableName(dsTestQuery) +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName + '/Properties/' + dsName ) +cmo.createProperty('user') + +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName + '/Properties/' + dsName + '/Properties/user') +cmo.setValue(dsUserName) + +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName + '/Properties/' + dsName ) +cmo.createProperty('databaseName') + +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName + '/Properties/' + dsName + '/Properties/databaseName') +cmo.setValue(dsDatabaseName) + +cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDataSourceParams/' + dsName ) +cmo.setGlobalTransactionsProtocol('OnePhaseCommit') + +cd('/SystemResources/' + dsName ) +set('Targets',jarray.array([ObjectName('com.bea:Name=' + datasourceTarget + ',Type=Server')], ObjectName)) + +save() +activate() diff --git a/vagrant-setup/weblogic/create_domain.py b/vagrant-setup/weblogic/create_domain.py new file mode 100644 index 0000000..180bc0a --- /dev/null +++ b/vagrant-setup/weblogic/create_domain.py @@ -0,0 +1,81 @@ +# Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. +# +# WebLogic on Docker Default Domain +# +# Domain, as defined in DOMAIN_NAME, will be created in this script. Name defaults to 'base_domain'. +# +# Since : October, 2014 +# Author: bruno.borges@oracle.com +# ============================================== +domain_name = os.environ.get("DOMAIN_NAME", "base_domain") +admin_port = int(os.environ.get("ADMIN_PORT", "7001")) +admin_pass = os.environ.get("ADMIN_PASSWORD") +cluster_name = os.environ.get("CLUSTER_NAME", "Cluster") +domain_home = os.environ.get("DOMAIN_HOME", '/u01/oracle/user_projects/domains/%s' % domain_name) +production_mode = os.environ.get("PRODUCTION_MODE", "dev") + +print('domain_name : [%s]' % domain_name); +print('admin_name : [%s]' % admin_name); +print('admin_port : [%s]' % admin_port); +print('cluster_name: [%s]' % cluster_name); +print('domain_home : [%s]' % domain_home); +print('production_mode : [%s]' % production_mode); + +# Open default domain template +# ====================== +readTemplate("/u01/software/wls12210/wlserver/common/templates/wls/wls.jar") + +set('Name', domain_name) +setOption('DomainName', domain_name) + +# Disable Admin Console +# -------------------- +# cmo.setConsoleEnabled(false) + +# Configure the Administration Server and SSL port. +# ========================================================= +cd('/Servers/AdminServer') +set('Name', 'AdminServer') +set('ListenAddress', '') +set('ListenPort', admin_port) + +# Define the user password for weblogic +# ===================================== +cd('/Security/%s/User/oracle' % domain_name) +cmo.setPassword(admin_pass) + +# Write the domain and close the domain template +# ============================================== +setOption('OverwriteDomain', 'true') +setOption('ServerStartMode',production_mode) + +cd('/NMProperties') +set('ListenAddress','') +set('ListenPort',5556) +set('CrashRecoveryEnabled', 'true') +set('NativeVersionEnabled', 'true') +set('StartScriptEnabled', 'false') +set('SecureListener', 'false') +set('LogLevel', 'FINEST') + +# Set the Node Manager user name and password (domain name will change after writeDomain) +cd('/SecurityConfiguration/base_domain') +set('NodeManagerUsername', 'oracle') +set('NodeManagerPasswordEncrypted', admin_pass) + +# Define a WebLogic Cluster +# ========================= +cd('/') +create(cluster_name, 'Cluster') + +cd('/Clusters/%s' % cluster_name) +cmo.setClusterMessagingMode('unicast') + +# Write Domain +# ============ +writeDomain(domain_home) +closeTemplate() + +# Exit WLST +# ========= +exit() diff --git a/vagrant-setup/weblogic/create_jms.py b/vagrant-setup/weblogic/create_jms.py new file mode 100644 index 0000000..25247b6 --- /dev/null +++ b/vagrant-setup/weblogic/create_jms.py @@ -0,0 +1,213 @@ +from java.util import Properties +from java.io import FileInputStream +from java.io import File +from java.io import FileOutputStream +from java import io +from java.lang import Exception +from java.lang import Throwable +import os.path +import sys + +###################****##############****######################## +# ScriptName : CreateJMSObjects-v1.4.py +# Properties : ConfigJMSObjects.properties +# Author : Pavan Devarakonda / Ariel Cassan +###################****##############****######################## + +propInputStream=FileInputStream(sys.argv[1]) +configProps=Properties() +configProps.load(propInputStream) + +def getJMSSubdeploymentPath(jms_module_name): + jms_subdeployment_path = "/JMSSystemResources/"+jms_module_name+"/SubDeployments/"+subdeployment_name + return jms_subdeployment_path + +def deleteJMSModule(jms_module_name): + deleteIgnoringExceptions(jms_module_name) + +def createJMSModule(jms_module_name,server_target_name): + jms_subdeployment_path= getJMSSubdeploymentPath(jms_module_name) + cd('/JMSServers') + jmssrvlist=ls(returnMap='true') + cd('/') + module = create(jms_module_name, "JMSSystemResource") + server = getMBean("Servers/"+server_target_name) + module.addTarget(server) + cd('/SystemResources/'+jms_module_name) + + module.createSubDeployment(subdeployment_name) + cd(jms_subdeployment_path) + list=[] + for j in jmssrvlist: + s='com.bea:Name='+j+',Type=JMSServer' + list.append(ObjectName(str(s))) + set('Targets',jarray.array(list, ObjectName)) + +def getJMSModulePath(jms_module_name): + jms_module_path = "/JMSSystemResources/"+jms_module_name+"/JMSResource/"+jms_module_name + return jms_module_path + +def getJMSQueuePath(jms_module_name,qname): + jms_queue_path = getJMSModulePath(jms_module_name)+"/Queues/"+qname + return jms_queue_path + +def createJMSQueue(jms_module_name,jndi,jms_q_name,target,q_rl,q_ep,q_ed): + jms_module_path= getJMSModulePath(jms_module_name) + jms_subdeployment_path= getJMSSubdeploymentPath(jms_module_name) + cd(jms_module_path) + cmo.createQueue(jms_q_name) + cd(getJMSQueuePath(jms_module_name,jms_q_name)) + cmo.setJNDIName(jndi) + # cmo.setDefaultTargetingEnabled(bool("true")) + cmo.setSubDeploymentName(subdeployment_name) + cd(jms_subdeployment_path) + cmo.addTarget(getMBean("/JMSServers/"+target)) + cd(getJMSQueuePath(jms_module_name,jms_q_name)+"/DeliveryFailureParams/"+jms_q_name) + cmo.setRedeliveryLimit(int(q_rl)) + cmo.setExpirationPolicy(q_ep) + erQueue = getMBean(getJMSQueuePath(jms_module_name,q_ed)) + cmo.setErrorDestination(erQueue) + + +def createJMSUDQ(jms_module_name,jndi,jms_udq_name,target): + jms_module_path = getJMSModulePath(jms_module_name) + jms_subdeployment_path= getJMSSubdeploymentPath(jms_module_name) + cd(jms_module_path) + cmo.createUniformDistributedQueue(jms_udq_name) + cd(jms_module_path+'/UniformDistributedQueues/'+jms_udq_name) + cmo.setJNDIName(jndi) + # cmo.setDefaultTargetingEnabled(bool("true")) + cmo.setSubDeploymentName(subdeployment_name) + print('JMS Module path: '+jms_module_path) + cd(jms_module_path+'/UniformDistributedQueues/'+jms_udq_name) + set('ForwardDelay', 10) + cd(jms_subdeployment_path) + cmo.addTarget(getMBean("/JMSServers/"+target)) + path_tmp = getJMSQueuePath(jms_module_name,jms_udq_name) + print('temporary path : [%s]' % path_tmp) + + cd(path_tmp+"/DeliveryFailureParams/"+jms_udq_name) + cmo.setRedeliveryLimit(3) + cmo.setExpirationPolicy('Redirect') + erQueue = getMBean(getJMSQueuePath(jms_module_name,'object_error_queue')) + cmo.setErrorDestination(erQueue) + + +def createJMSConnectionFactory(jms_module_name,cfjndi,jms_cf_name,target): + jms_module_path = getJMSModulePath(jms_module_name) + jms_subdeployment_path= getJMSSubdeploymentPath(jms_module_name) + cd(jms_module_path) + cf = create(jms_cf_name,'ConnectionFactory') + jms_cf_path = jms_module_path+'/ConnectionFactories/'+jms_cf_name + cd(jms_cf_path) + cf.setJNDIName(cfjndi) + cf.setSubDeploymentName(subdeployment_name) + cd (jms_cf_path+'/SecurityParams/'+jms_cf_name) + #cf.setAttachJMXUserId(bool("false")) + cd(jms_cf_path+'/ClientParams/'+jms_cf_name) + cmo.setClientIdPolicy('Restricted') + cmo.setSubscriptionSharingPolicy('Exclusive') + cmo.setMessagesMaximum(10) + cd(jms_cf_path+'/TransactionParams/'+jms_cf_name) + set('TransactionTimeout', "3600") + set('XAConnectionFactoryEnabled', "true") + # cd(jms_cf_path) + # cmo.setDefaultTargetingEnabled(bool("true")) + cd(jms_subdeployment_path) + cmo.addTarget(getMBean("/JMSServers/"+target)) + +def createFlstr(fstr_name_p,dir_name_p,target_name_p): + cd('/') + fst = create(fstr_name_p, "FileStore") + cd('/FileStores/'+fstr_name_p) + cmo.setDirectory(dir_name_p) + fst.addTarget(getMBean("/Servers/"+target_name_p)) + +def createJDstr(jstr_name_p,ds_name_p,target_name_p,prefix_p): + cd('/') + jst = create(jstr_name_p, "JDBCStore") + cd('/JDBCStores/'+jstr_name_p) + cmo.setDataSource(getMBean('/SystemResources/'+ds_name_p)) + cmo.setPrefixName(prefix_p) + jst.addTarget(getMBean("/Servers/"+target_name_p)) + +def createJMSsrvr(jms_srv_name_p,target_name_p,persis_store_p,page_dir_p, thrs_high_p, thrs_low_p, msg_size_p): + cd('/') + srvr = create(jms_srv_name_p, "JMSServer") + cd('/Deployments/'+jms_srv_name_p) + srvr.setPersistentStore(getMBean('/FileStores/'+persis_store_p)) +# srvr.setPersistentStore(getMBean('/JDBCStores/'+persis_store)) + srvr.setPagingDirectory(page_dir_p) + srvr.addTarget(getMBean("/Servers/"+target_name_p)) + srvr.setBytesThresholdLow(long(thrs_low_p)) + srvr.setBytesThresholdHigh(long(thrs_high_p)) + srvr.setMaximumMessageSize(long(msg_size_p)) + +adminUser=configProps.get("adminUser") +adminPassword=configProps.get("adminPassword") +adminURL=configProps.get("adminURLProtocol")+'://'+configProps.get("adminURL") + +connect(adminUser,adminPassword,adminURL) + +edit() +startEdit() + +#=============# JMS SERVER and PERSISITENT STORE CONFIGURATION #=============# +jms_srv_name=configProps.get("jms_srvr_name") +trg=configProps.get("jms_srvr_target") +persis_store=configProps.get("jms_srvr_persis_store_name") +page_dir=configProps.get("jms_srvr_pag_dir") +thrs_high=configProps.get("jms_srvr_by_threshold_high") +thrs_low=configProps.get("jms_srvr_by_threshold_low") +msg_size=configProps.get("jms_srvr_max_msg_size") +total_q=configProps.get("total_q") +total_udq=configProps.get("total_udq") +total_conf=configProps.get("total_conf") +tot_djmsm=configProps.get("total_default_jms_module") +subdeployment_name=configProps.get("subdeployment_name") +jms_srv_target=configProps.get("jms_srv_objects_target") + + +createFlstr(persis_store,page_dir,trg) +java.lang.Thread.sleep(5000) +print(jms_srv_name+','+trg+','+persis_store+','+page_dir+','+thrs_high+','+thrs_low+','+msg_size) +createJMSsrvr(jms_srv_name,trg,persis_store,page_dir,thrs_high,thrs_low,msg_size) + + # ====# JMS CONFIGURATION## ########################################## + + +a=1 +while(a <= int(tot_djmsm)): + var1=int(a) + jms_mod_name=configProps.get("jms_mod_name"+ str(var1)) + server_target=configProps.get("jms_mod_target"+ str(var1)) + createJMSModule(jms_mod_name,server_target) + + i=1 + while(i <= int(total_q)): + q_name=configProps.get("q_name"+ str(i)) + q_jndi=configProps.get("q_jndi"+ str(i)) + q_rl=configProps.get("q_rl"+ str(i)) + q_ep=configProps.get("q_ep"+ str(i)) + q_ed=configProps.get("q_ed"+ str(i)) + createJMSQueue(jms_mod_name,q_jndi,q_name,jms_srv_target,q_rl,q_ep,q_ed) + i = i + 1 + j=1 + while(j <= int(total_udq)): + udq_name=configProps.get("udq_name"+ str(j)) + udq_jndi=configProps.get("udq_jndi"+ str(j)) +# createJMSUDQ(jms_mod_name,udq_jndi,udq_name,jms_srv_target) + j = j + 1 + k = 1 + while(k <= int(total_conf)): + conf_name=configProps.get("conf_name"+ str(k)) + conf_jndi=configProps.get("conf_jndi"+ str(k)) + createJMSConnectionFactory(jms_mod_name,conf_jndi,conf_name,jms_srv_target) + k = k + 1 + a = a+1 + +save() +activate(block="true") +disconnect() + +exit() diff --git a/vagrant-setup/weblogic/silent.xml b/vagrant-setup/weblogic/silent.xml new file mode 100644 index 0000000..f87202e --- /dev/null +++ b/vagrant-setup/weblogic/silent.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vagrant-setup/weblogic/weblogic_icon_48x48.xpm b/vagrant-setup/weblogic/weblogic_icon_48x48.xpm new file mode 100644 index 0000000..1f35e0c --- /dev/null +++ b/vagrant-setup/weblogic/weblogic_icon_48x48.xpm @@ -0,0 +1,310 @@ +/* XPM */ +static char *weblogic_icon_48x48[] = { +/* columns rows colors chars-per-pixel */ +"48 48 256 2 ", +" c #F70000", +". c #F70800", +"X c #F70808", +"o c #F71818", +"O c #F71821", +"+ c #F72121", +"@ c #F74242", +"# c #F76B6B", +"$ c #F77373", +"% c #F77B7B", +"& c #F78484", +"* c #F7848C", +"= c #F78C8C", +"- c #F7ADA5", +"; c #F7ADAD", +": c #F7BDBD", +"> c #F7C6BD", +", c #F7D6D6", +"< c #F7E7E7", +"1 c #F7FFFF", +"2 c red", +"3 c #FF0008", +"4 c #FF0808", +"5 c #FF1010", +"6 c #FF1018", +"7 c #FF1818", +"8 c #FF1821", +"9 c #FF2121", +"0 c #FF2129", +"q c #FF3131", +"w c #FF4242", +"e c #FF424A", +"r c #FF4A42", +"t c #FF4A4A", +"y c #FF5A5A", +"u c #FF635A", +"i c #FF6B63", +"p c #FF6B6B", +"a c #FF7373", +"s c #FF7B7B", +"d c #FF847B", +"f c #FF8484", +"g c #FF848C", +"h c #FF8C8C", +"j c #FF949C", +"k c #FF9C9C", +"l c #FFA5A5", +"z c #FFADA5", +"x c #FFADAD", +"c c #FFBDBD", +"v c #FFC6C6", +"b c #FFD6CE", +"n c #FFD6D6", +"m c #FFE7E7", +"M c #FFEFE7", +"N c #FFEFEF", +"B c #FFF7EF", +"V c #FFF7F7", +"C c #FFF7FF", +"Z c #FFFFF7", +"A c gray100", +"S c gray100", +"D c gray100", +"F c gray100", +"G c gray100", +"H c gray100", +"J c gray100", +"K c gray100", +"L c gray100", +"P c gray100", +"I c gray100", +"U c gray100", +"Y c gray100", +"T c gray100", +"R c gray100", +"E c gray100", +"W c gray100", +"Q c gray100", +"! c gray100", +"~ c gray100", +"^ c gray100", +"/ c gray100", +"( c gray100", +") c gray100", +"_ c gray100", +"` c gray100", +"' c gray100", +"] c gray100", +"[ c gray100", +"{ c gray100", +"} c gray100", +"| c gray100", +" . c gray100", +".. c gray100", +"X. c gray100", +"o. c gray100", +"O. c gray100", +"+. c gray100", +"@. c gray100", +"#. c gray100", +"$. c gray100", +"%. c gray100", +"&. c gray100", +"*. c gray100", +"=. c gray100", +"-. c gray100", +";. c gray100", +":. c gray100", +">. c gray100", +",. c gray100", +"<. c gray100", +"1. c gray100", +"2. c gray100", +"3. c gray100", +"4. c gray100", +"5. c gray100", +"6. c gray100", +"7. c gray100", +"8. c gray100", +"9. c gray100", +"0. c gray100", +"q. c gray100", +"w. c gray100", +"e. c gray100", +"r. c gray100", +"t. c gray100", +"y. c gray100", +"u. c gray100", +"i. c gray100", +"p. c gray100", +"a. c gray100", +"s. c gray100", +"d. c gray100", +"f. c gray100", +"g. c gray100", +"h. c gray100", +"j. c gray100", +"k. c gray100", +"l. c gray100", +"z. c gray100", +"x. c gray100", +"c. c gray100", +"v. c gray100", +"b. c gray100", +"n. c gray100", +"m. c gray100", +"M. c gray100", +"N. c gray100", +"B. c gray100", +"V. c gray100", +"C. c gray100", +"Z. c gray100", +"A. c gray100", +"S. c gray100", +"D. c gray100", +"F. c gray100", +"G. c gray100", +"H. c gray100", +"J. c gray100", +"K. c gray100", +"L. c gray100", +"P. c gray100", +"I. c gray100", +"U. c gray100", +"Y. c gray100", +"T. c gray100", +"R. c gray100", +"E. c gray100", +"W. c gray100", +"Q. c gray100", +"!. c gray100", +"~. c gray100", +"^. c gray100", +"/. c gray100", +"(. c gray100", +"). c gray100", +"_. c gray100", +"`. c gray100", +"'. c gray100", +"]. c gray100", +"[. c gray100", +"{. c gray100", +"}. c gray100", +"|. c gray100", +" X c gray100", +".X c gray100", +"XX c gray100", +"oX c gray100", +"OX c gray100", +"+X c gray100", +"@X c gray100", +"#X c gray100", +"$X c gray100", +"%X c gray100", +"&X c gray100", +"*X c gray100", +"=X c gray100", +"-X c gray100", +";X c gray100", +":X c gray100", +">X c gray100", +",X c gray100", +" /dev/null 2>&1; then + echo "User oracle already exists" + if [ -f "/u01/oracle/.bashrc" ] + then + if grep -Gixq "^export WLS_HOME=.*$" /u01/oracle/.bashrc; then + echo "/u01/oracle/.bashrc already contains WebLogic environment variables" + else + cat $SETUP/weblogic/bashrc >> /u01/oracle/.bashrc + fi + else + if [ ! -d "/u01/oracle" ] + then + mkdir -p /u01/oracle + fi + cp $SETUP/oracle/bashrc /u01/oracle/.bashrc + cat $SETUP/weblogic/bashrc >> /u01/oracle/.bashrc + fi + else + if [ $(getent group oinstall) ]; then + echo "Group oinstall already exists" + else + echo "Creating group oinstall" + groupadd oinstall + fi + echo "Creating user oracle" + mkdir -p /u01/oracle + useradd -d /u01/oracle -K MAIL_DIR=/dev/null -g oinstall oracle + chown -R oracle:oinstall /u01/oracle + echo -e "0rclPasswd\n0rclPasswd\n" | passwd oracle + cp $SETUP/oracle/bashrc /u01/oracle/.bashrc + cat $SETUP/weblogic/bashrc >> /u01/oracle/.bashrc + fi + + export MW_HOME=/u01/app/oracle/middleware + export WLS_HOME=$MW_HOME/wlserver + export WL_HOME=$WLS_HOME + export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1 + + mkdir -p $MW_HOME + mkdir -p /u01/software + mkdir -p /u01/app/inventory + mkdir -p /u01/app/oracle/config/domains + mkdir -p /u01/app/oracle/config/applications + + if [ "$u01exists" = 1 ] + then + echo "Setting permissions of oracle user at /u01" + chown -R oracle:oinstall /u01 + chmod -R 775 /u01/app + fi + + yum -y install libaio bc flex net-tools + + cd /u01/software + unzip $SETUP/cache/fmw_12.2.1.3.0_wls_Disk1_1of1.zip + su oracle -c "java -Xmx1024m -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile $SETUP/weblogic/wl_install.rsp -invPtrLoc $SETUP/oracle/oraInst.loc" + rm fmw_12.2.1.3.0_wls.jar + rm fmw_12213_readme.htm + + cd /u01/app/oracle/middleware/wlserver/server/bin + . ./setWLSEnv.sh + + echo "Creating Weblogic domain 'wldomain' and starting Weblogic" + cd /u01/app/oracle/config/domains + mkdir wldomain + chown -R oracle:oinstall wldomain + chmod -R 775 wldomain + cd wldomain + su oracle -c "nohup java -Dweblogic.management.username=weblogic -Dweblogic.management.password=welcome01 -Dweblogic.Domain=wldomain -Dweblogic.Name=centorion -Dweblogic.ListenPort=7001 -Dweblogic.management.GenerateDefaultConfig=true weblogic.Server < /dev/null &> /dev/null &" + + # if [ -d "/usr/local/maven" ] + # then + # cd $MW_HOME/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.2.1 + # mvn install:install-file -DpomFile=oracle-maven-sync-12.2.1.pom -Dfile=oracle-maven-sync-12.2.1.jar + # mvn com.oracle.maven:oracle-maven-sync:push -DoracleHome=/u01/app/oracle/middleware -Doracle-maven-sync.testingOnly=false + # fi + + else + + echo "You must download https://download.oracle.com/otn/nt/middleware/12c/12213/fmw_12.2.1.3.0_wls_Disk1_1of1.zip and save it at /vagrant/vagrant-setup/cache before begining WebLogic 12 set up." + + fi + fi + + cd $PPWD + + else + + echo "WebLogic must be installed as root. Type sudo ./weblogic12.sh for executing the script." + + fi +fi \ No newline at end of file