CN111949311A - Gray scale publishing method and system - Google Patents

Gray scale publishing method and system Download PDF

Info

Publication number
CN111949311A
CN111949311A CN202010806579.6A CN202010806579A CN111949311A CN 111949311 A CN111949311 A CN 111949311A CN 202010806579 A CN202010806579 A CN 202010806579A CN 111949311 A CN111949311 A CN 111949311A
Authority
CN
China
Prior art keywords
gray scale
version
containers
gray
normal
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.)
Granted
Application number
CN202010806579.6A
Other languages
Chinese (zh)
Other versions
CN111949311B (en
Inventor
麦培元
莫奇军
郑文湛
陶锦然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010806579.6A priority Critical patent/CN111949311B/en
Publication of CN111949311A publication Critical patent/CN111949311A/en
Application granted granted Critical
Publication of CN111949311B publication Critical patent/CN111949311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention provides a gray scale release method and system, and belongs to the technical field of cloud computing. The gray scale release method comprises the following steps: acquiring version information according to the gray level production instruction and downloading a mirror image corresponding to the version number in the version information; the version information also comprises a gray scale corresponding to the version number and a plurality of modules; determining the number of gray containers and the number of normal containers of each module according to the gray scale proportion; newly adding a plurality of gray containers on a gray server according to the number of the gray containers, and deploying the mirror images in the gray containers; and adjusting the normal containers on the normal server according to the number of the normal containers. The invention can reduce code conflict, reduce the complexity of production links and production risks and improve the development efficiency.

Description

Gray scale publishing method and system
Technical Field
The invention relates to the technical field of cloud computing, in particular to a gray scale publishing method and system.
Background
With the development of the times, in order to quickly occupy the market traffic entrance and bring business trend, the time period from the establishment of a new business to the delivery of the new business is required to be shorter and shorter. Version flow rates become a standard of maturity for applications of great interest, and various DevOps (a combination of Development and Operations, which are a collective term for a group of processes, methods, and systems) systems have come into play.
The existing traditional plate-sending mode and method have many defects, such as various manual steps in production, low development efficiency and the like. In addition, code conflicts caused by the insertion of urgent projects and urgent versions in the commissioning process also increase the commissioning risk.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a gray level publishing method and system so as to reduce the complexity of a production link and the production risk and improve the development efficiency.
In order to achieve the above object, an embodiment of the present invention provides a gray scale publishing method, including:
acquiring version information according to the gray level production instruction and downloading a mirror image corresponding to the version number in the version information; the version information also comprises a gray scale corresponding to the version number and a plurality of modules;
determining the number of gray containers and the number of normal containers of each module according to the gray scale proportion;
newly adding a plurality of gray containers on a gray server according to the number of the gray containers, and deploying the mirror images in the gray containers;
and adjusting the normal containers on the normal server according to the number of the normal containers.
An embodiment of the present invention further provides a gray scale publishing system, including:
the image unit is used for acquiring version information according to the gray level production instruction and downloading an image corresponding to a version number in the version information; the version information also comprises a gray scale corresponding to the version number and a plurality of modules;
the container number unit is used for determining the gray level container number and the normal container number of each module according to the gray level proportion;
the gray scale container unit is used for newly adding a plurality of gray scale containers on the gray scale server according to the number of the gray scale containers and deploying the mirror images in the gray scale containers;
and the normal container unit is used for adjusting the normal containers on the normal server according to the number of the normal containers.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the gray scale publishing method when executing the computer program.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the gray scale publishing method.
The gray level issuing method and the system of the embodiment of the invention download the mirror image according to the gray level production instruction, then determine the number of gray level containers and the number of normal containers of each module according to the gray level proportion, finally add a plurality of gray level containers on the gray level server according to the number of the gray level containers and deploy the mirror image in the gray level containers, and adjust the normal containers on the normal server according to the number of the normal containers, thereby reducing code conflict, reducing the complexity of the production link and the production risk, and improving the development efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a flowchart of a gray scale distribution method in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a client interacting with a normal server in an embodiment of the invention;
FIG. 3 is a schematic diagram of a client interacting with a normal server and a grayscale server in an embodiment of the present invention;
fig. 4 is a schematic diagram of a gray scale distribution system in an embodiment of the present invention.
Fig. 5 is a block diagram showing the configuration of the gradation issuance system in the embodiment of the present invention;
fig. 6 is a block diagram showing the structure of a computer device in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In view of the problems of various production manual steps, low development efficiency, high production risk and the like existing in the conventional edition issuing mode and production, the embodiment of the invention provides a gray level issuing method to reduce code conflicts, reduce the complexity of production links and the production risk and improve the development efficiency. The present invention will be described in detail below with reference to the accompanying drawings.
The invention relates to a full-application version issuing, which is a practice of dealing with multi-version simultaneous development and supporting gray level production, and comprises a container virtual technology, a code library modularization management, gray level conversion and backspacing and other gray level management modes, and aims to reduce code conflict, reduce version complexity, improve version efficiency and reduce production risk. The method is only suitable for non-continuous stateless program modules, has certain limitation on the non-support of a database and other persistent layer servers, and can well support the frequent iteration requirement of a front-end interactive system and other programs which need multiple prototype iterations, thereby shortening the period from research and development to production of a project.
The plate sending mode is divided into full-quantity plate sending and incremental plate sending. The full version issuing refers to that all programs of the application are constructed in full quantity when the version is printed each time, and the whole application, the modules and the sub-modules are uniformly compiled and then issued after being released to production for production and application, and only the full installation coverage is needed in a deployment environment. The incremental version issuing refers to that each version making is carried out by taking the basic base line of the last delivery as comparison, and extracting the incremental or differential part to carry out the independent version issuing and putting into production. The premise of incremental version sending is that the environment for installing the version is consistent with the basic version of the version, but the traditional environment often generates inconsistency in the operation and maintenance process, and the version installation is also possibly inconsistent due to environmental problems. Because of the uncertainty of incremental version release, the application system may have accumulated errors but is not discovered, and the small problem accumulation generated by deploying the incremental version every time the application system is installed can generate a systematic problem.
Multi-version concurrency means that the same application or one delivery unit has different branches or modules under independent development. On the premise of high module cohesion and low coupling among modules, different modules do not have conflicting codes.
The gray release refers to a release mode that part of servers maintain an old version, and part of servers install a new version containing new changes, and particular users (namely users meeting certain strategies or conditions) are guided to the gray servers.
The code conflict refers to the problem that when a plurality of branches are changed when the same file or the same resource exists, the traditional model synchronizes codes generated by the next branch in different monthly versions of iterative development or version branches of repeated delivery of the same monthly version. General configuration management can address simple or one-way merges, but often requires human intervention if there are complex or multiple source scenarios.
The version complexity refers to the number of production versions, the types of the versions and the number of manual steps contained in one business function of production.
Each version production is a damage to production, and the production risk is a series of possible losses caused by version change, misoperation and the like in the production process.
Fig. 1 is a flowchart of a gray scale distribution method in an embodiment of the present invention. As shown in fig. 1, the gray scale distribution method includes:
s101: and acquiring the version information according to the gray level production instruction and downloading the mirror image corresponding to the version number in the version information.
The version information also comprises a gray scale corresponding to the version number and a plurality of modules.
TABLE 1
Figure BDA0002629346930000041
Figure BDA0002629346930000051
Table 1 is a version information table in the embodiment of the present invention. As shown in table 1, a version refers to a set of one or more images generated by compiling a source code of a sub-module each time, and is associated with each other through a unique version number, and version information of each version includes a version number, a basic version number, production time, a gray scale, an application, a module, a container number, a sub-module, and an image.
The version adopts the cloud idea of PaaS (Platform As A Service, which is a deployment repeat tool required by transferring underlying hardware, system software and basic tool software), and packs system tools and applications into a mirror image by using a mirror image container technology such As Docker to realize a mirror image, namely an environment; the application is made into a full-scale delivery, and the differences of development, test and production environments are concentrated to a plurality of environment parameters.
The production time refers to the time that the version is actually applied to the production server. And if the version reaches the delivery standard, the operation and maintenance personnel can carry out production when the production is implemented. Before executing S101, the commissioning deployment system of the present invention sends the actual commissioning time to the version information management system and records it in the database.
S101 specifically comprises the following steps: and obtaining version information with the current time consistent with the actual production time according to the gray scale production instruction, and downloading a mirror image corresponding to the version number in the version information.
The traditional code library is large in size, generally has an application level, respectively comprises codes of all modules, a source code is compiled into a target code by using a complex editing script, and then the target code is deployed into a traditional system environment in a manual mode or a script mode, wherein the process of the target code is more complex and unreliable than that of full-volume edition or container edition. The invention introduces modules and sub-modules, divides the application into finer granularity, establishes the code base according to the sub-modules, can reduce the conflict when the codes are merged, reduces the logic complexity of an application layer, provides the reliability of deployment and installation, and improves the code reuse rate.
In one embodiment, before performing S101, the method further includes:
1. and determining the sub-module corresponding to the modified code.
Before determining the sub-modules corresponding to the modified codes, a developer reads source codes from a code library to a development tool for development by using a development compiling system so as to develop and modify one or more sub-modules at the front end and the back end.
Wherein the module comprises a plurality of sub-modules. For a huge business system, different business functions can be divided into different applications. The invention is suitable for system use of multiple applications. A module refers to a set of different sub-functions under an application. According to the layered design of the application, for example, an application can be divided into a front-end module and a back-end module according to a front-end and back-end separation design. Each module is composed of submodules, and the atomic functions of the submodules are assembled into a service module to complete complex service functions.
In actual deployment, each module will deploy a container independently in one copy, and each container is composed of images of multiple sub-modules. If one module is high capacity due to performance requirements, multiple copies (containers) can be redundant. The versions of the same module in multiple copies are consistent.
The sub-modules perform an independent function, and are compiled in full quantity as the minimum particles of the application, so that a series of program combinations for assembling the modules can be multiplexed. Each submodule is designed according to the principle of high cohesion and low coupling.
2. Compiling the sub-modules by combining the platform technology of PaaS to obtain the mirror images corresponding to the sub-modules and setting the version numbers corresponding to the mirror images. And then selecting the production time and the basic version of the version, sending the version information of the compiled version, the application, the module, the sub-module and the mirror image to a version information management system through a development and compilation system, recording the version information of the compiled version, the application, the module, the sub-module and the mirror image into a database, and recording a mirror image entity into a mirror image library.
In the invention, one submodule is compiled once to generate a mirror image, and the mirror image is stored in a mirror image library and has a unique mirror image number. The mirror images inherit the characteristics of the container, support distributed multipoint deployment and support stateless design. In a production deployment, an image may be deployed in one or more containers, where the code and environment deployed on the containers are the same. By means of a mirror image full-volume publishing mode, version errors and omissions generated in the incremental publishing of the traditional file can be reduced.
Fig. 4 is a schematic diagram of a gray scale distribution system in an embodiment of the present invention. As shown in fig. 4, a developer needs to modify the code of "submodule 1 of front-end module a of application a", read (S26) the source code of the code library, obtain the source code (21) to the local environment, develop and compile (S22) to obtain the target code, and store (S27) the target code to the code library. The developer selects application A to make a version, reads (S28) the basic version number from the database through the version information management system, reads (S25) the basic version number from the version information management system as V1.1 through the development compiling system, and sets the version number as V1.2. The development compilation system finds that only "sub-module 1 of front-end module a of application a" has modified code, compiles and mirrors this sub-module, named number v1.1.fa102, and updates (S30) the mirror to the mirror library. The developer performs functional verification in the test environment for version V1.2. After the verification is passed, the developer decides to put into production on day U and sets the grayscale server ratio to 0.4. In consideration of the increase of subsequent services, the number of containers is changed to 15, the development and compilation system sends the information to the version information management system as version information to be updated (S36), and the version information management system sends the version information to the database to be stored (S29).
S102: and determining the number of gray containers and the number of normal containers of each module according to the gray scale proportion.
The gray scale refers to the scale number of the gray server which needs to be installed and started when the production version is recorded, and the decimal number is rounded upwards. If the number of containers of the module is 10 and the gray scale ratio is 0.4, 4 containers containing the current version are named as gray containers, and 6 containers containing the basic version are named as normal containers.
S103: and adding a plurality of gray containers on the gray server according to the number of the gray containers, and deploying the mirror images in the gray containers.
The gray server refers to a server set which is produced with a newer version when the gray scale proportion is not 0 after the gray scale version is produced. If the correction version is already put into production, all the servers are consistent versions at present, all the servers are normal servers, and no grayscale server exists.
S104: and adjusting the normal containers on the normal server according to the number of the normal containers.
The container number refers to the number of copy containers of each module of the version produced at this time. FIG. 2 is a schematic diagram of a client interacting with a normal server in an embodiment of the invention. Fig. 3 is a schematic diagram of a client interacting with a normal server and a grayscale server in an embodiment of the invention. As shown in fig. 3, the number of containers of the normal server is 12 before the gray scale production. As shown in fig. 4, after the grayscale projection, the number of containers of the normal server is 9, and the number of containers of the grayscale server is 6.
A normal server refers to a collection of servers where an application completes a whole set of transactions. During the greyscale test and during the transition there will be a different number of servers and a stable version will generally run. If the latest production version has a gray strategy, namely the gray scale of a certain module is not 0, the program version is an older program version on the current normal server. If the positive version has already been put into production, all current servers are consistent versions, all servers are normal servers, and the server cluster or the current server is represented as deploying the latest image.
The client accesses the system through the APP or the browser to request various resources and services of the system. As shown in fig. 2, a client can request access to different application modules through a specific URL, so as to obtain various resources and services. As shown in fig. 3, if the customer meets a certain gray scale admission condition, such as that the customer belongs to a certain area or the customer belongs to a certain white list, the flow is directed to the gray scale server (S45), otherwise, the flow is directed to the normal server (S42), so that the new service function is deployed on the gray scale server and only part of the customers can access the new service function. When a risk problem occurs in production, the problem influence range can be greatly controlled, and the transaction of most customers on a normal server is not influenced.
As shown in fig. 2 and 3, the customer access will access the application, module and container through a router (S41), where the front end and back end have different routers. The router A is responsible for judging the gray scale admission condition of the client, if the admission condition is met, the client is guided to the gray scale server (S45), otherwise, the client is guided to the normal server (S42). The router a judges that the user needs to request to sub-module 1 of the front-end module a according to the resource requested by the user (S42), and then returns the requested resource to the client.
The router B and the router C are routers at the back end, if the resource of the sub-module 3(S44) needs to be used in the sub-module 1 accessed by the client, the client needs to go through the router B to route the access (S43), and the router B forwards the access to the sub-module 3(S44) to obtain the resource, and the implementation of the router is consistent with the front-end routing mode. The flow guiding rules of the routers in the gray server and the normal server are consistent.
The execution subject of the gradation issuance method shown in fig. 1 is a gradation issuance system. As can be seen from the process shown in fig. 1, the gray scale issuing method according to the embodiment of the present invention first downloads the mirror image according to the gray scale production instruction, then determines the number of gray scale containers and the number of normal containers of each module according to the gray scale proportion, finally adds a plurality of gray scale containers on the gray scale server according to the number of gray scale containers and deploys the mirror image in the gray scale containers, and adjusts the normal containers on the normal server according to the number of normal containers, so that code conflicts can be reduced, the complexity of the production link and the production risk are reduced, and the development efficiency is improved.
In specific implementation, operation and maintenance personnel start a production instruction according to the production time and the production gray version (S23). The commissioning deployment system reads the version information from the version information management system and reads (S31) the mirrored entities from the mirror repository version by version. And the production deployment system reads that the gray scale ratio of V1.2 is 0.4, and calculates the container number of the gray server and the normal server according to the container number of each module. The number of containers for the grayscale server and the normal server as sub-module 1 of front-end module a is 6 and 9, respectively. The commissioning deployment system deploys (S32)6 grayscale containers on the grayscale server, applying the mirror image of V1.2 on the grayscale server. Meanwhile, because the normal containers need to be adjusted from 10 to 9, the line is inserted for 1 normal container which is running. The production is completed by this gray version, and the final effect is shown in fig. 3. The front-end module a of the grayscale server is version v1.1.fa102, while the front-end module a of the normal server is version v1.1.fa101, thereby implementing grayscale policy commissioning.
In one embodiment, the method further comprises: acquiring a basic version number corresponding to the version number according to the gray scale rollback instruction; downloading a basic mirror image corresponding to the basic version number; the base image is deployed in a grayscale container.
The basic version is the current version which is already operated during the current version production except the first version of the application. The version number of the current version is a base version (base version number) of the current version.
In specific implementation, when a problem is encountered in the grayscale test point process, the operation and maintenance personnel may initiate a grayscale rollback instruction to rollback the grayscale version in the production deployment system (S24), and stop the grayscale server that has been already produced and implemented. When operation and maintenance personnel initiate a gray scale rollback instruction, the commissioning deployment system reads (S34) that the version number of the current normal server is V1.2 from the version information management system, and at the moment, the version needs to be uniformly updated to the basic version V1.1. The commissioning deployment system reads (S31) the base image corresponding to the base version number from the image library, deploys (S32) the base image in a gray-scale container, and synchronizes (S35) the update information to the version information management system. The invention uses the rolling upgrade characteristic, does not stop updating and does not influence the normal operation of the server.
In one embodiment, the method further comprises: acquiring a version number according to a production turning instruction; downloading a mirror image corresponding to the version number; the mirror image is deployed in a normal container.
The correction version is a version that the gray scale version expands the range of the gray scale version to all servers after the gray scale flow is verified to be correct, namely all normal servers are synchronously upgraded to the gray scale server. As shown in fig. 3, the operation and maintenance staff initiates a commissioning reversal instruction at the commissioning deployment system to commission the revision (S33), and the commissioning deployment system reads (S34) the version number from the version information management system to obtain the normal containers of which the normal servers have 9 operational V1.1 versions, and the grayscale servers have 6 grayscale containers of which the V1.2 versions are operated. At the moment, the commissioning deployment system reads (S31) the image corresponding to the version number from the image library, deploys (S32) the image in normal containers (9 normal containers are updated to be V1.2 versions in a rolling manner), and updates (S35) the information to the version information management system, so that all clients can access the latest version and use the latest service function. The normal version is converted without stopping the machine for production, only a new version needs to be installed on the normal server, rolling upgrade is used, the new version is verified on the gray scale server, and the production risk is low.
The specific process of the embodiment of the invention is as follows:
1. and determining the sub-module corresponding to the modified code.
2. Compiling the sub-modules by combining the platform technology of PaaS to obtain the mirror images corresponding to the sub-modules and setting the version numbers corresponding to the mirror images.
3. And obtaining version information with the current time consistent with the actual production time according to the gray scale production instruction, and downloading a mirror image corresponding to the version number in the version information.
4. And determining the number of gray containers and the number of normal containers of each module according to the gray scale proportion.
5. And newly adding a plurality of gray containers on the gray server according to the number of the gray containers, deploying the mirror images in the gray containers, and adjusting the normal containers on the normal server according to the number of the normal containers.
6. And when the gray scale version is backed, acquiring a basic version number corresponding to the version number according to the gray scale back instruction, downloading a basic mirror image corresponding to the basic version number, and deploying the basic mirror image in the gray scale container.
7. And when the production is changed to the positive version, acquiring the version number according to the production change instruction, downloading the mirror image corresponding to the version number, and deploying the mirror image in a normal container.
In summary, the gray level publishing method provided by the embodiment of the invention has the following beneficial effects:
1. the invention uses the industry boundary to design the system layer by layer model, the setting of the sub-module enables the code to have high cohesion and low coupling, and the large-scale application system is decoupled, thereby greatly improving the code reuse rate, leading developers to be capable of concentrating on the research and development of one service in one time, improving the development efficiency and reducing the code complexity.
2. The gray scale production technology of the invention uses the virtual machine and the full version-sending characteristic, so that the problems of file loss, unequal bottom versions of files and different version media in different environments which may occur in production can be avoided, and the complexity of the production link is reduced. Meanwhile, the full-volume mirror image is put into production to facilitate elastic expansion and contraction, and the version is pushed forward or retreated.
3. The invention adopts a gray level release mode, can control the production risk by combining with a specific gray level strategy, enables technical personnel to largely try new technology and new business in production, and increases the business research and development capability and the rapid delivery capability.
4. The invention uses the independent code base of the sub-module, and only one version base is arranged in one sub-module, thereby reducing the repeated construction of the development and compilation environment, having no code synchronization, reducing the code conflict brought by the synchronization, improving the concentration degree of the developer on the current service of the current module, and improving the reuse of the personnel of the project group.
5. The present invention uses automated tools to reduce repetitive labor and release productivity.
Based on the same inventive concept, the embodiment of the invention also provides a gray scale publishing system, and as the principle of the device for solving the problem is similar to the gray scale publishing method, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
Fig. 5 is a block diagram of the structure of the gradation issuance system in the embodiment of the present invention. As shown in fig. 4 to 5, the gradation issuance system includes:
the image unit is used for acquiring version information according to the gray level production instruction and downloading an image corresponding to a version number in the version information; the version information also comprises a gray scale corresponding to the version number and a plurality of modules;
the container number unit is used for determining the gray level container number and the normal container number of each module according to the gray level proportion;
the gray scale container unit is used for newly adding a plurality of gray scale containers on the gray scale server according to the number of the gray scale containers and deploying the mirror images in the gray scale containers;
and the normal container unit is used for adjusting the normal containers on the normal server according to the number of the normal containers.
In one embodiment, the method further comprises the following steps:
a submodule determining unit, configured to determine a submodule corresponding to the modified code; wherein the module comprises a plurality of sub-modules;
and the compiling unit is used for compiling the sub-modules to obtain the mirror images corresponding to the sub-modules and setting the version numbers corresponding to the mirror images.
In one embodiment, the method further comprises the following steps:
the basic version number unit is used for acquiring a basic version number corresponding to the version number according to the gray scale rollback instruction;
the first mirror image downloading unit is used for downloading a basic mirror image corresponding to the basic version number;
the first deployment unit is used for deploying the basic mirror image in the gray scale container.
In one embodiment, the method further comprises the following steps:
the version number unit is used for acquiring a version number according to the production turning instruction;
the second mirror image downloading unit is used for downloading a mirror image corresponding to the version number;
and the second deployment unit is used for deploying the mirror image in the normal container.
As shown in fig. 4, in practical applications, the grayscale release system includes a database, a version information management system, a development and compilation system, a code library, a mirror library, and a production deployment system.
The version information management system mainly provides database storage (S29) and reading (S28) functions, reading (S25) and updating (S36) functions for developing a compiling system, and reading (S34) and updating (S35) functions for a commissioning deployment system.
The development compiling system comprises a submodule determining unit and a compiling unit, reads source codes (S26) and stores object codes (S27) by interfacing the code library, provides development compiling functions (S22) for developers, updates version information (S36) to the version information management system, and updates images (S30) to the image library.
The production deployment system comprises a mirror image unit, a container number unit, a gray scale container unit, a normal container unit, a basic version number unit, a first mirror image downloading unit, a first deployment unit, a version number unit, a second mirror image downloading unit and a second deployment unit, and is used for providing a production gray scale version (S23) function, a rollback gray scale version (S24) function and a production conversion version (S33) function for operation and maintenance personnel, reading version information (S34) from the version information management system, providing a deployment (S32) function for a normal server and a gray scale server of a production environment, and updating a deployment result (S35) to the version information management system.
The database mainly stores the relationship between versions, applications, modules, sub-modules and mirror images. As table 1 shows the relationship between two versions, one version of an application includes a plurality of modules, one module includes a plurality of sub-modules, and one sub-module corresponds to a plurality of mirror versions.
The code base is divided into sub-module bases, and the source code and the operation history of each sub-module are recorded in each independent code base. Because of the hierarchical design, each sub-module refers to program code that performs an independent function. Under the traditional situation, a code library is used for placing a plurality of service function codes of a plurality of modules in an application, the coupling degree is high, the source codes are converted into the target codes through a complex compiling script during compiling, and the compiling often has the inexplicable problem. The invention subdivides the application into modules and sub-modules, and decouples from compiling by using the module, the container, the contrast relation between the sub-modules and the mirror images and the virtualization technology, thereby realizing the decoupling of the code base. In the invention, the sub-modules are independent libraries on the version library, a scene of multi-branch and multi-version with a traditional waterfall model is not required, developers can develop serially on one version forever, and the operations of synchronization and combination are not required, thereby reducing the conflict of code synchronization.
The mirror image library records mirror image entities generated during each compiling, each mirror image corresponds to a unique number, and the mirror image library records the contrast relation between each mirror image number and the mirror image entities.
To sum up, the gray scale issuing system of the embodiment of the invention downloads the mirror image according to the gray scale production instruction, then determines the number of gray scale containers and the number of normal containers of each module according to the gray scale proportion, finally adds a plurality of gray scale containers on the gray scale server according to the number of the gray scale containers and deploys the mirror image in the gray scale containers, and adjusts the normal containers on the normal server according to the number of the normal containers, so that code conflict can be reduced, the complexity of a production link and the production risk can be reduced, and the development efficiency can be improved.
The embodiment of the present invention further provides a specific implementation manner of a computer device, which can implement all the steps in the gray scale publishing method in the foregoing embodiment. Fig. 6 is a block diagram of a computer device in an embodiment of the present invention, and referring to fig. 6, the computer device specifically includes the following:
a processor (processor)601 and a memory (memory) 602.
The processor 601 is configured to call a computer program in the memory 602, and the processor implements all the steps in the gray scale distribution method in the above embodiments when executing the computer program, for example, the processor implements the following steps when executing the computer program:
acquiring version information according to the gray level production instruction and downloading a mirror image corresponding to the version number in the version information; the version information also comprises a gray scale corresponding to the version number and a plurality of modules;
determining the number of gray containers and the number of normal containers of each module according to the gray scale proportion;
newly adding a plurality of gray containers on a gray server according to the number of the gray containers, and deploying the mirror images in the gray containers;
and adjusting the normal containers on the normal server according to the number of the normal containers.
To sum up, the computer device of the embodiment of the present invention downloads the mirror image according to the gray scale production instruction, then determines the number of gray scale containers and the number of normal containers of each module according to the gray scale proportion, finally adds a plurality of gray scale containers on the gray scale server according to the number of gray scale containers and deploys the mirror image in the gray scale containers, and adjusts the normal containers on the normal server according to the number of normal containers, so that code conflicts can be reduced, the complexity of the production link and the production risk can be reduced, and the development efficiency can be improved.
An embodiment of the present invention further provides a computer-readable storage medium capable of implementing all the steps in the gray scale distribution method in the foregoing embodiments, where the computer-readable storage medium stores a computer program, and the computer program implements all the steps of the gray scale distribution method in the foregoing embodiments when executed by a processor, for example, the processor implements the following steps when executing the computer program:
acquiring version information according to the gray level production instruction and downloading a mirror image corresponding to the version number in the version information; the version information also comprises a gray scale corresponding to the version number and a plurality of modules;
determining the number of gray containers and the number of normal containers of each module according to the gray scale proportion;
newly adding a plurality of gray containers on a gray server according to the number of the gray containers, and deploying the mirror images in the gray containers;
and adjusting the normal containers on the normal server according to the number of the normal containers.
To sum up, the computer-readable storage medium of the embodiment of the present invention downloads the mirror image according to the grayscale production instruction, then determines the number of grayscale containers and the number of normal containers of each module according to the grayscale proportion, and finally adds a plurality of grayscale containers on the grayscale server according to the number of the grayscale containers and deploys the mirror image in the grayscale containers, and adjusts the normal containers on the normal server according to the number of the normal containers, so that code conflicts can be reduced, the complexity of the production link and the production risk can be reduced, and the development efficiency can be improved.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, or devices described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.

Claims (10)

1. A gray scale issuing method characterized by comprising:
acquiring version information according to a gray level production instruction and downloading a mirror image corresponding to a version number in the version information; the version information also comprises a gray scale corresponding to the version number and a plurality of modules;
determining the number of gray containers and the number of normal containers of each module according to the gray scale proportion;
newly adding a plurality of gray containers on a gray server according to the number of the gray containers, and deploying the mirror image in the gray containers;
and adjusting the normal containers on the normal server according to the number of the normal containers.
2. The gray scale issuing method according to claim 1, further comprising:
determining a sub-module corresponding to the modified code; wherein the module comprises a plurality of sub-modules;
and compiling the sub-modules to obtain mirror images corresponding to the sub-modules and setting the version numbers corresponding to the mirror images.
3. The gray scale issuing method according to claim 1, further comprising:
acquiring a basic version number corresponding to the version number according to a gray scale rollback instruction;
downloading a basic mirror image corresponding to the basic version number;
deploying the base mirror in the grayscale container.
4. The gray scale issuing method according to claim 1, further comprising:
acquiring the version number according to a production turning instruction;
downloading the mirror image corresponding to the version number;
deploying the mirror image in the normal container.
5. A gradation issuance system, comprising:
the image unit is used for acquiring version information according to the gray level production instruction and downloading an image corresponding to a version number in the version information; the version information also comprises a gray scale corresponding to the version number and a plurality of modules;
the container number unit is used for determining the gray level container number and the normal container number of each module according to the gray level proportion;
the gray scale container unit is used for newly adding a plurality of gray scale containers on a gray scale server according to the number of the gray scale containers and deploying the mirror image in the gray scale containers;
and the normal container unit is used for adjusting the normal containers on the normal server according to the number of the normal containers.
6. A gray scale distribution system as set forth in claim 5, further comprising:
a submodule determining unit, configured to determine a submodule corresponding to the modified code; wherein the module comprises a plurality of sub-modules;
and the compiling unit is used for compiling the sub-modules to obtain the mirror images corresponding to the sub-modules and setting the version numbers corresponding to the mirror images.
7. A gray scale distribution system as set forth in claim 5, further comprising:
a basic version number unit, configured to obtain a basic version number corresponding to the version number according to the grayscale rollback instruction;
the first mirror image downloading unit is used for downloading the basic mirror image corresponding to the basic version number;
a first deployment unit to deploy the base image in the grayscale container.
8. A gray scale distribution system as set forth in claim 5, further comprising:
the version number unit is used for acquiring the version number according to the production turning instruction;
the second mirror image downloading unit is used for downloading the mirror image corresponding to the version number;
a second deployment unit for deploying the mirror image in the normal container.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the steps of the gray scale publishing method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the gray scale distribution method according to any one of claims 1 to 4.
CN202010806579.6A 2020-08-12 2020-08-12 Gray level release method and system Active CN111949311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010806579.6A CN111949311B (en) 2020-08-12 2020-08-12 Gray level release method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010806579.6A CN111949311B (en) 2020-08-12 2020-08-12 Gray level release method and system

Publications (2)

Publication Number Publication Date
CN111949311A true CN111949311A (en) 2020-11-17
CN111949311B CN111949311B (en) 2023-08-25

Family

ID=73332399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010806579.6A Active CN111949311B (en) 2020-08-12 2020-08-12 Gray level release method and system

Country Status (1)

Country Link
CN (1) CN111949311B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452776A (en) * 2021-06-25 2021-09-28 中国工商银行股份有限公司 PaaS platform service scheduling method and device and PaaS platform
CN114968274A (en) * 2022-07-29 2022-08-30 之江实验室 Method and system for automatically and rapidly deploying front-end processor based on gray release

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107656748A (en) * 2017-09-08 2018-02-02 北京京东尚科信息技术有限公司 Using the method and apparatus of issue
CN108279921A (en) * 2018-01-22 2018-07-13 广州欧赛斯信息科技有限公司 A kind of automatic gray scale dissemination method, system and device based on container platform
CN109857428A (en) * 2018-12-29 2019-06-07 大唐软件技术股份有限公司 Gray scale dissemination method for IOM system
CN110162382A (en) * 2019-04-09 2019-08-23 平安科技(深圳)有限公司 Gray scale dissemination method, device, computer equipment and storage medium based on container
CN110427204A (en) * 2019-08-08 2019-11-08 浪潮云信息技术有限公司 A kind of automation gray scale dissemination method based on container and service grid
CN110888666A (en) * 2019-12-12 2020-03-17 北京中电普华信息技术有限公司 Application of gray scale release method based on application load balancing in cloud service system
CN111324377A (en) * 2020-03-11 2020-06-23 上海东普信息科技有限公司 Application gray level release method, system, device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107656748A (en) * 2017-09-08 2018-02-02 北京京东尚科信息技术有限公司 Using the method and apparatus of issue
CN108279921A (en) * 2018-01-22 2018-07-13 广州欧赛斯信息科技有限公司 A kind of automatic gray scale dissemination method, system and device based on container platform
CN109857428A (en) * 2018-12-29 2019-06-07 大唐软件技术股份有限公司 Gray scale dissemination method for IOM system
CN110162382A (en) * 2019-04-09 2019-08-23 平安科技(深圳)有限公司 Gray scale dissemination method, device, computer equipment and storage medium based on container
CN110427204A (en) * 2019-08-08 2019-11-08 浪潮云信息技术有限公司 A kind of automation gray scale dissemination method based on container and service grid
CN110888666A (en) * 2019-12-12 2020-03-17 北京中电普华信息技术有限公司 Application of gray scale release method based on application load balancing in cloud service system
CN111324377A (en) * 2020-03-11 2020-06-23 上海东普信息科技有限公司 Application gray level release method, system, device and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452776A (en) * 2021-06-25 2021-09-28 中国工商银行股份有限公司 PaaS platform service scheduling method and device and PaaS platform
CN113452776B (en) * 2021-06-25 2022-12-09 中国工商银行股份有限公司 PaaS platform service scheduling method and device and PaaS platform
CN114968274A (en) * 2022-07-29 2022-08-30 之江实验室 Method and system for automatically and rapidly deploying front-end processor based on gray release

Also Published As

Publication number Publication date
CN111949311B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
US11561956B2 (en) Key pattern management in multi-tenancy database systems
EP3477488A1 (en) Deploying changes to key patterns in multi-tenancy database systems
US7310801B2 (en) Servicing a component-based software product throughout the software product lifecycle
EP3477499A1 (en) Exchanging shared containers and adapting tenants in multi-tenancy database systems
US7711693B2 (en) Deployment of life-cycle model for LDAP applications
EP3477501A1 (en) System sharing types in multi-tenancy database systems
EP3477498A1 (en) Transitioning between system sharing types in multi-tenancy database systems
US8566819B2 (en) Apparatus and method for providing software configurations on a plurality of platforms
CN102147747B (en) The system and method for the upgrading path strengthened
US20050102665A1 (en) Automatic parallel non-dependent component deployment
CN105359147A (en) Online database migration
JPH076026A (en) Method for guarantee of interchangeablity of configuration management and component and method for exclusion of non- interchangeability of resident software and migration software
CN111949311A (en) Gray scale publishing method and system
CN111414169A (en) BMC (baseboard management controller) image upgrading method and related components
US9454361B2 (en) System and method of merging of objects from different replicas
CN111723138B (en) System and method for automatically acquiring data in artificial simulation mode
CN110688140B (en) Code management method and terminal
CN109271199A (en) A kind of method and system for database continuous integrating and script file management
US11593098B2 (en) Synchronization of source code under development in multiple concurrent instances of an integrated development environment
CN113220451A (en) Method, system, device and storage medium for deploying distributed cluster system
CN112328295A (en) Software updating method and device
CN115756554B (en) Version upgrading method and device
US11176024B1 (en) Software patch application and testing optimization
Legrand et al. [Re] Velho and Legrand (2009)-Accuracy Study and Improvement of Network Simulation in the SimGrid Framework
Joubert et al. Porting Control System Software From Python 2 to 3-Challenges and Lessons

Legal Events

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