CN114024842B - Weblogic domain building method and device, storage medium and electronic equipment - Google Patents

Weblogic domain building method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114024842B
CN114024842B CN202111288099.6A CN202111288099A CN114024842B CN 114024842 B CN114024842 B CN 114024842B CN 202111288099 A CN202111288099 A CN 202111288099A CN 114024842 B CN114024842 B CN 114024842B
Authority
CN
China
Prior art keywords
server
domain
target server
service
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111288099.6A
Other languages
Chinese (zh)
Other versions
CN114024842A (en
Inventor
安卫杰
周明宏
常冬冬
张子建
陈华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111288099.6A priority Critical patent/CN114024842B/en
Publication of CN114024842A publication Critical patent/CN114024842A/en
Application granted granted Critical
Publication of CN114024842B publication Critical patent/CN114024842B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a Weblogic domain building method and device, a storage medium and electronic equipment, wherein the method comprises the following steps: when the validity of each acquired domain building parameter is checked, enabling WLST preset to set initial Weblogic domains corresponding to a plurality of preset servers based on each domain building parameter; starting a preset execution script, and configuring and starting a node manager in each server; determining a first target server in which management services are set in each server and a second target server in which managed services are required to be set; when the management service of the first target server is in a starting state, a second target server is connected with the first target server through WLST, a managed service and a computing module are arranged in the second target server, and the managed service is started to complete the construction of the Weblogic domain. By applying the method, the automatic domain building process can be realized, the operation complexity is reduced, and the domain building efficiency is improved.

Description

Weblogic domain building method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a Weblogic domain building method and apparatus, a storage medium, and an electronic device.
Background
Webogic fully supports the J2EE standard, currently one of the mainstream J2EE servers in the commercial market, which is widely used as a major middleware product at various large commercial banks. The Weblogic is an important operation and maintenance object in the operation and maintenance activities of the data center, and the number of instances of Weblogic running in the large commercial bank data center reaches tens of thousands. For applications deployed on webogic, the webogic domain needs to be established first before the application is deployed.
In the prior art, the construction of the Weblogic domain is mainly implemented by adopting a manual mode, a domain template is created on a server where a management service is arranged and transmitted to the server where the managed service is arranged for decompression, and the Weblogic console is logged in for interface operation, so that the operation steps are complicated, the standardized and automatic domain construction can not be realized, the batch execution can not be realized when the managed service is established on a plurality of servers, and the implementation efficiency is low.
Disclosure of Invention
In view of this, the invention provides a Weblogic domain building method, by which the automation of Weblogic domain building can be realized, and the implementation efficiency of Weblogic domain building can be improved.
The invention also provides a Weblogic domain building device which is used for guaranteeing the realization and application of the method in practice.
A Weblogic domain building method comprising:
acquiring a plurality of domain building parameters, and performing validity check on each domain building parameter;
When the validity of each domain building parameter is checked, starting a preset WLST to set initial Weblogic domains corresponding to a plurality of preset servers based on each domain building parameter;
Starting a preset execution script, configuring a node manager in each server, and starting each node manager;
Determining a first target server in which management services are set in each server and a second target server in which managed services are required to be set;
When the management service of the first target server is in a starting state, the second target server is connected with the first target server through the WLST, and a managed service and a computing module are arranged in the second target server, so that the communication between the managed service and the computing module and the management service is realized when the managed service is in the starting state, and the construction process of the Weblogic domain is completed.
The above method, optionally, performs validity verification on each domain building parameter, including:
determining the parameter format of each domain establishing parameter;
For each domain building parameter, checking whether the parameter format of the domain building parameter meets the format requirement corresponding to the domain building parameter; and if the parameter format of the domain establishing parameter meets the format requirement corresponding to the domain establishing parameter, passing the validity check of the domain establishing parameter.
The above method, optionally, wherein the configuring a node manager in each server includes:
acquiring a preset configuration file, wherein the configuration file comprises a plurality of configuration parameters;
Acquiring domain information of an initial Weblogic domain, and modifying parameter default values of each configuration parameter in the configuration file based on the domain information to acquire a changed configuration file;
And configuring a node manager corresponding to each server in each server based on the changed configuration file.
The method, optionally, the determining a first target server with a managed service set in each server and a second target server with a managed service set, includes:
Acquiring a preset first IP address of a management service and a second IP address of the managed service;
Sequentially comparing the server IP addresses of the servers with the first IP address to determine whether the currently compared server is provided with a management service;
When the IP address of the server in the current comparison is consistent with the first IP address, determining that the server in the current comparison is provided with a management service, wherein the server in the current comparison is a first target server;
when the server IP address of the currently compared server is inconsistent with the first IP address, judging whether the server IP address of the currently compared server is consistent with the second IP address;
When the IP address of the server of the current comparison is consistent with the second IP address, determining that the server of the current comparison needs to be set to be managed for service, wherein the server of the current comparison is a second target server.
The method, optionally, further comprises:
And constructing a first start-stop script in the first target server by applying a preset Shell instruction, and starting the first start-stop script to enable management service in the first target server to be in a starting state.
In the above method, optionally, when the management service of the first target server is in a start state, the connecting, by the WLST, the second target server with the first target server, and setting a managed service and a computing module in the second target server, includes:
starting a preset service port;
detecting whether the first target server is in a starting state based on the service port;
when the first target server is not in a starting state, detecting whether the first target server is in a starting state again according to preset waiting time until the first target server is in the starting state, connecting the second target server with the first target server through WLST, and acquiring preset managed service information and calculation information;
carrying out validity check on the managed service information and the calculation information;
And when the validity of the managed service information and the calculation information is checked, creating a managed service and a calculation module on the second target server based on the managed service information and the calculation information.
The method, optionally, further comprises:
And constructing a second start-stop script in the second target server by using a preset Shell instruction, and starting the second start-stop script to enable the managed service in the second target server to be in a starting state.
A Weblogic domain building device, comprising:
the first acquisition unit is used for acquiring a plurality of domain building parameters and carrying out validity check on each domain building parameter;
The first setting unit is used for enabling WLST preset on the basis of each domain establishing parameter when the validity of each domain establishing parameter is checked, setting initial Weblogic domains in a plurality of preset servers, wherein the paths of the initial Weblogic domains in each server are consistent with the configuration parameters;
The second setting unit is used for starting a preset execution script, configuring a node manager in the initial Weblogic domain and starting the node manager;
a determining unit, configured to determine a first target server in which a management service is set in each of the servers, and a second target server in which a managed service is to be set;
and the connection unit is used for connecting the second target server with the first target server through the WLST when the management service of the first target server is in a starting state, and setting a managed service and a computing module in the second target server so as to realize communication between the managed service and the computing module and the management service when the managed service is in the starting state and complete the construction process of the Weblogic domain.
A storage medium, the storage medium comprising stored instructions, wherein when the instructions are executed, control a device in which the storage medium is located to execute the Weblogic domain building method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the Weblogic domain building method described above.
Compared with the prior art, the invention has the following advantages:
Based on the embodiment provided by the invention, in the process of carrying out Weblogic domain building, acquiring a plurality of domain building parameters, and carrying out validity check on each domain building parameter; when the validity of each domain building parameter is checked, enabling WLST preset based on each domain building parameter, setting an initial Weblogic domain in a plurality of preset servers, wherein the path of the initial Weblogic domain in each server is consistent with the configuration parameters. Starting a preset execution script, configuring a node manager in an initial Weblogic domain, and starting the node manager; determining a first target server in which management services are set in each server and a second target server in which managed services are required to be set; when the management service of the first target server is in a starting state, the second target server is connected with the first target server through the WLST, and a managed service and a computing module are arranged in the second target server, so that the communication between the managed service and the computing module and the management service is realized when the managed service is in the starting state, and the construction process of the Weblogic domain is completed.
By applying the embodiment provided by the invention, the automatic domain building process is realized by utilizing WLST scripts, and the same initial Weblogic domain and node manager are built on the basis of the same parameters in all servers, so that the consistency of the configuration of each server Weblogic domain and node manager is realized by a domain building template in the traditional method, the operation complexity is reduced, and the implementation efficiency of domain building is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for creating a Weblogic domain according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for implementing a Weblogic domain building method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for implementing a Weblogic domain building method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a batch execution of domain building operations on multiple servers in a Weblogic domain building method according to an embodiment of the present invention;
FIG. 5 is a flowchart of another embodiment of a Weblogic domain building method according to an embodiment of the present invention;
FIG. 6 is a block diagram of a Weblogic domain building device according to an embodiment of the present invention;
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the present disclosure, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions, and the terms "comprise," "include," or any other variation thereof, are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor devices, distributed computing environments that include any of the above devices or devices, and the like.
The names of the professions according to the present application are as follows:
and (3) middleware: the software in the middle refers to distributed software which plays a role in connection between system software such as an operating system, a database and the like and application software in a network environment. The method solves the problems of interconnection and interoperation of distributed application software in a heterogeneous network environment, provides standard interfaces and protocols, shields implementation details, improves portability of an application system, simplifies application development, and improves application program quality.
Webogic: an enterprise-level Java EE application Server platform (middleware) is provided, and the WebLogic Server realizes J2EE/Java specifications proposed by Sun company and comprehensively supports J2EE standards including EJB, JSP, servlet, JMS, JDBC, XML and WML. The system can be quickly installed, supports the control console to perform component management and configuration, and supports hot deployment. Clustering is supported, possessing high performance, scalability and high availability, with rich diagnostic tools and high performance JVM.
Weblogic Domain: domain is a logical concept, and Domain is the largest concept in WebLogic application servers. A logical management unit is formed by a set of WebLogic Server instances and other service resources. One WebLogic domain has one management server and a plurality of managed servers.
ADMINSERVER: the management service, administration Server, is called AS for short, is a server instance in WebLogic domain, which serves AS management responsibility, is a central control point of the domain, stores configuration information and logs of the domain, and runs WebLogic management console.
Node manager: namely, the NodeManager, is a tool provided by Weblogic, and a daemon (background service) running on a physical machine can remotely monitor and control the Weblogic Server. The following operations may be performed using the node manager:
Starting, closing and restarting the management server.
Starting, closing, restarting and suspending the managed server.
When a fault occurs, the management server and the managed server are automatically restarted.
Webogic multi-machine domain: weblogic Serer, which refers to Weblogic Domain (Domain) management, is deployed across multiple servers.
WLST: i.e., webLogic Scripting Tool, is a Weblogic scripting tool, a command line scripting interface, scripting environment is based on a javascript interpreter (Jython), which is used by system administrators to monitor and manage Weblogic Server instances and domains.
The embodiment of the invention provides a Weblogic domain building method which can be applied to various system platforms, wherein an execution subject of the method can be a processor of a computer terminal or various mobile devices, and a flow chart of the method is shown in fig. 1, and specifically comprises the following steps:
S101: and obtaining a plurality of domain building parameters, and carrying out validity check on each domain building parameter.
In the embodiment provided by the invention, in order to establish a Weblogic Domain, one or more servers in a cluster (deployment unit) are managed by incorporating the same Weblogic Domain (Domain).
First, a plurality of parameters for domain construction are acquired, wherein the main parameters include:
the necessary parameters are as follows: ADMINSERVER IP addresses, domain path, managed Server name, managed ServerIP, welogic user password.
Optional parameters: the NodeManager monitors ports, ADMINSERVER monitors ports, managed Server monitors ports, JVM configuration, etc.
The optional parameters generally do not need to be input, and default values are used in no special cases.
And the validity of the input Domain building parameters including IP address, domain path, server name, port, etc. is checked, and error exit is reported for the case of non-compliance, so as to avoid the execution exception generated when the subsequent steps are executed.
In an embodiment of the present invention, optionally, the verifying validity of each domain building parameter includes:
determining the parameter format of each domain establishing parameter;
For each domain building parameter, checking whether the parameter format of the domain building parameter meets the format requirement corresponding to the domain building parameter; and if the parameter format of the domain establishing parameter meets the format requirement corresponding to the domain establishing parameter, passing the validity check of the domain establishing parameter.
Each domain building parameter has a parameter format corresponding to each domain building parameter, for example:
The IP address format must be for the first three-dimensional space;
Domain path: must be a complete accessible path;
server name: cannot be empty;
The port: a number of >1, etc.
If each domain building parameter accords with the corresponding parameter format, the validity of the domain building parameter is checked, and if the domain building parameter does not accord with the corresponding parameter format, the validity of the domain building parameter is not checked.
S102: and when the validity of each domain building parameter is checked, starting a preset WLST to set initial Weblogic domains corresponding to a plurality of preset servers based on each domain building parameter.
And executing unified domain building operation on each server, and creating the same Weblogic domain, wherein the paths and the configurations of the Weblogic domains on each server are completely consistent.
In the embodiment provided by the invention, when the input domain establishing parameters pass the validity test, a preset WLST script tool is started to execute unified domain establishing operation on a plurality of preset servers, and an initial Weblogic domain is set.
The unified domain building operation is realized through WLST createDomain commands, and the method is specifically as follows:
createDomain(domain_template_file,domain_dir,wls_username,wls_password);
readDomain(domain_dir);
wherein,
Domain_template_file is the jar packet of Weblogic domain building;
domain_dir is a Domain path;
wls _usernames is the Weblogic console user name;
wls _password is Weblogic console user password;
createDomain is a function provided by WLST to create Weblogic Domain from output parameters (Doamin path, domain user, password);
readDomain, which is a function provided by WLST, reads configuration information specifying Domain.
S103: and starting a preset execution script, configuring a node manager in each server, and starting each node manager.
And configuring the NodeManager node manager in each server through a preset execution script, modifying relevant configuration parameters of the NodeManager node manager, and starting the NodeManager node manager.
In an embodiment of the present invention, the configuring a node manager in each of the servers includes:
And acquiring a preset configuration file.
Specifically, a configuration file nodemanager/property of the node manager is obtained, wherein the configuration file contains a plurality of configuration parameters, and the configuration of the node manager is realized by changing the configuration parameters.
And acquiring domain information of an initial Weblogic domain, and modifying parameter default values of each configuration parameter in the configuration file based on the domain information to acquire a changed configuration file.
And acquiring Domain information of the initial Weblogic Domain by executing the script, modifying parameter default values of STARTSCRIPTNAME, SECURELISTENER, AUTHENTICATIONENABLED and other configuration parameters in the configuration file nodes according to the Domain information, and supplementing the newly-built Domain path into the file to obtain a changed configuration file.
And configuring a node manager corresponding to each server in each server based on the changed configuration file.
And modifying the corresponding configuration file according to the domain information of the initial Weblogic domain to configure the node manager corresponding to the initial Weblogic domain, so that the node manager can be conveniently used for executing subsequent operations.
S104: and determining a first target server in which the management service is set in each server and a second target server in which the managed service is required to be set.
In the embodiment provided by the invention, the host IP address of each server is respectively compared with the IP address of the first target server which is provided with the management service ADMINSERVER and the IP address of the second target server which needs to be provided with the managed service, so as to determine that each server is the first target server or the second target server.
S105: when the management service of the first target server is in a starting state, the second target server is connected with the first target server through the WLST, and a managed service and a computing module are arranged in the second target server, so that the communication between the managed service and the computing module and the management service is realized when the managed service is in the starting state, and the construction process of the Weblogic domain is completed.
In the embodiment provided by the invention, the operation of setting the managed service and the operation of the computing module are executed, the management service of connecting the second target server where the managed service is located to the first target server through WLST is needed to be processed, and the management service of the first target server is normally started, so that the communication between the managed service and the computing module and the management service is realized under the condition that the managed service is in a starting state.
Specifically, setting the first target server to the start state includes the following processing procedures: and constructing a first start-stop script in the first target server by applying a preset Shell instruction, and starting the first start-stop script to enable management service in the first target server to be in a starting state.
Based on the embodiment provided by the invention, in the process of carrying out Weblogic domain building, acquiring a plurality of domain building parameters, and carrying out validity check on each domain building parameter; when the validity of each domain building parameter is checked, enabling WLST preset based on each domain building parameter, setting an initial Weblogic domain in a plurality of preset servers, wherein the path of the initial Weblogic domain in each server is consistent with the configuration parameters. Starting a preset execution script, configuring a node manager in an initial Weblogic domain, and starting the node manager; determining a first target server in which management services are set in each server and a second target server in which managed services are required to be set; when the management service of the first target server is in a starting state, the second target server is connected with the first target server through the WLST, and a managed service and a computing module are arranged in the second target server, so that the communication between the managed service and the computing module and the management service is realized when the managed service is in the starting state, and the construction process of the Weblogic domain is completed.
By applying the embodiment provided by the invention, the automatic domain building process is realized by utilizing WLST scripts, and the same initial Weblogic domain and node manager are built on the basis of the same parameters in all servers, so that the consistency of the configuration of each server Weblogic domain and node manager is realized by a domain building template in the traditional method, the operation complexity is reduced, and the implementation efficiency of domain building is improved.
In the embodiment provided by the present invention, as shown in fig. 2, optionally, the determining a first target server for which a management service has been set in each of the servers, and a second target server for which a managed service needs to be set, includes:
s201: and acquiring a preset first IP address of the management service and a second IP address of the managed service.
In the embodiment provided by the invention, each server has the corresponding IP address, and the corresponding server can be identified through the IP address, wherein the server needing to be provided with the managed service can be a plurality of servers.
S202: and sequentially comparing the server IP addresses of the servers with the first IP address to determine whether the currently compared server is provided with the management service.
And when the server IP address of the currently compared server is consistent with the first IP address, executing S203, and when the server IP address of the currently compared server is inconsistent with the first IP address, executing S204.
S203: and determining that the currently aligned server is provided with a management service.
The server in current comparison is a first target server.
S204: and when the server IP address of the currently compared server is inconsistent with the first IP address, judging whether the server IP address of the currently compared server is consistent with the second IP address.
S205 is executed when the server IP address of the currently aligned server is identical to the second IP address, and S206 is executed when the server IP address of the currently aligned server is not identical to the second IP address.
S205: and determining that the currently aligned server needs to be provided with managed services.
The server which is compared currently is a second target server.
S206: and determining that the currently aligned server does not need to be provided with managed services.
It should be noted that the same server may also set the management service and the managed service at the same time, so when the server IP address of the currently compared server is consistent with the first IP address, the server IP address of the currently compared server may also be compared with the second IP address, to determine whether the server is the server to be set with the managed service.
It should be further noted that, a Weblogic domain may have a plurality of servers to be set with managed services, each server has its own corresponding IP address, and the IP address of the currently compared server is compared with the IP address of each server to be set with managed services, if any IP address of the servers to be set with managed services is met, the currently compared server needs to be set with managed services, that is, the second target server.
By comparing the IP address of each server with the preset first IP address of the management service and the second IP address of the managed service, in the domain building process, each server is automatically identified as the first server with the management service or the second server with the managed service to be set, so that manual intervention is reduced, and the implementation efficiency in the domain building process is improved.
In an embodiment of the present invention, as shown in fig. 3, optionally, when the management service of the first target server is in a start state, a managed service and a computing module are set in the second target server, including:
S301: and starting a preset service port.
S302: and detecting whether the first target server is in a starting state or not based on the service port.
Whether ADMINSERVER has been started normally is determined by loop probing ADMINSERVER whether the service port is accessible, typically by TELNENT IP: the service port.
S303: and when the first target server is not in the starting state, detecting whether the first target server is in the starting state again according to preset waiting time until the first target server is in the starting state, connecting the second target server with the first target server through WLST, and acquiring preset managed service information and calculation information.
Specifically, if the first target server is not in the starting state, detecting after a preset waiting time of N seconds until the first target server is detected to be in the starting state, connecting the second target server with the first target server through WLST, acquiring preset managed service information and calculation information, and executing S304. Optionally, to prevent the trap from entering the long-time waiting, the timeout time of the step may be set to 10 minutes, and if the first target service is still not detected to be in the starting state for more than 10 minutes, the first target service is considered to be started abnormally, and the subsequent execution is exited. Where N is a random number of random value (1-10).
S304: and carrying out validity check on the managed service information and the calculation information.
Specifically, the managed service information and the Server IP address, the managed Server port, the node manager information and the like in the calculation information are connected to the management service through WLST, whether the managed service and the calculation module are created or not is checked, and if the managed service and the calculation module are created, the validity check is not satisfied. If not, the subsequent operation S305 is continued.
Further, WLST, in addition to creating managed services, the parameters of managed services such as logging, overload, health checking, etc. are configured by WLST command configuration.
S305: and when the validity of the managed service information and the calculation information is checked, creating a managed service and a calculation module on the second target server based on the managed service information and the calculation information.
According to the preset time, whether the management service is in a starting state or not is circularly detected, when the management service is in the starting state, the managed service and the computing module are created based on the managed service information and the computing information which pass through the validity check, so that the creation of the managed service is ensured to be executed after the normal starting of the management service, the automatic cooperative control of domain building operation is realized, the cooperative waiting time is reduced, and the domain building implementation efficiency is improved.
In an embodiment provided by the present invention, optionally, the method further includes: and constructing a second start-stop script in the second target server by using a preset Shell instruction, and starting the second start-stop script to enable the managed service in the second target server to be in a starting state.
When the managed service is started, the Weblogic domain synchronizes files such as config. Xml, key seed files, and the like from the management service to the second server where the managed service is set.
And creating a second start-stop script in the second target server so as to realize the start and the stop of the managed service in the second target server by executing the second start-stop script, without manual execution, and improve the efficiency.
In the embodiment provided by the invention, manual interface operation in the domain building process is comprehensively replaced by WLST scripts, and the implementation efficiency of the domain building is improved by adaptively processing and shielding ADMINSERVER, namely management service and managed Server, namely difference of the managed service in the domain building process, so that the whole domain building process is realized without manual intervention, one-key execution is supported or batch execution is realized by an operation and maintenance tool (cloud management platform).
As shown in fig. 5, according to the Weblogic domain creation method provided by the embodiment of the present invention, firstly, domain creation parameters are input and validity verification is performed on the domain creation parameters, and according to the domain creation parameters, a preset WLST script command is executed to create an initial Weblogic domain in each server, so that management services and managed services do not need to be distinguished; then configuring and starting a node manager in the created initial Weblogic domain, and comparing the IP address of each server with the IP address of the server where the management service is located to judge whether the management service is set by the server; if the server is the server where the management service is located, performing additional processing on the server where the management service is located, creating a start-stop script of the management service, and starting the management service; if the server is not the server where the management service is located, checking whether the server needs to create the managed service, if yes, checking whether the management service is started, if not, randomly waiting for N seconds until the management service is started, and ensuring that the creation of the managed service is executed after the normal starting of the management service through a cyclic waiting and automatic detection mechanism. After the management service is started, a server where the management service is located is connected with a server where the managed service is located through WLST script commands, managed service information of the managed service and the computing information are obtained, validity verification is conducted, a computing module in the server and the managed service are created through WLST script commands, relevant configuration is conducted, operation through a Weblogic console interface is not needed, a start-stop script of the managed service is finally created, and the managed service is started.
In the process of executing the domain building, the server types of the management service and the managed service are identified, the differentiation processing is adaptively carried out, the server differentiation is shielded, the domain building operation is supported to be executed on all servers in a unified mode, and the batch execution is supported.
The specific implementation process and derivative manner of the above embodiments are all within the protection scope of the present invention.
Corresponding to the method shown in fig. 1, the embodiment of the present invention further provides a Weblogic domain building device, which is used for implementing the method shown in fig. 1, where the Weblogic domain building device provided by the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and the structural schematic diagram of the Weblogic domain building device is shown in fig. 6, and specifically includes:
a first obtaining unit 601, configured to obtain a plurality of domain building parameters, and perform validity verification on each domain building parameter;
A first setting unit 602, configured to enable WLST, which is preset, to set an initial Weblogic domain in a plurality of preset servers based on each domain building parameter when the validity of each domain building parameter is checked, where an initial Weblogic domain path and a configuration parameter in each server are consistent;
A second setting unit 603, configured to start a preset execution script, configure a node manager in the initial Weblogic domain, and start the node manager;
A determining unit 604, configured to determine a first target server in which a management service is set in each of the servers, and a second target server in which a managed service needs to be set;
and the connection unit 605 is configured to connect the second target server with the first target server through the WLST when the management service of the first target server is in a start state, and set a managed service and a computing module in the second target server, so as to implement communication between the managed service and the computing module and the management service when the managed service is in a start state, and complete a construction process of a Weblogic domain.
Based on the embodiment provided by the invention, in the process of carrying out Weblogic domain building, a plurality of domain building parameters are obtained by a first obtaining unit, and validity verification is carried out on each domain building parameter; when the validity of each domain building parameter is checked, the first setting unit enables WLST preset according to each domain building parameter, and an initial Weblogic domain is set in a plurality of preset servers, and the path and the configuration parameters of the initial Weblogic domain in each server are consistent. The second setting unit starts a preset execution script, configures a node manager in an initial Weblogic domain, and starts the node manager; the method comprises the steps that a determining unit determines a first target server in which management services are set in each server and a second target server in which managed services are required to be set; when the management service of the first target server is in a starting state, the connection unit connects the second target server with the first target server through the WLST, and a managed service and calculation module is arranged in the second target server; in order to realize the communication between the managed service and the computing module and the management service when the managed service is in a starting state, and complete the construction process of the Weblogic domain.
By applying the device provided by the invention, an automatic domain building process is realized by utilizing WLST scripts, and the same initial Weblogic domain and node manager are built on the basis of the same parameters in all servers, so that the consistency of the configuration of each server Weblogic domain and node manager is realized by using a domain building template in the traditional method, the complexity of operation is reduced, and the implementation efficiency of domain building is improved.
The specific working process of each unit and subunit in the Weblogic domain building device disclosed in the above embodiment of the present invention can be referred to the corresponding content in the Weblogic domain building method disclosed in the above embodiment of the present invention, and will not be described herein again.
The embodiment of the invention also provides a storage medium, which comprises stored instructions, wherein when the instructions run, the equipment where the storage medium is controlled to execute the Weblogic domain building method.
The embodiment of the present invention further provides an electronic device, whose structural schematic diagram is shown in fig. 7, specifically including a memory 701, and one or more instructions 702, where the one or more instructions 702 are stored in the memory 701, and configured to be executed by the one or more processors 703, where the one or more instructions 702 perform the following operations:
acquiring a plurality of domain building parameters, and performing validity check on each domain building parameter;
When the validity of each domain building parameter is checked, starting a preset WLST to set initial Weblogic domains corresponding to a plurality of preset servers based on each domain building parameter;
Starting a preset execution script, configuring a node manager in each server, and starting each node manager;
Determining a first target server in which management services are set in each server and a second target server in which managed services are required to be set;
When the management service of the first target server is in a starting state, the second target server is connected with the first target server through the WLST, and a managed service and a computing module are arranged in the second target server, so that the communication between the managed service and the computing module and the management service is realized when the managed service is in the starting state, and the construction process of the Weblogic domain is completed.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both.
To clearly illustrate this interchangeability of hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A webogic domain building method, comprising:
acquiring a plurality of domain building parameters, and performing validity check on each domain building parameter;
When the validity of each domain building parameter is checked, starting a preset WLST to set initial Weblogic domains corresponding to a plurality of preset servers based on each domain building parameter;
Starting a preset execution script, configuring a node manager in each server, and starting each node manager;
Determining a first target server in which management services are set in each server and a second target server in which managed services are required to be set;
When the management service of the first target server is in a starting state, the second target server is connected with the first target server through the WLST, and a managed service and a computing module are arranged in the second target server so as to realize communication between the managed service and the computing module and the management service when the managed service is in the starting state, and complete the construction process of a Weblogic domain;
Wherein the determining a first target server in which the management service is set and a second target server in which the managed service is set in each of the servers includes:
Acquiring a preset first IP address of a management service and a second IP address of the managed service;
Sequentially comparing the server IP addresses of the servers with the first IP address to determine whether the currently compared server is provided with a management service;
When the IP address of the server in the current comparison is consistent with the first IP address, determining that the server in the current comparison is provided with a management service, wherein the server in the current comparison is a first target server;
when the server IP address of the currently compared server is inconsistent with the first IP address, judging whether the server IP address of the currently compared server is consistent with the second IP address;
When the IP address of the server of the current comparison is consistent with the second IP address, determining that the server of the current comparison needs to be set to be managed for service, wherein the server of the current comparison is a second target server.
2. The method of claim 1, wherein said verifying the validity of each of said domain building parameters comprises:
determining the parameter format of each domain establishing parameter;
For each domain building parameter, checking whether the parameter format of the domain building parameter meets the format requirement corresponding to the domain building parameter; and if the parameter format of the domain establishing parameter meets the format requirement corresponding to the domain establishing parameter, passing the validity check of the domain establishing parameter.
3. The method of claim 1, wherein said configuring a node manager in each of said servers comprises:
acquiring a preset configuration file, wherein the configuration file comprises a plurality of configuration parameters;
Acquiring domain information of an initial Weblogic domain, and modifying parameter default values of each configuration parameter in the configuration file based on the domain information to acquire a changed configuration file;
And configuring a node manager corresponding to each server in each server based on the changed configuration file.
4. The method as recited in claim 1, further comprising:
And constructing a first start-stop script in the first target server by applying a preset Shell instruction, and starting the first start-stop script to enable management service in the first target server to be in a starting state.
5. The method of claim 4, wherein said connecting the second target server to the first target server via the WLST and setting up managed services and computing modules in the second target server when the management service of the first target server is in a startup state comprises:
starting a preset service port;
detecting whether the first target server is in a starting state based on the service port;
when the first target server is not in a starting state, detecting whether the first target server is in a starting state again according to preset waiting time until the first target server is in the starting state, connecting the second target server with the first target server through WLST, and acquiring preset managed service information and calculation information;
carrying out validity check on the managed service information and the calculation information;
And when the validity of the managed service information and the calculation information is checked, creating a managed service and a calculation module on the second target server based on the managed service information and the calculation information.
6. The method as recited in claim 5, further comprising:
And constructing a second start-stop script in the second target server by using a preset Shell instruction, and starting the second start-stop script to enable the managed service in the second target server to be in a starting state.
7. A Weblogic domain building device, comprising:
the first acquisition unit is used for acquiring a plurality of domain building parameters and carrying out validity check on each domain building parameter;
The first setting unit is used for enabling WLST preset according to each domain establishing parameter when the validity of each domain establishing parameter is checked, setting initial Weblogic domains in a plurality of preset servers, and enabling paths of the initial Weblogic domains in each server to be consistent with configuration parameters;
The second setting unit is used for starting a preset execution script, configuring a node manager in the initial Weblogic domain and starting the node manager;
a determining unit, configured to determine a first target server in which a management service is set in each of the servers, and a second target server in which a managed service is to be set;
The connection unit is used for connecting the second target server with the first target server through the WLST when the management service of the first target server is in a starting state, and setting a managed service and a computing module in the second target server so as to realize communication between the managed service and the computing module and the management service when the managed service is in the starting state and complete the construction process of a Weblogic domain;
Wherein the determining a first target server in which the management service is set and a second target server in which the managed service is set in each of the servers includes:
Acquiring a preset first IP address of a management service and a second IP address of the managed service;
Sequentially comparing the server IP addresses of the servers with the first IP address to determine whether the currently compared server is provided with a management service;
When the IP address of the server in the current comparison is consistent with the first IP address, determining that the server in the current comparison is provided with a management service, wherein the server in the current comparison is a first target server;
when the server IP address of the currently compared server is inconsistent with the first IP address, judging whether the server IP address of the currently compared server is consistent with the second IP address;
When the IP address of the server of the current comparison is consistent with the second IP address, determining that the server of the current comparison needs to be set to be managed for service, wherein the server of the current comparison is a second target server.
8. A storage medium comprising stored instructions that, when executed, control a device in which the storage medium resides to perform the Weblogic domain building method of any of claims 1 to 6.
9. An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to perform the Weblogic domain method of any of claims 1 to 6 by one or more processors.
CN202111288099.6A 2021-11-02 2021-11-02 Weblogic domain building method and device, storage medium and electronic equipment Active CN114024842B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111288099.6A CN114024842B (en) 2021-11-02 2021-11-02 Weblogic domain building method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111288099.6A CN114024842B (en) 2021-11-02 2021-11-02 Weblogic domain building method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114024842A CN114024842A (en) 2022-02-08
CN114024842B true CN114024842B (en) 2024-09-27

Family

ID=80059722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111288099.6A Active CN114024842B (en) 2021-11-02 2021-11-02 Weblogic domain building method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114024842B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325953A (en) * 2016-08-30 2017-01-11 广西电网有限责任公司 Weblogic cluster one-key automatic deployment method
CN111966364A (en) * 2020-07-31 2020-11-20 国网福建省电力有限公司 Weblogic automatic environment building method and system based on docker

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10187454B2 (en) * 2014-01-21 2019-01-22 Oracle International Corporation System and method for dynamic clustered JMS in an application server environment
CN111984372B (en) * 2020-08-19 2024-06-18 中国建设银行股份有限公司 Data processing method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325953A (en) * 2016-08-30 2017-01-11 广西电网有限责任公司 Weblogic cluster one-key automatic deployment method
CN111966364A (en) * 2020-07-31 2020-11-20 国网福建省电力有限公司 Weblogic automatic environment building method and system based on docker

Also Published As

Publication number Publication date
CN114024842A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
US11307967B2 (en) Test orchestration platform
US9529602B1 (en) Systems and methods for internet recovery and service
US20150378743A1 (en) Systems and Methods for Enhancing the Availability of Multi-Tier Applications on Cloud Computing Platforms
US20170161059A1 (en) Management of multiple application programming interface versions for development environments
US20160371163A1 (en) Systems and methods for smart diagnoses and triage of failures with identity continuity
KR20160044484A (en) Cloud deployment infrastructure validation engine
US10685115B1 (en) Method and system for implementing cloud native application threat detection
US11539612B2 (en) Testing virtualized network functions
US10331418B2 (en) State machine representation of a development environment deployment process
US10439887B2 (en) Generic test framework for service interfaces
CN112714166B (en) Multi-cluster management method and device for distributed storage system
US11635972B2 (en) Multi-tenant java agent instrumentation system
US10120707B2 (en) Deployment of development environments
CN113127009A (en) Automatic deployment method and device for big data management platform
CN111083006A (en) Broadband data auditing method, device, equipment and storage medium
US20260046197A1 (en) Method and apparatus for controlling electronic devices
US12596540B2 (en) Cloud initiated bare metal as a service for on-premises servers
CN113722240B (en) Stability testing method and system for linux operating system management platform
US7984335B2 (en) Test amplification for datacenter applications via model checking
CN114024842B (en) Weblogic domain building method and device, storage medium and electronic equipment
EP3808036A1 (en) Late stage device configuration and behavior pattern-based validation
CN117609973B (en) Registration center nano-tube method, system, device and server
US20230244464A1 (en) Environment establishment for a program in a server system
WO2024036043A1 (en) Method and apparatus for controlling electronic devices
CN113986365B (en) Information modification method and device based on WebLogic

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant