[go: up one dir, main page]

CN117331578B - Cluster mirror deployment method and system for micro and small data centers - Google Patents

Cluster mirror deployment method and system for micro and small data centers Download PDF

Info

Publication number
CN117331578B
CN117331578B CN202311636742.9A CN202311636742A CN117331578B CN 117331578 B CN117331578 B CN 117331578B CN 202311636742 A CN202311636742 A CN 202311636742A CN 117331578 B CN117331578 B CN 117331578B
Authority
CN
China
Prior art keywords
cluster
file
build
command
cluster image
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
CN202311636742.9A
Other languages
Chinese (zh)
Other versions
CN117331578A (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.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
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 Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202311636742.9A priority Critical patent/CN117331578B/en
Publication of CN117331578A publication Critical patent/CN117331578A/en
Application granted granted Critical
Publication of CN117331578B publication Critical patent/CN117331578B/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/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a cluster mirror image deployment method and system for a microminiature data center. The method comprises the following steps: obtaining a construction request of a client, wherein the construction request comprises path parameters of a k3s cluster mirror image construction file; acquiring the k3s cluster mirror image construction file based on the path parameters, and analyzing the k3s cluster mirror image construction file to obtain an analysis result; encapsulating the analysis result into a cluster mirror image packet; and initializing a k3s cluster and an application in the k3s cluster based on the cluster mirror package to complete cluster mirror deployment. The method can solve the problem that the lightweight deployment of the microminiature data center cannot be realized rapidly through the k8s cluster in the prior art, and realize the integration and delivery of the microminiature data center application.

Description

Cluster mirror image deployment method and system for microminiature data center
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a cluster mirror deployment method and system for a microminiature data center.
Background
With the development of computer technology, a container cloud technology appears, a container can encapsulate the whole environment operation of business application, and container mirroring can realize consistency and standardization of application delivery, so that the existing challenges of research and development of business application can be well solved. Business applications for legacy enterprises begin to be containerized.
Kubernetes is abbreviated as k8s and is open source container management software for managing multiple hosts in a cloud platform. However, when the cluster application of the micro-miniature data center is built, the deployment requirements of the micro-miniature data center such as light weight, tailorable performance and the like of k8s cannot be rapidly realized due to the complicated deployment flow and complex components.
Disclosure of Invention
Based on the foregoing, it is necessary to provide a cluster mirror deployment method and system for a micro-miniature data center, which can realize rapid cluster mirror deployment of the micro-miniature data center and improve the application integration delivery speed.
In a first aspect, the present application provides a cluster mirror deployment method for a microminiature data center. The method comprises the following steps:
obtaining a construction request of a client, wherein the construction request comprises path parameters of a k3s cluster mirror image construction file;
acquiring the k3s cluster mirror image construction file based on the path parameters, and analyzing the k3s cluster mirror image construction file to obtain an analysis result;
encapsulating the analysis result into a cluster mirror image packet;
and initializing a k3s cluster and an application in the k3s cluster based on the cluster mirror package to complete cluster mirror deployment.
In one embodiment, the obtaining the construction request of the client includes:
and constructing a command line tool, and acquiring the construction request of the client by using the command line tool.
In one embodiment, the parsing the k3s cluster image building file includes:
analyzing the k3s cluster image construction file to obtain a construction command in the k3s cluster image construction file, wherein the construction command comprises a file header;
converting the construction command into a task list according to the file header of the construction command;
and pulling a cluster initialization material packet of the k3s cluster mirror image construction file from the cloud based on the task list, wherein the cluster initialization material packet stores Yu Jiqun mirror image root file system.
In one embodiment, the encapsulating the parsing result into a cluster mirror package includes:
and packaging the construction command and the cluster initialization material package into the cluster mirror package.
In one embodiment, the build command includes a copy command, a pre-build command, and a post-build command;
the copy command is used for copying the application program or the application configuration file from the user space to the cluster mirror root file system;
the pre-construction command is used for executing a corresponding cluster initialization material packet before initializing the clusters;
the post-construction command is used for executing the corresponding cluster initialization material package after initializing the clusters.
In one embodiment, the method further comprises:
analyzing the k3s cluster mirror image construction file to obtain a custom configuration address in the k3s cluster mirror image construction file;
acquiring a custom configuration file based on the custom configuration address;
and packaging the construction command, the cluster initialization material package and the custom configuration file into the cluster mirror package.
In one embodiment, before the obtaining the construction request of the client, the method further includes:
analyzing the k3s cluster image construction file, and acquiring a temporary cluster model according to the analyzed cluster image information to construct a temporary cluster;
and a cluster mirror image package of the k3s cluster mirror image construction file is led out from the temporary cluster and is stored to the cloud and/or the local.
In one embodiment, the method further comprises:
acquiring a construction request of a client, and acquiring the k3s cluster mirror image construction file based on path parameters in the construction request;
based on the k3s cluster mirror image construction file, acquiring a corresponding cluster mirror image package from the cloud and/or the local;
and initializing a k3s cluster and an application in the k3s cluster based on the cluster mirror package to complete cluster mirror deployment.
In a second aspect, the present application further provides a cluster mirror deployment system for a microminiature data center. The system comprises:
the request acquisition module is used for acquiring a construction request of the client, wherein the construction request comprises path parameters of a k3s cluster mirror image construction file;
the cluster image construction file analysis module is used for acquiring the k3s cluster image construction file based on the path parameters, analyzing the k3s cluster image construction file and obtaining an analysis result; encapsulating the analysis result into a cluster mirror image packet;
and the cluster mirror image command execution module is used for initializing a k3s cluster and the application in the k3s cluster based on the cluster mirror image package to complete cluster mirror image deployment.
In a third aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the above-described aspects.
According to the cluster mirror image deployment method and system for the microminiature data center, the construction request of the client is obtained, and the construction request comprises the path parameters of the k3s cluster mirror image construction file; acquiring the k3s cluster mirror image construction file based on the path parameters, and analyzing the k3s cluster mirror image construction file to obtain an analysis result; encapsulating the analysis result into a cluster mirror image packet; based on the cluster mirror image package, initializing a k3s cluster and applications in the k3s cluster, solving the problem that the lightweight deployment of the microminiature data center cannot be realized rapidly through the k8s cluster in the prior art, and realizing the integration and delivery of the microminiature data center applications.
Drawings
FIG. 1 is an application environment diagram of a cluster mirror deployment method for a miniature data center in one embodiment;
FIG. 2 is a flow diagram of a cluster mirror deployment method for a micro-data center in one embodiment;
FIG. 3 is a flow chart illustrating the parsing of the k3s cluster image build file in step 204 in one embodiment;
FIG. 4 is a flow chart of a cluster mirror deployment method facing a micro data center in one embodiment;
FIG. 5 is a flowchart showing steps before a client's build request is obtained, in one embodiment;
FIG. 6 is a flow chart of another cluster mirror deployment method for a micro-miniature data center in one embodiment;
FIG. 7 is a block diagram of a cluster mirror deployment system facing a micro-data center in one embodiment;
fig. 8 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar terms herein do not denote a limitation of quantity, but rather denote the singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein refers to two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The cluster mirror image deployment method for the microminiature data center provided by the embodiment of the application can be applied to an application environment shown in fig. 1. The client 102 communicates with the cloud server 104 through a network. The data storage system 106 may store data that the cloud server 104 needs to process. The data storage system 106 may be integrated on the cloud server 104 or may be located on another network server.
On a cloud server 104, acquiring a construction request of a client, wherein the construction request comprises path parameters of a k3s cluster mirror image construction file; acquiring the k3s cluster mirror image construction file based on the path parameters, and analyzing the k3s cluster mirror image construction file to obtain an analysis result; encapsulating the analysis result into a cluster mirror image packet; and initializing a k3s cluster and an application in the k3s cluster based on the cluster mirror package to complete cluster mirror deployment.
The client 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, etc. The cloud server 104 may be implemented as a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a cluster mirror deployment method for a micro-miniature data center is provided, and the method is applied to the cloud server in fig. 1 for illustration, and includes the following steps:
step 202, obtaining a construction request of a client, wherein the construction request comprises path parameters of a k3s cluster mirror image construction file.
The k3s container management software is lightweight k8s and is compatible with all k8s API interfaces. The k3s container management software is easy to install, only half of the k8s memory is needed, and all components are in a binary file of less than 100 MB. And the k3s container management software has special optimization processing on scenes such as edge calculation, ioT (Internet of Things) Internet of things and the like, and is very suitable for building a cluster system of a microminiature data center.
Specifically, a k3s cluster mirror image construction file meeting the Kubefile standard is written according to requirements for storage. The k3s cluster mirror image construction file comprises cluster version information, cluster components, cluster construction modes and cluster service components. The k3s cluster mirror image deployment refers to deploying mirror image files of an application program into a k3s cluster, and the containerized application program is deployed in a mirror image form, wherein the mirror image comprises the application program and all runtime environments and files on which the application program depends. And obtaining a construction request of the client, wherein the construction request comprises path parameters of the k3s cluster mirror image construction configuration file.
And 204, acquiring the k3s cluster image construction file based on the path parameters, and analyzing the k3s cluster image construction file to obtain an analysis result.
Specifically, the k3s cluster mirror image construction file is analyzed to obtain an analysis result, wherein the analysis result comprises a construction command and cluster mirror image information. The cluster mirror information comprises cluster version information, cluster components, cluster construction modes and cluster service components.
And step 206, packaging the analysis result into a cluster mirror package.
Specifically, the analysis result of the k3s cluster mirror image construction file is packaged to obtain a cluster mirror image package. And realizing rapid application program mirror deployment by using the cluster mirror package.
And step 208, initializing a k3s cluster and an application in the k3s cluster based on the cluster mirror package, and completing cluster mirror deployment.
In the cluster mirror image deployment method facing the microminiature data center, a construction request of a client is obtained, wherein the construction request comprises path parameters of a k3s cluster mirror image construction file; acquiring the k3s cluster mirror image construction file based on the path parameters, and analyzing the k3s cluster mirror image construction file to obtain an analysis result; encapsulating the analysis result into a cluster mirror image packet; based on the cluster mirror image package, initializing a k3s cluster and applications in the k3s cluster, solving the problem that the lightweight deployment of the microminiature data center cannot be realized rapidly through the k8s cluster in the prior art, and realizing the integration and delivery of the microminiature data center applications.
In one embodiment, the obtaining of the client build request in step 202 includes: and constructing a command line tool, and acquiring the construction request of the client by using the command line tool.
Specifically, a path parameter in a construction request of a client is obtained through a command line tool, and a k3s cluster mirror image construction file is obtained according to the path parameter.
In one embodiment, as shown in fig. 3, in step 204, the resolving result obtained by resolving the k3s cluster image building file specifically includes the following steps:
step 302, analyzing the k3s cluster image construction file to obtain a construction command in the k3s cluster image construction file, wherein the construction command comprises a file header.
The file header is a fixed description based on k3s clusters and mainly comprises a FROM file header, a COPY file header, a RUN file header, a CMD file header and the like.
Step 304, converting the construction command into a task list according to the file header of the construction command.
And 306, pulling a cluster initialization material package of the k3s cluster mirror image construction file from the cloud based on the task list, wherein the cluster initialization material package stores a Yu Jiqun mirror image root file system.
Specifically, according to the file header of the construction command, the construction command is converted into a task list to be executed, and the file header beginning with the FROM can pull a cluster initialization material packet required by the k3s mirror image construction file FROM a cluster mirror image warehouse of the cloud.
The cluster initialization material package comprises a k3s cluster command executable file, a k3s cluster configuration file, a k3s cluster initialization script, a k3s cluster stop script, a k3s cluster uninstallation script, a k3s cluster control plane command line tool and the like.
Wherein, after step 306, encapsulating the parsing result into a cluster mirror package includes: and packaging the construction command and the cluster initialization material package into the cluster mirror package.
In one embodiment, as shown in fig. 4, the method further comprises:
and step 402, analyzing the k3s cluster mirror image construction file to obtain a custom configuration address in the k3s cluster mirror image construction file.
Step 404, obtaining a custom configuration file based on the custom configuration address.
And step 406, packaging the construction command, the cluster initialization material package and the custom configuration file into the cluster mirror package.
Specifically, after the k3s cluster image construction file is written, if additional construction commands exist subsequently, a custom configuration address can be added in the k3s cluster image construction file, and the custom configuration address stores a custom configuration file corresponding to the additional construction commands.
In this embodiment, the k3s cluster mirror image construction file is parsed, and the corresponding cluster initialization material package is grabbed from the cloud according to the parsed construction command, so that the cluster mirror image material package is packaged, the application deployment efficiency is improved, and meanwhile, the k3s cluster mirror image construction file can be adjusted according to the self-defined configuration file as required, so that the lightweight deployment of the microminiature data center is further realized.
In one embodiment, the build commands include a copy command, a pre-build command, and a post-build command. The copy command is used to copy an application program or application configuration file from user space to the cluster mirror root file system. The pre-build command is used for executing a corresponding cluster initialization package before initializing the cluster. The post-construction command is used for executing the corresponding cluster initialization material package after initializing the clusters.
Specifically, the copy command may replicate the following: executable files, application configuration files, folders, and the like. The pre-build command may perform the following: downloading file packages from the cloud, decompressing, replacing file content, and the like. The post-build command may perform the following: the yaml configuration file is applied based on the k3s command line tool, the k3s workload copy number is changed, and the like.
In one embodiment, as shown in fig. 5, before step 202 obtains the client's build request, the method further includes:
and step 502, analyzing the k3s cluster image construction file, and acquiring a temporary cluster model according to the analyzed cluster image information to construct a temporary cluster.
Specifically, a temporary cluster model is determined according to the cluster version information obtained after analysis, and the cluster component and the cluster service component are deployed into the temporary cluster model according to the cluster construction mode to construct a temporary cluster.
And step 504, deriving a cluster image package of the k3s cluster image construction file from the temporary cluster, and storing the cluster image package to a cloud and/or a local.
Specifically, a cluster mirror package of the k3s cluster mirror construction file is derived from the temporary cluster, so that the slave storage space required by cluster construction is reduced, and the obtained cluster mirror package is stored to the cloud and/or local.
Illustratively, as shown in FIG. 6, the method further comprises:
step 602, obtaining a construction request of a client, and obtaining the k3s cluster mirror image construction file based on path parameters in the construction request.
Step 604, obtaining a corresponding cluster mirror package from the cloud and/or the local based on the k3s cluster mirror building file.
And step 606, initializing a k3s cluster and an application in the k3s cluster based on the cluster mirror package, and completing cluster mirror deployment.
Specifically, the k3s cluster mirror image construction file is obtained according to the construction request, a corresponding cluster mirror image package is preferentially obtained from the cloud and/or the local according to the k3s cluster mirror image construction file, if the corresponding mirror image package does not exist in the cloud and/or the local, the k3s cluster mirror image construction file is analyzed, and a cluster initial material package is pulled from the cloud according to the analyzed construction command and is packaged into a cluster mirror image package.
In the embodiment, a cluster mirror image package is built through the temporary cluster, and the whole cluster is quickly started through inquiring the stored cluster mirror image package, so that service response and deployment efficiency are improved.
In an example embodiment, a cluster mirror deployment method for a microminiature data center is provided, which specifically includes the following steps:
step 1: and writing a k3s cluster mirror image construction file meeting the Kubefile standard according to the requirement for storage.
Step 2: and obtaining a construction request of the client, wherein the construction request comprises path parameters of the k3s cluster mirror image construction configuration file.
Step 3: and analyzing the k3s cluster mirror image construction file to obtain a construction command and a custom configuration address in the k3s cluster mirror image construction file. And converting the construction command into a task list according to the file header of the construction command. And pulling a cluster initialization material package storage Yu Jiqun mirror root file system of the k3s cluster mirror construction file from the cloud based on the task list. And obtaining the custom configuration file according to the custom configuration address.
Step 4: and packaging the construction command, the cluster initialization material package and the custom configuration file into the cluster mirror package.
Step 5: and initializing the k3s cluster and the application in the k3s cluster based on the cluster mirror package to complete the cluster mirror deployment.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a cluster mirror image deployment system facing the microminiature data center, which is used for realizing the cluster mirror image deployment method facing the microminiature data center. The implementation scheme of the solution provided by the system is similar to the implementation scheme recorded in the method, so the specific limitation in the embodiment of the cluster mirror deployment system for the microminiature data center provided below can be referred to the limitation of the cluster mirror deployment method for the microminiature data center hereinabove, and the description is omitted here.
In one embodiment, as shown in fig. 7, there is provided a cluster mirror deployment system for a microminiature data center, including: a request acquisition module 71, a cluster image construction file parsing module 72 and a cluster image command execution module 73, wherein:
the request acquisition module 71 is configured to acquire a construction request of the client, where the construction request includes a path parameter of the k3s cluster mirror image construction file.
The cluster image construction file analysis module 72 is configured to obtain the k3s cluster image construction file based on the path parameter, and analyze the k3s cluster image construction file to obtain an analysis result; and packaging the analysis result into a cluster mirror image package.
The cluster mirror command execution module 73 is configured to initialize the k3s cluster and the application in the k3s cluster based on the cluster mirror packet, and complete the cluster mirror deployment.
In one embodiment, the request acquisition module 71 is further configured to: and constructing a command line tool, and acquiring the construction request of the client by using the command line tool.
In one embodiment, the cluster image build file parsing module 72 is further configured to: analyzing the k3s cluster image construction file to obtain a construction command in the k3s cluster image construction file, wherein the construction command comprises a file header; converting the construction command into a task list according to the file header of the construction command; and pulling a cluster initialization material packet of the k3s cluster mirror image construction file from the cloud based on the task list, wherein the cluster initialization material packet stores Yu Jiqun mirror image root file system.
In one embodiment, the cluster image build file parsing module 72 is further configured to: and packaging the construction command and the cluster initialization material package into the cluster mirror package.
In one embodiment, the build command includes a copy command, a pre-build command, and a post-build command; the copy command is used for copying the application program or the application configuration file from the user space to the cluster mirror root file system; the pre-construction command is used for executing a corresponding cluster initialization material packet before initializing the clusters; the post-construction command is used for executing the corresponding cluster initialization material package after initializing the clusters.
In one embodiment, the cluster image build file parsing module 72 is further configured to: analyzing the k3s cluster mirror image construction file to obtain a custom configuration address in the k3s cluster mirror image construction file; acquiring a custom configuration file based on the custom configuration address; and packaging the construction command, the cluster initialization material package and the custom configuration file into the cluster mirror package.
In one embodiment, the cluster image build file parsing module 72 is further configured to: analyzing the k3s cluster image construction file, and acquiring a temporary cluster model according to the analyzed cluster image information to construct a temporary cluster; and a cluster mirror image package of the k3s cluster mirror image construction file is led out from the temporary cluster and is stored to the cloud and/or the local.
In one embodiment, the cluster image build file parsing module 72 is further configured to: and based on the k3s cluster mirror image construction file, acquiring a corresponding cluster mirror image package from the cloud and/or the local.
The modules in the cluster mirror image deployment system facing the microminiature data center can be realized by all or part of software, hardware and the combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 8. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by the processor, implements a cluster mirror deployment method for a microminiature data center.
It will be appreciated by those skilled in the art that the structure shown in fig. 8 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
s1, acquiring a construction request of a client, wherein the construction request comprises path parameters of a k3S cluster mirror image construction file.
S2, acquiring the k3S cluster image construction file based on the path parameters, and analyzing the k3S cluster image construction file to obtain an analysis result.
S3, packaging the analysis result into a cluster mirror image package.
And S4, initializing a k3S cluster and the application in the k3S cluster based on the cluster mirror image package, and completing cluster mirror image deployment.
In one embodiment, the processor when executing the computer program further performs the steps of: and constructing a command line tool, and acquiring the construction request of the client by using the command line tool.
In one embodiment, the processor when executing the computer program further performs the steps of: analyzing the k3s cluster image construction file to obtain a construction command in the k3s cluster image construction file, wherein the construction command comprises a file header; converting the construction command into a task list according to the file header of the construction command; and pulling a cluster initialization material packet of the k3s cluster mirror image construction file from the cloud based on the task list, wherein the cluster initialization material packet stores Yu Jiqun mirror image root file system.
In one embodiment, the processor when executing the computer program further performs the steps of: and packaging the construction command and the cluster initialization material package into the cluster mirror package.
In one embodiment, the copy command is used to copy an application program or application configuration file from user space to the cluster mirror root file system; the pre-construction command is used for executing a corresponding cluster initialization material packet before initializing the clusters; the post-construction command is used for executing the corresponding cluster initialization material package after initializing the clusters.
In one embodiment, the processor when executing the computer program further performs the steps of: analyzing the k3s cluster mirror image construction file to obtain a custom configuration address in the k3s cluster mirror image construction file; acquiring a custom configuration file based on the custom configuration address; and packaging the construction command, the cluster initialization material package and the custom configuration file into the cluster mirror package.
In one embodiment, the processor when executing the computer program further performs the steps of: analyzing the k3s cluster image construction file, and acquiring a temporary cluster model according to the analyzed cluster image information to construct a temporary cluster; and a cluster mirror image package of the k3s cluster mirror image construction file is led out from the temporary cluster and is stored to the cloud and/or the local.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a construction request of a client, and acquiring the k3s cluster mirror image construction file based on path parameters in the construction request; based on the k3s cluster mirror image construction file, acquiring a corresponding cluster mirror image package from the cloud and/or the local; and initializing a k3s cluster and an application in the k3s cluster based on the cluster mirror package to complete cluster mirror deployment.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
s1, acquiring a construction request of a client, wherein the construction request comprises path parameters of a k3S cluster mirror image construction file.
S2, acquiring the k3S cluster image construction file based on the path parameters, and analyzing the k3S cluster image construction file to obtain an analysis result.
S3, packaging the analysis result into a cluster mirror image package.
And S4, initializing a k3S cluster and the application in the k3S cluster based on the cluster mirror image package, and completing cluster mirror image deployment.
In one embodiment, the computer program when executed by the processor further performs the steps of: and constructing a command line tool, and acquiring the construction request of the client by using the command line tool.
In one embodiment, the computer program when executed by the processor further performs the steps of: analyzing the k3s cluster image construction file to obtain a construction command in the k3s cluster image construction file, wherein the construction command comprises a file header; converting the construction command into a task list according to the file header of the construction command; and pulling a cluster initialization material packet of the k3s cluster mirror image construction file from the cloud based on the task list, wherein the cluster initialization material packet stores Yu Jiqun mirror image root file system.
In one embodiment, the computer program when executed by the processor further performs the steps of: and packaging the construction command and the cluster initialization material package into the cluster mirror package.
In one embodiment, the copy command is used to copy an application program or application configuration file from user space to the cluster mirror root file system; the pre-construction command is used for executing a corresponding cluster initialization material packet before initializing the clusters; the post-construction command is used for executing the corresponding cluster initialization material package after initializing the clusters.
In one embodiment, the computer program when executed by the processor further performs the steps of: analyzing the k3s cluster mirror image construction file to obtain a custom configuration address in the k3s cluster mirror image construction file; acquiring a custom configuration file based on the custom configuration address; and packaging the construction command, the cluster initialization material package and the custom configuration file into the cluster mirror package.
In one embodiment, the computer program when executed by the processor further performs the steps of: analyzing the k3s cluster image construction file, and acquiring a temporary cluster model according to the analyzed cluster image information to construct a temporary cluster; and a cluster mirror image package of the k3s cluster mirror image construction file is led out from the temporary cluster and is stored to the cloud and/or the local.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a construction request of a client, and acquiring the k3s cluster mirror image construction file based on path parameters in the construction request; based on the k3s cluster mirror image construction file, acquiring a corresponding cluster mirror image package from the cloud and/or the local; and initializing a k3s cluster and an application in the k3s cluster based on the cluster mirror package to complete cluster mirror deployment.
In an embodiment a computer program product is provided comprising a computer program which, when executed by a processor, implements the steps corresponding to the methods described in the embodiments above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric RandomAccess Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can take many forms, such as static Random access memory (Static Random Access Memory, SRAM) or Dynamic Random access memory (Dynamic Random AccessMemory, DRAM), among others. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (8)

1.一种面向微小型数据中心的集群镜像部署方法,其特征在于,所述方法包括:1. A cluster image deployment method for micro-small data centers, characterized in that the method includes: 获取客户端的构建请求,所述构建请求包括k3s集群镜像构建文件的路径参数;Obtain the client's build request, which includes the path parameter of the k3s cluster image build file; 基于所述路径参数获取所述k3s集群镜像构建文件,并对所述k3s集群镜像构建文件进行解析,得到所述k3s集群镜像构建文件中的构建命令,所述构建命令包括文件头;根据所述构建命令的文件头,将所述构建命令转换为任务列表;基于所述任务列表,从云端中拉取所述k3s集群镜像构建文件的集群初始化物料包,所述集群初始化物料包存储于集群镜像根文件系统;Obtain the k3s cluster image build file based on the path parameter, parse the k3s cluster image build file, and obtain the build command in the k3s cluster image build file, where the build command includes a file header; according to Build the file header of the command, and convert the build command into a task list; based on the task list, pull the cluster initialization material package of the k3s cluster image build file from the cloud, and the cluster initialization material package is stored in the cluster image root file system; 将所述构建命令以及所述集群初始化物料包封装为集群镜像包;Encapsulate the build command and the cluster initialization material package into a cluster image package; 基于所述集群镜像包,初始化k3s集群以及所述k3s集群内的应用,完成集群镜像部署。Based on the cluster image package, the k3s cluster and the applications in the k3s cluster are initialized to complete the cluster image deployment. 2.根据权利要求1所述的面向微小型数据中心的集群镜像部署方法,其特征在于,所述获取客户端的构建请求包括:2. The cluster image deployment method for micro-small data centers according to claim 1, characterized in that said obtaining the client's build request includes: 构建命令行工具,利用所述命令行工具获取所述客户端的所述构建请求。Build a command line tool, and use the command line tool to obtain the build request of the client. 3.根据权利要求1所述的面向微小型数据中心的集群镜像部署方法,其特征在于,所述构建命令包括拷贝命令、前构建命令以及后构建命令;3. The cluster image deployment method for micro-small data centers according to claim 1, wherein the build command includes a copy command, a pre-build command and a post-build command; 所述拷贝命令用于将应用程序或应用配置文件从用户空间拷贝到所述集群镜像根文件系统;The copy command is used to copy an application or application configuration file from user space to the cluster image root file system; 所述前构建命令用于在初始化集群前执行对应的集群初始化物料包;The pre-build command is used to execute the corresponding cluster initialization material package before initializing the cluster; 所述后构建命令用于在初始化集群后执行对应的集群初始化物料包。The post-build command is used to execute the corresponding cluster initialization material package after initializing the cluster. 4.根据权利要求1所述的面向微小型数据中心的集群镜像部署方法,其特征在于,所述方法还包括:4. The cluster image deployment method for micro-small data centers according to claim 1, characterized in that the method further includes: 对所述k3s集群镜像构建文件进行解析,得到所述k3s集群镜像构建文件中的自定义配置地址;Parse the k3s cluster image build file to obtain the custom configuration address in the k3s cluster image build file; 基于所述自定义配置地址,获取自定义配置文件;Obtain a custom configuration file based on the custom configuration address; 将所述构建命令和所述集群初始化物料包以及所述自定义配置文件封装成所述集群镜像包。The build command, the cluster initialization material package, and the custom configuration file are packaged into the cluster image package. 5.根据权利要求1所述的面向微小型数据中心的集群镜像部署方法,其特征在于,所述获取客户端的构建请求之前,所述方法还包括:5. The cluster image deployment method for micro-small data centers according to claim 1, characterized in that before obtaining the client's build request, the method further includes: 对所述k3s集群镜像构建文件进行解析,根据解析后得到的集群镜像信息获取临时集群模型构建临时集群;Parse the k3s cluster image construction file, obtain the temporary cluster model and build a temporary cluster based on the cluster image information obtained after analysis; 从所述临时集群中导出所述k3s集群镜像构建文件的集群镜像包存储至云端和/或本地。The cluster image package exporting the k3s cluster image construction file from the temporary cluster is stored in the cloud and/or locally. 6.根据权利要求5所述的面向微小型数据中心的集群镜像部署方法,其特征在于,所述方法还包括:6. The cluster image deployment method for micro-small data centers according to claim 5, characterized in that the method further includes: 获取客户端的构建请求,基于所述构建请求中的路径参数,获取所述k3s集群镜像构建文件;Obtain the client's build request, and obtain the k3s cluster image build file based on the path parameter in the build request; 基于所述k3s集群镜像构建文件,从云端和/或本地中获取对应的集群镜像包;Based on the k3s cluster image construction file, obtain the corresponding cluster image package from the cloud and/or locally; 基于所述集群镜像包,初始化k3s集群以及所述k3s集群内的应用,完成集群镜像部署。Based on the cluster image package, the k3s cluster and the applications in the k3s cluster are initialized to complete the cluster image deployment. 7.一种面向微小型数据中心的集群镜像部署系统,其特征在于,所述系统包括:7. A cluster image deployment system for micro-small data centers, characterized in that the system includes: 请求获取模块,用于获取客户端的构建请求,所述构建请求包括k3s集群镜像构建文件的路径参数;The request acquisition module is used to obtain the client's build request, which includes the path parameter of the k3s cluster image build file; 集群镜像构建文件解析模块,用于基于所述路径参数获取所述k3s集群镜像构建文件,并对所述k3s集群镜像构建文件进行解析,得到所述k3s集群镜像构建文件中的构建命令,所述构建命令包括文件头;根据所述构建命令的文件头,将所述构建命令转换为任务列表;基于所述任务列表,从云端中拉取所述k3s集群镜像构建文件的集群初始化物料包,所述集群初始化物料包存储于集群镜像根文件系统;将所述构建命令以及所述集群初始化物料包封装为集群镜像包;A cluster image build file parsing module is used to obtain the k3s cluster image build file based on the path parameter, and parse the k3s cluster image build file to obtain the build command in the k3s cluster image build file, where The build command includes a file header; according to the file header of the build command, the build command is converted into a task list; based on the task list, the cluster initialization material package of the k3s cluster image build file is pulled from the cloud, so The cluster initialization material package is stored in the cluster image root file system; the build command and the cluster initialization material package are encapsulated into a cluster image package; 集群镜像命令执行模块,用于基于所述集群镜像包,初始化k3s集群以及所述k3s集群内的应用,完成集群镜像部署。The cluster image command execution module is used to initialize the k3s cluster and the applications in the k3s cluster based on the cluster image package to complete the cluster image deployment. 8.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至权利要求6中任一项所述的方法的步骤。8. A computer-readable storage medium with a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
CN202311636742.9A 2023-12-01 2023-12-01 Cluster mirror deployment method and system for micro and small data centers Active CN117331578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311636742.9A CN117331578B (en) 2023-12-01 2023-12-01 Cluster mirror deployment method and system for micro and small data centers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311636742.9A CN117331578B (en) 2023-12-01 2023-12-01 Cluster mirror deployment method and system for micro and small data centers

Publications (2)

Publication Number Publication Date
CN117331578A CN117331578A (en) 2024-01-02
CN117331578B true CN117331578B (en) 2024-03-26

Family

ID=89283468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311636742.9A Active CN117331578B (en) 2023-12-01 2023-12-01 Cluster mirror deployment method and system for micro and small data centers

Country Status (1)

Country Link
CN (1) CN117331578B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045424A1 (en) * 2015-09-18 2017-03-23 乐视控股(北京)有限公司 Application program deployment system and deployment method
CN112346752A (en) * 2020-12-03 2021-02-09 江苏云坤信息科技有限公司 Software environment rapid deployment method based on jenkins and K3S
CN112416524A (en) * 2020-11-25 2021-02-26 电信科学技术第十研究所有限公司 Implementation method and device of cross-platform CI/CD (compact disc/compact disc) based on docker and kubernets offline
CN112631614A (en) * 2020-12-30 2021-04-09 平安证券股份有限公司 Application deployment method and device, computer equipment and storage medium
WO2021217871A1 (en) * 2020-04-28 2021-11-04 平安科技(深圳)有限公司 Method and apparatus for deploying micro service cluster, computer device and storage medium
CN116820500A (en) * 2023-07-07 2023-09-29 南方电网数字平台科技(广东)有限公司 Cluster mirror image deployment method, device, equipment and storage medium
CN117112122A (en) * 2022-05-17 2023-11-24 北京京东振世信息技术有限公司 Cluster deployment method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11698780B2 (en) * 2021-04-21 2023-07-11 Hewlett Packard Enterprise Development Lp Deployment and configuration of an edge site based on declarative intents indicative of a use case
EP4392870A4 (en) * 2022-02-09 2025-03-05 Harpoon Corp VISUAL CLUSTER DEPLOYMENT AND OPERATING SYSTEM AND PROCEDURES

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045424A1 (en) * 2015-09-18 2017-03-23 乐视控股(北京)有限公司 Application program deployment system and deployment method
WO2021217871A1 (en) * 2020-04-28 2021-11-04 平安科技(深圳)有限公司 Method and apparatus for deploying micro service cluster, computer device and storage medium
CN112416524A (en) * 2020-11-25 2021-02-26 电信科学技术第十研究所有限公司 Implementation method and device of cross-platform CI/CD (compact disc/compact disc) based on docker and kubernets offline
CN112346752A (en) * 2020-12-03 2021-02-09 江苏云坤信息科技有限公司 Software environment rapid deployment method based on jenkins and K3S
CN112631614A (en) * 2020-12-30 2021-04-09 平安证券股份有限公司 Application deployment method and device, computer equipment and storage medium
CN117112122A (en) * 2022-05-17 2023-11-24 北京京东振世信息技术有限公司 Cluster deployment method and device
CN116820500A (en) * 2023-07-07 2023-09-29 南方电网数字平台科技(广东)有限公司 Cluster mirror image deployment method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Linux集群节点自动化部署方法与实现;许兆新;周长林;;应用科技(第10期);全文 *
基于K3s的边缘计算在泛在电力物联网的技术研究;王海庆;杨永宁;白姗;;科技资讯;20191203(第34期);全文 *

Also Published As

Publication number Publication date
CN117331578A (en) 2024-01-02

Similar Documents

Publication Publication Date Title
US11010681B2 (en) Distributed computing system, and data transmission method and apparatus in distributed computing system
US9436507B2 (en) Composing and executing workflows made up of functional pluggable building blocks
US20160012350A1 (en) Interoperable machine learning platform
CN111625316A (en) Environment deployment method and device, electronic equipment and storage medium
US20230108560A1 (en) Methods and Systems for Representation, Composition and Execution of Artificial Intelligence Centric Applications
WO2022148390A1 (en) Methods for deploying, updating and calling smart contract in blockchain
CN113177034B (en) A cross-platform unified distributed graph data processing method
US20200034484A1 (en) User-defined analysis of distributed metadata
CN114567584B (en) Routing information processing method, device, computer equipment and storage medium
CN108121591A (en) A kind of implementation method and device of Kubernetes nodes
CN105474177A (en) Distributed processing system, distributed processing device, distributed processing method, and distributed processing program
US9971751B1 (en) Version-specific request processing
CN112052011A (en) Method and device for combining small programs, electronic equipment and medium
CN115576677A (en) Task flow scheduling management system and method for rapid processing of batch remote sensing data
US20240004853A1 (en) Virtual data source manager of data virtualization-based architecture
US11960616B2 (en) Virtual data sources of data virtualization-based architecture
CN116414525A (en) Implementation method, reasoning method and related device of high concurrency reasoning service
US20160328410A1 (en) System and method for providing a climate data persistence service
CN115544968A (en) A method, system, device and storage medium compatible with multi-item device tree
CN117331578B (en) Cluster mirror deployment method and system for micro and small data centers
CN107222363A (en) One kind storage protocol conformance test method and system
US11263026B2 (en) Software plugins of data virtualization-based architecture
CN117421160A (en) Data backup method, device, computer equipment and storage medium
CN114296883B (en) A method for constructing and scheduling a light-load virtualized network experimental behavior simulator
JP7516263B2 (en) Distributed computing system with a frameset package store of synthetic data as a service - Patents.com

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