此文章介绍一个GITHUB上的WebLogic deploy tool,里面有挺多的集成功能,例如创建域,部署应用等。但由于是脚本化的工具,对于WebLogic各版本的兼容还有待提高。对于生产实施到底有多大的作用我还在继续验证。希望是可以带来工作效率的提升。

下面是我验证的第一个tool: Create Domain Tool, 仅供参考。

[[email protected] jdk1.8.0_241]# JAVA_HOME=/usr/java/jdk1.8.0_241

[[email protected] jdk1.8.0_241]# export JAVA_HOME

[[email protected] jdk1.8.0_241]# echo $JAVA_HOME

[[email protected] bin]# pwd

/u01/install/weblogic-deploy/bin

[[email protected] bin]# vi MinimalDemoDomain.yaml

domainInfo:

    AdminPassword: welcome1

[[email protected] bin]# chmod 777 MinimalDemoDomain.yaml

[[email protected] bin]# ./createDomain.sh -oracle_home /home/weblogic/Oracle_Home  -domain_type WLS -domain_parent /home/demoapp -model_file MinimalDemoDomain.yaml

JDK version is 1.8.0_241-b07

JAVA_HOME = /usr/java/jdk1.8.0_241

WLST_EXT_CLASSPATH = /u01/install/weblogic-deploy/lib/weblogic-deploy-core.jar

CLASSPATH = /u01/install/weblogic-deploy/lib/weblogic-deploy-core.jar

WLST_PROPERTIES = -Djava.util.logging.config.class=oracle.weblogic.deploy.logging.WLSDeployCustomizeLoggingConfig -Dcom.oracle.cie.script.throwException=true

/home/weblogic/Oracle_Home/oracle_common/common/bin/wlst.sh /u01/install/weblogic-deploy/lib/python/create.py -oracle_home /home/weblogic/Oracle_Home -domain_type WLS -domain_parent /home/demoapp -model_file MinimalDemoDomain.yaml

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

####<Mar 24, 2020 10:34:09 PM> <INFO> <WebLogicDeployToolingVersion> <logVersionInfo> <WLSDPLY-01750> <The WebLogic Deploy Tooling createDomain version is 1.7.2:master.10eaf6e:Mar 20, 2020 23:24 UTC>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_file> <WLSDPLY-05002> <Performing validation in TOOL mode for WebLogic Server version 12.2.1.3.0 and WLST OFFLINE mode>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_file> <WLSDPLY-05003> <Performing model validation on the /u01/install/weblogic-deploy/bin/MinimalDemoDomain.yaml model file>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the domainInfo section of the model file>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the topology section of the model file>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05009> <Model file /u01/install/weblogic-deploy/bin/MinimalDemoDomain.yaml does not contain a topology section, validation of topology was skipped.>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the resources section of the model file>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05009> <Model file /u01/install/weblogic-deploy/bin/MinimalDemoDomain.yaml does not contain a resources section, validation of resources was skipped.>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the appDeployments section of the model file>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05009> <Model file /u01/install/weblogic-deploy/bin/MinimalDemoDomain.yaml does not contain a appDeployments section, validation of appDeployments was skipped.>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the kubernetes section of the model file>

####<Mar 24, 2020 10:34:10 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05009> <Model file /u01/install/weblogic-deploy/bin/MinimalDemoDomain.yaml does not contain a kubernetes section, validation of kubernetes was skipped.>

####<Mar 24, 2020 10:34:10 PM> <INFO> <filter_helper> <apply_filters> <WLSDPLY-20017> <No filter configuration file /u01/install/weblogic-deploy/lib/model_filters.json>

####<Mar 24, 2020 10:34:10 PM> <INFO> <DomainCreator> <__create_domain> <WLSDPLY-12203> <Creating domain of type WLS>

####<Mar 24, 2020 10:34:10 PM> <INFO> <DomainCreator> <__create_base_domain_with_select_template> <WLSDPLY-12210> <Selecting base template named Basic WebLogic Server Domain>

####<Mar 24, 2020 10:34:12 PM> <INFO> <DomainCreator> <__extend_domain_with_select_template> <WLSDPLY-12212> <Loading selected templates>

####<Mar 24, 2020 10:34:21 PM> <INFO> <DomainCreator> <__extend_domain_with_select_template> <WLSDPLY-12206> <Closing templates for domain base_domain>

####<Mar 24, 2020 10:34:21 PM> <INFO> <DomainCreator> <__extend_domain_with_select_template> <WLSDPLY-12205> <Writing base domain base_domain to directory /home/demoapp/base_domain>

####<Mar 24, 2020 10:34:27 PM> <INFO> <DomainCreator> <__extend_domain_with_select_template> <WLSDPLY-12206> <Closing templates for domain base_domain>

####<Mar 24, 2020 10:34:28 PM> <INFO> <LibraryHelper> <install_domain_libraries> <WLSDPLY-12213> <The model did not specify any domain libraries to install>

####<Mar 24, 2020 10:34:28 PM> <INFO> <LibraryHelper> <extract_classpath_libraries> <WLSDPLY-12216> <The archive file was not provided so there are no classpath libraries to extract>

####<Mar 24, 2020 10:34:28 PM> <INFO> <LibraryHelper> <install_domain_scripts> <WLSDPLY-12241> <The model did not specify any domain scripts to install>

Issue Log for createDomain version 1.7.2 running WebLogic version 12.2.1.3.0 offline mode:

Total:       WARNING :     0    SEVERE :     0

createDomain.sh completed successfully (exit code = 0)

[[email protected] ~]$ pwd

/home/demoapp

[[email protected] ~]$ ll

total 12

drwxr-x---. 13 root    root     236 Mar 24 22:34 base_domain

[[email protected] demoapp]# chown -R demoapp.demoapp base_domain

[[email protected] bin]$ pwd

/home/demoapp/base_domain/bin

[[email protected] bin]$ ./startWebLogic.sh

JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000

CLASSPATH=/usr/java/jdk1.8.0_241/lib/tools.jar:/home/weblogic/Oracle_Home/wlserver/server/lib/weblogic.jar:/home/weblogic/Oracle_Home/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/home/weblogic/Oracle_Home/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/home/weblogic/Oracle_Home/wlserver/common/derby/lib/derbynet.jar:/home/weblogic/Oracle_Home/wlserver/common/derby/lib/derbyclient.jar:/home/weblogic/Oracle_Home/wlserver/common/derby/lib/derby.jar

PATH=/home/demoapp/base_domain/bin:/home/weblogic/Oracle_Home/wlserver/server/bin:/home/weblogic/Oracle_Home/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.9.8.0.0/apache-ant-1.9.8/bin:/usr/java/jdk1.8.0_241/jre/bin:/usr/java/jdk1.8.0_241/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/demoapp/.local/bin:/home/demoapp/bin

***************************************************

*  To start WebLogic Server, use a username and   *

<Mar 24, 2020 10:38:24,145 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[5]" is now listening on 192.168.76.20:7001 for protocols iiop, t3, ldap, snmp, http.>

<Mar 24, 2020 10:38:24,159 PM CST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>

<Mar 24, 2020 10:38:24,146 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 192.168.122.1:7001 for protocols iiop, t3, ldap, snmp, http.>

<Mar 24, 2020 10:38:24,206 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>

WebLogic deploy tool(1)_Create Domain Tool转存失败重新上传取消WebLogic deploy tool(1)_Create Domain Tool

 参考资源: https://github.com/oracle/weblogic-deploy-tooling/tree/792bac08377683ff48c61dbd362773a7bf90bbb7

相关文章: