CN111949311B - Gray level release method and system - Google Patents

Gray level release method and system Download PDF

Info

Publication number
CN111949311B
CN111949311B CN202010806579.6A CN202010806579A CN111949311B CN 111949311 B CN111949311 B CN 111949311B CN 202010806579 A CN202010806579 A CN 202010806579A CN 111949311 B CN111949311 B CN 111949311B
Authority
CN
China
Prior art keywords
gray scale
version
containers
normal
gray
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010806579.6A
Other languages
Chinese (zh)
Other versions
CN111949311A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a gray level publishing method and a gray level publishing system, and belongs to the technical field of cloud computing. The gray level distribution method comprises the following steps: acquiring version information according to the gray scale 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; adding a plurality of gray scale containers on a gray scale server according to the number of the gray scale containers, and disposing mirror images in the gray scale 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 the production link and the production risk, and improve the development efficiency.

Description

Gray level release method and system
Technical Field
The invention relates to the technical field of cloud computing, in particular to a gray level publishing method and a gray level publishing system.
Background
With the development of the times, in order to quickly occupy the market flow entry and bring the business trend, the time period from the stand of new business to the delivery and production is required to be shorter and shorter. Version flow rates are a well-established application maturity standard, and various DevOps (combination of Development and Operations, a collective term for a set of processes, methods and systems) systems have developed.
The traditional plate-making mode and the traditional plate-making method have a plurality of defects, such as a plurality of manual steps of production, low development efficiency and the like. In addition, code conflicts caused by emergency project insertion and emergency versions during production increase production risk.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a gray level publishing method and a gray level publishing system, so that the complexity of a production link and the production risk are reduced, and the development efficiency is improved.
In order to achieve the above object, an embodiment of the present invention provides a gray scale distribution method, including:
acquiring version information according to the gray scale 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;
adding a plurality of gray scale containers on a gray scale server according to the number of the gray scale containers, and disposing mirror images in the gray scale containers;
and adjusting the normal containers on the normal server according to the number of the normal containers.
The embodiment of the invention also provides a gray level publishing system, which comprises:
the mirror image unit is used for acquiring version information according to the gray scale 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;
the container number unit is used for determining the gray container number and the normal container number of each module according to the gray scale;
the gray scale container unit is used for adding a plurality of gray scale containers on the gray scale server according to the number of the gray scale containers and disposing 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 invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor realizes the steps of the gray distribution method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the gray scale distribution method.
According to the gray level publishing method and system, the mirror image is downloaded according to the gray level production instruction, the gray level container number and the normal container number of each module are determined according to the gray level proportion, a plurality of gray level containers are newly added on the gray level server according to the gray level container number, the mirror image is deployed in the gray level container, and the normal containers on the normal server are adjusted according to the normal container number, so that code conflict can be reduced, production link complexity and production risk can be reduced, and development efficiency can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart 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 gray server in an embodiment of the present invention;
fig. 4 is a schematic diagram of a gray scale distribution system according to an embodiment of the present invention.
FIG. 5 is a block diagram of a gray scale distribution system according to an embodiment of the present invention;
fig. 6 is a block diagram of a computer device in an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Those skilled in the art will appreciate that embodiments of the invention may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In view of the problems of the existing traditional plate-making mode and the existing problems of multiple manual steps, low development efficiency, high production risk and the like, the embodiment of the invention provides a gray level publishing method for reducing code conflict, reducing production link complexity and production risk and improving development efficiency. The present invention will be described in detail with reference to the accompanying drawings.
The invention is based on the application of full-volume edition, is a practice of edition issuing flow and architecture for coping with multi-edition simultaneous development and supporting gray scale production, and comprises a container virtual technology, a code base modularization management mode, gray scale forward and backward and other gray scale management modes, and aims to reduce code conflict, reduce edition complexity, improve edition efficiency and reduce production risk. The method is only suitable for non-persistent stateless program modules, has certain limitation on the fact that a database and other persistent layer servers are not supported, but can well support the frequent iteration requirement of a front-end interactive system and other programs requiring multiple prototype iterations, thereby shortening the period from research and development to production of projects.
The plate-making mode is divided into full-volume plate making and increment plate making. The full-volume publishing refers to the process of constructing all programs of the application in full volume every time when the publishing is performed, and the process of publishing the programs to production and producing the applications is equivalent to the process of uniformly compiling the whole application, the module and the sub-module and then publishing the versions, and only full-volume installation coverage is needed in a deployment environment. The incremental plate making refers to that each plate making is performed by taking the base baseline delivered last time as a comparison, and extracting the incremental or differential part to independently make the plate and put into production. The premise of incremental version sending is that the environment of the installed 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 inconsistency can be caused by environmental problems. Because of the uncertainty of incremental versioning, there may be cases where the application system is not found but is in error, and the small problem accumulation generated by deploying incremental versions each time is installed can create systematic problems.
Multi-version concurrency refers to the same application or a delivery unit having different branches or modules being developed independently. On the premise of high cohesion of modules and low coupling between modules, different modules have no conflicting codes.
Gray level publishing refers to a publishing mode in which a part of servers maintain old versions, and part of servers install new versions containing new changes and stream specific users (i.e., users meeting certain policies or conditions) to gray level servers.
Code conflict refers to the problem of code merging generated by synchronizing a traditional model to the next branch in different month versions of iterative development or multiple-delivery version branches of the same month version when multiple branches have changes when the same file or the same resource exists. General configuration management can address simple or unidirectional merging, but often requires human intervention if complex or multiple sources exist.
Version complexity refers to the number of versions made, the type of version, and how many manual steps are included in one business function that is put into production.
Each version production is a damage to production, and the production risk is a series of possibility of loss 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 version information according to the gray scale production instruction and downloading the mirror image corresponding to the version number in the version information.
The version information further comprises a gray scale corresponding to the version number and a plurality of modules.
TABLE 1
Table 1 is a version information table in an embodiment of the present invention. As shown in table 1, the version refers to a set of one or more images generated by compiling the source code of the sub-module each time, and the version information of each version includes a version number, a base version number, a production time, a gray scale, an application, a module, a container number, the sub-module, and the images are decorrelated by unique version numbers.
The version adopts the cloud idea of PaaS (Platform As A Service, platform is service, is a deployment repetition tool for transferring the bottom hardware, system software and basic tool software, and the system tool and the application are packaged into a mirror image by using a mirror image container technology such as a Docker, so that the mirror image is an environment; the application is made into full version delivery, concentrating the differences in development, testing and production environments to several environmental parameters.
The production time refers to the time when the version is actually applied to the production server. If the version meets the delivery standard, the operation and maintenance personnel can conduct the operation when the operation can be 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 into the database.
S101 specifically includes: and acquiring 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 and bulky, is generally at an application level, contains codes of all modules respectively, often uses a complex editing script to compile source codes into target codes, and is deployed into a traditional system environment in a manual mode or a script mode, and the process is more complex and unreliable compared with full-scale or container publishing. The invention introduces the module and the sub-module, divides the application into finer granularity, establishes the code base according to the sub-module, can reduce conflict when the codes are combined, reduces the logic complexity of the application layer, provides the reliability of deployment and installation, and improves the code multiplexing rate.
In one embodiment, before executing S101, the method further includes:
1. and determining a sub-module corresponding to the modified code.
Before determining the sub-modules corresponding to the modified code, a developer uses a development compiling system to read source code from a code library to a development tool for development to develop and reform one or more sub-modules at the front end and the back end.
Wherein the module comprises a plurality of sub-modules. For a large business system, different business functions may be divided into different applications. The invention is suitable for the system of a plurality of applications. A module refers to a collection of different sub-functional programs under an application. According to the layered design of the application, for example, an application can be separated into a front-end module and a back-end module according to the front-end and back-end separation design. Each module is composed of sub-modules, and the atomic functions of the sub-modules are assembled into a service module to complete complex service functions.
In actual deployment, each module will independently deploy one container in one copy, each container being made up of mirror images of multiple sub-modules. Multiple copies (containers) may be redundant if one module is high due to performance capacity requirements. Versions of the same module in multiple copies are consistent.
The sub-modules perform an independent function and are compiled in full as minimal particles of the application, enabling a series of program combinations of the assembled modules to be multiplexed. Each sub-module is designed in accordance with the principle of high cohesion and low coupling.
2. Compiling the sub-modules by combining the platform technology of PaaS to obtain images corresponding to the sub-modules and setting version numbers corresponding to the images. And then selecting the production time and the basic version of the version, sending the compiled version, application, module, sub-module and version information of the mirror image to a version information management system through a development compiling system, recording the version information into a database, and recording the mirror image entity into a mirror image library.
In the invention, a sub-module is compiled at a time 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 image inherits the characteristics of the container, supports distributed multipoint deployment, and supports stateless design. In a production deployment, one image will be deployed in one or more containers, with the code and environment deployed on the containers being the same. Version misplacement generated during the traditional file version of the incremental version can be reduced by the way of full-quantity version of the mirror image.
Fig. 4 is a schematic diagram of a gray scale distribution system according to an embodiment of the present invention. As shown in fig. 4, a developer needs to modify the code of the sub-module 1 of the front end module a of the application a, read (S26) the source code of the code library, acquire 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 the application A to produce a version, reads (S28) a basic version number from a database through a version information management system, reads (S25) the basic version number from the version information management system through a development compiling system to be V1.1, and determines the version number to be V1.2. The development and compiling system finds that only the sub-module 1 of the front-end module A of the application A has modified codes, compiles the sub-module and makes an image, the number is named as V1.1.FA102, and updates (S30) the image to the image library. The developer performs functional verification on version V1.2 in the test environment. After the verification is passed, the developer decides to put into production on the U day, and sets the gray server ratio to be 0.4. In consideration of the increase of the subsequent business, the number of containers is changed to 15, and the development compiling system sends the information as version information to the version information management system for updating (S36), and the version information management system sends the version information to the database for storage (S29).
S102: and determining the number of gray containers and the number of normal containers of each module according to the gray scale ratio.
The gray scale is to record the current production version, the gray server is required to be installed and started, and the decimal fraction is rounded up. If the number of containers in the module is 10 and the gray scale ratio is 0.4, then 4 containers containing the current version are named gray scale containers and 6 containers containing the base version are named normal containers.
S103: and adding a plurality of gray scale containers on the gray scale server according to the number of the gray scale containers, and disposing the mirror image in the gray scale containers.
The gray server refers to a server set of which the gray scale ratio is not 0 and which is used for producing a newer version after producing the gray scale version. If the transfer version is already put into production, all servers are consistent versions, all servers are normal servers, and no gray server exists.
S104: and adjusting the normal containers on the normal server according to the number of the normal containers.
The number of containers refers to the number of duplicate containers of each module of the version of the current production. 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 gray server in an embodiment of the present invention. As shown in fig. 3, the number of containers for a normal server is 12 before greyscale delivery. As shown in fig. 4, after the gradation switching, the number of containers of the normal server is 9, and the number of containers of the gradation server is 6.
A normal server refers to a collection of servers that an application completes a complete set of transactions. During gray scale testing and during the transition, there will be a different number of servers, typically running a stable version. If the latest put-to-product version has a gray scale strategy, namely the gray scale proportion of a certain module is not 0, the current normal server is the older program version. If the transfer-up version has been put into production, then all servers are currently consistent versions, all servers are normal servers, and indicate that the current server or cluster of servers has deployed the latest image.
Clients access the system through the APP or browser, requesting various resources and services of the system. As shown in FIG. 2, the client can access different application modules through specific URL requests, so as to achieve the purpose of acquiring various resources and services. As shown in fig. 3, if the client meets a certain gray level admission condition, if the client belongs to a specific area or the client belongs to a white list, the client is guided to a gray level server (S45), otherwise, the client is guided to a normal server (S42), so that new service functions can be deployed on the gray level server, and only part of the clients can access the service functions. When the risk problem occurs in the production, the problem influence range can be greatly controlled, and the transaction of most clients on a normal server is not influenced.
As shown in fig. 2 and 3, client access will be to applications, modules and containers through routers (S41), where the front end and the back end have different routers. The router A is responsible for judging the gray level admission condition of the client, if the admission condition is met, the client is guided to the gray level server (S45), otherwise, the client is guided to the normal server (S42). The router a determines that the user needs to request to the 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.
Router B and router C are back-end routers, and if the resources of sub-module 3 need to be used in sub-module 1 accessed by the client (S44), the route access needs to be sent to the sub-module 3 through router B (S43), and the router B forwards the resource to sub-module 3 (S44) to obtain the resources, so that the implementation of the resource is consistent with the front-end routing mode. The flow guiding rule of the router in the gray server is consistent with that of the router in the normal server.
The gray scale distribution method shown in fig. 1 is mainly executed as a gray scale distribution system. As can be seen from the flow shown in fig. 1, the gray level publishing method in the embodiment of the invention downloads the mirror image according to the gray level commissioning instruction, then determines the gray level container number and the normal container number of each module according to the gray level proportion, finally adds a plurality of gray level containers on the gray level server according to the gray level container number and deploys the mirror image in the gray level container, adjusts the normal containers on the normal server according to the normal container number, thereby reducing code conflict, reducing the commissioning link complexity and the commissioning risk, and improving the development efficiency.
In specific implementation, operation and maintenance personnel initiate a production instruction according to the production time production gray level version (S23). The commissioning deployment system reads version information from the version information management system and reads (S31) the image entities from the image library version by version. The gray scale ratio of V1.2 read by the production deployment system is 0.4, and the container numbers of the gray scale server and the normal server are calculated according to the container number of each module. The number of containers of the gray server and the normal server of the sub-module 1 of the front-end module a is 6 and 9, respectively. The production deployment system deploys (S32) 6 gray scale containers on the gray scale server, and applies the mirror image of V1.2 on the gray scale server. Meanwhile, since the normal containers need to be adjusted from 10 to 9, 1 normal container is running down. The final effect is shown in fig. 3 until the gray version production is completed. The front-end module A of the gray server is the V1.1.FA102 version, and the front-end module A of the normal server is the V1.1.FA101 version, so that gray policy production is realized.
In one embodiment, the method further comprises: acquiring a basic version number corresponding to the version number according to the gray level rollback instruction; downloading a basic mirror image corresponding to the basic version number; the base mirror is deployed in a grayscale container.
The base version refers to the current version that has been run at the time of the current version commissioning, in addition to the first version of the application. The version number of the current version is the base version (base version number) of the current version.
In particular, when a problem is encountered in the gray scale test point process, an operation and maintenance personnel can initiate a gray scale back instruction to back a gray scale version in the production deployment system (S24) to stop a gray scale server which is already put into production for implementation. When the operation and maintenance personnel initiate the gray-scale rollback instruction, the commissioning deployment system reads (S34) from the version information management system that the version number of the current normal server is V1.2, and at the moment, the version needs to be uniformly updated to be the basic version V1.1. The commissioning deployment system reads (S31) a basic mirror image corresponding to the basic version number from the mirror image library, deploys (S32) the basic mirror image in the gray scale container, and synchronously sends (S35) update information to the version information management system. The invention uses the characteristic of rolling upgrade, and does not stop updating and affect the operation of a normal server.
In one embodiment, the method further comprises: acquiring a version number according to a production conversion instruction; downloading the mirror image corresponding to the version number; the mirror is deployed in a normal container.
The conversion version is a version in which the gray level version expands the range of the gray level version to all servers after gray level flow verification is correct, namely, all normal servers are synchronously upgraded to the gray level server. As shown in fig. 3, the operation and maintenance personnel initiates a production transfer instruction at the production deployment system to produce a transfer version (S33), and the production deployment system reads (S34) the version number from the version information management system to obtain that the normal server has 9 normal containers running the V1.1 version, and the gray server has 6 gray containers running the V1.2 version. At the moment, the commissioning deployment system reads (S31) the mirror image corresponding to the version number from the mirror image library, deploys (S32) the mirror image in the normal containers (the 9 normal containers are rolled and upgraded to the version V1.2), 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 version is converted without stopping production, only the normal server is required to be installed with a new version, rolling upgrading is used, the new version is verified on the gray server, and production risk is low.
The specific flow of the embodiment of the invention is as follows:
1. and determining a sub-module corresponding to the modified code.
2. Compiling the sub-modules by combining the platform technology of PaaS to obtain images corresponding to the sub-modules and setting version numbers corresponding to the images.
3. And acquiring 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 ratio.
5. And adding a plurality of gray scale containers on the gray scale server according to the number of the gray scale containers, deploying the mirror image in the gray scale containers, and adjusting the normal containers on the normal server according to the number of the normal containers.
6. When the gray level version is returned, a basic version number corresponding to the version number is obtained according to the gray level return instruction, a basic mirror image corresponding to the basic version number is downloaded, and the basic mirror image is deployed in the gray level container.
7. When the version is put into production and converted, the version number is acquired according to the put into production and converted instruction, the mirror image corresponding to the version number is downloaded, and the mirror image is deployed 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 system layered design model in industry, the setting of the sub-modules ensures that the codes are highly cohesive and low in coupling, the large-scale application system is decoupled, the multiplexing rate of the codes is greatly improved, and the development personnel can concentrate on the development of one service in one time, the development efficiency is improved, and the complexity of the codes is reduced.
2. The virtual machine and the full-volume edition feature used by the gray scale production technology can avoid the problems of file loss, unequal bottom layers of files and different edition media in different environments which possibly occur in production, and reduce the complexity of production links. And meanwhile, full mirror image production is used to facilitate elastic capacity expansion and capacity contraction, and forward pushing or backward version.
3. The invention adopts a gray level release mode, and can control the production risk by combining a specific gray level strategy, so that technicians can greatly produce and try new technologies and new services, and the service research and development capability and the quick release capability are improved.
4. The invention uses the independent code base of the submodule, and one submodule only has one version base, thus reducing the repeated construction of development and compiling environments, having no code synchronization, reducing code conflict caused by synchronization, improving the concentration of developers on the current business of the current module and improving the multiplexing of project team personnel.
5. The invention uses automatic tools to reduce repeated labor and release productivity.
Based on the same inventive concept, the embodiment of the invention also provides a gray level release system, and because the principle of the device for solving the problem is similar to that of the gray level release method, the implementation of the system can be referred to the implementation of the method, and the repetition is omitted.
Fig. 5 is a block diagram of a gray scale distribution system according to an embodiment of the present invention. As shown in fig. 4 to 5, the gradation release system includes:
the mirror image unit is used for acquiring version information according to the gray scale 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;
the container number unit is used for determining the gray container number and the normal container number of each module according to the gray scale;
the gray scale container unit is used for adding a plurality of gray scale containers on the gray scale server according to the number of the gray scale containers and disposing 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:
a sub-module determining unit, configured to determine a sub-module 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 images corresponding to the sub-modules and setting version numbers corresponding to the images.
In one embodiment, the method further comprises:
a basic version number unit, configured to obtain 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;
a first deployment unit for deploying the base image in the gray scale container.
In one embodiment, the method further comprises:
the version number unit is used for acquiring a version number according to the production conversion positive instruction;
the second image downloading unit is used for downloading the image corresponding to the version number;
a second deployment unit for deploying the image in the normal container.
As shown in fig. 4, in practical application, the gray level publishing system includes a database, a version information management system, a development compiling system, a code base, a mirror image base and a production deployment system.
The version information management system mainly provides the functions of database storage (S29) and reading (S28), provides the functions of reading (S25) and updating (S36) for developing and compiling systems, and provides the functions of reading versions (S34) and updating (S35) for production deployment systems.
The development and compiling system comprises a submodule determining unit and a compiling unit, reads source codes (S26) and storage target codes (S27) for the butt joint code library, provides development and 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 mirroring unit, a container number unit, a gray container unit, a normal container unit, a basic version number unit, a first mirror downloading unit, a first deployment unit, a version number unit, a second mirror downloading unit and a second deployment unit, and is used for providing a production gray version (S23) function, a back gray version (S24) function and a production conversion version (S33) function for operation and maintenance personnel, reading version information (S34) from a version information management system, providing deployment (S32) function for a normal server and a gray server of a butt joint production environment, and updating (S35) deployment results to the version information management system.
The database mainly stores the relation between version, application, module, sub-module and mirror image. In addition to the above information, the database needs to record the time of production, the basic version, the gray scale, the number of containers, and the like of each version.
The code base is divided into base according to sub-modules, and the source code and operation history of each sub-module are recorded in each independent code base. Because of the application layering design, each sub-module refers to program code that performs an independent function. Under the traditional condition, 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 code is converted into the target code through a complex compiling script in compiling, and the compiling often has the rare problem. The invention subdivides the application into the module and the sub-module, and the control relation and the virtualization technology of the sub-module and the mirror image are decoupled from compiling by utilizing the module and the container, thereby realizing the decoupling of the code library. In the invention, the submodules are all independent libraries on the version library, so that the scene of multiple branches and multiple versions is not required to be compared with the traditional waterfall model, developers can develop the version in series permanently, and the operation of synchronization and merging is not required, thereby reducing the conflict of code synchronization.
The mirror image library is used for recording mirror image entities generated during each compiling, each mirror image corresponds to a unique number, and the mirror image library records the comparison relation between each mirror image number and the mirror image entity.
In summary, the gray level release system of the embodiment of the invention downloads the mirror image according to the gray level production instruction, then determines the gray level container number and the normal container number of each module according to the gray level proportion, finally adds a plurality of gray level containers on the gray level server according to the gray level container number, deploys the mirror image in the gray level containers, and adjusts the normal containers on the normal server according to the normal container number, thereby reducing code conflict, reducing production link complexity and production risk, and improving development efficiency.
The embodiment of the invention also provides a concrete implementation mode of the computer equipment capable of realizing all the steps in the gray level distribution method in the embodiment. Fig. 6 is a block diagram of a computer device according to an embodiment of the present invention, and referring to fig. 6, the computer device specifically includes:
a processor (processor) 601 and a memory (memory) 602.
The processor 601 is configured to invoke a computer program in the memory 602, where the processor executes the computer program to implement all the steps in the gray scale distribution method in the above embodiment, for example, the processor executes the computer program to implement the following steps:
acquiring version information according to the gray scale 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;
adding a plurality of gray scale containers on a gray scale server according to the number of the gray scale containers, and disposing mirror images in the gray scale containers;
and adjusting the normal containers on the normal server according to the number of the normal containers.
In summary, the computer device in the embodiment of the invention downloads the mirror image according to the gray scale production instruction, then determines the gray scale container number and the normal container number 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 gray scale container number, deploys the mirror image in the gray scale containers, adjusts the normal containers on the normal server according to the normal container number, and can reduce code conflict, reduce production link complexity and production risk and improve development efficiency.
The embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps of the gradation release method in the above embodiment, the computer-readable storage medium storing thereon a computer program which, when executed by a processor, implements all the steps of the gradation release method in the above embodiment, for example, the processor implements the following steps when executing the computer program:
acquiring version information according to the gray scale 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;
adding a plurality of gray scale containers on a gray scale server according to the number of the gray scale containers, and disposing mirror images in the gray scale containers;
and adjusting the normal containers on the normal server according to the number of the normal containers.
In summary, the computer readable storage medium in the embodiment of the invention downloads the mirror image according to the gray scale production instruction, then determines the gray scale container number and the normal container number 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 gray scale container number, deploys the mirror image in the gray scale containers, adjusts the normal containers on the normal server according to the normal container number, and can reduce code conflict, reduce production link complexity and production risk and improve development efficiency.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.
Those of skill in the art will further appreciate that the various illustrative logical blocks (illustrative logical block), units, and steps described in connection with the embodiments of the invention may be implemented by electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components (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. Those skilled in the art may implement the described functionality in varying ways for each particular application, but such implementation is not to be understood as beyond the scope of the embodiments of the present invention.
The various illustrative logical blocks, or units, or devices described in the embodiments of the invention 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. A general purpose processor may be a microprocessor, but in the alternative, the general purpose 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. In an example, a storage medium may be coupled to the processor such that 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 reside in a user terminal. In the alternative, the processor and the storage medium may reside as distinct components in a user terminal.
In one or more exemplary designs, the above-described functions of embodiments of the present invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on a computer-readable medium or transmitted as one or more instructions or code on the computer-readable medium. Computer readable media includes both computer storage media and communication media that facilitate transfer of computer programs from one place to another. A 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 may 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 that may be used to carry or store program code in the form of instructions or data structures and other data structures that may be read by a general or special purpose computer, or a general or special purpose processor. Further, any connection is properly termed a computer-readable medium, e.g., 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 wireless such as infrared, radio, and microwave, and is also included in the definition of computer-readable medium. The disks (disks) and disks (disks) include compact disks, laser disks, optical disks, DVDs, floppy disks, and blu-ray discs where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included within the computer-readable media.

Claims (10)

1. A gradation release method, characterized by comprising:
acquiring version information according to a gray scale production instruction and downloading a mirror image corresponding to a version number in the version information; the version information also comprises a gray scale and a plurality of modules corresponding to the version number;
determining the number of gray scale containers and the number of normal containers of each module according to the gray scale proportion;
adding a plurality of gray scale containers on a gray scale server according to the number of the gray scale containers, and disposing the mirror image in the gray scale containers;
and adjusting the normal containers on the normal server according to the normal container number.
2. The gradation release 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;
compiling the sub-module to obtain a mirror image corresponding to the sub-module and setting a version number corresponding to the mirror image.
3. The gradation release method according to claim 1, further comprising:
acquiring a basic version number corresponding to the version number according to the gray-scale rollback instruction;
downloading a basic image corresponding to the basic version number;
the base mirror is deployed in the grayscale container.
4. The gradation release method according to claim 1, further comprising:
acquiring the version number according to a production conversion instruction;
downloading the mirror image corresponding to the version number;
the mirror image is deployed in the normal container.
5. A gradation release system, comprising:
the mirror image unit is used for acquiring version information according to the gray scale production instruction and downloading a mirror image corresponding to the version number in the version information; the version information also comprises a gray scale and a plurality of modules corresponding to the version number;
the container number unit is used for determining the gray container number and the normal container number of each module according to the gray scale proportion;
a gray scale container unit for adding a plurality of gray scale containers on a gray scale server according to the number of gray scale containers and disposing 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. The gray scale distribution system according to claim 5, further comprising:
a sub-module determining unit, configured to determine a sub-module 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 images corresponding to the sub-modules and setting version numbers corresponding to the images.
7. The gray scale distribution system according to claim 5, further comprising:
a basic version number unit, configured to obtain a basic version number corresponding to the version number according to a gray-scale rollback instruction;
the first image downloading unit is used for downloading the basic image corresponding to the basic version number;
a first deployment unit for deploying the base mirror in the gray scale container.
8. The gray scale distribution system according to claim 5, further comprising:
the version number unit is used for acquiring the version number according to the production conversion instruction;
the second image downloading unit is used for downloading the image corresponding to the version number;
a second deployment unit for deploying the 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 distribution method of any of claims 1 to 4 when the computer program is executed.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the gray scale distribution method according to any 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 CN111949311A (en) 2020-11-17
CN111949311B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452776B (en) * 2021-06-25 2022-12-09 中国工商银行股份有限公司 PaaS platform service scheduling method and device and PaaS platform
CN114968274B (en) * 2022-07-29 2022-11-08 之江实验室 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

Also Published As

Publication number Publication date
CN111949311A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
US11561956B2 (en) Key pattern management in multi-tenancy database systems
CN109947773B (en) Deploying changes to key patterns in a multi-tenant database system
CN110147369B (en) Data splitting and write redirection in a multi-leased database system
CN109947767B (en) System sharing type in multi-leasing database system
US10482080B2 (en) Exchanging shared containers and adapting tenants in multi-tenancy database systems
US10452646B2 (en) Deploying changes in a multi-tenancy database system
US10713277B2 (en) Patching content across shared and tenant containers in multi-tenancy database systems
EP3477498A1 (en) Transitioning between system sharing types in multi-tenancy database systems
US7519964B1 (en) System and method for application deployment in a domain for a cluster
EP2021937B1 (en) Techniques to perform gradual upgrades
US8286127B2 (en) Mirrored file system
US20060155777A1 (en) Deployment of life-cycle model for LDAP applications
US20060282479A1 (en) Methods, systems, and computer program products for provisioning software using local changesets that represent differences between software on a repository and a local system
US10846081B2 (en) System and method for code synchronization between mainframe environment and distributed environment
CN111949311B (en) Gray level release method and system
CN105359147A (en) Online database migration
CN107025108B (en) Exporting hierarchical data from a Source Code Management (SCM) system to a Product Lifecycle Management (PLM) system
US20220156277A1 (en) Data synchronization in a data analysis system
CN113760234B (en) Software development method and system
US20110016450A1 (en) System and method of merging of objects from different replicas
US20190065327A1 (en) Efficient versioned object management
CN113220451A (en) Method, system, device and storage medium for deploying distributed cluster system
CN106357777A (en) Method for automatically and synchronously updating program and data based on Web server
CN113094069B (en) Method and device for upgrading image warehouse
CN112069067B (en) Data testing method and device based on block chain and computer 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
GR01 Patent grant
GR01 Patent grant