Nothing Special   »   [go: up one dir, main page]

CN117112122A - Cluster deployment method and device - Google Patents

Cluster deployment method and device Download PDF

Info

Publication number
CN117112122A
CN117112122A CN202210535242.5A CN202210535242A CN117112122A CN 117112122 A CN117112122 A CN 117112122A CN 202210535242 A CN202210535242 A CN 202210535242A CN 117112122 A CN117112122 A CN 117112122A
Authority
CN
China
Prior art keywords
target object
container
cluster
starting
mirror 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.)
Pending
Application number
CN202210535242.5A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202210535242.5A priority Critical patent/CN117112122A/en
Publication of CN117112122A publication Critical patent/CN117112122A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

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

Abstract

The invention discloses a cluster deployment method and device, and relates to the technical field of computers. One embodiment of the method comprises the following steps: pulling the mirror image of the target object cluster from a mirror image warehouse according to the identification of the mirror image of the target object cluster; performing arrangement operation on the management node and the working node to obtain an arrangement file; and starting the container instance in the target object cluster by using the arrangement file so as to start corresponding nodes in the target object cluster according to the input starting parameters. The implementation method fills the blank of the cluster in the aspect of containerization deployment, and solves the problem of recovery of the instance downtime fault of the cluster in the containerization scene by forcedly designating the priority network and disk mounting.

Description

Cluster deployment method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a cluster deployment method and apparatus.
Background
Currently, when a technician develops and deploys the Doris related service, the service can only be deployed through a Linux server or a Linux virtual machine, the Doris component related installation package is stored in the Linux server or the Linux virtual machine, then the installation and the configuration of each dependent component are sequentially completed, and finally the related service is started. If the Doris needs to be deployed in the cloud environment, the deployment can only be realized through a scheme of a cloud virtual host (Linux virtual machine), and a deployment strategy based on the containerized environment is not available.
In carrying out the present invention, the inventors have found that at least the following problems exist in the prior art: based on the deployment mode of the Linux server or the Linux virtual machine, the method is easily influenced by the current server environment factors, so that various environment problems such as unmatched server versions, lack of dependent packages, unmatched related dependent package versions and the like occur; the deployment of the components on which the Doris related service depends is completed manually, the deployment is troublesome, time-consuming and labor-consuming, and the deployment is inflexible in capacity expansion and contraction operation.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a cluster deployment method and apparatus, which at least can solve the problem that there is no deployment cluster based on a containerized environment in the prior art.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided
Pulling the mirror image of the target object cluster from a mirror image warehouse according to the identification of the mirror image of the target object cluster; the mirror image comprises a management node and a working node of the cluster;
performing arrangement operation on the management node and the working node to obtain an arrangement file;
and starting the container instance in the target object cluster by using the arrangement file so as to start corresponding nodes in the target object cluster according to the input starting parameters.
Optionally, before the pulling the mirror image of the target object cluster from the mirror image warehouse according to the identification of the mirror image of the target object cluster, the method further includes:
receiving an edited image construction file; the image construction file comprises a plurality of instructions for constructing a target object cluster image;
the plurality of instructions are executed in a server hosting the container engine to construct a target object cluster image and upload to an image repository.
Optionally, before the receiving the edited image building file, the method further includes:
acquiring information on which a target object cluster is deployed; the information comprises a target object installation package, a language operation environment package, client information and a basic mirror image; the client is used for submitting tasks to the object management node for processing, and the basic mirror image is an upper layer mirror image on which the target object cluster mirror image is made.
Optionally, the method further comprises:
receiving the edited container starting script, and packaging the container starting script into a target object cluster mirror image; wherein the container launch script has a command to install a deployment and launch a target object container instance;
the using the orchestration file to launch container instances in a target object cluster includes: and starting the container instance by using the container starting script and the programming file.
Optionally, arranging the file includes: resource control information, IP address information of a container, disk mounting information and port mapping information;
the resource control information comprises a use threshold value of resources in the container, the disk mounting information is used for mounting data of target object clusters in the container to the outside of the container, and the port mapping information comprises mapping ports in the container to hosts outside the container.
Optionally, the starting the corresponding node in the target object cluster according to the input starting parameter includes:
in the process of starting the target object container instance, receiving the input starting parameter, and starting the management node in response to the starting parameter as the management node parameter; or (b)
And detecting whether the management node is started successfully or not in response to the starting parameter being the working node parameter, starting the working node in response to the detection result being the successful starting, and otherwise determining that the working node is failed to start.
Optionally, the method further comprises: when a plurality of IP addresses exist in the host, a target IP address is configured for each target object container instance in a preferential network mode.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a cluster deployment apparatus, including:
the pulling module is used for pulling the mirror image of the target object cluster from the mirror image warehouse according to the identification of the mirror image of the target object cluster; the mirror image comprises a management node and a working node of the cluster;
the arrangement module is used for carrying out arrangement operation on the management node and the working node to obtain an arrangement file;
and the starting module is used for starting the container instance in the target object cluster by using the arrangement file so as to start the corresponding node in the target object cluster according to the input starting parameter.
Optionally, the method further comprises a construction module for:
receiving an edited image construction file; the image construction file comprises a plurality of instructions for constructing a target object cluster image;
the plurality of instructions are executed in a server hosting the container engine to construct a target object cluster image and upload to an image repository.
Optionally, the building module is further configured to:
acquiring information on which a target object cluster is deployed; the information comprises a target object installation package, a language operation environment package, client information and a basic mirror image; the client is used for submitting tasks to the object management node for processing, and the basic mirror image is an upper layer mirror image on which the target object cluster mirror image is made.
Optionally, the building module is further configured to:
receiving the edited container starting script, and packaging the container starting script into a target object cluster mirror image; wherein the container launch script has a command to install a deployment and launch a target object container instance;
the using the orchestration file to launch container instances in a target object cluster includes: and starting the container instance by using the container starting script and the programming file.
Optionally, arranging the file includes: resource control information, IP address information of a container, disk mounting information and port mapping information;
the resource control information comprises a use threshold value of resources in the container, the disk mounting information is used for mounting data of target object clusters in the container to the outside of the container, and the port mapping information comprises mapping ports in the container to hosts outside the container.
Optionally, the starting module is configured to:
in the process of starting the target object container instance, receiving the input starting parameter, and starting the management node in response to the starting parameter as the management node parameter; or (b)
And detecting whether the management node is started successfully or not in response to the starting parameter being the working node parameter, starting the working node in response to the detection result being the successful starting, and otherwise determining that the working node is failed to start.
Optionally, the method further comprises:
when a plurality of IP addresses exist in the host, a target IP address is configured for each target object container instance in a preferential network mode.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a cluster deployment electronic device.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the cluster deployment method.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program, which when executed by a processor, implements any of the cluster deployment methods described above.
According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: the method for containerizing the Doris related components is provided, so that the problems existing in the prior art are solved, and the method has the advantages that: 1. enabling Doris to have the capability of providing services in a containerized environment; 2. shielding the influence of external environmental factors on the Doris main service; 3. the workload of manual deployment is reduced, and the deployment cost is reduced; 4. the flexibility of service expansion capacity is improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of a cluster deployment method according to an embodiment of the present invention;
FIG. 2 is a diagram of a Doris cluster container orchestration model;
FIG. 3 is a schematic diagram of the main modules of a cluster deployment apparatus according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 5 is a schematic diagram of a computer system suitable for use in implementing a mobile device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Referring to fig. 1, a main flowchart of a cluster deployment method provided by an embodiment of the present invention is shown, including the following steps:
s101: pulling the mirror image of the target object cluster from a mirror image warehouse according to the identification of the mirror image of the target object cluster; the mirror image comprises a management node and a working node of the cluster;
s102: performing arrangement operation on the management node and the working node to obtain an arrangement file;
s103: and starting the container instance in the target object cluster by using the arrangement file so as to start corresponding nodes in the target object cluster according to the input starting parameters.
In the above embodiment, for steps S101 to S102, apache Doris is a modern MPP analysis database product, and only a response time of sub-second order is needed to obtain the query result, so as to effectively support real-time data analysis. The distributed architecture is very concise and easy to operate and maintain, and can support ultra-large data sets of more than 10 PB. Doris communicates using MySQL protocol, and users can connect to Doris clusters through MySQL clients or MySQL JDBC.
The image is a read-only template, which is the basis for creating containers, and provides a simple set of mechanisms to create and update existing images through version management and incremental file systems. In the scheme, master and worker services are packaged into a mirror image, and the master is a management node of a Doris cluster and is responsible for task issuing and cluster management; the worker is a working node of the Doris cluster, receives tasks from the master node and is responsible for executing specific tasks.
The container is an running instance of the mirror, and a writable layer is created at the uppermost layer of the mirror. The Docker container is an open-source application container engine, so that a developer can package applications and rely on packages to a lightweight, portable container, then issue to a Linux machine, and also can realize virtualization. The container completely uses a sandbox mechanism, does not have any interfaces with each other, has almost no performance overhead, and does not depend on any language and framework including a system. The Docker mirror can implement multiple runs at a time.
The main application scene of the scheme is as follows: the cloud environment where the cluster (such as the Doris cluster) needs to be deployed is taken as a platform Service provider, and a solution of PaaS (Platform as a Service ) or SaaS (Software as a Service) Service of the cluster is provided for an enterprise on a cloud platform.
Information on which the Doris cluster is deployed is obtained, such as a Doris installation package, JDK (Java Development Kit, java language software development kit), mySQL client, and cents 7 base image. The foundation image is an upper layer image on which the Doris cluster image is made, wherein the central s7 foundation image is a Docker image with programs, libraries, resources and the like required by the central s7 operating system, and is the foundation of Doris operation. The Doris cluster is divided into two roles of a master and a worker, and the MySQL client is used for submitting tasks to the master so as to distribute the tasks to the worker for processing through the master.
Writing a Dockerf file containing all commands that a user can call on a command line to perform mirror assembly. When additional requirements need to be customized, only instructions need to be added or modified in the Dockerfile file, and the image is regenerated.
Instructions in the Dockerfile file can be divided into two types according to role: a build instruction and a set instruction, the build instruction is used for building an image, and the specified operation of the build instruction is not executed on a container for running the image; the setting instruction is used to set the attribute of the image, and the specified operation thereof is to be performed in the container running the image. If the base image is specified using the From instruction, the environment variable is set using the Env instruction, the image creator information is specified using the mainainer instruction, and the operations performed at the start of the container are set using the Cmd, entrypoint instruction. If the MySQL client is installed, an anonymous data volume is specified, and if the data volume is forgotten to be installed when the Doris container instance is started, the data volume is automatically installed on the anonymous volume; the specified data volume is a specified external mounting disk, otherwise, some production data, log data and the like generated by the container are stored in the container, and the container destruction data is lost.
In a server provided with a Docker container engine, the Docker generates a Doris cluster mirror image by reading and executing an instruction Docker build-t Doris: v1-f Dockerfile in a Docker container file so as to upload the Doris cluster mirror image to a mirror image warehouse, thereby facilitating the subsequent pulling of the Doris cluster mirror image from the mirror image warehouse. An entrypoint. Sh startup script may also be written that is also packaged into a Doris cluster image for use in subsequently starting Doris container instances in the Doris cluster.
After the Doris cluster images are uploaded to the image warehouse, a document arranging link is entered, and the document arranging link is shown in fig. 2. The arrangement file will pull the Doris cluster image from the image warehouse according to the image identification (such as version number), which is the same way that a general dosker container is arranged. The container arrangement is a tool for arranging the Docker containers, defines and runs the application of multiple containers, and can start multiple containers by one command. The programming may be performed by a programming tool such as a Docker-composition or Kubernetes.
The Docker-composition orchestration tool needs to be pre-installed, and the Docker-composition project is an open source project of the Docker official and is responsible for realizing the rapid orchestration of the Docker container clusters. The Docker-compound divides the managed containers into three layers, project (project), service (service) and container (container), respectively. All files (Docker-composition. Yml, extensions files or environment variable files, etc.) under the Docker-composition running directory form a project, and if no special designation exists, the project name is the current directory name. An engineering may include a plurality of services, each defining images, parameters, and dependencies of container operations. Multiple container instances may be included in a service, and the problem of load balancing is not solved by the Docker-compound, so service discovery and load balancing need to be achieved by other tools.
The engineering configuration FILE of the Docker-compound defaults to Docker-component. Yml, which can be customized through the environment variable COMPOSE_FILE or-f parameters, defines a plurality of dependent services and the container in which each service runs. The scheme can use the Docker-composition.yml to perform deployment configuration and resource management arrangement on each node forming the Doris cluster, then start the whole Doris cluster through a Docker-composition up one-key, and also can arrange and start the Doris cluster through an arrangement tool of open sources such as Kubernetes and the like.
In the Docker-component. Yml, each management node and worker node needs to specify resource control, IP address, disk mount, and port map, each instance (or service) is running in a container, the role of each module is detailed below:
1) And (3) resource control: limiting usage thresholds of CPU and memory inside a container
2) IP address: specifying IP address of container
3) Disk mounting: metadata and data of the Doris cluster in the container are mounted to the container for external storage, so that data loss caused by container destruction is avoided, and cluster container downtime recovery is facilitated
Furthermore, disk mounting is a precondition for downtime recovery. Only if the data is mounted outside, the problem that the data is lost when the container is down can be avoided. The new Doris container instance can replace the downed Doris container instance only if the data is not lost, the configuration information and the like are not changed. In addition, the disk mounting has other functions, such as: the log data is mounted outside, which is beneficial to the inquiry question and the like.
4) Port mapping: network ports within the container are mapped to hosts outside the container to facilitate connection of the Doris cluster and log viewing (each service of Doris would generate a log).
For step S103, the starting of the Doris container instance in the Doris cluster is finally performed. The Doris cluster is divided into two roles of a master and a worker, starting parameters are required to be transmitted in the process of compiling files, the effective parameters are the master and the worker, other parameters are invalid, and if the parameters are the starting master parameters, the master service is started; if the worker parameters are started, the worker service is started, and the Doris cluster starts one master service and a plurality of worker services. If the parameters are invalid, the starting fails. In addition, the master service relied on when the worker service starts needs to start successfully, otherwise, the worker service fails to start.
In addition, in the containerized orchestration environment such as Kubernetes multi-network card, the Doris cluster is deployed in a fixed IP mode because of the existence of the multi-network card, and a plurality of different IP addresses may exist in the same host. The current Doris container instance cannot automatically identify the available IP address, and a network card network is generally randomly bound, if the Doris container instance is destroyed, a network is reconstructed, and a network card network is randomly bound again. If the two binding networks are inconsistent, the original Doris cluster cannot be connected, because the metadata information reserved by the cluster is the information of the last network.
When multiple IP addresses are encountered on a deployment host, the correct IP (i.e., the IP address that was entered at the time of container orchestration) must be forced through a priority network (priority_networks). Otherwise the Doris container instance would randomly unbind an IP so that no connection can be established with the current Doris cluster any more when the current Doris instance fails back.
The embodiment aims to provide a strategy for deploying the Doris cluster based on the Apache Doris, fills the blank of the Doris cluster in the aspect of a containerized deployment scheme, and solves the problem of instance downtime fault recovery of the Doris cluster in a containerized scene by forcedly designating a priority network and a disk mounting mode.
Referring to fig. 3, a schematic diagram of main modules of a cluster deployment apparatus 300 according to an embodiment of the present invention is shown, including:
the pulling module 301 is configured to pull, according to an identifier of a mirror image of a target object cluster, the mirror image of the target object cluster from a mirror image repository; the mirror image comprises a management node and a working node of the cluster;
the arrangement module 302 is configured to perform an arrangement operation on the management node and the working node to obtain an arrangement file;
and the starting module 303 is configured to start the container instance in the target object cluster by using the orchestration file, so as to start the corresponding node in the target object cluster according to the input starting parameter.
Specifically: in the process of starting the target object container instance, receiving the input starting parameter, and starting the management node in response to the starting parameter as the management node parameter; or in response to the starting parameter being the working node parameter, detecting whether the management node is started successfully, in response to the detection result being the successful starting, starting the working node, otherwise, determining that the working node is failed to start.
The implementation device of the invention further comprises a construction module for: receiving an edited image construction file; the image construction file comprises a plurality of instructions for constructing a target object cluster image; the plurality of instructions are executed in a server hosting the container engine to construct a target object cluster image and upload to an image repository.
Obtaining information on which the deployment target object cluster depends; the information comprises a target object installation package, a language operation environment package, client information and a basic mirror image; the client is used for submitting tasks to the object management node for processing, and the basic mirror image is an upper layer mirror image on which the target object cluster mirror image is made.
Receiving the edited container starting script, and packaging the container starting script into a target object cluster mirror image; wherein the container launch script has a command to install a deployment and launch a target object container instance; the using the orchestration file to launch container instances in a target object cluster includes: and starting the container instance by using the container starting script and the programming file.
In the embodiment of the invention, the file arrangement comprises: resource control information, IP address information of a container, disk mounting information and port mapping information;
the resource control information comprises a use threshold value of resources in the container, the disk mounting information is used for mounting data of target object clusters in the container to the outside of the container, and the port mapping information comprises mapping ports in the container to hosts outside the container.
In the implementation device of the invention, when a host machine has a plurality of IP addresses, a target IP address is configured for each target object container instance in a preferential network mode.
In addition, the implementation of the apparatus in the embodiments of the present invention has been described in detail in the above method, so that the description is not repeated here.
Fig. 4 shows an exemplary system architecture 400, including terminal devices 401, 402, 403, a network 404, and a server 405 (by way of example only), to which embodiments of the invention may be applied.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, are installed with various communication client applications, and a user may interact with the server 405 through the network 404 using the terminal devices 401, 402, 403 to receive or transmit messages, etc.
The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
Server 405 may be a server providing various services for performing the creation of target object cluster images, orchestration of nodes, and initiation of target object cluster operations.
It should be noted that the method provided by the embodiment of the present invention is generally performed by the server 405, and accordingly, the apparatus is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprises a pulling module, an arranging module and a starting module. The names of these modules do not in some way limit the module itself, for example, a pull module may also be described as a "pull mirror module".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include performing a cluster deployment method of the present solution.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A cluster deployment method, comprising:
pulling the mirror image of the target object cluster from a mirror image warehouse according to the identification of the mirror image of the target object cluster; the mirror image comprises a management node and a working node of the cluster;
performing arrangement operation on the management node and the working node to obtain an arrangement file;
and starting the container instance in the target object cluster by using the arrangement file so as to start corresponding nodes in the target object cluster according to the input starting parameters.
2. The method of claim 1, further comprising, prior to pulling the image of the target object cluster from the image repository based on the identification of the image of the target object cluster:
receiving an edited image construction file; the image construction file comprises a plurality of instructions for constructing a target object cluster image;
the plurality of instructions are executed in a server hosting the container engine to construct a target object cluster image and upload to an image repository.
3. The method of claim 2, further comprising, prior to said receiving the edited image build file:
acquiring information on which a target object cluster is deployed; the information comprises a target object installation package, a language operation environment package, client information and a basic mirror image; the client is used for submitting tasks to the object management node for processing, and the basic mirror image is an upper layer mirror image on which the target object cluster mirror image is made.
4. A method according to claim 2 or 3, further comprising:
receiving the edited container starting script, and packaging the container starting script into a target object cluster mirror image; wherein the container launch script has a command to install a deployment and launch a target object container instance;
the using the orchestration file to launch container instances in a target object cluster includes: and starting the container instance by using the container starting script and the programming file.
5. The method of claim 1, wherein arranging the document comprises: resource control information, IP address information of a container, disk mounting information and port mapping information;
the resource control information comprises a use threshold value of resources in the container, the disk mounting information is used for mounting data of target object clusters in the container to the outside of the container, and the port mapping information comprises mapping ports in the container to hosts outside the container.
6. The method of claim 1, wherein the launching of the corresponding node in the target object cluster according to the incoming launch parameters comprises:
in the process of starting the target object container instance, receiving the input starting parameter, and starting the management node in response to the starting parameter as the management node parameter; or (b)
And detecting whether the management node is started successfully or not in response to the starting parameter being the working node parameter, starting the working node in response to the detection result being the successful starting, and otherwise determining that the working node is failed to start.
7. The method as recited in claim 1, further comprising:
when a plurality of IP addresses exist in the host, a target IP address is configured for each target object container instance in a preferential network mode.
8. A cluster deployment apparatus, comprising:
the pulling module is used for pulling the mirror image of the target object cluster from the mirror image warehouse according to the identification of the mirror image of the target object cluster; the mirror image comprises a management node and a working node of the cluster;
the arrangement module is used for carrying out arrangement operation on the management node and the working node to obtain an arrangement file;
and the starting module is used for starting the container instance in the target object cluster by using the arrangement file so as to start the corresponding node in the target object cluster according to the input starting parameter.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202210535242.5A 2022-05-17 2022-05-17 Cluster deployment method and device Pending CN117112122A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210535242.5A CN117112122A (en) 2022-05-17 2022-05-17 Cluster deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210535242.5A CN117112122A (en) 2022-05-17 2022-05-17 Cluster deployment method and device

Publications (1)

Publication Number Publication Date
CN117112122A true CN117112122A (en) 2023-11-24

Family

ID=88804359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210535242.5A Pending CN117112122A (en) 2022-05-17 2022-05-17 Cluster deployment method and device

Country Status (1)

Country Link
CN (1) CN117112122A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117331578A (en) * 2023-12-01 2024-01-02 之江实验室 Cluster mirror image deployment method and system for microminiature data center
CN117407008A (en) * 2023-12-14 2024-01-16 之江实验室 System component cluster deployment method and device for microminiature data center
CN118467113A (en) * 2024-07-12 2024-08-09 济南浪潮数据技术有限公司 Container perception scheduling method, product, device and medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117331578A (en) * 2023-12-01 2024-01-02 之江实验室 Cluster mirror image deployment method and system for microminiature data center
CN117331578B (en) * 2023-12-01 2024-03-26 之江实验室 Cluster mirror image deployment method and system for microminiature data center
CN117407008A (en) * 2023-12-14 2024-01-16 之江实验室 System component cluster deployment method and device for microminiature data center
CN117407008B (en) * 2023-12-14 2024-04-19 之江实验室 System component cluster deployment method and device for microminiature data center
CN118467113A (en) * 2024-07-12 2024-08-09 济南浪潮数据技术有限公司 Container perception scheduling method, product, device and medium

Similar Documents

Publication Publication Date Title
US20210349706A1 (en) Release lifecycle management system for multi-node application
US9959105B2 (en) Configuration of an application in a computing platform
US10387068B2 (en) Size adjustable volumes for containers
CN107766126B (en) Container mirror image construction method, system and device and storage medium
CN110413288B (en) Application deployment method, device, server and storage medium
US9262238B2 (en) Connection management for an application in a computing platform
US9170797B2 (en) Automated deployment of an application in a computing platform
US9330102B2 (en) Multi-tenant platform-as-a-service (PaaS) system implemented in a cloud computing environment
US9720668B2 (en) Creating and maintaining multi-tenant applications in a platform-as-a-service (PaaS) environment of a cloud computing system
US8762986B2 (en) Advanced packaging and deployment of virtual appliances
US20150186129A1 (en) Method and system for deploying a program module
CN117112122A (en) Cluster deployment method and device
US10540162B2 (en) Generating service images having scripts for the deployment of services
CN115421740A (en) Deployment method and device of cloud native application
WO2023084345A1 (en) Automated deployment of enterprise archive with dependency on application server via script
CN116028163A (en) Method, device and storage medium for scheduling dynamic link library of container group
US9893936B2 (en) Dynamic management of restful endpoints
CN111897565A (en) Data processing method, device and equipment based on Internet of things
CN112685051A (en) Method, device, platform and storage medium for automatically executing shell script
CN113805858A (en) Method and device for continuously deploying software developed by scripting language
CN118860425A (en) Image file importing method, device, equipment, storage medium and product
CN118733074A (en) Application upgrading method, device, server and storage medium
CN118819556A (en) Host deployment method, device, equipment and storage medium
CN117472509A (en) Non-containerized application management method based on Kubernetes cluster equipment
CN115291972A (en) K8s cluster environment configuration method and device and electronic equipment

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