A WebLogic cluster control method and related equipment
By automatically creating, configuring and monitoring managed servers, the problem of low capacity expansion efficiency of WebLogic domains is solved, and automated capacity expansion is achieved, reducing labor and time costs.
Patent Information
- Application Number
- CN202210269076.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-03-18
AI Technical Summary
In the prior art, the expansion of the WebLogic domain mainly relies on manual operations, resulting in complicated expansion processes, low efficiency and a large amount of human resources.
By obtaining the configuration information of the target domain and server deployment information, the managed server is automatically created in the target domain, and configured according to preset and personalized parameters, restart and monitor the server status to achieve automated incremental deployment of the managed server.
It realizes automated capacity expansion of the WebLogic domain, reduces manual operations, reduces labor and time costs, and improves capacity expansion efficiency.
Smart Images

Figure CN114637516B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer science and technology, and in particular to a WebLogic cluster control method and related equipment. Background Art
[0002] WebLogic is a Java application server used to develop, integrate, deploy and manage large-scale distributed Web applications, network applications and database applications. WebLogic can organize and manage various software and hardware resources in domains.
[0003] A domain can be a logical management unit consisting of a group of WebLogic server instances and other service resources. A domain can include an administration server (AS) and at least one managed server. The administration server can be used for domain configuration and management, and the managed server can deploy service resources such as Web applications, EJB and WebService to provide external services.
[0004] In actual applications, due to the rapid development of business, system architecture integration, and database optimization and adjustment, there is a need to expand the domain in WebLogic, that is, to incrementally deploy managed servers in the domain. Currently, the expansion of the domain is mainly completed by staff through manual operations.
[0005] However, the manual expansion process is complicated and requires a certain amount of human resources. When the number of managed servers to be expanded is large, the expansion efficiency is low. Summary of the invention
[0006] In view of the above problems, the present invention provides a WebLogic cluster control method and related devices that overcome the above problems or at least partially solve the above problems. The technical solution is as follows:
[0007] A WebLogic cluster control method, comprising:
[0008] Obtain configuration information of the target domain to be expanded;
[0009] Obtaining server deployment information for deploying at least one managed server to the target domain;
[0010] Creating each of the managed servers in the target domain based on the configuration information of the target domain and the server deployment information;
[0011] According to the preset service parameters and personalized configuration parameters, respectively configure the parameters of each of the created managed servers;
[0012] Respectively controlling each of the managed servers for which parameter configuration has been performed to restart;
[0013] The running status of each of the managed servers after restart is respectively obtained, and the managed servers in a normal running state are determined as the managed servers that have been successfully deployed in the target domain.
[0014] Optionally, the target domain includes a management server, and the server deployment information includes matching information of the managed server and the host; and creating each managed server in the target domain based on the configuration information of the target domain and the server deployment information includes:
[0015] Based on the configuration information of the target domain, connecting the management server in the target domain; the configuration information includes: the domain name of the target domain, the host name where the management server is located, and the IP address of the management server;
[0016] According to the matching information, a corresponding number of hosts are created through the management server, and a managed server is created on each of the created hosts.
[0017] Optionally, the respectively controlling each of the managed servers for which parameter configuration has been performed to restart includes:
[0018] Creating a node manager on each host where the managed server is located;
[0019] Creating a control script for restarting each of the managed servers;
[0020] The control script is started so that the control script controls each of the managed servers to restart through each of the node managers.
[0021] Optionally, the configuring parameters of each of the created managed servers according to the preset service parameters and the personalized configuration parameters includes:
[0022] According to the unified preset service parameters, parameters of each of the managed servers are configured respectively, so that each of the managed servers meets the business requirements and development standards;
[0023] According to different personalized configuration parameters, parameters are configured for each of the managed servers respectively.
[0024] A WebLogic cluster control device comprises: a first obtaining unit, a second obtaining unit, a first creating unit, a first configuring unit, a first controlling unit, a third obtaining unit and a first determining unit; wherein:
[0025] The first obtaining unit is used to obtain configuration information of the target domain to be expanded;
[0026] The second obtaining unit is used to obtain server deployment information for deploying at least one managed server to the target domain;
[0027] The first creating unit is used to create each of the managed servers in the target domain based on the configuration information of the target domain and the server deployment information;
[0028] The first configuration unit is used to configure parameters of each of the created managed servers according to preset service parameters and personalized configuration parameters;
[0029] The first control unit is used to control each of the managed servers that have been parameter configured to restart;
[0030] The third obtaining unit is used to respectively obtain the running status of each of the managed servers after restart;
[0031] The first determining unit is configured to determine the managed server in a normal operating state as the managed server that has been successfully deployed in the target domain.
[0032] Optionally, the target domain includes a management server, and the server deployment information includes matching information of the managed server and the host; the first creation unit includes: a first connection unit, a second creation unit and a third creation unit; wherein:
[0033] The first connection unit is used to connect the management server in the target domain based on the configuration information of the target domain; the configuration information includes: the domain name of the target domain, the host name where the management server is located, and the IP address of the management server;
[0034] The second creating unit is used to create a corresponding number of hosts through the management server according to the matching information;
[0035] The third creating unit is used to create a managed server on each of the created hosts.
[0036] Optionally, the first control unit includes: a fourth creation unit, a fifth creation unit and a start unit; wherein:
[0037] The fourth creation unit is used to create a node manager on the host where each of the managed servers is located;
[0038] The fifth creation unit is used to create a control script for restarting each of the managed servers;
[0039] The startup unit is used to start the control script so that the control script controls each of the managed servers to restart through each of the node managers.
[0040] Optionally, the first configuration unit includes: a second configuration unit and a third configuration unit;
[0041] The second configuration unit is used to configure parameters of each of the managed servers according to unified preset service parameters, so that each of the managed servers meets business requirements and development standards;
[0042] The third configuration unit is used to perform parameter configuration on each of the managed servers according to different personalized configuration parameters.
[0043] A computer-readable medium stores a computer program, wherein when the program is executed by a processor, any of the above-mentioned WebLogic cluster control methods is implemented.
[0044] A processor is used to run a program, wherein the program implements any of the above-mentioned WebLogic cluster control methods when running.
[0045] An electronic device, comprising:
[0046] one or more processors;
[0047] a storage device having one or more programs stored thereon;
[0048] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned WebLogic cluster control methods.
[0049] The WebLogic cluster control method and related devices proposed in this embodiment can obtain the configuration information of the target domain to be expanded; obtain the server deployment information for deploying at least one managed server to the target domain; create each managed server in the target domain based on the configuration information of the target domain and the server deployment information; configure the parameters of each created managed server according to the preset service parameters and personalized configuration parameters; control each managed server that has been parameter configured to restart; obtain the running status of each managed server after restart, and determine the managed server in normal running state as the managed server that has been successfully deployed to the target domain. The present invention can complete the automatic incremental deployment of one or more managed servers in the target domain, automatically expand the target domain, reduce the manual operation of the staff during the expansion process, reduce the consumption of human resources, reduce the demand for manpower, release the staff from the complex expansion operation, reduce the manpower and time costs, and improve the expansion efficiency of the target domain.
[0050] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0052] Figure 1 A flowchart of a first WebLogic cluster control method provided by an embodiment of the present invention is shown;
[0053] Figure 2 A flow chart of a second WebLogic cluster control method provided by an embodiment of the present invention is shown;
[0054] Figure 3 A schematic diagram of the structure of a WebLogic cluster control device provided by an embodiment of the present invention is shown;
[0055] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0056] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0057] like Figure 1 As shown, this embodiment proposes a first WebLogic cluster control method. The method may include the following steps:
[0058] S101, obtaining configuration information of a target domain to be expanded;
[0059] The target domain may be a domain in WebLogic where the managed servers are to be incrementally deployed.
[0060] The configuration information of the target domain may include information such as the domain name, the IP address of the management server, and the name of the weblogic where the target domain is located.
[0061] Optionally, the target domain configuration parameters may include:
[0062] DOMAIN_NAME = 'Domain name';
[0063] ADMINSERVER_ADDR = 'host name:AS listening port';
[0064] ADMIN_MANAGE_ADDR = 'AS management IP address';
[0065] WLS_USERNAME = 'weblogic', the default user name of the WebLogic console is weblogic;
[0066] WLS_PASSWORD = 'password', the password of the WebLogic console user.
[0067] Among them, DOMAIN is the domain, and NAME is the name;
[0068] Among them, ADMINSERVER is the host name where the management server is located, and ADDR is the listening port. It should be noted that both the management server and the managed server need to be deployed on a host or virtual machine. For example, in the target domain, the deployed management server is deployed on the first host, the deployed first managed server is deployed on the second host, and the deployed second managed server is deployed on the first virtual machine. Specifically, one host or virtual machine can be deployed with one or more managed servers.
[0069] It should be noted that both the management server and the managed server can be regarded as a process on the host where they are located. Optionally, the management server can be regarded as a process on the host where it is located, which is used to control the operation of each managed server in its domain and provide services to the outside; the managed server can be regarded as a process on the host where it is located and in its domain that provides certain services to the outside.
[0070] Among them, ADMIN is the management server AS, MANAGE is management, and ADDR is the IP address;
[0071] Among them, WLS is the WebLogic console, and USERNAME is the user name;
[0072] Optionally, when obtaining the configuration information of the target domain, the present invention can also obtain the environment information of the target domain, wherein the environment information can be the number of managed servers deployed in the target domain, the name and IP address of each managed server, and other information.
[0073] It should be noted that the present invention obtains the environmental information of the target domain, and can distinguish the names of the incrementally deployed managed servers from the deployed managed servers when naming the incrementally deployed managed servers, thereby avoiding duplicate naming, avoiding possible managed server identification errors and control object errors, and improving management efficiency.
[0074] S102, obtaining server deployment information for deploying at least one managed server to a target domain;
[0075] The server deployment information may include configuration parameters of each managed server to be incrementally deployed, including the host name of the managed server and related startup parameters.
[0076] Optionally, the server deployment information may include:
[0077] MACHINE_ADDRS = 'Host name 1: IP address 1: Port 1; Host name 2: IP address 2: Port 2; Host name 3: IP address 3: Port 3;'
[0078] MSERVER_ADDRS = 'MS1: host name 1: port 1; MS2: host name 2: port 2; MS3: host name 3: port 3';
[0079] MS_JVM_PARA = 'JVM parameters';
[0080] START_OPTIONS = 'Other startup parameters';
[0081] Among them, MACHINE_ADDRS can be a list of hosts where each managed server to be incrementally deployed is located; MSERVER_ADDRS can be a list of managed servers to be incrementally deployed;
[0082] Optionally, the server deployment information may also include configuration information of the target domain.
[0083] S103, creating each managed server in the target domain based on the configuration information of the target domain and the server deployment information;
[0084] Specifically, after obtaining the configuration information and server deployment information of the target domain, the present invention can sequentially create each managed server to be incrementally deployed in the target domain according to the obtained configuration information and server deployment information of the target domain.
[0085] Optionally, the target domain includes a management server, and the server deployment information includes matching information of the managed server and the host; in this case, step S103 may include:
[0086] Based on the configuration information of the target domain, the management server is connected in the target domain; the configuration information includes: the domain name of the target domain, the host name where the management server is located, and the IP address of the management server;
[0087] According to the matching information, a corresponding number of hosts are created through the management server, and a managed server is created on each of the created hosts.
[0088] Specifically, the present invention can first connect to the management server in the target domain according to the configuration information of the target domain, create multiple weblogic machines, i.e., hosts or virtual machines, through the management server, and set ports on the hosts or virtual machines respectively, and then create managed servers one by one in each host or virtual machine respectively.
[0089] S104, configuring parameters for each created managed server according to preset service parameters and personalized configuration parameters;
[0090] The preset service parameters may be some optimal standardized configuration parameters summarized by technicians based on practice. Optionally, the preset service parameters may include: listening address and port; size, number and format of log files; maximum limit of file handles; creation and configuration of JDBC connection pool; number and waiting time of stuck threads; automatic restart of overload; Native IO.
[0091] Among them, the personalized configuration parameters can be configuration parameters for personalizing the managed server. It should be noted that the present invention can customize the input parameters according to various complex requirements in the generation environment, customize the expansion of the target domain, create a standard managed server that meets complex service requirements, and cope with complex business scenarios. Optionally, the personalized configuration parameters may include: MS_JVM_PARA = 'JVM parameters'; START_OPTIONS = 'startup parameters'.
[0092] Among them, the JVM configuration parameters may include: -XX:MaxPermSize maximum non-heap memory size; -Xms, the minimum heap size available to the application; -Xmx, the maximum heap size available to the application; -XX:+HeapDumpOnOutOfMemoryError, when the JVM has an OOM, it automatically generates a DUMP file; -verbose:gc-XX:+PrintGCDetails; -XX:+PrintGCTimeStamps-Xloggc:xxx.log outputs GC details, prints GC details and timestamps, and specifies the gc log path.
[0093] Optionally, startup parameters can include:
[0094] Thread pool mode;
[0095] -Dweblogic.threadpool.MinPoolSize=xx thread pool minimum value;
[0096] -Dweblogic.threadpool.MaxPoolSize=xx thread pool maximum value.
[0097] Optionally, in other WebLogic cluster control methods proposed in this embodiment, step S104 may include:
[0098] According to the unified preset service parameters, configure the parameters of each managed server separately so that each managed server meets the business requirements and development standards;
[0099] According to different personalized configuration parameters, parameters of each managed server are configured separately.
[0100] Specifically, the present invention can uniformly configure relevant parameters of each incrementally deployed managed server according to preset service parameters pre-set by the staff.
[0101] Specifically, for a managed server that is incrementally deployed, the present invention can configure relevant parameters of the managed server according to the parameters customized for the managed server.
[0102] S105, respectively controlling each managed server for which parameter configuration has been performed to restart;
[0103] Specifically, the present invention can control each incrementally deployed managed server to restart through the management server after configuring parameters for each incrementally deployed managed server.
[0104] S106, respectively obtaining the operating status of each managed server after restart;
[0105] Specifically, the present invention can monitor the running status of the incrementally deployed managed server after the incrementally deployed managed server is restarted.
[0106] S107, determining the managed server in a normal operating state as a managed server that has been successfully deployed in the target domain;
[0107] Specifically, if the running state of a managed server of an incremental deployment is a normal running state, such as a running state, it can be determined that the managed server can run normally, that is, it can be determined that the managed server has been successfully deployed in the target domain;
[0108] Specifically, if the running state of a managed server deployed incrementally is abnormal, such as failure to provide external services or slow response during service, it can be determined that the managed server cannot operate normally, that is, it can be determined that the managed server is not successfully deployed.
[0109] Optionally, when the target domain is expanded, the present invention can simultaneously perform batch incremental deployment on multiple managed servers. At this time, for the scenario where multiple managed servers need to be added in the production environment, the present invention can quickly and batch implement incremental deployment, thereby improving the operational efficiency and operational safety of expanding the target domain.
[0110] It should be noted that the present invention implements Figure 1 The steps S101, S102, S103, S104, S105, S106 and S107 shown can complete the automated incremental deployment of one or more managed servers in the target domain, automatically expand the target domain, reduce the manual operations of the staff during the expansion process, reduce the consumption of human resources, reduce manpower requirements, release the staff from complex expansion operations, reduce manpower and time costs, and improve the expansion efficiency of the target domain.
[0111] It is understandable that the present invention can perform batch expansion on multiple domains in the same WebLogic, that is, incrementally deploy managed servers in multiple domains in a unified manner to cope with complex scenarios of expanding domains.
[0112] The WebLogic cluster control method proposed in this embodiment obtains the configuration information of the target domain to be expanded; obtains the server deployment information for deploying at least one managed server to the target domain; creates each managed server in the target domain based on the configuration information of the target domain and the server deployment information; configures the parameters of each created managed server according to the preset service parameters and personalized configuration parameters; controls each managed server that has been parameter configured to restart; obtains the running status of each managed server after restart, and determines the managed server in normal running status as the managed server that has been successfully deployed to the target domain. The present invention can complete the automatic incremental deployment of one or more managed servers in the target domain, automatically expand the target domain, reduce the manual operation of the staff during the expansion process, reduce the consumption of human resources, reduce the demand for manpower, release the staff from the complex expansion operation, reduce the manpower and time costs, and improve the expansion efficiency of the target domain.
[0113] based on Figure 1 ,like Figure 2 As shown, this embodiment proposes a second WebLogic cluster control method. In this method, step S105 may include the following steps:
[0114] S201, creating a node manager on each host where each managed server is located;
[0115] Specifically, after creating each incrementally deployed managed server in the target domain, the present invention can create a node manager on each host where each incrementally deployed managed server is located. For example, the present invention can create a node manager on the host where the first incrementally deployed managed server is located, and create a node manager on the host where the second incrementally deployed managed server is located.
[0116] S302, creating a control script for restarting each managed server;
[0117] The control script may be a script used to control the managed server. Specifically, the control script may include a start script and a stop script.
[0118] It should be noted that WebLogic has its own start and stop service, that is, it can control each managed server to start and stop the service respectively, but the start and stop service of WebLogic has the risk of misoperation. Specifically, to avoid the normal implementation of the start and stop service, the present invention can automatically generate a start script and a stop script in the domain directory of the incrementally deployed managed server, and use the start script or the stop script to control the corresponding managed server.
[0119] Optionally, the main process of generating a startup script in the present invention may include:
[0120]
[0121]
[0122] It should be noted that the process of generating the stop script in the present invention is similar to that of the start script, and will not be described in detail.
[0123] S203: Start the control script so that the control script controls each managed server to restart through each node manager.
[0124] Specifically, the present invention can trigger a control script, and respectively connect to the node managers on the hosts where the incrementally deployed managed servers are located through the control script, so as to control the incrementally deployed managed servers.
[0125] Specifically, the present invention can control the managed server to restart through the control script and the node manager, so as to monitor the running status of the managed server after the restart, and determine whether the incremental deployment of the managed server is completed.
[0126] It should be noted that, through steps S201, S202 and S203, the present invention can realize the start and stop control of the incrementally deployed managed servers, thereby realizing the restart control of the managed servers, monitoring whether their incremental deployment is successfully completed, ensuring the success rate of the incremental deployment, and thus improving the expansion efficiency of the target domain.
[0127] The WebLogic cluster control method proposed in this embodiment can realize the restart control of the managed server, monitor whether its incremental deployment is successfully completed, ensure the success rate of incremental deployment, and further improve the expansion efficiency of the target domain.
[0128] and Figure 1 The method shown corresponds to Figure 3 As shown, this embodiment proposes a WebLogic cluster control device, which may include: a first obtaining unit 101, a second obtaining unit 102, a first creating unit 103, a first configuring unit 104, a first controlling unit 105, a third obtaining unit 106 and a first determining unit 107; wherein:
[0129] A first obtaining unit 101 is used to obtain configuration information of a target domain to be expanded;
[0130] A second obtaining unit 102 is used to obtain server deployment information for deploying at least one managed server to a target domain;
[0131] A first creation unit 103, configured to create each managed server in the target domain based on the configuration information of the target domain and the server deployment information;
[0132] The first configuration unit 104 is used to configure parameters of each created managed server according to preset service parameters and personalized configuration parameters;
[0133] The first control unit 105 is used to control each managed server that has been parameter configured to restart;
[0134] The third obtaining unit 106 is used to obtain the running status of each managed server after restart;
[0135] The first determining unit 107 is configured to determine a managed server in a normal operating state as a managed server that has been successfully deployed in the target domain.
[0136] It should be noted that the specific processing of the first obtaining unit 101, the second obtaining unit 102, the first creating unit 103, the first configuring unit 104, the first controlling unit 105, the third obtaining unit 106 and the first determining unit 107 and the technical effects thereof can be referred to in detail. Figure 1 The relevant descriptions of steps S101, S102, S103, S104, S105, S106 and S107 of the method shown are not repeated here.
[0137] Optionally, the target domain includes a management server, and the server deployment information includes matching information of the managed server and the host; the first creation unit 103 includes: a first connection unit, a second creation unit and a third creation unit; wherein:
[0138] A first connection unit, configured to connect to a management server in a target domain based on configuration information of the target domain; the configuration information includes: a domain name of the target domain, a host name where the management server is located, and an IP address of the management server;
[0139] A second creation unit, configured to create a corresponding number of hosts through a management server according to the matching information;
[0140] The third creating unit is used to create a managed server on each of the created hosts.
[0141] Optionally, the first control unit 105 includes: a fourth creation unit, a fifth creation unit and a start unit; wherein:
[0142] The fourth creation unit is used to create a node manager on the host where each managed server is located;
[0143] A fifth creation unit, used to create a control script for restarting and controlling each managed server;
[0144] The startup unit is used to start the control script so that the control script controls each managed server to restart through each node manager.
[0145] Optionally, the first configuration unit 104 includes: a second configuration unit and a third configuration unit;
[0146] The second configuration unit is used to configure parameters of each managed server according to the unified preset service parameters, so that each managed server meets the business requirements and development standards;
[0147] The third configuration unit is used to perform parameter configuration on each managed server according to different personalized configuration parameters.
[0148] The WebLogic cluster control device proposed in this embodiment obtains the configuration information of the target domain to be expanded; obtains the server deployment information for deploying at least one managed server to the target domain; creates each managed server in the target domain based on the configuration information of the target domain and the server deployment information; configures the parameters of each created managed server according to the preset service parameters and personalized configuration parameters; controls each managed server that has been parameter configured to restart; obtains the running status of each managed server after restart, and determines the managed server in normal running status as the managed server that has been successfully deployed to the target domain. The present invention can complete the automatic incremental deployment of one or more managed servers in the target domain, automatically expand the target domain, reduce the manual operation of the staff during the expansion process, reduce the consumption of human resources, reduce the demand for manpower, release the staff from the complex expansion operation, reduce the manpower and time costs, and improve the expansion efficiency of the target domain.
[0149] It should be noted that, in this embodiment, the WebLogic cluster control device can be a chip, a component or a module, and the WebLogic cluster control device can include a processor and a memory. The first obtaining unit 101, the second obtaining unit 102, the first creating unit 103, the first configuring unit 104, the first control unit 105, the third obtaining unit 106 and the first determining unit 107 are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.
[0150] The processor may include a kernel, which calls the corresponding program unit from the memory. One or more kernels may be set, and the WebLogic cluster is controlled by adjusting kernel parameters.
[0151] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0152] Reference below Figure 4 , which shows a schematic structural diagram of an electronic device 700 suitable for implementing this embodiment. Figure 4 The electronic device 700 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0153] like Figure 4 As shown, the electronic device 700 may include a processor 701, a memory 702, a communication interface 703, an input unit 704, an output unit 705, and a communication bus 706. The processor 701 and the memory 702 are connected to each other via the communication bus 706. The communication interface 703, the input unit 704, and the output unit 705 are also connected to the communication bus 706.
[0154] The communication interface 703 may be an interface of a communication module, such as an interface of a GSM module. The communication interface 703 may be used to obtain data or instructions sent by other devices. The communication interface 703 may also be used to send data or instructions to other devices.
[0155] In the embodiment of the present invention, the processor 701 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, etc.
[0156] Optionally, the memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during the use of the computer.
[0157] In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0158] The processor 701 may call a program stored in the memory 702. Specifically, the processor 701 may execute any of the above WebLogic cluster control methods.
[0159] The memory 702 is used to store one or more programs. The program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 702 at least stores a program for implementing the following functions:
[0160] Obtain configuration information of the target domain to be expanded;
[0161] obtaining server deployment information for deploying at least one managed server to a target domain;
[0162] Based on the configuration information of the target domain and the server deployment information, each managed server is created in the target domain;
[0163] According to the preset service parameters and personalized configuration parameters, configure the parameters of each managed server that has been created;
[0164] Respectively control each managed server that has been parameter configured to restart;
[0165] The running status of each managed server after restart is obtained respectively, and the managed servers in the normal running status are determined as the managed servers that have been successfully deployed in the target domain.
[0166] Optionally, the electronic device 700 may include: one or more processors;
[0167] When one or more programs are executed by one or more processors, the one or more processors implement any of the above-mentioned WebLogic cluster control methods.
[0168] certainly, Figure 4 The structure of the electronic device 700 shown does not constitute a limitation on the electronic device in the embodiment of the present invention. In actual applications, the electronic device may include Figure 4 More or fewer components than shown, or combinations of certain components.
[0169] An embodiment of the present invention provides a computer-readable medium on which a computer program is stored, wherein the program implements any of the above WebLogic cluster control methods when executed by a processor.
[0170] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program implements any of the above WebLogic cluster control methods when running.
[0171] The present invention also provides a computer program product, which, when executed on a WebLogic cluster control device, enables the WebLogic cluster control device to implement any of the above WebLogic cluster controls.
[0172] Among them, the electronic device, processor, computer-readable medium or computer program product provided by the above-mentioned embodiments of the present invention can all be used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0173] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable WebLogic cluster control device to generate a machine, so that instructions executed by the processor of the computer or other programmable WebLogic cluster control device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0174] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable WebLogic cluster control device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0175] These computer program instructions can also be loaded onto a computer or other programmable WebLogic cluster control device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0176] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0177] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0178] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0179] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0180] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used, and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. The scope of the invention involved in the present invention is not limited to the technical solution formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.
Claims
1. A WebLogic cluster control method, characterized in that: include: Obtain configuration information of the target domain to be expanded; Obtaining server deployment information for deploying at least one managed server to the target domain, the server deployment information including a host name where the managed server is located and related startup parameters; Creating each of the managed servers in the target domain based on the configuration information of the target domain and the server deployment information; According to the preset service parameters and personalized configuration parameters, the parameters of each managed server that has been created are configured respectively, including: according to the unified preset service parameters, the parameters of each managed server are configured respectively, so that each managed server meets the business requirements and development standards, the preset service parameters include the listening address and port, the size, number and format of the log file, the maximum limit of the file handle, the creation and configuration of the JDBC connection pool, the number and waiting time of the stuck thread, the automatic restart of the overload and the Native IO; according to different personalized configuration parameters, the parameters of each managed server are configured respectively; Respectively controlling each of the managed servers that have been parameter configured to restart, including: creating a node manager on each host where each of the managed servers is located; creating a control script for controlling the restart of each of the managed servers; starting the control script so that the control script controls each of the managed servers to restart through each of the node managers; The running status of each of the managed servers after restart is respectively obtained, and the managed servers in a normal running state are determined as the managed servers that have been successfully deployed in the target domain.
2. The WebLogic cluster control method according to claim 1, characterized in that: The target domain includes a management server, and the server deployment information includes matching information of the managed server and the host; and creating each managed server in the target domain based on the configuration information of the target domain and the server deployment information includes: Based on the configuration information of the target domain, connecting the management server in the target domain; the configuration information includes: the domain name of the target domain, the host name where the management server is located, and the IP address of the management server; According to the matching information, a corresponding number of hosts are created through the management server, and a managed server is created on each of the created hosts.
3. A WebLogic cluster control device, characterized in that: include: a first obtaining unit, a second obtaining unit, a first creating unit, a first configuring unit, a first controlling unit, a third obtaining unit and a first determining unit; wherein: The first obtaining unit is used to obtain configuration information of the target domain to be expanded; The second obtaining unit is used to obtain server deployment information for deploying at least one managed server to the target domain, wherein the server deployment information includes a host name where the managed server is located and related startup parameters; The first creating unit is used to create each of the managed servers in the target domain based on the configuration information of the target domain and the server deployment information; The first configuration unit is used to configure parameters of each of the created managed servers according to preset service parameters and personalized configuration parameters; The first control unit is used to control each of the managed servers that have been parameter configured to restart; The third obtaining unit is used to respectively obtain the running status of each of the managed servers after restart; The first determining unit is used to determine the managed server in a normal operating state as the managed server that has been successfully deployed to the target domain; Wherein, the first control unit includes: a fourth creation unit, a fifth creation unit and a start unit; wherein: The fourth creation unit is used to create a node manager on the host where each of the managed servers is located; The fifth creation unit is used to create a control script for restarting each of the managed servers; The startup unit is used to start the control script so that the control script controls each of the managed servers to restart through each of the node managers; Wherein, the first configuration unit includes: a second configuration unit and a third configuration unit; The second configuration unit is used to configure parameters of each of the managed servers according to unified preset service parameters so that each of the managed servers meets business requirements and development standards. The preset service parameters include listening address and port, size, number and format of log files, maximum limit of file handles, creation and configuration of JDBC connection pool, number and waiting time of stuck threads, automatic restart of overload and Native IO; The third configuration unit is used to perform parameter configuration on each of the managed servers according to different personalized configuration parameters.
4. The WebLogic cluster control device according to claim 3, characterized in that: The target domain includes a management server, and the server deployment information includes matching information of the managed server and the host; The first creation unit includes: a first connection unit, a second creation unit and a third creation unit; wherein: The first connection unit is used to connect the management server in the target domain based on the configuration information of the target domain; the configuration information includes: the domain name of the target domain, the host name where the management server is located, and the IP address of the management server; The second creating unit is used to create a corresponding number of hosts through the management server according to the matching information; The third creating unit is used to create a managed server on each of the created hosts.
5. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the WebLogic cluster control method according to claim 1 or 2 is implemented.
6. A processor for running a program, wherein: When the program is running, the WebLogic cluster control method as claimed in claim 1 or 2 is implemented.
Citation Information
Patent Citations
Method and system for laterally expanding capacity
CN105450735A