CN114124703B - Multi-environment service configuration method, equipment and medium based on Kubernetes - Google Patents

Multi-environment service configuration method, equipment and medium based on Kubernetes Download PDF

Info

Publication number
CN114124703B
CN114124703B CN202111425179.1A CN202111425179A CN114124703B CN 114124703 B CN114124703 B CN 114124703B CN 202111425179 A CN202111425179 A CN 202111425179A CN 114124703 B CN114124703 B CN 114124703B
Authority
CN
China
Prior art keywords
client
environment
service
server
configuration
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
CN202111425179.1A
Other languages
Chinese (zh)
Other versions
CN114124703A (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.)
Chaozhou Zhuoshu Big Data Industry Development Co Ltd
Original Assignee
Chaozhou Zhuoshu Big Data Industry Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chaozhou Zhuoshu Big Data Industry Development Co Ltd filed Critical Chaozhou Zhuoshu Big Data Industry Development Co Ltd
Priority to CN202111425179.1A priority Critical patent/CN114124703B/en
Publication of CN114124703A publication Critical patent/CN114124703A/en
Application granted granted Critical
Publication of CN114124703B publication Critical patent/CN114124703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method, equipment and medium for configuring multi-environment service based on Kubernetes, wherein the method comprises the following steps: determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment; adding corresponding configuration centers for the first client, the second client and the third client respectively; and deploying the server to master nodes corresponding to the first client, the second client and the third client respectively. The server only needs to configure one server, and the client can operate the Kubernetes corresponding to each environment by reading the configuration file in the client configuration center, so that the machine does not need to be switched back and forth, the occurrence of human errors is reduced, the time period of each operation is shortened, the manpower resources are saved, and the working efficiency is improved.

Description

Multi-environment service configuration method, equipment and medium based on Kubernetes
Technical Field
The application relates to the technical field of computer programs, in particular to a method, equipment and medium for configuring multi-environment service based on Kubernetes.
Background
With the continuous maturation and perfection of various APP, the functions of the application are continuously increased in the test environment, the gray scale environment and the formal environment, and the number of foreground and background services is also increased. In a plurality of environments, besides conventional maintenance, in some updating or deleting operations, different environments need to change the content of the configuration files needed by different files due to different configuration information, the release of the configuration files after each change needs to be repacked, the mirror image is regenerated, and the update data released by the test environment cannot be directly configured on the gray environment or the formal environment, so that the working content of operation and maintenance personnel is very trivial, and the maintenance workload is also greatly increased.
Although Kubernetes is used as a container cluster management tool to have the basic mirror image updating and rollback functions, the operation process is very tedious, consumes a lot of time, and is easy to miss during manual operation. When maintenance personnel need to newly deploy services, update services or roll-back services based on the Kubernetes, the deployment efficiency is seriously affected due to complicated operation steps.
Disclosure of Invention
In order to solve the above problems, namely to solve the problems of complicated steps and low efficiency when maintainers newly deploy services, update services or roll back services on Kubernetes, the present application provides a Kubernetes-based multi-environment service configuration method, device and medium, which includes:
in a first aspect, the present application provides a Kubernetes-based multi-environment service configuration method, including: determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment; adding corresponding configuration centers for the first client, the second client and the third client respectively, wherein the configuration centers are used for providing service configuration information of environments where the first client, the second client and the third client are located; and deploying the server to master nodes respectively corresponding to the first client, the second client and the third client.
In one example, after the server is deployed to the master node corresponding to each of the first client, the second client, and the third client, the method further includes: acquiring a service update instruction, and determining the environment corresponding to the service update instruction as the gray environment and/or the formal environment; acquiring a service update file in the first client through the server, and carrying out mirror image processing on the service update file to obtain a service update file after mirror image processing; and calling an interface of the second client and/or the third client through a configuration center corresponding to the second client and/or a configuration center corresponding to the third client, and deploying the service update file after the mirror image processing to the second client and/or the third client.
In one example, after the mirrored service update file is deployed to the second client and/or the third client by the configuration center corresponding to the second client and/or the configuration center corresponding to the third client, invoking an interface of the second client and/or the third client, the method further includes: acquiring a version number of the service update file after the mirror image processing; and recording the version number of the service update file after the mirror image processing to the server side and the second client side and/or the third client side.
In one example, after the server is deployed to the master node corresponding to each of the first client, the second client, and the third client, the method further includes: acquiring a service rollback instruction, and determining the environment corresponding to the service rollback instruction as the gray environment and/or the formal environment; determining the version number of the service file to be rolled back according to the service rolling-back instruction; inquiring the corresponding service file to be rolled back in the server according to the version number of the service file to be rolled back; and calling an interface of the second client and/or the third client through a configuration center corresponding to the second client and/or a configuration center corresponding to the third client, and deploying the service file to be rolled back to the second client and/or the third client.
In one example, after the interface of the second client and/or the third client is called through the configuration center corresponding to the second client and/or the configuration center corresponding to the third client, and the service file to be rolled back is deployed to the second client and/or the third client, the method further includes: acquiring version numbers corresponding to services operated by the second client and/or the third client before deploying the service files to be rolled back; inquiring in the server to obtain a version number corresponding to the running service; and adding a bug tag for the version number corresponding to the running service, and recording the bug tag to the server, wherein the bug tag is used for marking that a bug exists in a service file of the version number corresponding to the running service.
In one example, after the server is deployed to the master node corresponding to each of the first client, the second client, and the third client, the method further includes: acquiring a service stop instruction, and determining the environment corresponding to the service stop instruction as the gray environment and/or the formal environment; and stopping running the service currently running in the second client and/or the third client through the configuration center corresponding to the second client and/or the configuration center corresponding to the third client.
In one example, after the server is deployed to the master node corresponding to each of the first client, the second client, and the third client, the method further includes: determining that a new engineering file exists in the first client; and calling a Jenkins API interface, creating a Jenkins project corresponding to the new project file, and recording the Jenkins project to the server.
In one example, the method further comprises: and the server side performs encryption communication with the first client side, the second client side and the third client side by adopting an HTTPS encryption mechanism.
In another aspect, the present application further provides a Kubernetes-based multi-environment service configuration device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the following instructions: determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment; adding corresponding configuration centers for the first client, the second client and the third client respectively, wherein the configuration centers are used for providing service configuration information of the environment; and deploying the server to master nodes respectively corresponding to the first client, the second client and the third client.
In another aspect, the present application also provides a non-volatile computer storage medium storing computer-executable instructions configured to: determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment; adding corresponding configuration centers for the first client, the second client and the third client respectively, wherein the configuration centers are used for providing service configuration information of the environment; and deploying the server to master nodes respectively corresponding to the first client, the second client and the third client.
The Kubernetes-based multi-environment service configuration method, the Kubernetes-based multi-environment service configuration equipment and the Kubernetes-based multi-environment service configuration medium have the following beneficial effects: according to the technical scheme, the server only needs to be configured with one server, and the client can be operated to correspond to the Kubernetes of each environment by reading the configuration file in the client configuration center, so that the machine does not need to be switched back and forth. Each environment only needs to be provided with one client, the installation and the starting are convenient and quick, and non-professional operation and maintenance personnel can also install and deploy, so that the time of manual operation is saved, the occurrence of human errors is reduced, the time period of each operation is shortened, the manpower resources are saved, and the working efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a schematic flow chart of a Kubernetes-based multi-environment service configuration method in an embodiment of the present application;
fig. 2 is a schematic diagram of a Kubernetes-based multi-environment service configuration device in an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that, in the method for configuring the multiple environment service of Kubernetes described in the present application, the multiple environment service may be stored in a system or a server in a program or an algorithm manner, and support for the program or the algorithm may be implemented by corresponding elements in a hardware terminal where the system or the server is located, for example, a processor, a memory, a communication module, and the like. In the embodiment of the present application, a system is illustrated as an example, and the system may support a program or an algorithm through a hardware terminal where the system is located, or may support the program or the algorithm by communicating with a remote server. The system may be stored in a corresponding hardware terminal including, but not limited to: cell phones, tablet computers, personal computers, and other hardware devices with corresponding computing power. Users can log in the system through the system itself, APP or WEB page, etc. to realize allocation, reference and supervision of functions or parameters in the system, and further realize configuration of multi-environment service.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, the method for configuring the multi-environment service based on Kubernetes provided in the embodiment of the present application includes:
s101: determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment.
Specifically, it should be noted that the first client, the second client, and the third client should be installed with Kubernetes and operate in a test environment, a gray environment, and a formal environment, respectively.
The test environment refers to the operation environment of service file construction and test, the gray scale environment refers to the operation environment of service files after formally online, wherein a part of users use the scheme A for smooth transition and the other part of users use the scheme B for smooth transition.
Meanwhile, as the first client, the second client and the third client are all provided with the Kubernetes, the three clients are all hard deployed on master nodes of the affiliated environment.
S102: corresponding configuration centers are added for the first client, the second client and the third client respectively, and the configuration centers are used for providing service configuration information of environments where the first client, the second client and the third client are located.
Specifically, the system adds configuration centers for three clients, respectively. The configuration center is used for storing and providing configuration information of various services, so that the mirror image can be directly pulled to update the mirror image file of the service file which is already tested in the test environment without repacking the mirror image when the environment is updated each time, and the integrity of the tested environment mirror image can be ensured.
S103: and deploying the server to master nodes respectively corresponding to the first client, the second client and the third client.
Specifically, the server needs a master node capable of accessing each environment, so as to obtain a mirror version of each service file of each environment, and implement deployment of the service files.
In one embodiment, after the system deploys the server to the master node corresponding to each of the first client, the second client, and the third client, the system may further include the following scheme:
specifically:
the system acquires a service update instruction, wherein the service update is to directly pull the service file which is already tested in the test environment to the gray environment and/or the formal environment in the form of the service update instruction.
The system determines that the environment corresponding to the service update instruction is a gray environment and/or a formal environment.
And the system obtains the service update file in the first client through the server, namely, the service file after passing the test, and performs mirror image processing on the service update file to obtain a service update file after mirror image processing (for example, a mirror image yml format file).
And the system calls the interfaces of the second client and/or the third client through the configuration center corresponding to the second client and/or the configuration center corresponding to the third client, and deploys the service update file after the mirror image processing to the second client and/or the third client.
Because the configuration center is arranged in the method, the configuration centers corresponding to the environments can be supported to be directly read, so that configuration information is obtained, the image files which are tested by the test environment are directly used, the gray environment and/or the configuration files in the formal environment are not required to be modified again and packaged, and the integrity of the image files which are tested in the deployment process is ensured.
In one embodiment, after the interface of the second client and/or the third client is called through the configuration center corresponding to the second client and/or the configuration center corresponding to the third client and the service update file after the mirroring is deployed to the second client and/or the third client, the method further includes the following steps:
specifically:
the system obtains the version number of the service update file after the mirror image processing.
And recording the version number of the service update file after the mirror image processing to the server side, the second client side and/or the third client side.
By recording the version number, the direct query and the call can be facilitated when the subsequent second client and/or the third client roll back in the subsequent process.
In one embodiment, after the server is deployed to the master node corresponding to each of the first client, the second client, and the third client, the method further includes the following steps:
specifically:
and acquiring the service rollback instruction, and determining the environment corresponding to the service rollback instruction as a gray environment and/or a formal environment.
Further, the system determines the version number of the file to be rolled back according to the service rollback instruction.
And further, according to the version number of the file to be rolled back, inquiring the corresponding service file to be rolled back in the server.
And calling an interface of the second client and/or the third client through a configuration center corresponding to the second client and/or a configuration center corresponding to the third client, and robustly deploying the service to be rolled back to the second client and/or the third client.
In gray scale environments and test environments, currently running service files typically encounter a bug, and in order to quickly solve the problem, an urgent rollback is required to obtain a previous version substitution of the bug version. Through the technical scheme recorded in the application, the problem of emergency rollback can be solved.
In one embodiment, after the interface of the second client and/or the third client is called through the configuration center corresponding to the second client and/or the third client and/or the configuration center corresponding to the third client, the method further includes the following technical scheme:
specifically, the version number corresponding to the service executed before the service file to be rolled back is deployed, that is, the version number has a corresponding bug, is obtained from the second client and/or the third client.
Further, a bug tag is added for the version number corresponding to the running service and recorded to the server, and the bug tag is used for marking that a bug exists in the service file of the version number corresponding to the running service.
In still another embodiment, after the system deploys the server to the master node corresponding to each of the first client, the second client, and the third client, the system may further include the following technical scheme:
specifically:
the system acquires the service stop instruction and determines the environment corresponding to the service stop instruction as a gray environment and/or a formal environment.
And stopping running the service currently running in the second client and/or the third client through the configuration center corresponding to the second client and/or the configuration center corresponding to the third client.
In one embodiment, after the server is deployed to the master node corresponding to each of the first client, the second client, and the third client, the method further includes the following technical scheme:
specifically:
the system determines that a new project file exists in the first client.
And calling a Jenkins API interface, creating a Jenkins project corresponding to the new project file, and recording the Jenkins project to the server.
The process is to test a new engineering file created in the environment, and the technical scheme is adopted for facilitating one-key deployment.
In one embodiment, the server uses an HTTPS encryption mechanism to perform encrypted communication with the first client, the second client, and the third client. The safety of data transmission is ensured.
According to the technical scheme, the server only needs to be configured with one server, and the client can be operated to correspond to the Kubernetes of each environment by reading the configuration file in the client configuration center, so that the machine does not need to be switched back and forth.
Each environment only needs to be provided with one client, and the installation is started, so that the installation and the deployment are convenient and quick, and non-professional operation and maintenance personnel can also perform.
In addition, in one embodiment, corresponding operation interfaces are arranged in the server and the client, deployment, updating, rollback and stopping of service can be operated according to one key of the operation interfaces, and the system can automatically operate according to operation instructions, so that the time of manual operation is saved, the occurrence of human errors is reduced, the time period of each operation is shortened, the human resources are saved, and the working efficiency is improved.
In one embodiment, as shown in fig. 2, the present application further provides a Kubernetes-based multi-environment service configuration device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the following instructions:
determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment;
adding corresponding configuration centers for the first client, the second client and the third client respectively, wherein the configuration centers are used for providing service configuration information of the environment;
and deploying the server to master nodes respectively corresponding to the first client, the second client and the third client.
In one embodiment, the present application also provides a non-volatile computer storage medium storing computer-executable instructions configured to:
determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment;
adding corresponding configuration centers for the first client, the second client and the third client respectively, wherein the configuration centers are used for providing service configuration information of the environment;
and deploying the server to master nodes respectively corresponding to the first client, the second client and the third client.
All embodiments in the application are described in a progressive manner, and identical and similar parts of all embodiments are mutually referred, so that each embodiment mainly describes differences from other embodiments. In particular, for the apparatus and medium embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the section of the method embodiments being relevant.
The devices and media provided in the embodiments of the present application are in one-to-one correspondence with the methods, so that the devices and media also have similar beneficial technical effects as the corresponding methods, and since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media are not described in detail herein.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. The utility model provides a multi-environment service configuration method based on Kubernetes, which is characterized in that the method comprises the following steps:
determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment;
adding corresponding configuration centers for the first client, the second client and the third client respectively, wherein the configuration centers are used for providing service configuration information of environments where the first client, the second client and the third client are located;
deploying the server to master nodes respectively corresponding to the first client, the second client and the third client; the server accesses the master node of each environment, acquires the mirror version of each service file of each environment, and deploys the service files.
2. The Kubernetes-based multi-environment service configuration method of claim 1, wherein after the server is deployed to master nodes corresponding to the first client, the second client, and the third client, the method further comprises:
acquiring a service update instruction, and determining the environment corresponding to the service update instruction as the gray environment and/or the formal environment;
acquiring a service update file in the first client through the server, and carrying out mirror image processing on the service update file to obtain a service update file after mirror image processing;
and calling an interface of the second client and/or the third client through a configuration center corresponding to the second client and/or a configuration center corresponding to the third client, and deploying the service update file after the mirror image processing to the second client and/or the third client.
3. The Kubernetes-based multi-environment service configuration method according to claim 2, wherein the method further comprises, after the service update file after the mirroring is deployed to the second client and/or the third client, invoking an interface of the second client and/or the third client through a configuration center corresponding to the second client and/or a configuration center corresponding to the third client:
acquiring a version number of the service update file after the mirror image processing;
and recording the version number of the service update file after the mirror image processing to the server side and the second client side and/or the third client side.
4. The Kubernetes-based multi-environment service configuration method of claim 1, wherein after the server is deployed to master nodes corresponding to the first client, the second client, and the third client, the method further comprises:
acquiring a service rollback instruction, and determining the environment corresponding to the service rollback instruction as the gray environment and/or the formal environment;
determining the version number of the service file to be rolled back according to the service rolling-back instruction;
inquiring the corresponding service file to be rolled back in the server according to the version number of the service file to be rolled back;
and calling an interface of the second client and/or the third client through a configuration center corresponding to the second client and/or a configuration center corresponding to the third client, and deploying the service file to be rolled back to the second client and/or the third client.
5. The Kubernetes-based multi-environment service configuration method of claim 4, wherein, after the interface of the second client and/or the third client is called through the configuration center corresponding to the second client and/or the configuration center corresponding to the third client, the method further comprises:
acquiring version numbers corresponding to services operated by the second client and/or the third client before deploying the service files to be rolled back;
inquiring in the server to obtain a version number corresponding to the running service;
and adding a bug tag for the version number corresponding to the running service, and recording the bug tag to the server, wherein the bug tag is used for marking that a bug exists in a service file of the version number corresponding to the running service.
6. The Kubernetes-based multi-environment service configuration method of claim 1, wherein after the server is deployed to master nodes corresponding to the first client, the second client, and the third client, the method further comprises:
acquiring a service stop instruction, and determining the environment corresponding to the service stop instruction as the gray environment and/or the formal environment;
and stopping running the service currently running in the second client and/or the third client through the configuration center corresponding to the second client and/or the configuration center corresponding to the third client.
7. The Kubernetes-based multi-environment service configuration method of claim 1, wherein after the server is deployed to master nodes corresponding to the first client, the second client, and the third client, the method further comprises:
determining that a new engineering file exists in the first client;
and calling a Jenkins API interface, creating a Jenkins project corresponding to the new project file, and recording the Jenkins project to the server.
8. The Kubernetes-based multi-environment service configuration method of claim 1, further comprising:
and the server side performs encryption communication with the first client side, the second client side and the third client side by adopting an HTTPS encryption mechanism.
9. A Kubernetes-based multi-environment service configuration device, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the following instructions:
determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment;
adding corresponding configuration centers for the first client, the second client and the third client respectively, wherein the configuration centers are used for providing service configuration information of the environment;
deploying the server to master nodes respectively corresponding to the first client, the second client and the third client; the server accesses the master node of each environment, acquires the mirror version of each service file of each environment, and deploys the service files.
10. A non-transitory computer storage medium storing computer-executable instructions, the computer-executable instructions configured to:
determining a server, a first client, a second client and a third client, wherein the first client operates a master node in a test environment, the second client operates a master node in a gray scale environment, and the third client operates a master node in a formal environment;
adding corresponding configuration centers for the first client, the second client and the third client respectively, wherein the configuration centers are used for providing service configuration information of the environment;
deploying the server to master nodes respectively corresponding to the first client, the second client and the third client; the server accesses the master node of each environment, acquires the mirror version of each service file of each environment, and deploys the service files.
CN202111425179.1A 2021-11-26 2021-11-26 Multi-environment service configuration method, equipment and medium based on Kubernetes Active CN114124703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111425179.1A CN114124703B (en) 2021-11-26 2021-11-26 Multi-environment service configuration method, equipment and medium based on Kubernetes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111425179.1A CN114124703B (en) 2021-11-26 2021-11-26 Multi-environment service configuration method, equipment and medium based on Kubernetes

Publications (2)

Publication Number Publication Date
CN114124703A CN114124703A (en) 2022-03-01
CN114124703B true CN114124703B (en) 2024-01-23

Family

ID=80370551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111425179.1A Active CN114124703B (en) 2021-11-26 2021-11-26 Multi-environment service configuration method, equipment and medium based on Kubernetes

Country Status (1)

Country Link
CN (1) CN114124703B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549580A (en) * 2018-03-30 2018-09-18 平安科技(深圳)有限公司 Methods and terminal device of the automatic deployment Kubernetes from node
CN111464380A (en) * 2020-03-19 2020-07-28 时时同云科技(成都)有限责任公司 Method, device and system for parallel testing of multiple service items
CN111625316A (en) * 2020-05-15 2020-09-04 苏州浪潮智能科技有限公司 Environment deployment method and device, electronic equipment and storage medium
CN111740859A (en) * 2020-06-12 2020-10-02 百度在线网络技术(北京)有限公司 Test environment deployment method and device, electronic equipment and storage medium
CN113448837A (en) * 2020-11-03 2021-09-28 北京新氧科技有限公司 Development and test environment deployment method, system, electronic device, and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11329885B2 (en) * 2018-06-21 2022-05-10 International Business Machines Corporation Cluster creation using self-aware, self-joining cluster nodes
US10908897B2 (en) * 2018-11-27 2021-02-02 International Business Machines Corporation Distributing services to client systems to develop in a shared development environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549580A (en) * 2018-03-30 2018-09-18 平安科技(深圳)有限公司 Methods and terminal device of the automatic deployment Kubernetes from node
CN111464380A (en) * 2020-03-19 2020-07-28 时时同云科技(成都)有限责任公司 Method, device and system for parallel testing of multiple service items
CN111625316A (en) * 2020-05-15 2020-09-04 苏州浪潮智能科技有限公司 Environment deployment method and device, electronic equipment and storage medium
CN111740859A (en) * 2020-06-12 2020-10-02 百度在线网络技术(北京)有限公司 Test environment deployment method and device, electronic equipment and storage medium
CN113448837A (en) * 2020-11-03 2021-09-28 北京新氧科技有限公司 Development and test environment deployment method, system, electronic device, and medium

Also Published As

Publication number Publication date
CN114124703A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN107515776B (en) Method for upgrading service continuously, node to be upgraded and readable storage medium
KR102354536B1 (en) Hyperledger fabric network creation method, controller and storage medium
US10853189B2 (en) Image restore from incremental backup
CN106708608B (en) Distributed lock service method, acquisition method and corresponding device
CN113448686B (en) Resource deployment method and device, electronic equipment and storage medium
CN109857516B (en) Cluster migration method and device based on container
CN109561128B (en) Data transmission method and device
CN111045802B (en) Redis cluster component scheduling system and method and platform equipment
US12061901B2 (en) Documentation enforcement during compilation
CN113918276A (en) SDN controller deployment method, device and medium based on container
CN109558143B (en) Method and device for deploying applications in cluster
CN113608880A (en) Algorithm model deployment system
CN110968333B (en) Configuration information replacement method and device, machine-readable storage medium and processor
CN114124703B (en) Multi-environment service configuration method, equipment and medium based on Kubernetes
CN113282318A (en) Service implementation method and device
CN112883026A (en) Data processing method and device
CN110620798A (en) Control method, system, equipment and storage medium for FTP connection
CN110298031B (en) Dictionary service system and model version consistency distribution method
WO2020135129A1 (en) Method and device for loading plug-in of application, and terminal
CN113297316A (en) Method, device and system for realizing data synchronization
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN115617459A (en) Method, device and equipment for resource scheduling
CN116028463A (en) Method for constructing large data platform with separated storage and calculation
WO2016054886A1 (en) Software upgrade method and apparatus, electronic device and storage medium
CN110968444A (en) Data processing method and device of cloud computing platform

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