CN114911503A - Application issuing method, device, equipment and storage medium - Google Patents

Application issuing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114911503A
CN114911503A CN202210592955.5A CN202210592955A CN114911503A CN 114911503 A CN114911503 A CN 114911503A CN 202210592955 A CN202210592955 A CN 202210592955A CN 114911503 A CN114911503 A CN 114911503A
Authority
CN
China
Prior art keywords
application
environment
blue
release
parameter
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.)
Pending
Application number
CN202210592955.5A
Other languages
Chinese (zh)
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202210592955.5A priority Critical patent/CN114911503A/en
Publication of CN114911503A publication Critical patent/CN114911503A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The invention relates to the field of cloud computing, and discloses an application release method, which comprises the following steps: configuring application parameters and environment parameters of an application to be released; inquiring the release version state of the application to be released, and identifying the blue cluster identifier and the green cluster identifier of the application parameter; judging whether the environment parameter is a blue environment or not; when the environmental parameter is a blue environment, sending the application to be released to the blue environment for operation by using a preset flow control platform according to the blue cluster identifier and the release version state, and obtaining a release result of the application to be released; and when the environmental parameter is the green environment, sending the application to be issued to the green environment for operation by using a preset flow control platform according to the green cluster identifier and the issuing version, and obtaining an issuing result of the application to be issued. The invention also relates to a block chain technique, and the application parameters can be stored in block chain link points. The invention also provides an application issuing device, equipment and a medium. The invention can improve the publishing effect of the application publishing.

Description

Application issuing method, device, equipment and storage medium
Technical Field
The invention relates to the field of cloud computing, in particular to an application release method, an application release device, application release equipment and a storage medium.
Background
Application publishing is typically via a publishing policy, wherein the publishing policy includes: grey scale release, canary release, blue-green release, and the like, wherein the blue-green release can be widely used by deploying a new version of application while retaining an old version of application. Blue-green release is a smooth-transition application release mode, and can ensure that the application gradually transfers user traffic from an application of an old version to an application of a new version under the condition of continuously providing services, wherein the new version is deployed through a blue cluster, and the old version is deployed through a green cluster. However, in the conventional blue-green release process, deployment is usually performed manually, configuration parameter errors often occur, and a problem that a new version calls an old version of backend code or an old version calls a new version of backend code also exists, so that the release effect of application release is poor.
Disclosure of Invention
The invention provides an application publishing method, device, equipment and storage medium, and mainly aims to improve the publishing effect of application publishing.
In order to achieve the above object, the present invention provides an application publishing method, including:
acquiring an application to be issued, and configuring application parameters and environment parameters of the application to be issued;
inquiring the release version state of the application to be released, and identifying the blue cluster identifier and the green cluster identifier of the application parameter;
receiving a release request of the application to be released, and judging whether the environment parameter is a blue environment or not according to the release request;
when the environment parameter is a blue environment, sending the application to be issued to the blue environment for operation by using a preset flow control platform according to the blue cluster identifier and the release version state to obtain a release result of the application to be issued;
and when the environmental parameter is not the blue environment, determining that the environmental parameter is the green environment, and sending the application to be issued to the green environment for operation by using a preset flow control platform according to the green cluster identifier and the issuing version to obtain an issuing result of the application to be issued.
Optionally, the sending, by using a preset flow control platform according to the blue cluster identifier and the release version status, the application to be released to the blue environment to run, so as to obtain a release result of the application to be released, where the sending includes:
acquiring the application attribute of the application to be issued, and generating an application instance of the application attribute;
and acquiring a blue cluster corresponding to the blue cluster identifier, sending the application instance to the blue environment by using the flow control platform according to the release version state, and running the application instance in the blue environment by using the blue cluster to obtain a release result of the application to be released.
Optionally, as an embodiment of the present invention, the determining, according to the issue request, whether the environment parameter is a blue environment includes:
acquiring the environment parameter tags according to the release request, and comparing the environment parameter tags with dictionary environment tags in a preset environment dictionary;
when the environment parameter tag is consistent with a blue environment tag in the dictionary environment tags, determining whether the environment parameter is a blue environment;
and when the environment parameter tag is not consistent with a blue environment tag in the dictionary environment tags, determining whether the environment parameter is a green environment.
Optionally, the identifying the blue cluster identifier and the green cluster identifier of the application parameter includes:
acquiring a preset white list user set, and judging whether a micro service cluster in the application parameters serves the white list user set;
when a micro service cluster serves the white list user set, determining the micro service cluster as a blue cluster, and configuring a blue cluster identifier of the blue cluster;
and when the micro service cluster is not served by the white list user set, determining the micro service cluster as a green cluster, and configuring a green cluster identifier of the green cluster.
Optionally, the configuring the application parameter and the environment parameter of the application to be published includes:
acquiring a configuration object of the application to be issued, annotating the configuration object and acquiring a custom configuration parameter;
and configuring the application parameters and the environment parameters of the application to be released according to the custom configuration parameters.
Optionally, the querying a release version status of the application to be released includes:
acquiring a release version number of the application to be released, and querying a release version corresponding to the release version number by using a preset query statement;
and identifying the running condition of the release version, and determining the release version state of the application to be released according to the running condition.
Optionally, after the identifying the blue cluster identifier and the green cluster identifier of the application parameter, the method further includes:
acquiring a locator of the application to be issued, and judging whether the locator is a blue cluster identifier or not;
when the release request is the blue cluster identifier, obtaining a locator of the blue version;
and when the issuing request is not the blue cluster identifier, obtaining the green version locator.
In order to solve the above problem, the present invention further provides an application issuing apparatus, including:
the parameter configuration module is used for acquiring the application to be issued and configuring the application parameters and the environment parameters of the application to be issued;
the cluster identifier identification module is used for inquiring the release version state of the application to be released and identifying the blue cluster identifier and the green cluster identifier of the application parameter;
the environment parameter judging module is used for receiving a publishing request of the application to be published and judging whether the environment parameter is a blue environment or not according to the publishing request;
the application issuing module is used for sending the application to be issued to the blue environment for operation by using a preset flow control platform according to the blue cluster identifier and the issuing version state when the environment parameter is the blue environment, so as to obtain an issuing result of the application to be issued; and when the environmental parameter is not the blue environment, determining that the environmental parameter is the green environment, and sending the application to be issued to the green environment for operation by using a preset flow control platform according to the green cluster identifier and the issuing version to obtain an issuing result of the application to be issued.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and a processor executing the computer program stored in the memory to implement the application distribution method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being executed by a processor in an electronic device to implement the application issuing method described above.
In the embodiment of the invention, the user-defined configuration can be realized by acquiring the application to be released and configuring the application parameters and the environmental parameters of the application to be released, so that the parameter configuration efficiency is improved; secondly, inquiring the release version state of the application to be released, so that the consistency of the old version and the new version at the front end and the old version at the rear end can be kept, the release effect of the subsequent application to be released is ensured, whether the environmental parameter is a blue environment or not is judged according to the release request, the application environments of the new version and the old version can be distinguished, the operating environments of the new version and the old version of the application to be released are isolated, and the normal operation of the subsequent application to be released is ensured; and finally, sending the application to be released to the blue environment to run by using a preset flow control platform according to the blue cluster identifier and the release version state, and sending the application to be released to the green environment to run by using the preset flow control platform according to the green cluster identifier and the release version state to obtain the release result of the application to be released, so that the blue version can be called as the back-end code of the new version, the green version can be called as the back-end code of the old version, and the release effect of application release is improved. Therefore, the application publishing method, the application publishing device, the application publishing equipment and the storage medium provided by the embodiment of the invention can improve the publishing effect of the application publishing.
Drawings
Fig. 1 is a schematic flowchart of an application publishing method according to an embodiment of the present invention;
fig. 2 is a detailed flowchart illustrating a step in an application publishing method according to an embodiment of the present invention;
fig. 3 is a schematic detailed flowchart of a step in an application publishing method according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of an application distribution apparatus according to an embodiment of the present invention;
fig. 5 is a schematic internal structural diagram of an electronic device implementing an application publishing method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides an application issuing method. The execution subject of the application publishing method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the application publishing method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Referring to a flowchart of an application publishing method provided in an embodiment of the present invention shown in fig. 1, in the embodiment of the present invention, the application publishing method includes the following steps S1 to S5:
s1, acquiring the application to be issued, and configuring the application parameters and the environment parameters of the application to be issued.
In the embodiment of the present invention, the application to be published refers to an application to be updated on the basis of an existing old application, for example, an H5 page, an APP, and the like to be published. The application parameters can be a new version back-end code, an old version back-end code, a blue micro service cluster, a green micro service cluster and the like of the application to be released.
In the embodiment of the invention, the environment parameters refer to a green environment (namely an old environment) and a blue environment (namely a new environment) related to a release process of an application to be released, wherein the green environment refers to an environment in which an old version of back-end code and a green microservice cluster operate; the blue environment refers to an environment in which a new version of back-end code and a blue micro service cluster operate.
According to the embodiment of the invention, by configuring the application parameters and the environmental parameters of the application to be issued, errors of parameter configuration caused by manual configuration can be avoided, and the efficiency and the accuracy of parameter configuration are improved.
As an embodiment of the present invention, the configuring the application parameter and the environment parameter of the application to be published includes:
acquiring a configuration object of the application to be issued, annotating the configuration object and acquiring a custom configuration parameter; and configuring the application parameters and the environment parameters of the application to be released according to the user-defined configuration parameters.
The configuration object is a unified body formed by packaging data describing the attributes of the application to be published and operations applied to the data together; the user-defined configuration can be realized by annotating the configuration object, and some configuration data of the application to be issued can be stored, inquired and deleted.
In an embodiment of the present invention, the configuring the application parameters and the environment parameters of the application to be published according to the customized configuration parameters may be performed through a preset configuration language, for example, configuring the application parameters and the environment parameters of the application to be published through YAML.
S2, inquiring the release version state of the application to be released, and identifying the blue cluster identifier and the green cluster identifier of the application parameter.
It should be understood that the release version status refers to the release version operation condition involved in the alternation process of the old version and the new version, such as green upgrade, blue upgrade or blue rollback, etc. for the application to be released. Because the corresponding version is generated during the operation retest or the application uploading in the release process, the release version state of the application to be released needs to be queried to ensure the normal release of the application to be released, for example, when the blue version is in the blue upgrade state, it is indicated that the blue version cannot normally operate at this time, and other versions need to be replaced.
In the embodiment of the present invention, the blue cluster identifier refers to an identifier that uniquely identifies a cluster as a blue cluster, for example, a blue cluster ID, and is mainly used as a new version native code identifier; the green cluster identifier refers to an identifier that uniquely identifies a cluster as a green cluster, for example, a green cluster ID, and is mainly used as an old version of a native code identifier.
According to the embodiment of the invention, the consistency between the old version at the front end and the new version at the rear end can be realized by inquiring the release version state of the application to be released and identifying the blue cluster identifier and the green cluster identifier of the application parameter, so that the release effect of the subsequent application to be released is ensured.
As an embodiment of the present invention, the querying a release version status of the application to be released includes:
acquiring a release version number of the application to be released, and querying a release version corresponding to the release version number by using a preset query statement; and identifying the running condition of the release version, and determining the release version state of the application to be released according to the running condition.
The release version number refers to a version number corresponding to a different version, such as V1, V2, V3, and the like; the preset query statement may be Select from vision; the release version status refers to the running condition of the version, such as normal running, upgrading or rollback of the blue version.
Further, referring to fig. 2, the identifying the blue cluster identifier and the green cluster identifier of the application parameter includes the following steps S21-S23:
s21, acquiring a preset white list user set, and judging whether the micro service cluster in the application parameters serves the white list user set;
s22, when the micro service cluster serves the white list user set, determining that the micro service cluster is a blue cluster, and configuring a blue cluster identifier of the blue cluster;
s23, when the micro service cluster is not served by the white list user set, determining that the micro service cluster is a green cluster, and configuring a green cluster identifier of the green cluster.
The white list user set refers to a user set meeting a setting condition, and may be set based on a scene, for example, a user set served by a blue cluster may be regarded as a white list user set or a user set for testing an operation condition of an application in an application upgrading process. The main role of the white list user set is to identify the micro service cluster as a blue cluster or a green cluster.
In an optional embodiment of the present invention, after identifying the blue cluster identifier and the green cluster identifier of the application parameter, the method further includes:
acquiring a locator of the application to be issued, and judging whether the locator is a blue cluster identifier or not; when the release request is the blue cluster identifier, obtaining a locator of the blue version; and when the issuing request is not the blue cluster identifier, obtaining the green version locator.
The locator of the application to be published may be a uniform resource locator of the application to be published, such as a URL of H5 to be published; because the front-end resource and the back-end service released by the application to be released are separately deployed, whether the release request of the application to be released is the blue cluster identifier or not is judged, and the consistency of the old and new versions of the front end and the back end in the upgrading process of the application to be released can be ensured.
It should be appreciated that the blue version locator may be the blue URL returned by H5, and the green version locator may be the green URL returned by H5.
S3, receiving the release request of the application to be released, and judging whether the environment parameter is a blue environment according to the release request.
In the embodiment of the invention, the issue request refers to an issue instruction of the application to be issued, the instruction is that the front end issues, for example, ajax request, and the main function is to realize mutual interaction between the front end and the back end of the application to be issued.
In the embodiment of the invention, the blue environment refers to the environment for running the new version back-end code of the application to be released and the blue micro service cluster. By judging whether the environment parameter is a blue environment or not, the application environments of the new version and the old version can be distinguished, so that the operation environments of the new version and the old version of the application to be released are isolated, and the normal operation of the subsequent application to be released is ensured.
As an embodiment of the present invention, the determining whether the environment parameter is a blue environment according to the issue request includes:
acquiring the environment parameter tags according to the release request, and comparing the environment parameter tags with dictionary environment tags in a preset environment dictionary; when the environment parameter tag is consistent with a blue environment tag in the dictionary environment tags, determining whether the environment parameter is a blue environment; and when the environment parameter tag is not consistent with a blue environment tag in the dictionary environment tags, determining whether the environment parameter is a green environment.
The environmental parameter tag is an identifier assigned to an environmental parameter in a process of configuring the environmental parameter, and mainly functions to distinguish a Blue environment from a Green environment, for example, if the environmental parameter tag is Blue1 or Blue2, the environmental parameter is indicated as the Blue environment, and if the environmental parameter tag is Green1 or Green2, the environmental parameter is indicated as the Green environment, and the environmental parameter tag may be customized and limited by a user according to actual requirements, which is not limited herein.
In an embodiment of the present invention, the preset environment dictionary refers to a dictionary for storing environment parameters, and the environment dictionary may have a plurality of expression forms, for example, a data table form capable of being added, deleted, checked and modified.
And S4, when the environment parameter is a blue environment, sending the application to be issued to the blue environment for operation by using a preset flow control platform according to the blue cluster identifier and the release version state, and obtaining a release result of the application to be issued.
In the embodiment of the invention, when the environment parameter is a blue environment, the application to be released is represented to run through the blue environment, and the release result of the application to be released is obtained by sending the application to be released to the blue environment to run by using a preset flow control platform according to the blue cluster identifier and the release version state, so that the blue version can be called the back-end code of the new version, the normal release of the application is further ensured, and the release effect of the application release is improved.
In the embodiment of the present invention, the preset flow control platform is used for controlling the use condition of a new version and an old version of an application to be published in the process of publishing front-end and back-end interactions, and mainly has the function of managing resource access permissions, for example, a new H5 code calls a new back-end code (i.e., runs in a blue environment), and an old H5 code calls an old back-end code (i.e., runs in a green environment).
As an embodiment of the present invention, referring to fig. 3, the sending the application to be published to the blue environment for running by using a preset flow control platform according to the blue cluster identifier and the release version status to obtain a release result of the application to be published includes the following steps S41-42:
s41, obtaining the application attribute of the application to be released, and generating an application instance of the application attribute;
and S42, acquiring a blue cluster corresponding to the blue cluster identifier, sending the application instance to the blue environment by using the flow control platform according to the release version state, and running the application instance in the blue environment by using the blue cluster to obtain a release result of the application to be released.
The application attribute refers to native code information of an application to be issued; the application instance may include an application name, an application parameter, a parameter placeholder, an attribute name, and the like, and is mainly used for facilitating searching for information in the application to be published.
In an embodiment of the present invention, when the release version status is that the blue version normally operates, the application instance may be operated by the blue cluster, so as to implement release of the new version of the application to be released.
In another embodiment of the present invention, after obtaining the publishing result of the application to be published, the method further includes:
judging whether the issuing result is issued successfully or not; when the release result is successfully released, obtaining release application; and when the release result is not successfully released, upgrading the application to be released until the application to be released normally runs to obtain the release application.
Whether the release result is successfully released or not can be released through a preset internal test user by using the application function, and if the application function can be normally used, the application function is released; if the application function is abnormal in the using process, the operation and maintenance personnel can upgrade the application to solve the abnormality and obtain the upgraded release application.
And S5, when the environmental parameter is not the blue environment, determining that the environmental parameter is the green environment, and sending the application to be issued to the green environment to run by using a preset flow control platform according to the green cluster identifier and the release version to obtain a release result of the application to be issued.
In the embodiment of the invention, when the environment parameter is not a blue environment, the application to be released is represented to run through a green environment, and the application to be released is sent to the green environment to run by using a preset flow control platform according to the green cluster identifier and the release version, so that the release result of the application to be released is obtained, the green version can be called the back-end code of the old version, the normal release of the application is further ensured, and the release effect of the application release is improved.
In the embodiment of the present invention, the method for sending the application to be released to the green environment for operation by using the preset flow control platform according to the green cluster identifier and the release version to obtain the release result of the application to be released is consistent with the method for sending the application to be released to the blue environment for operation by using the preset flow control platform according to the blue cluster identifier and the release version state in S4 to obtain the release result of the application to be released, and details are not repeated here.
In the embodiment of the invention, the user-defined configuration can be realized by acquiring the application to be released and configuring the application parameters and the environmental parameters of the application to be released, so that the parameter configuration efficiency is improved; secondly, inquiring the release version state of the application to be released, so that the consistency of the old version and the new version at the front end and the old version at the rear end can be kept, the release effect of the subsequent application to be released is ensured, whether the environmental parameter is a blue environment or not is judged according to the release request, the application environments of the new version and the old version can be distinguished, the operating environments of the new version and the old version of the application to be released are isolated, and the normal operation of the subsequent application to be released is ensured; and finally, sending the application to be released to the blue environment to run by using a preset flow control platform according to the blue cluster identifier and the release version state, and sending the application to be released to the green environment to run by using the preset flow control platform according to the green cluster identifier and the release version state to obtain the release result of the application to be released, so that the blue version can be called as the back-end code of the new version, the green version can be called as the back-end code of the old version, and the release effect of application release is improved. Therefore, the application publishing method provided by the embodiment of the invention can improve the publishing effect of the application publishing.
The application distribution apparatus 100 of the present invention may be installed in an electronic device. According to the implemented functions, the application issuing apparatus may include a parameter configuration module 101, a cluster identifier identification module 102, an environment parameter judgment module 103, and an application issuing module 104, where the modules may also be referred to as units, and refer to a series of computer program segments that can be executed by a processor of an electronic device and can perform fixed functions, and the computer program segments are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the parameter configuration module 101 is configured to obtain an application to be published, and configure application parameters and environment parameters of the application to be published.
In the embodiment of the present invention, the application to be published refers to an application to be updated on the basis of an existing old application, for example, an H5 page, an APP, and the like to be published. The application parameters can be a new version back-end code, an old version back-end code, a blue micro service cluster, a green micro service cluster and the like of the application to be released.
In the embodiment of the invention, the environment parameters refer to a green environment (namely an old environment) and a blue environment (namely a new environment) related to a release process of an application to be released, wherein the green environment refers to an environment in which an old version of back-end code and a green microservice cluster operate; the blue environment refers to an environment in which a new version of back-end code and a blue micro service cluster operate.
According to the embodiment of the invention, by configuring the application parameters and the environmental parameters of the application to be issued, errors of parameter configuration caused by manual configuration can be avoided, and the efficiency and the accuracy of parameter configuration are improved.
As an embodiment of the present invention, the parameter configuration module 101 configures the application parameters and the environment parameters of the application to be published by performing the following operations, including:
acquiring a configuration object of the application to be issued, annotating the configuration object and acquiring a custom configuration parameter; and configuring the application parameters and the environment parameters of the application to be released according to the user-defined configuration parameters.
The configuration object is a unified body formed by packaging data describing the attributes of the application to be published and operations applied to the data together; the user-defined configuration can be realized by annotating the configuration object, and some configuration data of the application to be issued can be stored, inquired and deleted.
In an embodiment of the present invention, the configuring of the application parameters and the environment parameters of the application to be published according to the customized configuration parameters may be performed through a preset configuration language, for example, configuring the application parameters and the environment parameters of the application to be published through YAML.
The cluster identifier identifying module 102 is configured to query a release version status of the application to be released, and identify a blue cluster identifier and a green cluster identifier of the application parameter.
It should be understood that the release version status refers to the release version operation condition involved in the alternation process of the old version and the new version, such as green upgrade, blue upgrade or blue rollback, etc. for the application to be released. Because the corresponding version is generated during the operation retest or the application uploading in the release process, the release version state of the application to be released needs to be queried to ensure the normal release of the application to be released, for example, when the blue version is in the blue upgrade state, it is indicated that the blue version cannot normally operate at this time, and other versions need to be replaced.
In the embodiment of the present invention, the blue cluster identifier refers to an identifier that uniquely identifies a cluster as a blue cluster, for example, a blue cluster ID, and is mainly used as a new version native code identifier; the green cluster identifier refers to an identifier that uniquely identifies a cluster as a green cluster, for example, a green cluster ID, and is mainly used as a native code identifier of an old version.
According to the embodiment of the invention, the consistency between the old version at the front end and the new version at the rear end can be realized by inquiring the release version state of the application to be released and identifying the blue cluster identifier and the green cluster identifier of the application parameter, so that the release effect of the subsequent application to be released is ensured.
As an embodiment of the present invention, the cluster identifier identifying module 102 queries the release version status of the application to be released by performing the following operations, including:
acquiring a release version number of the application to be released, and querying a release version corresponding to the release version number by using a preset query statement; and identifying the running condition of the release version, and determining the release version state of the application to be released according to the running condition.
The release version number refers to a version number corresponding to a different version, such as V1, V2, V3, and the like; the preset query statement may be Select from vision; the release version status refers to the running condition of the version, such as normal running, upgrading or rollback of the blue version.
Further, the identifying the blue cluster identifier and the green cluster identifier of the application parameter includes:
acquiring a preset white list user set, and judging whether a micro service cluster in the application parameters serves the white list user set; when a micro service cluster serves the white list user set, determining the micro service cluster as a blue cluster, and configuring a blue cluster identifier of the blue cluster; and when the micro service cluster is not served by the white list user set, determining the micro service cluster as a green cluster, and configuring a green cluster identifier of the green cluster.
The white list user set refers to a user set meeting a set condition, and may be set based on a scene, for example, a user set served by a blue cluster may be regarded as a white list user set or a user set for testing an operation condition of an application in an application upgrading process. The main role of the white list user set is to identify the micro-service cluster as a blue cluster or a green cluster.
The cluster identity recognition module 102 is further operable to:
after the blue cluster identifier and the green cluster identifier of the application parameter are identified, acquiring a locator of the application to be issued, and judging whether the locator is the blue cluster identifier or not; when the release request is the blue cluster identifier, obtaining a locator of the blue version; and when the issuing request is not the blue cluster identifier, obtaining the green version locator.
The locator of the application to be published may be a uniform resource locator of the application to be published, such as a URL of H5 to be published; because the front-end resources released by the application to be released and the back-end service are separately deployed, whether the release request of the application to be released is the blue cluster identifier or not is judged, and the consistency of the old and new versions of the front end and the back end can be ensured in the upgrading process of the application to be released.
It should be appreciated that the blue version locator may be the blue URL returned by H5, and the green version locator may be the green URL returned by H5.
The environment parameter determining module 103 is configured to receive a publishing request of the application to be published, and determine whether the environment parameter is a blue environment according to the publishing request.
In the embodiment of the present invention, the issue request refers to an issue instruction of an application to be issued, where the instruction is a request sent by a front end, for example, ajax, and is mainly used to implement mutual interaction between the front end and the back end of the application to be issued.
In the embodiment of the invention, the blue environment refers to a new version back-end code of an application to be released and an environment in which a blue micro service cluster operates. By judging whether the environment parameter is a blue environment or not, the application environments of the new version and the old version can be distinguished, so that the operation environments of the new version and the old version of the application to be released are isolated, and the normal operation of the subsequent application to be released is ensured.
As an embodiment of the present invention, the determining module 103 determines whether the environment parameter is a blue environment according to the issue request by performing the following operations, including:
acquiring the environment parameter tags according to the release request, and comparing the environment parameter tags with dictionary environment tags in a preset environment dictionary; when the environment parameter tag is consistent with a blue environment tag in the dictionary environment tags, determining whether the environment parameter is a blue environment; and when the environment parameter tag is not consistent with a blue environment tag in the dictionary environment tags, determining whether the environment parameter is a green environment.
The environmental parameter tag is an identifier assigned to an environmental parameter in a process of configuring the environmental parameter, and mainly functions to distinguish a Blue environment from a Green environment, for example, if the environmental parameter tag is Blue1 or Blue2, the environmental parameter is indicated as the Blue environment, and if the environmental parameter tag is Green1 or Green2, the environmental parameter is indicated as the Green environment, and the environmental parameter tag may be customized and limited by a user according to actual requirements, which is not limited herein.
In an embodiment of the present invention, the preset environment dictionary refers to a dictionary for storing environment parameters, and the environment dictionary may have a plurality of expression forms, for example, a data table form capable of being added, deleted, checked and modified.
The application issuing module 104 is configured to, when the environment parameter is a blue environment, send the application to be issued to the blue environment by using a preset flow control platform according to the blue cluster identifier and the release version state, and operate the application to be issued to obtain an issuing result of the application to be issued; and when the environmental parameter is not the blue environment, determining that the environmental parameter is the green environment, and sending the application to be issued to the green environment for operation by using a preset flow control platform according to the green cluster identifier and the issuing version to obtain an issuing result of the application to be issued.
In the embodiment of the invention, when the environment parameter is a blue environment, the application to be released is represented to run through the blue environment, and the release result of the application to be released is obtained by sending the application to be released to the blue environment to run by using a preset flow control platform according to the blue cluster identifier and the release version state, so that the blue version can be called the back-end code of the new version, the normal release of the application is further ensured, and the release effect of the application release is improved.
In the embodiment of the present invention, the preset flow control platform is used for controlling the use condition of a new version and an old version of an application to be published in the process of publishing front-end and back-end interactions, and mainly has the function of managing resource access permissions, for example, a new H5 code calls a new back-end code (i.e., runs in a blue environment), and an old H5 code calls an old back-end code (i.e., runs in a green environment).
As an embodiment of the present invention, the following operations are executed by the application publishing module 104 to send the application to be published to the blue environment for running by using a preset flow control platform according to the blue cluster identifier and the release version status, so as to obtain a publishing result of the application to be published, where the operations include:
acquiring the application attribute of the application to be issued, and generating an application instance of the application attribute; and acquiring a blue cluster corresponding to the blue cluster identifier, sending the application instance to the blue environment by using the flow control platform according to the release version state, and running the application instance in the blue environment by using the blue cluster to obtain a release result of the application to be released.
The application attribute refers to native code information of an application to be issued; the application instance may include an application name, an application parameter, a parameter placeholder, an attribute name, and the like, and is mainly used for facilitating searching for information in the application to be published.
In an embodiment of the present invention, when the release version status is that the blue version normally operates, the application instance may be operated by the blue cluster, so as to implement release of the new version of the application to be released.
The application publication module 104 is further operable to:
after the issuing result of the application to be issued is obtained, whether the issuing result is issued successfully is judged; when the release result is successfully released, obtaining release application; and when the release result is not successfully released, upgrading the application to be released until the application to be released normally runs to obtain the release application.
Whether the release result is successfully released or not can be released through a preset internal test user by using the application function, and if the application function can be normally used, the application function is released; if the application function is abnormal in the using process, the operation and maintenance personnel can upgrade the application to solve the abnormality and obtain the upgraded release application.
In the embodiment of the invention, when the environment parameter is not a blue environment, the application to be released is represented to run through a green environment, and the application to be released is sent to the green environment to run by using a preset flow control platform according to the green cluster identifier and the release version, so that the release result of the application to be released is obtained, the green version can be called the back-end code of the old version, the normal release of the application is further ensured, and the release effect of the application release is improved.
In the embodiment of the present invention, the method for sending the application to be published to the green environment for operation by using the preset flow control platform according to the green cluster identifier and the release version to obtain the release result of the application to be published is consistent with the method for sending the application to be published to the blue environment for operation by using the preset flow control platform according to the blue cluster identifier and the release version state in S4, and the method for obtaining the release result of the application to be published is not repeated here.
In the embodiment of the invention, the user-defined configuration can be realized by acquiring the application to be issued and configuring the application parameters and the environment parameters of the application to be issued, so that the parameter configuration efficiency is improved; secondly, inquiring the release version state of the application to be released, so that the consistency of the old version at the front end and the new version at the rear end can be kept, the release effect of the subsequent application to be released is ensured, whether the environmental parameter is a blue environment or not is judged according to the release request, the application environments of the new version and the old version can be distinguished, the operation environments of the new version and the old version of the application to be released are isolated, and the normal operation of the subsequent application to be released is ensured; and finally, sending the application to be released to the blue environment to run by using a preset flow control platform according to the blue cluster identifier and the release version state, and sending the application to be released to the green environment to run by using the preset flow control platform according to the green cluster identifier and the release version state to obtain the release result of the application to be released, so that the blue version can be called as the back-end code of the new version, the green version can be called as the back-end code of the old version, and the release effect of application release is improved. Therefore, the application publishing device provided by the embodiment of the invention can improve the publishing effect of the application publishing.
Fig. 5 is a schematic structural diagram of an electronic device implementing the application distribution method according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as an application distribution program, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of media, which includes flash memory, removable hard disk, multimedia card, card type memory (e.g., SD or DX memory, etc.), magnetic memory, local disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of application distribution programs, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., application publishing programs, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication bus 12 may be a PerIPheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
Fig. 5 shows only an electronic device with components, and those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation of the electronic device, and may include fewer or more components than shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Optionally, the communication interface 13 may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the communication interface 13 may further include a user interface, which may be a Display (Display), an input unit (such as a Keyboard (Keyboard)), and optionally, a standard wired interface, or a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The application publishing program stored in the memory 11 of the electronic device is a combination of a plurality of computer programs, which when executed in the processor 10, can implement:
acquiring an application to be issued, and configuring application parameters and environment parameters of the application to be issued;
inquiring the release version state of the application to be released, and identifying the blue cluster identifier and the green cluster identifier of the application parameter;
receiving a release request of the application to be released, and judging whether the environment parameter is a blue environment or not according to the release request;
when the environment parameter is a blue environment, sending the application to be issued to the blue environment for operation by using a preset flow control platform according to the blue cluster identifier and the release version state to obtain a release result of the application to be issued;
and when the environmental parameter is not the blue environment, determining that the environmental parameter is the green environment, and sending the application to be issued to the green environment for operation by using a preset flow control platform according to the green cluster identifier and the issuing version to obtain an issuing result of the application to be issued.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable medium. The computer readable medium may be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
acquiring an application to be released, and configuring application parameters and environment parameters of the application to be released;
inquiring the release version state of the application to be released, and identifying the blue cluster identifier and the green cluster identifier of the application parameter;
receiving a release request of the application to be released, and judging whether the environment parameter is a blue environment or not according to the release request;
when the environment parameter is a blue environment, sending the application to be issued to the blue environment for operation by using a preset flow control platform according to the blue cluster identifier and the release version state to obtain a release result of the application to be issued;
and when the environmental parameter is not the blue environment, determining that the environmental parameter is the green environment, and sending the application to be issued to the green environment for operation by using a preset flow control platform according to the green cluster identifier and the release version to obtain a release result of the application to be issued.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided by the present invention, it should be understood that the disclosed media, devices, apparatuses and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules 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 modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, functional modules in the embodiments of the present invention 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, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An application publishing method, the method comprising:
acquiring an application to be issued, and configuring application parameters and environment parameters of the application to be issued;
inquiring the release version state of the application to be released, and identifying the blue cluster identifier and the green cluster identifier of the application parameter;
receiving a release request of the application to be released, and judging whether the environment parameter is a blue environment or not according to the release request;
when the environment parameter is a blue environment, sending the application to be issued to the blue environment for operation by using a preset flow control platform according to the blue cluster identifier and the release version state to obtain a release result of the application to be issued;
and when the environmental parameter is not the blue environment, determining that the environmental parameter is the green environment, and sending the application to be issued to the green environment for operation by using a preset flow control platform according to the green cluster identifier and the issuing version to obtain an issuing result of the application to be issued.
2. The application publishing method according to claim 1, wherein the sending the application to be published to the blue environment for running by using a preset flow control platform according to the blue cluster identifier and the publishing version status to obtain a publishing result of the application to be published comprises:
acquiring the application attribute of the application to be issued, and generating an application instance of the application attribute;
and acquiring a blue cluster corresponding to the blue cluster identifier, sending the application instance to the blue environment by using the flow control platform according to the release version state, and running the application instance in the blue environment by using the blue cluster to obtain a release result of the application to be released.
3. The application publishing method according to claim 1, wherein as an embodiment of the present invention, the determining whether the environment parameter is a blue environment according to the publishing request includes:
acquiring the environment parameter tags according to the release request, and comparing the environment parameter tags with dictionary environment tags in a preset environment dictionary;
when the environment parameter tag is consistent with a blue environment tag in the dictionary environment tags, determining whether the environment parameter is a blue environment;
and when the environment parameter tag is not consistent with a blue environment tag in the dictionary environment tags, determining whether the environment parameter is a green environment.
4. The application publishing method of claim 1, wherein the identifying the blue cluster identifier and the green cluster identifier of the application parameter comprises:
acquiring a preset white list user set, and judging whether a micro service cluster in the application parameters serves the white list user set;
when a micro service cluster serves the white list user set, determining the micro service cluster as a blue cluster, and configuring a blue cluster identifier of the blue cluster;
and when the micro service cluster is not served by the white list user set, determining the micro service cluster as a green cluster, and configuring a green cluster identifier of the green cluster.
5. The application publishing method of claim 1, wherein the configuring the application parameters and environment parameters of the application to be published comprises:
acquiring a configuration object of the application to be issued, annotating the configuration object and acquiring a custom configuration parameter;
and configuring the application parameters and the environment parameters of the application to be released according to the user-defined configuration parameters.
6. The application publishing method of claim 1, wherein the querying the publishing version status of the application to be published comprises:
acquiring a release version number of the application to be released, and inquiring a release version corresponding to the release version number by using a preset inquiry statement;
and identifying the running condition of the release version, and determining the release version state of the application to be released according to the running condition.
7. The application publishing method of claim 1, wherein after identifying the blue cluster identity and the green cluster identity of the application parameter, the method further comprises:
acquiring a locator of the application to be issued, and judging whether the locator is a blue cluster identifier or not;
when the release request is the blue cluster identifier, obtaining a locator of the blue version;
and when the issuing request is not the blue cluster identifier, obtaining the green version locator.
8. An application publication apparatus, comprising:
the parameter configuration module is used for acquiring the application to be issued and configuring the application parameters and the environment parameters of the application to be issued;
the cluster identifier identification module is used for inquiring the release version state of the application to be released and identifying the blue cluster identifier and the green cluster identifier of the application parameter;
the environment parameter judgment module is used for receiving a release request of the application to be released and judging whether the environment parameter is a blue environment or not according to the release request;
the application issuing module is used for sending the application to be issued to the blue environment for operation by using a preset flow control platform according to the blue cluster identifier and the issuing version state when the environment parameter is the blue environment, so as to obtain an issuing result of the application to be issued; and when the environmental parameter is not the blue environment, determining that the environmental parameter is the green environment, and sending the application to be issued to the green environment for operation by using a preset flow control platform according to the green cluster identifier and the release version to obtain a release result of the application to be issued.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the application publishing method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the application distribution method according to any one of claims 1 to 7.
CN202210592955.5A 2022-05-27 2022-05-27 Application issuing method, device, equipment and storage medium Pending CN114911503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210592955.5A CN114911503A (en) 2022-05-27 2022-05-27 Application issuing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210592955.5A CN114911503A (en) 2022-05-27 2022-05-27 Application issuing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114911503A true CN114911503A (en) 2022-08-16

Family

ID=82769324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210592955.5A Pending CN114911503A (en) 2022-05-27 2022-05-27 Application issuing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114911503A (en)

Similar Documents

Publication Publication Date Title
CN112052242A (en) Data query method and device, electronic equipment and storage medium
CN111651471B (en) Target data query method and device, electronic equipment and storage medium
CN112948427B (en) Data query method, device, equipment and storage medium
CN111787171B (en) Automatic outbound method, device, electronic equipment and computer readable storage medium
CN114997706A (en) Workflow-based business processing method, device, equipment and storage medium
CN113741909B (en) Micro-service deployment method and device, electronic equipment and storage medium
CN111538573A (en) Asynchronous task processing method and device and computer readable storage medium
WO2022142035A1 (en) System language internationalization maintenance method, apparatus, and computer-readable storage medium
CN112256783A (en) Data export method and device, electronic equipment and storage medium
CN114491646A (en) Data desensitization method and device, electronic equipment and storage medium
CN112541688B (en) Service data verification method and device, electronic equipment and computer storage medium
CN114911503A (en) Application issuing method, device, equipment and storage medium
CN113254446B (en) Data fusion method, device, electronic equipment and medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN114896164A (en) Interface optimization method and device, electronic equipment and storage medium
CN114820132A (en) Order distribution method and device, electronic equipment and storage medium
CN114895942A (en) Application skin changing method, device, equipment and storage medium
CN114510400A (en) Task execution method and device, electronic equipment and storage medium
CN114691782A (en) Database table increment synchronization method and device and storage medium
CN113918305A (en) Node scheduling method and device, electronic equipment and readable storage medium
CN113434397A (en) Task system testing method and device, electronic equipment and storage medium
CN113419718A (en) Data transmission method, device, equipment and medium
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN113064797B (en) Front-end monitoring method and device, electronic equipment and storage medium
CN113434359B (en) Data traceability system construction method and device, electronic device and readable storage medium

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