CN109120433B - Method and apparatus for containerized deployment of hosts - Google Patents

Method and apparatus for containerized deployment of hosts Download PDF

Info

Publication number
CN109120433B
CN109120433B CN201810810851.0A CN201810810851A CN109120433B CN 109120433 B CN109120433 B CN 109120433B CN 201810810851 A CN201810810851 A CN 201810810851A CN 109120433 B CN109120433 B CN 109120433B
Authority
CN
China
Prior art keywords
deployed
deployment
address
host
hosts
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
CN201810810851.0A
Other languages
Chinese (zh)
Other versions
CN109120433A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810810851.0A priority Critical patent/CN109120433B/en
Publication of CN109120433A publication Critical patent/CN109120433A/en
Application granted granted Critical
Publication of CN109120433B publication Critical patent/CN109120433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a method and a device for containerized deployment of a host. One embodiment of the method comprises: the method comprises the steps of obtaining an Internet Protocol (IP) address of a host to be deployed, obtaining an IP address set, establishing connection with the host to be deployed indicated by the IP address in the IP address set, and performing containerization deployment on the host to be deployed aiming at the connected host to be deployed indicated by the IP address in the IP address set, wherein the containerization deployment comprises the following steps: determining the running environment information of the host to be deployed, acquiring deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information. The implementation method realizes containerized deployment of hosts to be deployed for different operating environments.

Description

Method and apparatus for containerized deployment of hosts
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for containerized deployment of a host.
Background
With the introduction and development of containerization technology, more and more enterprises want to build their own containerization platforms. At present, many enterprises also use cloud services, and therefore, many enterprises have multiple infrastructures such as physical machines, virtual machines, cloud vendor hosts, and the operating environments (such as operating systems) of the various infrastructures have large differences, so that uniform containerization deployment of the infrastructures is difficult to achieve. The period consumed by deploying each host in a manual deployment mode is long, and errors are easy to occur.
Disclosure of Invention
The embodiment of the application provides a method and a device for containerized deployment of a host.
In a first aspect, an embodiment of the present application provides a method for containerized deployment of a host, where the method includes: acquiring an Internet Protocol (IP) address of a host to be deployed to obtain an IP address set; establishing connection with a host to be deployed indicated by an IP address in an IP address set; for a connected host to be deployed indicated by an IP address in an IP address set, performing containerized deployment on the host to be deployed, wherein the containerized deployment comprises: determining the running environment information of the host to be deployed, acquiring deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information.
In some embodiments, the above method further comprises: grouping the hosts to be deployed indicated by the IP addresses in the IP address set according to the operating environment information or the function type information of the hosts to be deployed indicated by the IP addresses in the IP address set or according to received grouping information sent by a user to obtain an IP address group set; and aiming at the connected host to be deployed indicated by the IP address in the IP address set, performing containerized deployment on the host to be deployed, including: and carrying out containerized deployment on the host groups to be deployed corresponding to the IP address groups in the IP address group set in parallel.
In some embodiments, the above method further comprises: receiving an application set to be installed and application installation sequence information indicated by a user; and according to the installation sequence indicated by the application installation sequence information, installing the application to be installed in the application set to be installed on the connected host to be deployed indicated by the IP address in the IP address set.
In some embodiments, the above method further comprises: determining hosts to be deployed indicated by a target number of IP addresses in an IP address group as a sample host set to be deployed according to the IP address group in the IP address group set; performing containerization deployment on hosts to be deployed in the sample host to be deployed set; and in response to the fact that the deployment success rate corresponding to the sample host set to be deployed is larger than a preset sample success rate threshold value, performing containerization deployment on the non-sample host to be deployed indicated by the IP address in the IP address group.
In some embodiments, the above method further comprises: for an IP address group in an IP address group set, determining the number of IP addresses contained in the IP address group, taking the product of the determined number and a preset deployment failure rate threshold value as a target number, and in response to determining that the number of hosts to be deployed, indicated by the IP address in the IP address group, which fail to be deployed in containerized deployment is greater than the target number, aborting containerized deployment of the hosts to be deployed, indicated by the IP address in the IP address group, which do not complete the containerized deployment; determining fault information causing failure of containerized deployment; and responding to the repair failure, and continuing the containerized deployment of the hosts to be deployed which are indicated by the IP addresses in the IP address group and do not complete the containerized deployment.
In some embodiments, the runtime environment information includes operating system version information, and the deployment information that matches the runtime environment information includes deployment files that match the operating system represented by the operating system version information.
In some embodiments, obtaining deployment information that matches the operating environment information includes: and searching deployment information matched with the operating environment information from a preset deployment information base.
In some embodiments, establishing a connection with a host to be deployed indicated by an IP address in the IP address set includes: and establishing a connection based on a secure shell protocol with the host to be deployed indicated by the IP address in the IP address set.
In some embodiments, the above method further comprises: and outputting the information related to the containerized deployment.
In a second aspect, an embodiment of the present application provides an apparatus for containerized deployment of a host, the apparatus including: the system comprises an acquisition unit, a configuration unit and a configuration unit, wherein the acquisition unit is configured to acquire an Internet Protocol (IP) address of a host to be deployed to obtain an IP address set; the connection unit is configured to establish connection with the host to be deployed indicated by the IP address in the IP address set; the deployment unit is configured to perform containerized deployment on the host to be deployed according to the connected host to be deployed indicated by the IP address in the IP address set, and the containerized deployment includes: determining the running environment information of the host to be deployed, acquiring deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information.
In some embodiments, the above apparatus further comprises: the grouping unit is configured to group the hosts to be deployed indicated by the IP addresses in the IP address set according to the operating environment information or the function type information of the hosts to be deployed indicated by the IP addresses in the IP address set or according to the received grouping information sent by the user to obtain an IP address group set; the deployment unit is further configured to perform containerized deployment on the host groups to be deployed corresponding to the IP address groups in the IP address group set in parallel.
In some embodiments, the above apparatus further comprises: a receiving unit configured to receive a set of applications to be installed and application installation order information indicated by a user; the deployment unit is further configured to install the applications to be installed in the set of applications to be installed on the connected hosts to be deployed indicated by the IP addresses in the set of IP addresses according to the installation order indicated by the application installation order information.
In some embodiments, the deployment unit is further configured to: determining hosts to be deployed indicated by a target number of IP addresses in an IP address group as a sample host set to be deployed according to the IP address group in the IP address group set; performing containerization deployment on hosts to be deployed in the sample host to be deployed set; and in response to the fact that the deployment success rate corresponding to the sample host set to be deployed is larger than a preset sample success rate threshold value, performing containerization deployment on the non-sample host to be deployed indicated by the IP address in the IP address group.
In some embodiments, the deployment unit is further configured to: for an IP address group in an IP address group set, determining the number of IP addresses contained in the IP address group, taking the product of the determined number and a preset deployment failure rate threshold value as a target number, and in response to determining that the number of hosts to be deployed, indicated by the IP address in the IP address group, which fail to be deployed in containerized deployment is greater than the target number, aborting containerized deployment of the hosts to be deployed, indicated by the IP address in the IP address group, which do not complete the containerized deployment; determining fault information causing failure of containerized deployment; and responding to the repair failure, and continuing the containerized deployment of the hosts to be deployed which are indicated by the IP addresses in the IP address group and do not complete the containerized deployment.
In some embodiments, the runtime environment information includes operating system version information, and the deployment information that matches the runtime environment information includes deployment files that match the operating system represented by the operating system version information.
In some embodiments, the deployment unit is further configured to: and searching deployment information matched with the operating environment information from a preset deployment information base.
In some embodiments, the connection unit is further configured to: and establishing a connection based on a secure shell protocol with the host to be deployed indicated by the IP address in the IP address set.
In some embodiments, the above apparatus further comprises: an output unit configured to output information related to the containerized deployment.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
The method and the device for containerized deployment of the host, provided by the embodiment of the application, obtain an IP address set by obtaining an Internet Protocol (IP) address of the host to be deployed, establish connection with the host to be deployed indicated by the IP address in the IP address set, and perform containerized deployment on the host to be deployed aiming at the host to be deployed, indicated by the IP address in the IP address set and connected, and the containerized deployment comprises the following steps: the method comprises the steps of determining the running environment information of the host to be deployed, obtaining deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information, so that deployment information suitable for the running environment of each host to be deployed can be obtained for the host to be deployed in different running environments, and then containerization deployment is completed on each host to be deployed by utilizing the corresponding deployment information.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for containerized deployment of hosts in accordance with the present application;
FIG. 3 is a flow diagram of yet another embodiment of a method for containerized deployment of hosts in accordance with the present application;
FIG. 4 is a schematic diagram of one application scenario for a method for containerized deployment of hosts in accordance with the present application;
FIG. 5 is a flow diagram of yet another embodiment of a method for containerized deployment of hosts in accordance with the present application;
FIG. 6 is a schematic block diagram illustrating one embodiment of an apparatus for containerized deployment of hosts in accordance with the present application;
FIG. 7 is a block diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary architecture 100 to which embodiments of the present method for containerized deployment of hosts or apparatus for containerized deployment of hosts may be applied.
As shown in fig. 1, the system architecture 100 may include hosts 101, 102, 103 to be deployed, a network 104, and a master 105. Network 104 is used to provide a medium for communication links between hosts 101, 102, 103 to be deployed and master 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The hosts 101, 102, 103 to be deployed interact with the master controller 105 through the network 104 to accept and execute operations related to containerized deployment of the hosts 101, 102, 103 to be deployed by the master controller, and the like. The hosts 101, 102, 103 to be deployed may have various client applications installed thereon, such as various communication tools, deployment-related applications, and so on.
The hosts 101, 102, 103 to be deployed may be hardware or software. When the hosts 101, 102, 103 to be deployed are hardware, they may be various electronic devices having a display screen, including but not limited to tablet computers, laptop portable computers, desktop computers, and the like. When the hosts 101, 102, 103 to be deployed are software. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The host computer 105 may be various electronic devices capable of providing containerization deployment services, such as a tablet computer, a laptop portable computer, a desktop computer, and the like that can build an environment required to support containerization for the hosts 101, 102, 103 to be deployed. The main control computer may search for a deployment file corresponding to the operating environment of the host to be deployed according to the operating environment information (for example, operating system version information) of the host to be deployed, and control the host to be deployed to install the corresponding deployment file, thereby deploying a containerization environment adapted to the operating environment of the host to be deployed for the host to be deployed. In addition, in the deployment process, the deployment server can also output current deployment related information to the terminal device.
It should be noted that the master controller 105 may perform containerized deployment on the hosts 101, 102, and 103 to be deployed remotely.
It should be noted that the method for deploying the hosts containerized provided by the embodiment of the present application is generally performed by the master controller 105, and accordingly, the apparatus for deploying the hosts containerized is generally disposed in the master controller 105.
It should be further noted that the hosts to be deployed 101, 102, and 103 to be deployed may provide a containerization deployment service, and may also be used as a master controller, at this time, the method for deploying hosts in a containerization manner provided in this embodiment may be executed by a host to be deployed that can provide the containerization deployment service in the hosts to be deployed 101, 102, and 103, and accordingly, the apparatus for deploying hosts in a containerization manner may also be disposed in a host to be deployed that can provide the containerization deployment service in the hosts to be deployed 101, 102, and 103 to be deployed.
It should be noted that the master controller may be hardware or software. When the master control computer is hardware, the master control computer can be various electronic devices. When the host computer is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of hosts, networks, and masters to be deployed in FIG. 1 is merely illustrative. There may be any number of hosts, networks, and masters to be deployed, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for containerized deployment of hosts in accordance with the present application is shown. The method for containerized deployment of hosts comprises the following steps:
step 201, an internet protocol IP address of a host to be deployed is obtained, and an IP address set is obtained.
In this embodiment, an execution subject (e.g., the master controller 105 in fig. 1) of the method for containerized deployment of hosts may first obtain IP addresses of hosts to be deployed (e.g., the hosts 101, 102, 103 to be deployed in fig. 1), so as to obtain an IP address set. The host to be deployed may be various types of electronic devices with operating systems. For example, the host to be deployed may be any computer. It should be noted that the host to be deployed may be an independent physical host or a virtual host.
Each host to be deployed may have an IP address. Alternatively, the IP address of each host to be deployed may be input to the execution agent. Alternatively, in the execution body, the IP addresses of all hosts that can accept containerized deployment may be stored in advance, and all IP addresses can be presented to the user. The IP address may then be selected by the user on demand. At this time, the host corresponding to the IP address selected by the user is the host to be deployed, and the IP addresses selected by the user form an IP address set.
Step 202, establishing connection with the host to be deployed indicated by the IP address in the IP address set.
In this embodiment, the execution main body may establish a connection with each host to be deployed. The connection mode can be various communication connection modes which are available in the prior art and are possible in the future. For example, a connection based on SSL (Secure Sockets Layer), TLS (Transport Layer Security), SET (Secure Electronic Transaction protocol) may be established with each host to be deployed.
In some optional implementations of this embodiment, an SSH (Secure Shell) based connection may also be established with the host to be deployed indicated by the IP address in the IP address set.
The above-mentioned various connection methods are well-known technologies that are widely researched and applied at present, and are not described herein again.
Step 203, performing containerized deployment on the host to be deployed, which is indicated by the IP address in the IP address set and is connected to the host to be deployed, where the containerized deployment includes: determining the running environment information of the host to be deployed, acquiring deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information.
In this embodiment, the execution subject may perform containerized deployment on each host to be deployed that has established a connection. For each host to be deployed, the following deployment operations may be performed:
step 2031, determining the operating environment information of the host to be deployed.
In this embodiment, the runtime environment information may refer to various information related to hardware and software of the host to be deployed. For example, the runtime environment information may include processor model information, graphics card model information, memory size, etc. of the host to be deployed. The runtime environment information may further include type information of an operating system of the host to be deployed, version information of the operating system, a name and version information of an application installed on the host to be deployed, and the like.
The execution main body can be manually input with the running environment information of the host to be deployed, the host to be deployed can also send the running environment information of the host to be deployed to the execution main body, and the running environment information of each host to be deployed can also be detected by using some existing related detection tools.
Step 2032, acquiring deployment information matched with the operating environment information.
In this embodiment, the deployment information matched with the operating environment information of the host to be deployed may be obtained locally or remotely. The deployment information may include deployment files, deployment tools, various types of deployment description information, user requirement information, and the like required for containerization deployment. The matched deployment information may refer to deployment information that is compatible with the operating environment information. For example, when the runtime environment information includes version information of the operating system, the deployment information may include a deployment file, a deployment tool, and the like that can be run on the operating system and that corresponds to the version of the operating system.
Alternatively, a large amount of deployment information may be pre-stored locally in the execution subject, and a corresponding operating environment index may be established for each deployment information. Therefore, the matched deployment information can be searched according to the running environment information of the host to be deployed.
Optionally, the corresponding relationship between the operating environment information and the deployment information matched with the operating environment information may also be stored in a back-end server of the execution main body, so that the operating environment information of the host to be deployed may be sent to the server, and then the server searches for the corresponding deployment information and returns the deployment information to the execution main body.
Step 2033, according to the deployment information, deploying a base environment supporting containerization on the host to be deployed.
In this embodiment, the base environment supporting containerization may refer to a base environment that enables a host to be deployed to use container technology. Container technology may refer to technology that enables isolation of applications and their dependencies, thereby building a set of self-contained units (i.e., one container instance) that can be run anywhere. In particular, the base environment supporting containerization is typically built on top of the operating system layer of the host. The host, which builds the containerized base environment, can allocate container instances from the computing resources available to the system, after which various applications can be deployed in different container instances.
Wherein, the basic environment supporting containerization in deployment can be realized by installing a container engine on a host to be deployed. Currently, common container engines include, but are not limited to: docker, Rocket, Odin, Runc, etc. Different vessel engines may have different mounting arrangements. Generally, the various container engines described above are provided with corresponding versions of container images. Therefore, the corresponding container engine image file can be determined according to the running environment of the host to be deployed and installed on the host to be deployed. In practice, the type of the container engine to be deployed can be specified by the user according to the actual requirements of the user, and then the container engine image file of the corresponding version is obtained and installed according to the operating environment information of the host to be deployed of the user.
Step 2034, according to the deployment information, deploy the container orchestration tool on the host to be deployed.
In this embodiment, a container orchestration tool may refer to some tool that may be used to manage the life cycle of a container. The container arrangement tool can be used for conveniently managing, maintaining and expanding the cross-machine operation of the containerized application.
Currently, common container organization tools include, but are not limited to: kubernets, Mesos, Swarm, Fleet, etc. Different container orchestration tools may have different mounting manners. Generally, the various container organizing tools described above are provided with corresponding mounting assemblies. Therefore, the corresponding installation component can be determined according to the running environment of the host to be deployed and installed on the host to be deployed.
In some optional implementations of the embodiment, after the base environment and the container orchestration tool supporting containerization are deployed on the to-be-deployed machine, the to-be-installed application set and the application installation order information indicated by the user may be further received. And then, according to the installation sequence indicated by the application installation sequence information, installing the application to be installed in the application set to be installed on the connected host to be deployed and indicated by the IP address in the IP address set.
Wherein, a visual operation platform can be provided for users, and various application software can be displayed. Then, the user can select the application software to be installed on the operation platform and specify the installation sequence of the application software. In practice, component icons corresponding to various application software can be provided, and the user can indicate the installation sequence of the application by dragging the component icon corresponding to the application software to be installed and some flow icons.
Alternatively, a user may choose to install some of the infrastructure components provided by kubernets to support various business applications that the user may later install on the host to be deployed. Common basic components include logging, monitoring, configuration, registration discovery, service gateways, and the like.
In some optional implementations of this embodiment, during the containerized deployment of the machine to be deployed, or after the deployment is completed, the information related to the containerized deployment may be output to the user. For example, the deployment completion time of each machine to be deployed or the deployed application name, version information, and the like may be sequentially output.
The method for containerized deployment of hosts, provided by the embodiments of the present application, obtains an IP address set by obtaining an internet protocol IP address of a host to be deployed, establishes a connection with the host to be deployed indicated by the IP address in the IP address set, and performs containerized deployment on the host to be deployed, indicated by the IP address in the IP address set and connected to the host to be deployed, where the containerized deployment includes: the method comprises the steps of determining the running environment information of the host to be deployed, obtaining deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information, so that deployment information suitable for the running environment of each host to be deployed can be obtained for the host to be deployed in different running environments, and then containerization deployment is completed on each host to be deployed by utilizing the corresponding deployment information.
With continued reference to FIG. 3, a flow 300 of yet another embodiment of a method for containerized deployment of hosts in accordance with the present application is illustrated. The method for containerized deployment of hosts comprises the following steps:
step 301, acquiring an IP address of a host to be deployed, and obtaining an IP address set.
Step 302, establishing connection with the host to be deployed indicated by the IP address in the IP address set.
The specific implementation process of steps 301 and 302 may refer to the related description of steps 201 and 202 in the corresponding embodiment of fig. 2, and will not be described herein again.
Step 303, according to the operating environment information or the function type information of the hosts to be deployed indicated by the IP addresses in the IP address set, or according to the received grouping information sent by the user, grouping the hosts to be deployed indicated by the IP addresses in the IP address set to obtain an IP address group set.
In this embodiment, each host to be deployed may be grouped, so as to obtain a plurality of host groups to be deployed, and further obtain an IP address group corresponding to each host group to be deployed. There are various ways to group hosts to be deployed. For example, the classification may be performed according to the runtime environment information of the hosts to be deployed (for example, the same type and version of operating systems are a group, etc.), or may be performed according to the function type information of the hosts to be deployed (for example, a group for processing data, a group for file management, etc.). Similarly, the grouping may also be based on other attributes of the hosts to be deployed. In addition, the user can also send grouping information, and the hosts to be deployed are grouped according to the grouping mode indicated by the user.
Step 304, aiming at the IP address group in the IP address group set, determining the hosts to be deployed indicated by the target number of IP addresses in the IP address group as a sample host set to be deployed; performing containerization deployment on hosts to be deployed in the sample host to be deployed set; and in response to the fact that the deployment success rate corresponding to the sample host set to be deployed is larger than a preset sample success rate threshold value, performing containerization deployment on the non-sample host to be deployed indicated by the IP address in the IP address group.
In this embodiment, some hosts to be deployed may be first selected from each group of hosts to be deployed as sample hosts to be deployed, and then the selected hosts to be deployed may be deployed in a container. And then, determining a further deployment mode of each host group to be deployed according to the deployment success rate corresponding to the sample hosts to be deployed of each group. Specifically, the following steps are shown:
step 3041, for an IP address group in the IP address group set, determine the hosts to be deployed indicated by the target number of IP addresses in the IP address group as a sample host set to be deployed.
In this embodiment, for each group of hosts to be deployed obtained after grouping, a target number of hosts to be deployed may be selected from each group of hosts to be deployed as sample hosts to be deployed, so as to obtain a sample host set to be deployed corresponding to each group of hosts to be deployed. The target number may be a number specified by a user, or a number calculated according to a preset calculation rule (e.g., two percent of the number of hosts to be deployed included in the host group to be deployed), or the like.
Step 3042, performing containerization deployment on the hosts to be deployed in the sample host to be deployed set.
In this embodiment, containerized deployment may be performed on each host to be deployed in the sample host to be deployed set corresponding to each host group to be deployed. The specific deployment process may refer to the related description in step 203 in the corresponding embodiment of fig. 2, and is not described herein again.
Step 3043, in response to determining that the deployment success rate corresponding to the sample to-be-deployed host set is greater than the preset sample success rate threshold, performing containerization deployment on the non-sample to-be-deployed host indicated by the IP address in the IP address group.
In this embodiment, after each host to be deployed in the sample host to be deployed set corresponding to each host group to be deployed completes containerization deployment, the deployment success rate corresponding to each sample host to be deployed set can be further counted. The counted deployment success rate may then be compared to a preset sample success rate threshold. Wherein the deployment success rate may be preset by a technician.
For the sample host to be deployed set with the deployment success rate larger than the preset sample success rate threshold, containerization deployment may be performed on other hosts to be deployed, which are not selected as the sample host to be deployed, in the host group to be deployed corresponding to the sample host to be deployed set.
In some optional implementations of this embodiment, the containerized deployment may be performed in parallel for each host group to be deployed. Specifically, various operation and maintenance tools (e.g., anchor, Puppet, saltstat, etc.) supporting batch deployment may be utilized to perform parallel container deployment on each host group to be deployed. The operation and maintenance tool supporting batch deployment can simultaneously deploy a large number of host groups to be deployed.
In this embodiment, for hosts to be deployed that fail to be deployed in the containerized deployment process, the hosts to be deployed may be uniformly re-deployed after the deployment of each group of hosts to be deployed is completed, or the hosts to be deployed may be re-deployed after the corresponding problem is solved by checking the reason for the deployment failure.
With continued reference to fig. 4, fig. 4 is a schematic diagram of an application scenario of the method for containerized deployment of hosts according to the present embodiment. In the application scenario of fig. 4, the host 401 may perform containerization deployment on the host to be deployed as an execution subject. First, the host computer may establish SSH-based connections with each host to be deployed. Then, the hosts to be deployed may be grouped according to the version of the operating system of each host to be deployed. The system can be divided into a Debian (a Linux operating system release) based host group to be deployed 402, a Knoppix (a Linux operating system release) based host group to be deployed 403, and an Ubuntu (a Linux operating system with desktop applications as the main operating system) based host group to be deployed 404. The to-be-deployed host group 402 includes nine to-be-deployed machines, the to-be-deployed host group 403 includes seven to-be-deployed machines, and the to-be-deployed host group 404 includes five to-be-deployed machines.
Thereafter, a sample host to be deployed may be picked from the groups of hosts to be deployed 402, 403, 404, respectively. The following description takes the host group 402 to be deployed as an example: first, three sample hosts to be deployed may be selected, and a sample host group to be deployed 405 is obtained. Then, containerized deployment is performed on each sample host to be deployed in the sample host to be deployed group 405. After the containerized deployment is completed, the sample deployment success rate 406 is statistically derived. Thereafter, the sample deployment success rate 406 may be compared to a preset deployment success rate threshold 407. If the sample deployment success rate 406 is greater than the deployment success rate threshold 407, the containerization deployment continues to be performed on the other six hosts to be deployed, which are not selected as the sample, in the host group to be deployed 402.
The containerization deployment process is described below by taking as an example the containerization deployment process for one of the hosts 408 to be deployed: first, the main control computer 401 may determine, through a remote console command, that the operating system information of the host 408 to be deployed is based on the Debian Amber Linux system. Then, the host 401 may obtain an installation file (e.g., Docker image file) of the container engine corresponding to the Amber Linux system and an installation file (kubernets installation component) of the container arrangement tool from a file library established in advance by the host. Then, the Docker image file and the Kubernetes installation component may be sequentially installed on the host 408 to be deployed, that is, the containerization deployment of the host 408 to be deployed is completed.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the process 400 of the method for containerized deployment of hosts in this embodiment highlights that after the hosts to be deployed are grouped, for each group of the hosts to be deployed, a part of the hosts to be deployed in a sample may be selected first for containerized deployment, and whether to continue to directly perform containerized deployment on other hosts to be deployed in the corresponding host groups to be deployed is determined according to the deployment success rate of the hosts to be deployed in the sample, so that before large-batch containerized deployment is performed, a small amount of samples may be used for testing, and further, a problem that may exist in the containerized deployment may be discovered in time.
With further reference to FIG. 5, a flow 500 of yet another embodiment of a method for containerized deployment of hosts is illustrated. The process 500 for containerized deployment of hosts includes the steps of:
step 501, acquiring an IP address of a host to be deployed to obtain an IP address set.
Step 502, establishing connection with the host to be deployed indicated by the IP address in the IP address set.
The specific implementation process of steps 501 and 502 may refer to the related description of steps 201 and 202 in the corresponding embodiment of fig. 2, and will not be described herein again.
Step 503, according to the operating environment information or the function type information of the hosts to be deployed indicated by the IP addresses in the IP address set, or according to the received grouping information sent by the user, grouping the hosts to be deployed indicated by the IP addresses in the IP address set, so as to obtain an IP address group set.
The specific implementation process of this step can refer to the related description of step 303 in the corresponding embodiment of fig. 3, and is not described herein again.
Step 504, determining the number of the IP addresses included in the IP address group for the IP address group in the IP address group set, taking the product of the determined number and a preset deployment failure rate threshold as a target number, and in response to determining that the number of hosts to be deployed, indicated by the IP address in the IP address group, for which containerization deployment fails is greater than the target number, aborting containerization deployment of the hosts to be deployed, indicated by the IP address in the IP address group, for which containerization deployment is not completed; determining fault information causing failure of containerized deployment; and responding to the repair failure, and continuing the containerized deployment of the hosts to be deployed which are indicated by the IP addresses in the IP address group and do not complete the containerized deployment.
In this embodiment, the number of hosts that fail to be deployed in a containerization manner corresponding to the deployment failure rate threshold may be calculated in advance according to the number of hosts to be deployed included in each group of hosts to be deployed and a preset deployment failure rate threshold. Then, in the process of performing containerized deployment on each group of hosts to be deployed, the number of hosts to be deployed, which fail the containerized deployment, may be counted, and when the number of hosts to be deployed, which fail the containerized deployment, exceeds the number corresponding to the calculated deployment failure rate, the current containerized deployment of the group of hosts to be deployed may be terminated first, and troubleshooting is performed. After the fault is repaired, the containerized deployment of the previously suspended host group to be deployed is resumed. Specifically, the method comprises the following steps:
step 5041, for an IP address group in the IP address group set, determining the number of IP addresses included in the IP address group, and taking the product of the determined number and a preset deployment failure rate threshold as a target number.
In this embodiment, for each IP address group, the number of IP addresses in each IP address group may be determined first, that is, the number of hosts to be deployed corresponding to each IP address group. Then, the product of each IP address group and the preset deployment failure rate threshold may be calculated, and the number of hosts to be deployed, which may be subjected to containerization deployment failure according to the preset failure rate threshold corresponding to each IP address group, is obtained. Wherein the deployment failure rate threshold may be set by a technician based on historical experience.
Step 5042, in response to determining that the number of hosts to be deployed, indicated by the IP address in the IP address group, for which containerization deployment fails is greater than the target number, aborting the containerization deployment of the hosts to be deployed, indicated by the IP address in the IP address group, for which containerization deployment is not complete.
In this embodiment, in the process of performing containerized deployment on each group of hosts to be deployed, the number of hosts to be deployed, which have failed in the containerized deployment, of each group may be continuously counted. For the host group to be deployed whose accumulated number of hosts to be deployed that failed in containerized deployment is greater than the number calculated in step 5041, the current containerized deployment of the host group to be deployed may be suspended, and troubleshooting may be performed.
At step 5043, failure information that caused the containerization deployment to fail is determined.
In this embodiment, the failure cause of the host to be deployed that fails in containerized deployment may be checked by using various existing failure checking modes to obtain failure information. For example, troubleshooting can be performed through a log generated in the containerization deployment process, or a current failure can be troubleshot by using a troubleshooting function carried by a used batch deployment tool.
Step 5044, in response to repairing the failure, continuing containerization deployment of hosts to be deployed that are indicated by the IP addresses in the IP address group and have not completed containerization deployment.
In this embodiment, after obtaining the fault information at step 5043, a technician may repair the fault. After the fault is repaired, containerization deployment can be continuously carried out on each terminated host group to be deployed.
As can be seen from fig. 5, compared with the embodiment corresponding to fig. 2, the process 500 of the method for containerized deploying of hosts in this embodiment highlights that the hosts to be deployed are grouped, and in the process of performing containerized deploying of each group of hosts to be deployed, the number of hosts to be deployed, which may fail in containerized deploying, corresponding to each group of hosts to be deployed may be calculated in advance according to a preset failure rate threshold and the number of hosts to be deployed of each group of hosts to be deployed. And then, accumulating the number of the hosts to be deployed, which fail to be deployed in containerized deployment of each group of hosts to be deployed. When the number of the hosts to be deployed of a group of hosts to be deployed, which are failed in the current accumulated containerization deployment, exceeds the calculated number of possible failures, the current containerization deployment process for reorganization can be terminated, troubleshooting is performed, and after the failure is recovered, the containerization deployment is continuously performed, so that a reference number can be determined according to a preset deployment failure rate threshold, when the containerization deployment process frequently fails due to the failure, the number of the hosts to be deployed, which are failed in the current containerization deployment, can be continuously counted in the containerization deployment process and compared with the reference number, when the reference number is exceeded, the deployment failure rate can be indicated to be too high, at the moment, the deployment process can be suspended, the problems of deployment can be timely found out for solving, and the phenomenon of a large number of deployment failures is avoided.
With further reference to fig. 6, as an implementation of the method shown in the above figures, the present application provides an embodiment of an apparatus for containerized deployment of hosts, which corresponds to the embodiment of the method shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 6, the apparatus 600 for containerized deployment of hosts provided in this embodiment includes an obtaining unit 601, a connecting unit 602, and a deploying unit 603. The obtaining unit 601 is configured to obtain an internet protocol IP address of a host to be deployed, and obtain an IP address set; the connection unit 602 is configured to establish a connection with a host to be deployed indicated by an IP address in the IP address set; the deployment unit 603 is configured to perform containerized deployment on the to-be-deployed host, indicated by the IP address in the IP address set and connected to the to-be-deployed host, where the containerized deployment includes: determining the running environment information of the host to be deployed, acquiring deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information.
In the present embodiment, in the apparatus 600 for containerized deployment of hosts: the specific processing of the obtaining unit 601, the connecting unit 602, and the deploying unit 603 and the technical effects thereof can refer to the related descriptions of step 201, step 202, and step 203 in the corresponding embodiment of fig. 2, which are not described herein again.
In some optional implementations of the present embodiment, the apparatus 600 for containerized deployment of hosts further includes: a grouping unit (not shown in the figure), configured to group the hosts to be deployed indicated by the IP addresses in the IP address set according to the operating environment information or the function type information of the hosts to be deployed indicated by the IP addresses in the IP address set, or according to the received grouping information sent by the user, so as to obtain an IP address group set; the deployment unit is further configured to perform containerized deployment on the host groups to be deployed corresponding to the IP address groups in the IP address group set in parallel.
In some optional implementations of the present embodiment, the apparatus 600 for containerized deployment of hosts further includes: a receiving unit (not shown in the figure) configured to receive the set of applications to be installed and the application installation order information indicated by the user; the deployment unit is further configured to install the applications to be installed in the set of applications to be installed on the connected hosts to be deployed indicated by the IP addresses in the set of IP addresses according to the installation order indicated by the application installation order information.
In some optional implementations of this embodiment, the deployment unit 603 is further configured to: determining hosts to be deployed indicated by a target number of IP addresses in an IP address group as a sample host set to be deployed according to the IP address group in the IP address group set; performing containerization deployment on hosts to be deployed in the sample host to be deployed set; and in response to the fact that the deployment success rate corresponding to the sample host set to be deployed is larger than a preset sample success rate threshold value, performing containerization deployment on the non-sample host to be deployed indicated by the IP address in the IP address group.
In some optional implementations of this embodiment, the deployment unit 603 is further configured to: for an IP address group in an IP address group set, determining the number of IP addresses contained in the IP address group, taking the product of the determined number and a preset deployment failure rate threshold value as a target number, and in response to determining that the number of hosts to be deployed, indicated by the IP address in the IP address group, which fail in containerized deployment is greater than the target number, aborting containerized deployment of the hosts to be deployed, indicated by the IP address in the IP address group, which do not complete containerized deployment; determining fault information causing failure of containerized deployment; and responding to the repair failure, and continuing the containerized deployment of the hosts to be deployed which are indicated by the IP addresses in the IP address group and do not complete the containerized deployment.
In some optional implementation manners of this embodiment, the running environment information includes operating system version information, and the deployment information matched with the running environment information includes a deployment file matched with an operating system represented by the operating system version information.
In some optional implementations of this embodiment, the deployment unit 603 is further configured to: and searching deployment information matched with the operating environment information from a preset deployment information base.
In some optional implementations of the present embodiment, the connection unit 602 is further configured to: and establishing a connection based on a secure shell protocol with the host to be deployed indicated by the IP address in the IP address set.
In some optional implementations of this embodiment, the apparatus 600 for containerized deployment of hosts further includes: an output unit (not shown in the figure) is configured to output information related to the containerization deployment.
The apparatus provided in the foregoing embodiment of the present application obtains an internet protocol IP address of a host to be deployed through an obtaining unit, to obtain an IP address set, where a connection unit establishes a connection with the host to be deployed indicated by the IP address in the IP address set, and a deployment unit performs containerized deployment on the host to be deployed, where the containerized deployment includes: the method comprises the steps of determining the running environment information of the host to be deployed, obtaining deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information, so that deployment information suitable for the running environment of each host to be deployed can be obtained for the host to be deployed in different running environments, and then containerization deployment is completed on each host to be deployed by utilizing the corresponding deployment information.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the 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 illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by a Central Processing Unit (CPU)701, performs the above-described functions defined in the method of the present application.
It should be noted that the computer readable medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present application, 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 this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 flowchart 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 application. 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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 units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a connection unit, and a deployment unit. The names of these units do not in some cases form a limitation on the unit itself, for example, the acquiring unit may also be described as "a unit that acquires an internet protocol IP address of a host to be deployed, resulting in a set of IP addresses".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring an Internet Protocol (IP) address of a host to be deployed to obtain an IP address set; establishing connection with a host to be deployed indicated by an IP address in an IP address set; for a connected host to be deployed indicated by an IP address in an IP address set, performing containerized deployment on the host to be deployed, wherein the containerized deployment comprises: determining the running environment information of the host to be deployed, acquiring deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (20)

1. A method for containerized deployment of hosts, comprising:
acquiring an Internet Protocol (IP) address of a host to be deployed to obtain an IP address set;
establishing connection with a host to be deployed indicated by the IP address in the IP address set;
for a connected host to be deployed indicated by an IP address in the IP address set, performing containerized deployment on the host to be deployed, where the containerized deployment includes: determining the running environment information of the host to be deployed, acquiring deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information;
before the hosts to be deployed are deployed in batches, a sample host to be deployed is selected from the hosts to be deployed for deployment testing.
2. The method of claim 1, wherein the method further comprises:
grouping the hosts to be deployed indicated by the IP addresses in the IP address set according to the operating environment information or the function type information of the hosts to be deployed indicated by the IP addresses in the IP address set or according to received grouping information sent by a user to obtain an IP address group set; and
the container deployment of the host to be deployed, which is indicated by the IP address in the IP address set and connected to the host to be deployed, includes:
and carrying out containerized deployment on the host groups to be deployed corresponding to the IP address groups in the IP address group set in parallel.
3. The method of claim 1, wherein the method further comprises:
receiving an application set to be installed and application installation sequence information indicated by a user;
and according to the installation sequence indicated by the application installation sequence information, installing the application to be installed in the application set to be installed on the connected host to be deployed indicated by the IP address in the IP address set.
4. The method of claim 2, wherein the method further comprises:
determining hosts to be deployed indicated by a target number of IP addresses in the IP address group as a sample host set to be deployed according to the IP address group in the IP address group set; performing containerization deployment on the hosts to be deployed in the sample host to be deployed set; and in response to the fact that the deployment success rate corresponding to the sample host set to be deployed is larger than a preset sample success rate threshold value, performing containerization deployment on the non-sample host to be deployed indicated by the IP address in the IP address group.
5. The method of claim 2, wherein the method further comprises:
for an IP address group in the IP address group set, determining the number of IP addresses contained in the IP address group, taking the product of the determined number and a preset deployment failure rate threshold value as a target number, and stopping containerization deployment of hosts to be deployed which are indicated by the IP address in the IP address group and have not finished containerization deployment in response to determining that the number of hosts to be deployed which are indicated by the IP address in the IP address group and have failed containerization deployment is greater than the target number; determining fault information causing failure of containerized deployment; and responding to the repair failure, and continuing the containerized deployment of the hosts to be deployed which are indicated by the IP addresses in the IP address group and do not complete the containerized deployment.
6. The method of claim 1, wherein the runtime environment information includes operating system version information, and the deployment information that matches the runtime environment information includes deployment files that match the operating system represented by the operating system version information.
7. The method of claim 1, wherein the obtaining deployment information that matches the operating environment information comprises:
and searching deployment information matched with the operating environment information from a preset deployment information base.
8. The method of claim 1, wherein the establishing a connection with the host to be deployed indicated by the IP address in the IP address set comprises:
and establishing a connection based on a secure shell protocol with the host to be deployed indicated by the IP address in the IP address set.
9. The method according to one of claims 1 to 8, wherein the method further comprises:
and outputting the information related to the containerized deployment.
10. An apparatus for containerized deployment of a host, wherein the apparatus comprises:
the system comprises an acquisition unit, a configuration unit and a configuration unit, wherein the acquisition unit is configured to acquire an Internet Protocol (IP) address of a host to be deployed to obtain an IP address set;
the connection unit is configured to establish connection with a host to be deployed indicated by an IP address in the IP address set;
a deployment unit, configured to perform containerized deployment on a connected host to be deployed, indicated by an IP address in the IP address set, for the host to be deployed, where the containerized deployment includes: determining the running environment information of the host to be deployed, acquiring deployment information matched with the running environment information, and deploying a basic environment and a container arrangement tool supporting containerization on the host to be deployed according to the deployment information;
before the hosts to be deployed are deployed in batches, a sample host to be deployed is selected from the hosts to be deployed for deployment testing.
11. The apparatus of claim 10, wherein the apparatus further comprises:
the grouping unit is configured to group the hosts to be deployed indicated by the IP addresses in the IP address set according to the operating environment information or the function type information of the hosts to be deployed indicated by the IP addresses in the IP address set or according to the received grouping information sent by the user to obtain an IP address group set;
the deployment unit is further configured to perform containerized deployment on the host groups to be deployed corresponding to the IP address groups in the IP address group set in parallel.
12. The apparatus of claim 10, wherein the apparatus further comprises:
a receiving unit configured to receive a set of applications to be installed and application installation order information indicated by a user;
the deployment unit is further configured to install the applications to be installed in the set of applications to be installed on the connected hosts to be deployed indicated by the IP addresses in the set of IP addresses according to the installation order indicated by the application installation order information.
13. The apparatus of claim 11, wherein the deployment unit is further configured to:
determining hosts to be deployed indicated by a target number of IP addresses in the IP address group as a sample host set to be deployed according to the IP address group in the IP address group set; performing containerization deployment on the hosts to be deployed in the sample host to be deployed set; and in response to the fact that the deployment success rate corresponding to the sample host set to be deployed is larger than a preset sample success rate threshold value, performing containerization deployment on the non-sample host to be deployed indicated by the IP address in the IP address group.
14. The apparatus of claim 11, wherein the deployment unit is further configured to:
for an IP address group in the IP address group set, determining the number of IP addresses contained in the IP address group, taking the product of the determined number and a preset deployment failure rate threshold value as a target number, and stopping containerization deployment of hosts to be deployed which are indicated by the IP address in the IP address group and have not finished containerization deployment in response to determining that the number of hosts to be deployed which are indicated by the IP address in the IP address group and have failed containerization deployment is greater than the target number; determining fault information causing failure of containerized deployment; and responding to the repair failure, and continuing the containerized deployment of the hosts to be deployed which are indicated by the IP addresses in the IP address group and do not complete the containerized deployment.
15. The apparatus of claim 10, wherein the runtime environment information comprises operating system version information, and the deployment information that matches the runtime environment information comprises a deployment file that matches an operating system represented by the operating system version information.
16. The apparatus of claim 10, wherein the deployment unit is further configured to:
and searching deployment information matched with the operating environment information from a preset deployment information base.
17. The apparatus of claim 10, wherein the connection unit is further configured to:
and establishing a connection based on a secure shell protocol with the host to be deployed indicated by the IP address in the IP address set.
18. The apparatus according to one of claims 10-17, wherein the apparatus further comprises:
an output unit configured to output information related to the containerized deployment.
19. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
20. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN201810810851.0A 2018-07-23 2018-07-23 Method and apparatus for containerized deployment of hosts Active CN109120433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810810851.0A CN109120433B (en) 2018-07-23 2018-07-23 Method and apparatus for containerized deployment of hosts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810810851.0A CN109120433B (en) 2018-07-23 2018-07-23 Method and apparatus for containerized deployment of hosts

Publications (2)

Publication Number Publication Date
CN109120433A CN109120433A (en) 2019-01-01
CN109120433B true CN109120433B (en) 2021-11-02

Family

ID=64863030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810810851.0A Active CN109120433B (en) 2018-07-23 2018-07-23 Method and apparatus for containerized deployment of hosts

Country Status (1)

Country Link
CN (1) CN109120433B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806881B (en) * 2019-11-05 2023-07-04 浪潮云信息技术股份公司 Method for deploying different CPU architectures by kubernetes
CN111857758B (en) * 2020-07-27 2024-03-22 平安科技(深圳)有限公司 Application deployment method, device and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867955A (en) * 2015-09-18 2016-08-17 乐视云计算有限公司 Deployment system and deployment method of application program
CN105893010A (en) * 2015-11-17 2016-08-24 乐视云计算有限公司 Host scheduling method and system used for container deployment
CN106020930A (en) * 2016-05-13 2016-10-12 深圳市中润四方信息技术有限公司 Application container based application management method and system
CN106874028A (en) * 2016-12-26 2017-06-20 新华三技术有限公司 Using dispositions method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867955A (en) * 2015-09-18 2016-08-17 乐视云计算有限公司 Deployment system and deployment method of application program
CN105893010A (en) * 2015-11-17 2016-08-24 乐视云计算有限公司 Host scheduling method and system used for container deployment
CN106020930A (en) * 2016-05-13 2016-10-12 深圳市中润四方信息技术有限公司 Application container based application management method and system
CN106874028A (en) * 2016-12-26 2017-06-20 新华三技术有限公司 Using dispositions method and device

Also Published As

Publication number Publication date
CN109120433A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
US10613788B2 (en) Data migration between cloud storage systems
US9386079B2 (en) Method and system of virtual desktop infrastructure deployment studio
US8332496B2 (en) Provisioning of operating environments on a server in a networked environment
CN112119374A (en) Selectively providing mutual transport layer security using alternate server names
CN108768730B (en) Method and device for operating intelligent network card
TW201444320A (en) Setup method and system for client and server environment
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
CN110647332A (en) Software deployment method and device based on container cloud
US20160378521A1 (en) Automated test optimization
CN111818145B (en) File transmission method, device, system, equipment and storage medium
CN109120433B (en) Method and apparatus for containerized deployment of hosts
CN109873732B (en) Test method and device for proxy server
CN110677307B (en) Service monitoring method, device, equipment and storage medium
CN114356521A (en) Task scheduling method and device, electronic equipment and storage medium
CN114168471A (en) Test method, test device, electronic equipment and storage medium
CN109582487B (en) Method and apparatus for transmitting information
CN111488268A (en) Dispatching method and dispatching device for automatic test
CN112506772B (en) Web automatic test method, device, electronic equipment and storage medium
CN114978923A (en) Fault drilling method, device and system
CN114629831A (en) Network card performance test method, device, equipment and storage medium
CN110221910B (en) Method and apparatus for performing MPI jobs
CN113448730A (en) Service processing method and device, computer equipment and storage medium
CN109324802B (en) Method and device for configuring server
CN113778527A (en) Method and apparatus for controlling state of pipeline task
CN116820526B (en) Operating system upgrading method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant