Disclosure of Invention
The application automation issuing method and the related device based on the middleware creating are used for solving the technical problems of low efficiency, labor waste, easiness in misoperation and long issuing time consumption in the manual issuing of the application based on the middleware creating in the prior art.
In view of this, a first aspect of the present application provides an application automation publishing method based on middleware creation, including:
uploading a target uploading application publishing packet to an application publishing system, and acquiring a target server selected by a user after the target uploading application publishing packet is uploaded successfully;
acquiring middleware domain information through the target server, acquiring middleware cluster information after the middleware domain information is successfully acquired, and confirming an application packet issuing position after the middleware cluster information is successfully acquired;
stopping running old version application, and stopping the cluster after unloading the old version application;
clearing the cache occupied by the old version application and restarting the cluster;
uploading the target uploading application publishing packet to a middleware host, so that the middleware host executes publishing of the target uploading application publishing packet.
Optionally, the uploading the target upload application publishing packet to an application publishing system, and after the uploading of the target upload application publishing packet is successful, acquiring a target server selected by a user, where the method further includes:
establishing an application publishing data model based on the middleware for publishing the target uploading application publishing packet, wherein the application publishing data model comprises an application packet management model, a middleware creating cluster model, a middleware creating middle domain model, a middleware creating instance model, a publishing range management model and a publishing log model.
Optionally, the uploading the target upload application distribution package to a middleware host, so that the middleware host performs the distribution of the target upload application distribution package, and then the method further includes:
and storing the release log of the target uploading application release packet.
Optionally, the method further comprises:
and if the storage of the release log of the target uploaded application release packet fails, returning prompt information.
The second aspect of the present application provides an application automation publishing apparatus based on middleware creation, including:
the acquisition module is used for acquiring the middleware domain information through the target server, acquiring the middleware cluster information after the middleware domain information is successfully acquired, and confirming the release position of the application packet after the middleware cluster information is successfully acquired;
the stopping module is used for stopping the running old version application, and stopping the cluster after the old version application is unloaded;
the starting module is used for clearing the cache occupied by the old version application and restarting the cluster;
and the issuing module is used for uploading the target uploading application issuing package to the middleware host, so that the middleware host executes issuing of the target uploading application issuing package.
Optionally, the method further comprises:
the modeling module is used for establishing an application publishing data model based on the creating middleware and used for publishing the target uploading application publishing package, and the application publishing data model comprises an application package management model, a creating middleware cluster model, a creating middleware domain model, a creating middleware instance model, a publishing range management model and a publishing log model.
Optionally, the method further comprises:
and the log storage module is used for storing the release log of the target uploading application release packet.
Optionally, the method further comprises:
and the return module is used for returning prompt information if the storage of the release log of the target uploading application release packet fails.
A third aspect of the present application provides an application automation publishing device based on middleware creation, where the device includes a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute any one of the methods for automatically issuing an application based on middleware according to the first aspect according to instructions in the program code.
A fourth aspect of the present application provides a computer-readable storage medium for storing program code for executing the method for automatically publishing an application based on a middleware in the first aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
the application provides an application automatic publishing method based on middleware creating, which comprises the following steps: uploading the target uploading application publishing packet to an application publishing system, and acquiring a target server selected by a user after the target uploading application publishing packet is uploaded successfully; acquiring middleware domain information through a target server, acquiring middleware cluster information after the middleware domain information is successfully acquired, and confirming an application packet issuing position after the middleware cluster information is successfully acquired; stopping the running old version application, and stopping the cluster after unloading the old version application; clearing the cache occupied by the old version application and restarting the cluster; and uploading the target uploading application publishing packet to the middleware host, so that the middleware host executes the publishing of the target uploading application publishing packet. According to the application automatic issuing method, the target uploading application issuing package can be uploaded to the middleware host for issuing through the routing mode of the domain, the cluster and the node only by uploading the target uploading application issuing package to the application issuing system of the middle-creation middleware, and the technical problems that the efficiency is low, manpower is wasted, misoperation is easy to occur and issuing time is long when manual issuing is adopted in the existing application based on the middle-creation middleware are solved.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following provides an explanation of terms mentioned in the examples of the present application:
creating a middleware: InforSuite AS application Server.
Example (c): a single virtual machine on the Java platform, running on a single node of the server; server instances form the basis of application deployment, an important building block for building clusters, each instance belonging to a single domain and having its own directory structure, configuration and deployed applications, each instance containing a reference to a node.
Clustering: the application server is a collection of logical entities of multiple server instances, sharing the same application, resource and configuration information, and can manage all instances in a cluster as a unit on a single host regardless of whether the server instances are on the same host.
Domain: a domain and a domain may contain one or more individual servers and clusters as a unit to manage a set of server resources that are interrelated.
For easy understanding, please refer to fig. 1 and 2, the present application provides an embodiment of an application automation publishing method based on a middleware creation, including:
step 101, uploading the target uploading application publishing package to an application publishing system, and obtaining a target server selected by a user after the target uploading application publishing package is uploaded successfully.
102, acquiring middleware domain information through a target server, acquiring middleware cluster information after the middleware domain information is successfully acquired, and confirming an application packet issuing position after the middleware cluster information is successfully acquired.
And 103, stopping the running old version application, and unloading the old version application to stop the cluster.
And 104, clearing the cache occupied by the old version application and restarting the cluster.
And 105, uploading the target uploading application publishing packet to the middleware host, so that the middleware host executes the publishing of the target uploading application publishing packet.
It should be noted that, in this embodiment of the application, an operator may upload a target upload application distribution package to an application distribution system by logging in the application distribution system, where the application distribution system presents an application system, a service domain, and a target server that are selectable to a user, after obtaining a target InforSuite AS application server selected by the user, obtain middleware domain information through the InforSuite AS application server, obtain cluster information of the middleware according to the middleware domain information, and after successfully obtaining the middleware cluster information, confirm an application distribution package position, that is, confirm configuration information of the middleware: and if the running old application exists under the path of the issuing packet, indicating that the application is normal, and if the running old application does not exist, indicating that the configuration has a problem. Since the running application is old, it needs to be uninstalled, the old application is stopped, the uninstalling of the old application is performed, and then the cluster is stopped. In order to ensure that the application server is updated normally, the cache of the old application needs to be cleared, the problem of failed release caused by the cache is avoided, then the cluster is restarted, and after the cluster is started successfully, the Inforsuite AS application server uploads the target uploading application release packet to the middleware host to complete application release. In the whole process, only the target uploading application publishing package is uploaded to the application publishing system by the user, the target Inforsuite AS application server is selected in the application publishing system, the user does not need to manually restart or manually execute the start-stop application node, and the automatic publishing of the application version is realized. According to the application automatic issuing method provided by the embodiment of the application automatic issuing method, the target uploading application issuing package can be uploaded to the middleware host for issuing in a domain, cluster and node routing mode only by uploading the target uploading application issuing package to the application issuing system of the creating middleware, and the technical problems that the efficiency is low, manpower is wasted, misoperation is easy and issuing time is long when manual issuing is adopted in the existing application based on the creating middleware are solved.
The application publishing system can integrate an application publishing data model based on the middleware, wherein the application publishing data model comprises an application package management model, a middleware creating cluster model, a middleware creating domain model, a middleware creating instance model, a publishing scope management model and a publishing log model. The application management model describes the relevant information of the system publishing package, mainly relating to the file information of the information system application package, such as file name and file size, and the code can be expressed as:
# name
Charfield (max _ length _ 256, null _ False, verbose _ name u "name")
Name of # File
file_name=models.
CharField (max _ length 128, null False, verbose _ name u "filename")
# File size
file _ size ═ models. charfield (max _ length ═ 64, null ═ False, verbose _ name ═ u "file size")
Document folder compressed document of document type
Charfield (max _ length _ 32, null _ True, verbose _ name _ u "type")
# File description
file _ desp _ model. charfield (null True, verbose _ name u "file description")
Time to create (packet upload time)
create _ time _ date _ add _ True, edit _ True, verbose _ name u "creation time")
# creator number
create _ user, integer field (null, verbose _ name u "create person number")
# time of last modification
modified_time=models.
DateTimeField (aotu _ now ═ True, edittable ═ True, verbose _ name: "last modified time")
# last reviser number
modified _ user, integer field (null, verbose _ name u "last modified person number")
# information remarks
Charfield (max _ length 256, verbose _ name u "Remark for information")
# disabled or not: 0 Normal, 1 disabled
Bootean field (null, default 0, verbose name u "disabled or not")
# deleted: 0 Normal, 1 deleted
Factory field (null is False, 0, and hub _ name u "is Deleted or not)
Creating a middleware domain model:
the domain is a logical unit for creating middleware management, the complex enterprise-level system is composed of a plurality of domains, the system is generally updated by taking the domain as the logical unit when being updated, the domain can comprise a plurality of clusters, each cluster comprises a plurality of nodes, and the application packages of each node are the same package. The middleware domain model may include the following: service system ID, service subsystem ID, host IP, create middleware account, create middleware password, create middleware port, domain name, domain state, password file position, creation time, creator number, last modification time, last modifier number, information remark, whether forbidden or not and whether deleted or not.
Creating a middleware cluster model:
the application supporting capability of a single node is limited, a multi-node management mode is usually adopted for an application system with more active users in enterprise content, a cluster is formed, and a cluster management model comprises information such as domain ID, cluster name, cluster state, creation time, creator number, last modification time, last modifier number, information remark, forbidden state, deletion state and the like.
Creating a middleware instance model:
the middleware model describes the running Java instance, the basic unit of middleware management is created, and the enterprise-level system generally provides services for users through Web, so that the middleware model corresponds to ports and process IDs one by one. The creating middleware instance model specifically describes an instance of the creating middleware, and the instance comprises information such as a cluster to which the instance belongs, an instance name, a port number, an IP address, a process ID, creating time, a creator number, last modification time, a last modifier number, information remarks, whether the instance is forbidden or not, whether the instance is deleted or not, and the like.
Issuing a scope model:
the release range describes the range of the application update, because the example is the minimum unit for bearing the application, and the large-scale enterprise-level application describes the application by taking the cluster as a unit, the release range usually selects a certain cluster of a certain domain under a certain system for update release.
And (3) issuing a log model:
the release log records the whole process of automatic release, and the release log records information such as a software name, a release position, release time, a release state and the like, so that if release errors occur, a user can be prompted to release a failure reason, and an audit function is provided for the release condition of the whole platform application.
And calling a shell script to launch the middleware in the creation process through related equipment such as a cluster, an IP (Internet protocol), a port, a user and the like, and displaying different execution results according to different released states. Meanwhile, a fault tolerance mechanism can be provided, if the application release fails, the rollback is automatically carried out, the deployment of the original effective file is automatically executed, and the related errors can be inquired through the release log.
For ease of understanding, referring to fig. 3, an embodiment of an application automation distribution apparatus based on middleware creation is provided in the present application, including:
and the uploading module is used for uploading the target uploading application publishing package to the application publishing system, and acquiring the target server selected by the user after the target uploading application publishing package is successfully uploaded.
And the acquisition module is used for acquiring the middleware domain information through the target server, acquiring the middleware cluster information after the middleware domain information is successfully acquired, and confirming the release position of the application packet after the middleware cluster information is successfully acquired.
And the stopping module is used for stopping the running old version application and stopping the cluster after unloading the old version application.
And the starting module is used for clearing the cache occupied by the old version application and restarting the cluster.
And the issuing module is used for uploading the target uploading application issuing package to the middleware host, so that the middleware host executes issuing of the target uploading application issuing package.
Further, still include:
the modeling module is used for establishing an application publishing data model based on the middleware for publishing the target uploading application publishing package, and the application publishing data model comprises an application package management model, a middleware creating cluster model, a middleware creating domain model, a middleware creating instance model, a publishing range management model and a publishing log model.
Further, still include:
and the log storage module is used for storing the release log of the target uploading application release packet.
Further, still include:
and the return module is used for returning prompt information if the storage of the release log of the target uploading application release packet fails.
The application also provides an embodiment of the application automation publishing device based on the middleware creating, wherein the device comprises a processor and a memory:
the memory is used for storing the program codes and transmitting the program codes to the processor;
the processor is used for executing the application automatic issuing method based on the middleware in the embodiment of the application automatic issuing method based on the middleware according to the instructions in the program codes.
An embodiment of a computer-readable storage medium is further provided in the present application, and the computer-readable storage medium is configured to store program code for executing the application automatic publishing method based on the middleware in the aforementioned embodiment of the application automatic publishing method based on the middleware.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer system (which may be a personal computer, a server, or a network system) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.