Cluster deployment method and device, electronic equipment and storage medium
The container cloud platform simplifies the deployment of master-slave nodes of the Jenkins cluster, solves the problem of low deployment efficiency of existing clusters, realizes rapid deployment and efficient configuration, and improves cluster deployment efficiency.
Patent Information
- Application Number
- CN202411615878.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-28
AI Technical Summary
Existing cluster deployment solutions have the problem of inefficient cluster deployment, especially when a large number of extension plug-ins are needed to integrate in the Jenkins cluster to support a diverse build, test and deployment process. The installation process is cumbersome and affects efficiency.
Create a stateless service for the master and slave node through the container cloud platform, obtain the mirror address and start the mirror, configure login information and key information, simplify the deployment process and realize the rapid deployment of the master and slave nodes.
Through mirroring, the rapid deployment of master-slave nodes is achieved, the deployment process is simplified, the cluster deployment efficiency is significantly improved, and errors and omissions caused by manual configuration are reduced.
Smart Images

Figure CN119728713A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software, and in particular to a cluster deployment method, device, electronic device and storage medium. Background Art
[0002] As business needs continue to grow, Jenkins clusters often need to integrate a large number of extension plug-ins to support diverse build, test, and deployment processes. However, the installation of each plug-in not only requires downloading and installation, but may also involve tedious steps such as version compatibility verification and configuration parameter adjustment.
[0003] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art: the existing cluster deployment solution has the problem of low cluster deployment efficiency. Summary of the invention
[0004] The present invention provides a cluster deployment method, device, electronic device and storage medium to improve cluster deployment efficiency.
[0005] According to one aspect of the present invention, a cluster deployment method is provided, comprising:
[0006] In response to the stateless service of the master node created by the user through the container cloud platform, the image address corresponding to the master node is obtained; based on the image address corresponding to the master node, the image corresponding to the master node is triggered to start; in response to the login information of the master node configured by the user through the container cloud platform, the login information of the master node is obtained; in response to the name information and key information of the slave node configured by the user through the container cloud platform, the name information and key information of the slave node are obtained;
[0007] In response to the stateless service of the slave node created by the user through the container cloud platform, the image address corresponding to the slave node is obtained; based on the image address corresponding to the slave node, the image corresponding to the slave node is triggered to start; the name information and key information of the slave node are configured into the environment variables of the slave node.
[0008] According to another aspect of the present invention, a cluster deployment device is provided, comprising:
[0009] The master node deployment module is used to respond to the stateless service of the master node created by the user through the container cloud platform, obtain the image address corresponding to the master node; based on the image address corresponding to the master node, trigger the start of the image corresponding to the master node; respond to the login information of the master node configured by the user through the container cloud platform, obtain the login information of the master node; respond to the name information and key information of the slave node configured by the user through the container cloud platform, obtain the name information and key information of the slave node;
[0010] The slave node deployment module is used to respond to the stateless service of the slave node created by the user through the container cloud platform, obtain the image address corresponding to the slave node; based on the image address corresponding to the slave node, trigger the start of the image corresponding to the slave node; configure the name information and key information of the slave node into the environment variables of the slave node.
[0011] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0012] at least one processor;
[0013] and a memory communicatively coupled to the at least one processor;
[0014] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cluster deployment method described in any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cluster deployment method described in any embodiment of the present invention when executed.
[0016] The technical solution of the embodiment of the present invention obtains the mirror address corresponding to the master node in response to the stateless service of the master node created by the user through the container cloud platform, and then triggers the start of the mirror corresponding to the master node based on the mirror address corresponding to the master node, and then obtains the login information of the master node in response to the login information of the master node configured by the user through the container cloud platform, and then obtains the name information and key information of the slave node in response to the name information and key information of the slave node configured by the user through the container cloud platform. Further, in response to the stateless service of the slave node created by the user through the container cloud platform, the mirror address corresponding to the slave node is obtained, and then based on the mirror address corresponding to the slave node, the start of the mirror corresponding to the slave node is triggered; the name information and key information of the slave node are configured into the environment variables of the slave node. The above technical solution realizes the rapid deployment of master and slave nodes through mirroring, simplifies the deployment process, and improves the efficiency of cluster deployment.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 is a flow chart of a cluster deployment method provided according to Embodiment 1 of the present invention;
[0020] Figure 2 is a flow chart of a cluster deployment method provided according to Embodiment 2 of the present invention;
[0021] Figure 3 is a structural diagram of a cluster deployment device provided according to Embodiment 3 of the present invention;
[0022] Figure 4 It is a structural diagram of an electronic device for implementing the cluster deployment method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0025] Embodiment 1
[0026] Figure 1This is a flow chart of a cluster deployment method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case where the master and slave nodes are deployed in sequence. The method can be executed by a cluster deployment device. The cluster deployment device can be implemented in the form of hardware and / or software. The cluster deployment device can be configured in a terminal and / or a server. Figure 1 As shown, the method includes:
[0027] S110. In response to the stateless service of the master node created by the user through the container cloud platform, obtain the image address corresponding to the master node; based on the image address corresponding to the master node, trigger the start of the image corresponding to the master node; in response to the login information of the master node configured by the user through the container cloud platform, obtain the login information of the master node; in response to the name information and key information of the slave node configured by the user through the container cloud platform, obtain the name information and key information of the slave node.
[0028] In an embodiment of the present invention, the master node may be a Master node of a Jenkins cluster, and the slave node may be a Slave node of a Jenkins cluster. The container cloud platform may be a container management platform built on Kubernetes.
[0029] The service state is the data required for the service request, which can be a variable or a data structure. Stateless services do not record service states, and there is no relationship between different requests; the opposite is true for stateful services. Specifically, for stateless services, all the data that the server can process comes from the information carried by the request. The processing of a single request from the client by a stateless service does not depend on other requests, and the information for processing a request is included in the request; for stateful services, the service will store data information related to the request context, and the requests can be related.
[0030] For example, users can obtain the image address corresponding to the Master node through the stateless service of the Master node of the Jenkins cluster created by the container cloud platform, and then call and trigger the start of the image corresponding to the Master node in the Harbor warehouse according to the image address corresponding to the Master node. Furthermore, users can configure the login information such as the account and password of the Master node through the container cloud platform; users can also configure the name information and key information of the Slave node through the container cloud platform.
[0031] In some optional implementations, the image corresponding to the master node includes: one or more of: tools, tool installation scripts, keys, global configurations, environment variables, working directories, startup parameters, and ports.
[0032] Among them, the tool can be a yum installation tool, which can specifically include but is not limited to: one or more of: GNU compiler suite (gcc), command line tool (curl), distributed version control tool (git), non-interactive network download tool (wget), open source SSL / TLS protocol library and toolkit (openssl), Chinese support component (chinese-support), tool for decompressing ZIP file (unzip) and Bourne Again Shell (bash).
[0033] In the embodiment of the present invention, tool installation scripts such as git, harbor, jdk, maven, sonarqube sever, etc. can also be configured.
[0034] It should be emphasized that by integrating all the plug-ins, configurations, credentials, and user permissions required for the Jenkins cluster Master node into the image, the configuration is centralized and standardized, which not only simplifies the configuration process, but also reduces errors and omissions caused by manual configuration. In addition, since all configurations are pre-installed in the image, deploying a new Jenkins cluster or migrating an existing cluster becomes very simple and fast. You only need to start the corresponding image to immediately get a fully configured Jenkins Master node without the need for tedious subsequent configuration work.
[0035] S120. In response to the stateless service of the slave node created by the user through the container cloud platform, obtain the image address corresponding to the slave node; based on the image address corresponding to the slave node, trigger the start of the image corresponding to the slave node; configure the name information and key information of the slave node into the environment variables of the slave node.
[0036] In an embodiment of the present invention, the image corresponding to the slave node includes one or more of a compilation and construction task image, an automated operation and maintenance (Ansible) task image, a stress (Jmeter) test task image, and a user interface (RobotUI) test task image.
[0037] The compilation and construction task image contains basic configurations such as agent.jar configuration, port configuration, and jdk configuration, as well as compilation tools such as maven, nodejs, golang, and python. The Ansible task image contains basic configurations such as agent.jar configuration, port configuration, and jdk configuration, as well as tools such as python, pip, and ansible-runner. The Jmeter test task image contains basic configurations such as agent.jar configuration, port configuration, and jdk configuration, as well as tools such as apache-ant and apache-jmeter. The RobotUI test task image contains basic configurations such as agent.jar configuration, port configuration, and jdk configuration, as well as tools such as google-chrome, chromedriber, and python.
[0038] It should be noted that, according to different business scenarios (such as Jmeter interface testing or Ansible automation, etc.), the present invention proposes to make Slave nodes into different Docker images. This scenario-based customization method enables Slave nodes to focus on specific tasks, avoiding waste of resources and configuration redundancy. In addition, each Slave node runs in its own Docker container and is isolated from each other, which means that the failure or configuration change of a Slave node will not affect other Slave nodes or Master nodes, thereby improving the stability and reliability of the system. According to business needs, it is also possible to easily start or stop the Slave nodes of a specific scenario, and adjust its resources (such as CPU, memory) and quantity as needed. This on-demand configuration and expansion capabilities enable the Jenkins cluster to flexibly respond to various testing and development tasks.
[0039] In some optional embodiments, the Docker Registry can be used to track and roll back to a previous version, thereby improving the maintainability and stability of the system.
[0040] In some optional embodiments, the utilization of resources can be optimized and the waste of resources can be reduced by configuring and expanding slave nodes on demand and utilizing the resource scheduling and management functions of Kubernetes. At the same time, by dynamically adjusting the resource allocation of slave nodes, the stability and performance of the system can be ensured under high load conditions.
[0041] The technical solution of the embodiment of the present invention obtains the mirror address corresponding to the master node in response to the stateless service of the master node created by the user through the container cloud platform, and then triggers the start of the mirror corresponding to the master node based on the mirror address corresponding to the master node, and then obtains the login information of the master node in response to the login information of the master node configured by the user through the container cloud platform, and then obtains the name information and key information of the slave node in response to the name information and key information of the slave node configured by the user through the container cloud platform. Further, in response to the stateless service of the slave node created by the user through the container cloud platform, the mirror address corresponding to the slave node is obtained, and then based on the mirror address corresponding to the slave node, the start of the mirror corresponding to the slave node is triggered; the name information and key information of the slave node are configured into the environment variables of the slave node. The above technical solution realizes the rapid deployment of master and slave nodes through mirroring, simplifies the deployment process, and improves the efficiency of cluster deployment.
[0042] Embodiment 2
[0043] Figure 2 A flow chart of a cluster deployment method provided for Embodiment 2 of the present invention, the method of this embodiment can be combined with the various optional schemes in the cluster deployment method provided in the above embodiments. The cluster deployment method provided in this embodiment is further optimized. Optionally, after configuring the name information and key information of the slave node into the environment variables of the slave node, it also includes: collecting and displaying one or more of the memory resource usage information, central processing unit resource usage information, hard disk resource usage information and network resource usage information of the master node; collecting and displaying one or more of the memory resource usage information, central processing unit resource usage information, hard disk resource usage information and network resource usage information of the slave node.
[0044] like Figure 2 As shown, the method includes:
[0045] S210. In response to the stateless service of the master node created by the user through the container cloud platform, obtain the image address corresponding to the master node; based on the image address corresponding to the master node, trigger the start of the image corresponding to the master node; in response to the login information of the master node configured by the user through the container cloud platform, obtain the login information of the master node; in response to the name information and key information of the slave node configured by the user through the container cloud platform, obtain the name information and key information of the slave node.
[0046] S220. In response to the stateless service of the slave node created by the user through the container cloud platform, obtain the image address corresponding to the slave node; based on the image address corresponding to the slave node, trigger the start of the image corresponding to the slave node; configure the name information and key information of the slave node into the environment variables of the slave node.
[0047] S230. Collect and display one or more of the memory resource usage information, central processing unit resource usage information, hard disk resource usage information, and network resource usage information of the master node; collect and display one or more of the memory resource usage information, central processing unit resource usage information, hard disk resource usage information, and network resource usage information of the slave node.
[0048] In an embodiment of the present invention, memory resource usage information, central processing unit resource usage information, hard disk resource usage information, network resource usage information, etc. of the master and slave nodes can be collected through Prometheus, and the memory resource usage information, central processing unit resource usage information, hard disk resource usage information, network resource usage information, etc. of the master and slave nodes can be displayed through the Grafana panel for users to view and analyze, thereby optimizing resource utilization and reducing resource waste.
[0049] Embodiment 3
[0050] Figure 3 This is a schematic diagram of the structure of a cluster deployment device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0051] The master node deployment module 310 is used to obtain the image address corresponding to the master node in response to the stateless service of the master node created by the user through the container cloud platform; trigger the start of the image corresponding to the master node based on the image address corresponding to the master node; obtain the login information of the master node in response to the login information of the master node configured by the user through the container cloud platform; obtain the name information and key information of the slave node in response to the name information and key information of the slave node configured by the user through the container cloud platform;
[0052] The slave node deployment module 320 is used to respond to the stateless service of the slave node created by the user through the container cloud platform, obtain the mirror address corresponding to the slave node; based on the mirror address corresponding to the slave node, trigger the start of the mirror corresponding to the slave node; configure the name information and key information of the slave node into the environment variables of the slave node.
[0053] The technical solution of the embodiment of the present invention obtains the mirror address corresponding to the master node in response to the stateless service of the master node created by the user through the container cloud platform, and then triggers the start of the mirror corresponding to the master node based on the mirror address corresponding to the master node, and then obtains the login information of the master node in response to the login information of the master node configured by the user through the container cloud platform, and then obtains the name information and key information of the slave node in response to the name information and key information of the slave node configured by the user through the container cloud platform. Further, in response to the stateless service of the slave node created by the user through the container cloud platform, the mirror address corresponding to the slave node is obtained, and then based on the mirror address corresponding to the slave node, the start of the mirror corresponding to the slave node is triggered; the name information and key information of the slave node are configured into the environment variables of the slave node. The above technical solution realizes the rapid deployment of master and slave nodes through mirroring, simplifies the deployment process, and improves the efficiency of cluster deployment.
[0054] In some optional implementations, the master node is a Master node of a Jenkins cluster, and the slave node is a Slave node of a Jenkins cluster.
[0055] In some optional implementations, the container cloud platform is a container management platform built based on Kubernetes.
[0056] In some optional implementations, the image corresponding to the master node includes: one or more of: tools, tool installation scripts, keys, global configurations, environment variables, working directories, startup parameters, and ports.
[0057] In some optional embodiments, the tools include: one or more of: a GNU compiler suite, a command line tool, a distributed version control tool, a non-interactive network download tool, an open source SSL / TLS protocol library and toolkit, a Chinese support component, a tool for decompressing ZIP files, and a Bourne Again Shell.
[0058] In some optional implementations, the image corresponding to the slave node includes one or more of a compilation and construction task image, an automated operation and maintenance task image, a stress testing task image, and a user interface testing task image.
[0059] In some optional implementations, the cluster deployment device further includes:
[0060] The resource usage collection module is used to collect and display one or more of the memory resource usage information, central processing unit resource usage information, hard disk resource usage information and network resource usage information of the master node; collect and display one or more of the memory resource usage information, central processing unit resource usage information, hard disk resource usage information and network resource usage information of the slave node.
[0061] The cluster deployment device provided in the embodiment of the present invention can execute the cluster deployment method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0062] Embodiment 4
[0063] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0064] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The I / O interface 15 is also connected to the bus 14.
[0065] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0066] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a cluster deployment method, which includes:
[0067] In response to the stateless service of the master node created by the user through the container cloud platform, the image address corresponding to the master node is obtained; based on the image address corresponding to the master node, the image corresponding to the master node is triggered to start; in response to the login information of the master node configured by the user through the container cloud platform, the login information of the master node is obtained; in response to the name information and key information of the slave node configured by the user through the container cloud platform, the name information and key information of the slave node are obtained;
[0068] In response to the stateless service of the slave node created by the user through the container cloud platform, the image address corresponding to the slave node is obtained; based on the image address corresponding to the slave node, the image corresponding to the slave node is triggered to start; the name information and key information of the slave node are configured into the environment variables of the slave node.
[0069] In some embodiments, the cluster deployment method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the cluster deployment method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the cluster deployment method in any other appropriate manner (e.g., by means of firmware).
[0070] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0071] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0072] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0073] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0074] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0075] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0076] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0077] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A cluster deployment method, characterized in that: include: In response to the stateless service of the master node created by the user through the container cloud platform, the image address corresponding to the master node is obtained; based on the image address corresponding to the master node, the image corresponding to the master node is triggered to start; in response to the login information of the master node configured by the user through the container cloud platform, the login information of the master node is obtained; In response to the name information and key information of the slave node configured by the user through the container cloud platform, the name information and key information of the slave node are obtained; In response to the stateless service of the slave node created by the user through the container cloud platform, the image address corresponding to the slave node is obtained; based on the image address corresponding to the slave node, the image corresponding to the slave node is triggered to start; the name information and key information of the slave node are configured into the environment variables of the slave node.
2. The method according to claim 1, characterized in that The master node is the Master node of the Jenkins cluster, and the slave node is the Slave node of the Jenkins cluster.
3. The method according to claim 1, characterized in that The container cloud platform is a container management platform built on Kubernetes.
4. The method according to claim 1, characterized in that The image corresponding to the master node includes: one or more of: tools, tool installation scripts, secret keys, global configurations, environment variables, working directories, startup parameters, and ports.
5. The method according to claim 4, characterized in that The tools include: one or more of: a GNU compiler suite, a command line tool, a distributed version control tool, a non-interactive network download tool, an open source SSL / TLS protocol library and toolkit, a Chinese support component, a tool for decompressing ZIP files, and a Bourne Again Shell.
6. The method according to claim 1, characterized in that The image corresponding to the slave node includes one or more of a compilation and construction task image, an automated operation and maintenance task image, a stress testing task image, and a user interface testing task image.
7. The method according to claim 1, characterized in that After configuring the name information and key information of the slave node into the environment variables of the slave node, the method further includes: Collect and display one or more of the master node's memory resource usage information, CPU resource usage information, hard disk resource usage information, and network resource usage information; Collect and display one or more of the memory resource usage information, central processing unit resource usage information, hard disk resource usage information and network resource usage information of the slave node.
8. A cluster deployment device, characterized in that: include: The master node deployment module is used to respond to the stateless service of the master node created by the user through the container cloud platform, obtain the image address corresponding to the master node; based on the image address corresponding to the master node, trigger the start of the image corresponding to the master node; respond to the login information of the master node configured by the user through the container cloud platform, obtain the login information of the master node; In response to the name information and key information of the slave node configured by the user through the container cloud platform, the name information and key information of the slave node are obtained; The slave node deployment module is used to respond to the stateless service of the slave node created by the user through the container cloud platform, obtain the image address corresponding to the slave node; based on the image address corresponding to the slave node, trigger the start of the image corresponding to the slave node; configure the name information and key information of the slave node into the environment variables of the slave node.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cluster deployment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cluster deployment method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Cluster management method and system based on cloud technology
CN121411874A