CN111324412A - Service deployment method, device and storage medium - Google Patents

Service deployment method, device and storage medium Download PDF

Info

Publication number
CN111324412A
CN111324412A CN201811527985.8A CN201811527985A CN111324412A CN 111324412 A CN111324412 A CN 111324412A CN 201811527985 A CN201811527985 A CN 201811527985A CN 111324412 A CN111324412 A CN 111324412A
Authority
CN
China
Prior art keywords
service
deployment
isolated
information
operating environment
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
CN201811527985.8A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811527985.8A priority Critical patent/CN111324412A/en
Publication of CN111324412A publication Critical patent/CN111324412A/en
Pending legal-status Critical Current

Links

Images

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • 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/45595Network integration; Enabling network access in virtual machine instances

Landscapes

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

Abstract

In the embodiment of the application, a configuration file and a deployment file of a service are deployed on first equipment needing to deploy the service in advance, and when the service needs to be deployed, the first equipment can be triggered to automatically deploy at least one service in at least one isolated operation environment on the equipment according to the configuration file and a script file, so that the automatic deployment of the service is realized, the deployment process of the service is greatly simplified, the labor cost and the operation requirement on deployment personnel are reduced, and the deployment rate and the deployment accuracy are improved.

Description

Service deployment method, device and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a service deployment method, device, and storage medium.
Background
Traditional network clouds can be divided into: private clouds, hybrid clouds, and public clouds. The private cloud can virtualize or pool the existing hardware resources, and can guarantee the security of data, so that more and more attention and applications are paid, but the defects of the private cloud in the aspects of cost, maintenance, cloud access, data migration and the like are very obvious.
In order to solve the defects of the private cloud, the private cloud is born as a novel network cloud, and the private cloud is based on a data center of a cloud service provider, so that the construction, operation and maintenance costs of infrastructure can be greatly simplified. Related services need to be deployed in a proprietary cloud network environment, at present, services are deployed in the proprietary cloud network environment mainly in a manual mode, efficiency of manual service deployment is low, and problems such as deployment errors can occur.
Disclosure of Invention
Aspects of the present application provide a service deployment method, device, and storage medium, which are used to automatically deploy services and improve deployment efficiency and accuracy.
The embodiment of the application provides a service deployment method, which is applied to first equipment, and comprises the following steps: responding to a trigger command of deploying services, and reading a configuration file, wherein the configuration file comprises operating environment description information of at least one service; creating at least one isolated operating environment on the first device according to the operating environment description information of the at least one service; and respectively deploying the at least one service in the at least one isolated operation environment according to the deployment file corresponding to the at least one service.
The embodiment of the application further provides a service deployment method applied to the second device, and the method comprises the following steps: receiving executable code sent by a first device, wherein the executable code is generated by the first device according to the operating environment description information of at least one service; executing the executable code to create at least one isolated execution environment on the second device; receiving a deployment file corresponding to the at least one service sent by the first device, and respectively deploying the at least one service in the at least one isolated operation environment according to the deployment file corresponding to the at least one service.
An embodiment of the present application further provides an apparatus, including: a memory and a processor; the memory for storing a computer program; the processor to execute the computer program to: responding to a trigger command of deploying services, and reading a configuration file, wherein the configuration file comprises operating environment description information of at least one service; creating at least one isolated operating environment on the first device according to the operating environment description information of the at least one service; and respectively deploying the at least one service in the at least one isolated operation environment according to the deployment file corresponding to the at least one service.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, which when executed by one or more processors causes the one or more processors to implement the steps in the service deployment method executed by the first device.
An embodiment of the present application further provides an apparatus, including: a memory, a processor, and a communication component; the communication component is used for receiving the executable code sent by the first equipment and receiving a deployment file corresponding to at least one service sent by the first equipment; the executable code is generated by the first device according to the running environment description information of the at least one service; the memory for storing a computer program; the processor to execute the computer program to: executing the executable code to create at least one isolated execution environment on the device; and respectively deploying the at least one service in the at least one isolated operation environment according to the deployment file corresponding to the at least one service.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, which when executed by one or more processors causes the one or more processors to implement the steps in the service deployment method executed by the second device.
The embodiment of the present application further provides a method for deploying a service in a proprietary cloud, which is applied to a first device in the proprietary cloud, and the method includes: responding to a trigger command of a deployment service, and reading a configuration file, wherein the configuration file comprises network configuration information and virtual machine configuration information of at least one basic service required by the proprietary cloud; creating at least one virtual machine on the first device according to the network configuration information and the virtual machine configuration information corresponding to the at least one basic service; and respectively deploying the at least one basic service in the at least one virtual machine according to the deployment file corresponding to the at least one basic service.
The embodiment of the present application further provides a method for deploying a service in a proprietary cloud, which is applied to a second device in the proprietary cloud, and the method includes: receiving an executable code sent by a first device in the private cloud, wherein the executable code is generated by the first device according to network configuration information and virtual machine configuration information corresponding to at least one service required by the private cloud; running the executable code to create at least one virtual machine on the second device; receiving a deployment file corresponding to the at least one basic service sent by the first device, and respectively deploying the at least one basic service in the at least one virtual machine according to the deployment file corresponding to the at least one basic service.
In the embodiment of the application, the configuration file and the deployment file of the service are deployed on the first device needing to deploy the service in advance, when the service needs to be deployed, the first device can be triggered to automatically deploy at least one service in at least one isolated operation environment on the device according to the configuration file and the script file, automatic deployment of the service is achieved, the deployment process of the service is greatly simplified, labor cost is reduced, operation requirements on deployment personnel are met, and deployment rate and accuracy are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1A is a schematic structural diagram of a network system according to an exemplary embodiment of the present disclosure;
fig. 1B is a schematic structural diagram of a network system according to another exemplary embodiment of the present application;
FIG. 2 is a flowchart illustrating a service deployment method according to an exemplary embodiment of the present application;
FIG. 3 is a flowchart illustrating a service deployment method according to another exemplary embodiment of the present application;
FIG. 4 is a block diagram of a service deployment apparatus according to an exemplary embodiment of the present application;
FIG. 5 is a block diagram of a structural framework for a service deployment apparatus provided by an exemplary embodiment of the present application;
FIG. 6 is a schematic block diagram of an apparatus provided in an exemplary embodiment of the present application;
fig. 7 is a schematic structural diagram of an apparatus according to another exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In a proprietary cloud network environment, multiple devices, such as servers; before the proprietary cloud is normally used, some services required for normal operation of the proprietary cloud need to be deployed on one or several devices in the proprietary cloud, the services are system environments of the proprietary cloud network and are the basis for deploying other services or applications in the proprietary cloud network, and therefore the services can be called basic services. The basic services are various in types, network and application configuration is complex, operation and maintenance workers manually deploy the basic services one by one, efficiency is low, and configuration correctness cannot be guaranteed.
Therefore, in some embodiments of the application, a configuration file and a deployment file of a service are deployed on a device requiring the service deployment in advance, and when the service deployment is required, the device can be triggered to automatically deploy at least one service to be deployed in at least one isolated operating environment on the device according to the configuration file and the deployment file, so that the automatic deployment of the service is realized, the deployment process of the service is greatly simplified, the labor cost and the operation requirement on deployment personnel are reduced, and the deployment rate and the deployment accuracy are improved.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1A is a schematic structural diagram of a network system according to an exemplary embodiment of the present application. As shown in fig. 1A, the network system 100A includes: a plurality of devices including the first device 101 and other devices 102.
The first device 101 and the other devices 102 in the network system 100A may be computer devices that can provide a computing processing service, respond to a service request, and perform corresponding processing. In physical implementation, the first device 101 or the other device 102 may be a server, for example, may be a conventional server, a cloud host, a virtual center, and the like. The server mainly comprises a processor, a hard disk, a memory, a system bus and the like, and is similar to a general computer framework. Of course, besides the server, the first device 101 or the other devices 102 may also be terminal devices, such as a laptop, a desktop, a smartphone, etc.
It should be noted that the network system provided in this embodiment may be applied to a network cloud, for example, the network system may be implemented as a private cloud, or a public cloud, but is not limited thereto. Alternatively, the network system provided by the embodiment may also be applied to a data center.
Before the network system 100A is normally operated or used, relevant services need to be deployed on devices in the network system 100A so that the network system 100A can be normally operated or used. In this embodiment, the type and number of the services that need to be deployed in the network system 100A are not limited, and may be determined according to the application scenario to which the network system 100A belongs.
No matter what kind of service is deployed, an automatic service deployment mode can be adopted in the network system 100A, so that the service deployment process is simplified, the labor cost and the operation requirements on deployment personnel are reduced, the deployment rate is further improved, errors caused by human are overcome, and the accuracy of service deployment is improved.
In the present embodiment, a process of automatically deploying a service is described by taking the deployment of at least one service on the first device 101 as an example. The first device 101 may be any device in the network system 100A. The at least one service may be one service or a plurality of services. The at least one service may include a base service and may also include a non-base service that is dependent on the base service.
In this embodiment, assuming that at least one service needs to be deployed on the first device 101, a configuration file and a deployment file corresponding to the at least one service may be deployed on the first device 101 in advance. The configuration file stores therein operating environment description information of at least one service, and the operating environment description information reveals an operating environment required for normal operation of the at least one service, and provides a basis for the first device 101 to create a corresponding operating environment for the at least one service. The deployment file records an operation flow required for deploying at least one service, and has a guiding effect on the first device 101 to deploy at least one service in the created operating environment. Alternatively, the deployment file may be an executable script file, but is not limited thereto.
When at least one service needs to be deployed, the deployment personnel may issue a trigger command for deploying the service to the first device 101, thereby triggering the first device 101 to automatically deploy the at least one service. For the first device 101, the configuration file may be read in response to a trigger command to deploy the service; according to the operating environment description information of at least one service contained in the configuration file, at least one isolated operating environment is created on the first device 101, and a deployment file corresponding to the at least one service is read, so that the at least one service is respectively deployed in the at least one isolated operating environment according to the operation flow in the deployment file, and automatic deployment of the service is realized.
Optionally, at least one service deployed on the first device 101 may provide a service for the first device 101 itself, or may provide a service for the other devices 102 in the network system 100A. If the other device 102 needs to use at least one service deployed on the first device 101, after the first device 101 successfully deploys the at least one service, the service request may be sent to the first device 101, and the service response data returned by the first device 101 is received, and corresponding operation is executed according to the service response data.
In some application scenarios, in order to ensure that the network system 100A operates normally, some basic services, which are the operation basis of the network system 100A, need to be deployed in the network system 100A, and only after the basic services are deployed, the other devices 102 in the network system 100A can deploy operating systems, applications, and the like by using the basic services. Based on this, the at least one service that needs to be deployed on the first device 101 may include a basic service that provides a basis for the network system 100A to operate. These basic services can be considered as machine tools in the network system 100A. Accordingly, the other device 102 may use these basic services deployed on the first device 101.
Taking a proprietary cloud scenario as an example, these base services may include Operations (OPS) base services and storage services that service the OPS base services. The OPS base services may include, but are not limited to: a provisioning (Clone) application service, an Out Of Band (OOB) service, an Out Of Band Master (Out Of Band Master) service, an installation process management service, a software package manager download (YUM) service, a Domain Name System (DNS) service, a Time synchronization (NTP) service, and the like. Wherein the storage service mainly stores valid data for different OPS base services.
Among the basic services, the Clone application service, the installation service, and the installation process management service are mainly used for installing operating systems of other devices. The Clone application service provides a file downloading service required by the installation of the operating system, the installation service is responsible for the establishment of an installation task of the operating system, and the installation process management service is responsible for the initiation, the closing and the error processing of an installation process of the operating system.
Among the basic services, the OOB service provides an out-of-band IP allocation service of other devices and an out-of-band command issuing service. The OOB Master service is used for managing out-of-band information of all devices in the network system, including out-of-band IP, MAC addresses, out-of-band account name passwords and the like, and simultaneously provides an interface for issuing out-of-band commands to other devices. The YUM service provides a service for software package download. The DNS service provides domain name resolution services within the network system. The NTP service is used by other devices to synchronize system time.
Based on the above, after the basic service is successfully deployed on the first device 101, the other devices 102 may rely on the basic service deployed on the first device 101 to complete the deployment of the non-basic service. To use the basic service deployed on the first device 101, the other device 102 may send a service request to the first device 101, receive service response data returned by the first device 101, and locally deploy the non-basic service according to the service response data. For example, the other device 102 installs an operating system, requiring use of the installed services provided by the first device 101; the other device 102 needs to install the related packages using the YUM service provided by the first device 101 during the deployment of the application. In addition, after some non-basic services are successfully installed, the other device 102 may also perform domain name resolution through the DNS service provided by the first device 101. Further, the other device 102 can also guarantee time consistency with the other device through the NTP service provided by the first device 101.
In this embodiment, the first device 101 may be in network connection with the other device 102. The first device 101 may be in wireless or wired network connection with the other device 102. If the first device 101 is communicatively connected to the other devices 102 through a mobile network, the network format of the mobile network may be any one of 2G (gsm), 2.5G (gprs), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G + (LTE +), WiMax, and the like.
It should be noted that the at least one service may be deployed on one device or multiple devices. Alternatively, when the services are deployed on multiple devices, a master-slave relationship may be formed between the multiple devices. For a system architecture and a deployment process of performing active/standby deployment on at least one service, reference may be made to the description in the embodiment shown in fig. 1B. It should be noted that, in the embodiment shown in fig. 1B, at least one service may also be a basic service for providing an operation basis for the network system, but is not limited thereto.
Fig. 1B is a schematic structural diagram of a network system according to another exemplary embodiment of the present application. As shown in fig. 1B, the network system 100B includes a plurality of devices including a first device 101, a second device 104, and other devices 102, similar to the network system 100A.
For a description of the first device 101 and the other devices 102, reference may be made to the network system 100A, which is not described herein again. Similar to the first device 101 and the other devices 102, the second device 104 is also a computer device that can provide a computing processing service, respond to a service request, and perform corresponding processing. In terms of physical implementation, the second device 104 may be a server device such as a conventional server, a cloud host, a virtual center, or may be a terminal device.
Similar to the network system 100A, before the network system 100B is normally operated or used, relevant services need to be deployed on devices in the network system 100B so that the network system 100B can be normally operated or used. In this embodiment, the type and the number of the services that need to be deployed in the network system 100B are not limited, and may be determined according to the application scenario to which the network system 100B belongs.
Similarly, the network system 100B also adopts an automatic service deployment manner, so as to simplify the service deployment process, reduce the labor cost and the operation requirements on the deployment personnel, further improve the deployment rate, overcome human errors, and improve the accuracy of service deployment.
In this embodiment, at least one service needs to be deployed on the first device 101 and the second device 104, and the first device 101 and the second device 102 form a master-slave relationship, that is, when the first device 101 deploys the service, the services may also be deployed on the second device 104, so as to achieve the purpose of service backup. In this way, when the service deployed in the first device 101 is abnormal and cannot be recovered, the service on the second device 104 can be used to ensure the normal operation of the network system 100B.
It should be noted that there may be a plurality of backup devices of the first device 101, and for clarity, the first device 101 and the second device 104 are taken as examples for explaining how to deploy services on the primary and backup devices, and the process of deploying services on other backup devices is the same as the process of deploying services on the second device 104.
In the network system 100B, a procedure for deploying at least one service on the first device 101 is the same as that for deploying at least one service on the first device 101 in the network system 100A, and is not described herein again, and an emphasis is placed on how to deploy at least one service on the second device 104.
In this embodiment, in addition to deploying at least one service on the first device 101, the first device may also generate an executable code according to the operating environment description information of the at least one service, and send the executable code to the second device 104, where the second device 104 may execute the executable code to create at least one isolated operating environment on the second device 104; further, the first device 101 may also send a deployment file corresponding to at least one service to the second device 104, and the second device 104 deploys the at least one service in at least one isolated operating environment on the second device 104 according to the deployment file corresponding to the at least one service. In this embodiment, the second device 104 may successfully deploy at least one service under the control of the first device 101, so as to form a primary-standby relationship with the first device 101. It is worth noting that the configuration file and the deployment file need not be stored on the second device 104, but are not limited thereto.
Optionally, the first device 101 may include a display component, by which deployment completion prompt information of the at least one service may be displayed. For example, after the first device 101 successfully deploys the at least one service, a deployment completion prompt of the at least one service may be displayed through its display component. For another example, after the second device 104 successfully deploys the at least one service, a deployment completion prompt message may be sent to the first device 101, and the first device 101 may display the deployment completion prompt message for successfully deploying the at least one service on the second device 104 to the deployment staff through the display component. Of course, the second device 104 may also include a display component, and the deployment completion prompt message of the at least one service may be displayed through the display component after the at least one service is successfully deployed.
Optionally, at least one service deployed on the first device 101 and the second device 104 may provide a service for the first device 101 and the second device 104 themselves, or may provide a service for the other devices 102 in the network system 100A. The other device 102 is a device different from the first device 101 and the second device 104 in the network system 100B. If the other device 102 needs to use the at least one service, a service request may be sent to the first device 101 or the second device 104 after the at least one service is successfully deployed. Optionally, when the first device 101 operates normally, the other device 102 may preferentially send a service request to the first device 101 to request a required service; when the first device 101 fails, the second device 104 takes over the first device 101 to start working, and the other devices 102 may send a service request to the second device 104 to request a required service. The first device 101 or the second device 104 may receive a service request sent by the other device 102, and when the first device 101 or the second device 104 receives the service request sent by the other device 102, the first device 101 or the second device 104 processes the service request and returns service response data to the other device 102.
Further, in the embodiment shown in fig. 1B, in order to reduce that the access flows of the same service are all concentrated on one device in the case that there is a primary-secondary relationship, a load balancing policy may be adopted to balance the access flows of each service to the first device and the second device, so as to implement load balancing. The load balancing policy is some policy or allocation rule that can equally allocate the access traffic of each service to the first device 101 and the second device 104 according to the processing capabilities of the first device 101 and the second device 104. Optionally, the load balancing policy may include an allocation proportion of access traffic of each service across the first device 101 and the second device 104. For the first device 101, the access traffic of each service may also be balanced to the first device 101 and the second device 104 according to a load balancing policy, so that all the access traffic is prevented from being concentrated on one device, and load balancing is achieved.
For example, after receiving a service request sent by another device 102, the first device 101 may perform load balancing on the received service request according to a load balancing policy and by combining the current access traffic of the service on the first device and the current access traffic of the service on the second device 104, that is, may send a part of the access traffic to the first device 101, where the part of the access traffic is processed by a corresponding service on the first device 101, and send another part of the access traffic to the second device 104, where the part of the access traffic is processed by a corresponding service on the second device 104. If a service request is sent to the second device 104, the corresponding service on the second device 104 will process the service request. Optionally, the second device 104 may return response data for the service request to the first device 101, and the first device 101 sends the response data to the other device 102 that sent the service request. Alternatively, the second device 104 may directly transmit the response data for the service request to the other device 102 that transmitted the service request.
The following describes in detail a process of deploying a service by the first device 101 or the second device 104, with reference to the method embodiment.
Fig. 2 is a flowchart illustrating a service deployment method according to an exemplary embodiment of the present application. The method 200 provided by the embodiment of the present application is performed by a first device. It should be noted that executable codes such as an application program, a system plug-in, an sdk (software Development kit), etc. may be installed on the first device, and the steps in the method 200 of the embodiment are implemented by running the executable codes. For convenience of description, the executable code deployed on the first device and capable of implementing the logic of the method 200 of the present embodiment may be referred to as build executable code. As shown in fig. 2, the method 200 implemented by the first device executing the build executable code includes the following steps:
201: and reading a configuration file in response to a trigger command for deploying the service, wherein the configuration file comprises the running environment description information of at least one service.
202: at least one isolated execution environment is created on the first device based on the execution environment description information for the at least one service.
203: and respectively deploying the at least one service in at least one isolated operation environment according to the deployment file corresponding to the at least one service.
In this embodiment, the configuration file includes operating environment description information of at least one service. The service operation environment description information mainly includes some parameters capable of representing the operation environment on which the service normally operates, such as resource information and network information in the operation environment. The resource information may include the size of the hard disk, the number of CPU cores, etc.; the network information may be network segment information, IP address, etc. where the operating environment is located. In the embodiment, the operating environment description information of at least one service is stored in a file form, so that the parameters are conveniently and quickly changed, and the maintenance cost of the code is reduced. It should be noted that the operating environment description information of different services may be the same or different.
In this embodiment, the at least one service refers to a service that needs to be deployed on the first device, and may be one or multiple. In addition, at least one service may be some basic services or non-basic services depending on the basic service. The basic service is a service which can enable other devices in a network system where the first device is located to have basic operating conditions, and further enable the other devices to further deploy other non-basic services depending on the basic service. It is worth noting that the basic service may be different according to different application scenarios and application requirements. Taking a proprietary cloud network environment as an example, its basic services may include, but are not limited to: the system comprises a Clone application service, an installation process management service, an OOB Master service, a YUM service, a DNS service, an NTP service and the like.
When at least one service needs to be deployed, the deployment personnel may issue a trigger command to the first device, the trigger command instructing the deployment of the service. When the first device receives the trigger command, the first device may read a pre-stored configuration file according to the trigger command.
In an alternative embodiment, the first device may provide a command input interface to the deployment personnel through which the deployment personnel may input a trigger command to trigger the first device to begin deploying the service. Based on this, one way of reading the configuration file in response to the trigger command of the deployment service includes: responding to the trigger operation of deployment personnel, and displaying a command input interface; receiving a trigger command which is input in a command input interface by a deployment person and indicates that the service is deployed; and reading the configuration file from the preset path according to the trigger command.
The command input interface is an interface displayed through the display component and is an interface for interacting with deployment personnel. The implementation form of the command input interface may be different according to the product form implemented by the build executable code. If the product form realized by the build executable code is an application program, the command input interface may be a page in the application program, for example, a home page; if the product form realized by the build executable code is a browser, the command input interface can be a WEB page; if the product form implemented by the build executable code is a system plug-in, the command input interface may be a command window provided by an operating system, and the like.
For example, a deployment person clicks a build executable code pre-stored in a first device to implement the method 200, the first device runs the build executable code, the command input interface is displayed through a display component, the deployment person inputs a deployment trigger command in the command input interface, which may be a segment of executable trigger code, and after receiving the trigger command, the first device executes the trigger command, searches for the configuration file, such as xx.txt, from a preset path in a local storage area of the first device, and reads the configuration file. It should be noted that the build executable code may be copied to the local storage area of the first device through the storage device, such as through a usb flash disk, in advance by the deployment personnel.
In some examples, the method 200 further comprises: responding to information input operation, and acquiring running environment description information of at least one service input by deployment personnel; performing validity check on the operation environment description information of at least one service; and after the verification is passed, writing the operation environment description information of at least one service into a configuration file, and storing the configuration file under a preset path.
The information input operation is an operation of inputting the operation environment description information of at least one service. For example, the deployment personnel inputs the operating environment description information of at least one service through an interface displayed by the display component. For another example, the deployment personnel may also input the operating environment description information of the at least one service by voice.
Optionally, the first device may automatically perform validity check on the operating environment description information, or may perform validity check on the operating environment description information according to a check command of a deployment worker. When the verification is triggered through the verification command, the deployment personnel inputs the verification command to the first equipment through the command input interface, and after the first equipment receives the verification command, the validity of the operating environment description information is verified. When automatic verification is performed, after the first device acquires the operating environment description information, validity verification is directly performed on the operating environment description information.
It should be noted that, according to the difference of the operation environment description information of at least one service, the specific operation of performing validity check on the operation environment description information may also be different.
In an alternative embodiment, at least one service may provide services to other devices in the network system, for example, when at least one service is a basic service in the network system, other devices in the network system need to deploy non-basic services on themselves using the basic service. This means that these services need to have the ability to communicate with other devices in the network. In addition, the services need to rely on certain software and hardware resources for normal operation. Based on this, the operation environment description information of these services may include: network information and resource information required for each service to operate normally. The network information required for each service to operate normally may include network information of the isolated operating environment that carries the service, such as an IP address. The resource information required for normal operation of each service may include software and hardware resources required for the isolated operating environment carrying the service, such as the size of a hard disk, the size of a memory, the number of CPU cores, and the like.
Based on the above example of the runtime environment description information, the validity check of the runtime environment description information of the at least one service may include, but is not limited to: and checking whether the IP address of the isolation operation environment required by each service is in the same network segment with the IP address of the first equipment, whether the IP address of the isolation operation environment required by each service conflicts, whether the software and hardware resource information of the isolation operation environment required by each service is matched with the software and hardware resources of the first equipment, and the like.
Taking IP address verification as an example, assume that the IP address of the first device is: 192.168.2.201, the IP address of the isolated operating environment for a service is: 192.168.2.206, if the two IP addresses belong to the same network segment, the IP address of the isolated operating environment needed by the service is considered to pass the verification.
Taking the software and hardware resource information of the isolated operating environment required by each service as an example, assuming that the first device includes 8 CPU cores, and the number of CPU cores of the isolated operating environment required by each service is 2, the number of CPU cores of the isolated operating environment required by each service is smaller than the maximum number of CPU cores (i.e., 8 cores) of the first device, and the verification is considered to be passed. It should be noted that, in this scenario, the IP addresses of the devices in the network where the first device is located are in the same network segment.
After reading the configuration file, the first device may create at least one isolated operating environment on the first device according to the operating environment description information of the at least one service contained in the configuration file.
It should be noted that the manner in which the at least one isolated runtime environment is created on the first device may vary if the runtime environment description information for the at least one service differs. In an optional embodiment, the runtime environment description information of at least one service includes: network information and resource information required for the normal operation of at least one service. In this alternative embodiment, one alternative way of creating at least one isolated execution environment on the first device based on the execution environment description information for the at least one service includes: reading at least one piece of resource information and network information required by normal operation of the service from the configuration file; and creating at least one isolated operation object corresponding to the at least one service on the first equipment according to the resource information and the network information required by the normal operation of the at least one service so as to obtain at least one isolated operation environment. The resource information required by the normal operation of each service is the resource information required by the operation of the corresponding isolated operation object, and generally comprises software and/or hardware resource information; similarly, the network information required for the normal operation of each service is the network information required for the communication between the corresponding isolated operation object and other devices. The network card of the isolated operation object and the network card of the first device may be bridged, and after the isolated operation object is successfully bridged with the first device, the isolated operation object also has the capability of communicating with other devices except the first device.
The isolated operation environment refers to an operation environment which is established on the first device, depends on software and hardware resources on the first device, and is mutually independent from other isolated operation environments. The isolation operation object is a kernel and a foundation stone of the isolation operation environment and is a basis for existence of the isolation operation environment. Alternatively, the isolated execution object may be a virtual machine or a container (Docker). In this embodiment, the isolated operating environment includes an isolated operating object, and network information and resource information configured for the isolated operating object.
Taking a virtual machine as an example, the virtual machine refers to a brand new virtual mirror image of an operating system on first equipment, and has the same functions as a real operating system, after entering the virtual system, all operations are performed in the brand new independent virtual system, running software can be independently installed, data can be stored, and the virtual machine has an independent desktop.
Optionally, the build executable code that may be pre-stored on the first device may include a creation code for creating an isolated runtime object, and the first device executing the creation code may create at least one isolated runtime environment corresponding to the at least one service on the first device. The number of the isolated operation environments to be created can be preset in the code, and the number of the isolated operation environments is the same as the number of the at least one service, so that one service can be deployed in one isolated operation environment.
Optionally, the manner of obtaining at least one isolated operating environment may be: when the code is created to run, firstly, the resource information such as the number of CPU cores, the memory, the hard disk and the like required by the normal running of at least one service and the network information are read from the configuration file, and then an isolated running object meeting the configuration requirement, such as a virtual machine or a container and the like, is created for each service on the first equipment according to the resource information and the network information required by the normal running of at least one service, so that an isolated running environment of each service is obtained.
In some examples, the method 200 further comprises: after the at least one isolation operation environment is successfully created, prompt information of completion of creation of the isolation operation environment can be output to deployment personnel to inform the deployment personnel that the isolation operation environment is successfully created and prompt the deployment personnel to deploy services in the isolation operation environment.
If the isolated operation environment is failed to be established, information of the isolated operation environment establishment failure can be output to deployment personnel, at this moment, the deployment personnel can manually stop the service deployment process, or when the isolated operation environment is failed to be established, the first equipment automatically stops the service deployment process. After the isolated operation environment is failed to be established, deployment personnel can analyze the information of the isolated operation environment deployment failure to search for bugs existing in the buid executable code and repair the bugs existing in the buid executable code, and after no problem exists, the service deployment process is re-run, namely, the first equipment is triggered to start the service deployment process through the process described above and the triggering command again. After restarting the service deployment process, the first device checks whether there is a service deployment process that has started to be not completed (or interrupted), and if so, continues to perform subsequent operations from the interrupted position.
It should be noted that, when repairing a code vulnerability that the isolated operating environment has failed to create, the deployer or the developer may only repair a portion where the vulnerability exists, but is not limited to this.
After the at least one isolated operating environment is established, the at least one service may be respectively deployed in the at least one isolated operating environment according to the deployment file corresponding to the at least one service. In which one service can be deployed in one isolated operating environment, thereby implementing isolation between different services. Optionally, if the at least one service is a basic service, the at least one basic service is respectively deployed in the at least one isolated operating environment, so that an operating basis of a network where the first device is located can be realized. Alternatively, the deployment file may be an executable script file, but is not limited thereto.
Optionally, respectively deploying at least one service in at least one isolated operation environment according to a deployment file corresponding to the at least one service to implement an operation basis of a network environment in which the first device is located, including: responding to a service deployment command of a deployment worker, and respectively issuing deployment files corresponding to at least one service to at least one isolated operation object; and at least one isolation operation object deploys corresponding services in the isolation operation environment according to the received deployment file.
The service deployment command refers to a command which is sent by a deployment person to the first device and used for deploying at least one service into a corresponding isolated operation environment. For example, the deployment person enters the service deployment command into the first device through the command entry interface.
It should be noted that, in this embodiment, the first device may also automatically issue the deployment file of the at least one service to the corresponding isolated operation object after the isolated operation environment is created, and trigger the corresponding isolated operation object to deploy the corresponding service in the isolated operation environment where the corresponding isolated operation object is located.
Optionally, the issuing, by the first device, the deployment file corresponding to the at least one service to the at least one isolated operation object respectively includes: calling a Saltsack channel, and respectively issuing deployment files corresponding to at least one service to at least one isolated operation object; or calling an infrastructure channel, and respectively issuing the deployment file corresponding to at least one service to at least one isolated operation object; or respectively issuing the deployment files corresponding to the at least one service to the at least one isolated operation object through the SSH channel.
The Saltsack is a centralized management platform of a server infrastructure, and has functions of configuration management, remote execution, monitoring and the like. And the Saltstack calling interface can be packaged in the first device, and the Saltstack channel is called through the Saltstack calling interface to respectively issue the deployment files of the corresponding services to the at least one isolation operation object.
The infrastructure is a configuration management system, and has functions of configuration management, remote execution, monitoring and the like. An anchor calling interface can be encapsulated in the first device, an anchor channel is called through the anchor calling interface, and deployment files corresponding to services are respectively issued to at least one isolation operation object.
The SSH (Secure Shell ) is a network protocol, and is used for encrypted login between devices, and the network protocol can be used to log in each isolated operating environment by the first device, and further can issue deployment files of corresponding services to at least one isolated operating environment through the SSH channel.
It should be noted that the precondition for issuing the service deployment command and the deployment file through the saltback channel and the infrastructure channel is that the IP address of the isolated operating environment is already configured and the bridging is successfully completed, that is, the isolated operating environment can successfully receive the externally issued data through the IP address.
Optionally, if the isolated operating environments required by the services are the same or substantially the same, a manner of issuing the deployment files may be that each deployment file is issued to any one isolated operating environment at random, it is ensured that each isolated operating environment has only one deployment file, and the deployment files received by each isolated operating environment are different, so that each deployment file can normally operate in different operating environments without mutual interference, and this manner can also save physical device resources in the machine room. Or, if the isolated operation environments required by the services are different, a corresponding relationship between the deployment file of each service and the isolated operation environment may be established, and then the deployment file of each service may be issued to the corresponding isolated operation environment in sequence according to the corresponding relationship.
In some examples, the method 200 further comprises: and after the at least one service is successfully deployed, outputting deployment completion prompt information of the at least one service to inform deployment personnel that the at least one service is deployed completely, and providing corresponding services for other equipment.
When at least one service is failed to be deployed, the service deployment failure information is acquired and output to the deployment personnel, and at the moment, the deployment personnel can manually stop the service deployment process, or when the service deployment failure occurs, the first equipment automatically stops the service deployment process. After at least one service deployment fails, a deployment person or a developer analyzes the failure information to search for bugs existing in the buid executable code, repairs the bugs existing in the buid executable code, and reruns the service deployment process after no problem exists, that is, the service deployment process can be triggered again through the service deployment command through the process described above.
In some examples, the method 200 further comprises: periodically monitoring an operational status of at least one service deployed to a first device; and if the running state of the same service is monitored to be abnormal continuously for multiple times, recovering the service which is monitored to be abnormal continuously for multiple times.
The operation state of the service refers to the operation condition of the service in the respective isolated operation environment. Optionally, a process state corresponding to the service may be monitored, and the process state directly reflects the operation condition of the service.
The abnormal running state refers to that a problem occurs in the running of the current service, such as that the process information of the service does not exist or is blocked. When the running state of the same service is monitored continuously for a plurality of times to be abnormal, the service can be restarted so as to carry out recovery operation on the service. Of course, the recovery operation on the service is not limited to the manner of restarting the service, and other manners may also be adopted, such as performing bug fixing on the service, restoring the relevant settings of the service to default values, and the like.
Optionally, the manner of periodically monitoring the running state of at least one service deployed on the first device may be that a saltback channel is periodically called, an anchor channel is called, or a detection command of a corresponding service is issued to each isolated running object through an SSH channel, after receiving the detection command, the isolated running object runs the detection command, so as to obtain process information corresponding to the corresponding service, and the obtained process information is returned to the first device through the saltback channel, the anchor channel, or the SSH channel.
Optionally, the first device compares process information corresponding to each preset service stored in the first device when the service is started with the process information returned by the corresponding isolated operation object, so as to determine whether the operation state of the service is abnormal.
For example, taking the Clone application service as an example, when it is monitored that the nginnx process of the Clone application service does not exist for multiple times and the number of times exceeds a threshold, it is determined that the running state of the Clone application service is abnormal, the first device may obtain a restart command of the nginnx process and send the restart command to a corresponding isolated running object through a saltback channel, an anchor channel, or an SSH channel; and after receiving the restart command of the Nginx process, the isolation running object runs the restart command to restart the Nginx process, so that the normal running of the Clone application service is ensured, and the Clone application service is provided for other equipment in the network where the first equipment is located.
After the at least one service is successfully deployed on the first device, the other device may send a service request to the first device to request use of the at least one service. However, providing at least one service to other devices in the network system only through the first device may cause a large amount of access traffic received by the first device due to a large number of other devices, which may cause access congestion and may not return service response data to other devices in a timely manner. To solve these problems, at least one backup device may be configured for the first device, and at least one service may be deployed on the backup device, so that part of the access traffic may be shared by the backup device. The following describes in detail a process of deploying a service on a second device, taking the second device as a backup device of a first device as an example.
In some examples, the method 200 further comprises: the first device may also generate executable code according to the operating environment description information of the at least one service; sending the executable code to a second device in a network where the first device is located, so that the second device creates at least one isolated operating environment on the second device by running the executable code; and sending the deployment file corresponding to the at least one service to the second device, so that the second device deploys the at least one service in at least one isolated operation environment on the second device according to the deployment file of the at least one service.
The executable code is suitable for being executed and used for instructing the second device to create the isolated operation environment, and the executable code can contain the operation environment description information of at least one service.
In some examples, network information and resource information required for normal operation of at least one service of the second device are obtained from the operating environment description information.
Optionally, the manner of sending the executable code to the second device in the network where the first device is located includes: the executable code is issued to the second device by calling the Saltsack channel, or calling the Ansible channel, or by the SSH channel.
After receiving the executable code, the second device runs the executable code, and creates at least one isolated running environment corresponding to at least one service on the second device, where a specific creation process is the same as that of the first device, and is not described herein again.
And when the isolation operation environment is successfully created, sending prompt information that the isolation operation environment is successfully created to the first equipment, so that the first equipment displays the prompt information that the isolation operation environment of the second equipment is successfully created to deployment personnel, and further indicates the deployment personnel to trigger the deployment service in the isolation operation environment on the second equipment.
When the isolated operating environment of the second device fails, according to the foregoing, processing is performed according to the failure processing mode of the first device, and meanwhile, the first device needs to send the executable code to the second device, which is not described herein again.
Optionally, the manner of sending the deployment file corresponding to the at least one service to the second device may be: and issuing at least one service deployment file to corresponding isolated operation environments on the second equipment by calling the Saltsack channel, or calling the infrastructure channel, or sending the at least one service deployment file to the corresponding isolated operation environments through the SSH channel, wherein each isolated operation environment has only one deployment file, and the deployment files in different isolated operation environments are different.
After the deployment file of the service is issued to the isolated operation environment on the second device, the isolated operation object in the isolated operation environment may operate the deployment file of the service to deploy the service in the isolated operation environment. And after the service is successfully deployed, sending prompt information of the successful service deployment to the first equipment, so that the first equipment displays the prompt information of the successful service deployment on the second equipment to deployment personnel.
When the service deployment of the second device fails, according to the foregoing, the processing is performed in the failure processing manner of the first device, and meanwhile, the deployment file needs to be sent to the second device by the first device, which is not described herein again.
It should be noted that the IP address of the isolated operating environment of the first device is different from the IP address of the isolated operating environment of the second device, but belongs to the same network segment.
It should be noted that the second device may not have executable code, such as build executable code, for deploying the service on the first device, and when at least one service needs to be deployed on the second device, the first device may send a corresponding executable command or a deployment file of the at least one service to the second device, that is, the second device may be controlled to implement the functions of creating the isolated operating environment and deploying the service in the isolated operating environment, which may be used to deploy the service on the backup device more easily and quickly.
When the first device has a backup device, a virtual server (LVS) load balancing service may also be deployed on the first device, where the LVS load balancing service is used to balance access traffic of the same service between the first device and the second device. Of course, the LVS load balancing service may also be deployed on the second device. In order to facilitate other devices to successfully access at least one service deployed on the first device or the second device under the condition of implementing load balancing, a virtual IP address may be configured for each service, and for other devices, it is only necessary to know the virtual IP address of each service, that is, other devices may access the service through the virtual IP address of the service. In this scenario, the configuration file corresponding to at least one service further includes: a binding relationship between the virtual IP address of each service and the IP addresses of the virtual execution environments of each service on the first device and the second device. Taking the Clone application service as an example, the virtual IP address of the Clone application service is denoted as IP-V, the IP address of the virtual operating environment on the first device is denoted as IP- cA, the IP address of the virtual operating environment on the second device is denoted as IP-B, and the binding relationship between IP-V, IP- cA and IP-B is stored in the configuration file.
In a scenario of deploying the LVS load balancing service, when other devices in the network system send a service request, the service request may first reach the LVS load balancing service on the first device or the second device. For the LVS load balancing service, receiving a service request of another device, where the service request carries a virtual IP address of a target service that the other device requests to access; inquiring the binding relation according to the virtual IP address of the target service to obtain the IP addresses of two isolated operating environments bound with the virtual IP address of the target service; and then according to the load balancing strategy, the service request is forwarded to the isolated operation environment corresponding to any one of the IP addresses of the two isolated operation environments.
It is worth noting that the LVS load balancing service may be deployed in an isolated operating environment, such as a virtual machine or a container. When the LVS load balancing service is deployed, the binding relationship between the virtual IP address of each service and the IP addresses of the virtual operating environments of each service on the first device and the second device is read from the configuration file and stored in the isolated operating environment where the service is located. Based on this, after receiving the service request of other equipment, the LVS load balancing service may directly query the local binding relationship of the isolated operation environment according to the virtual IP address of the target service carried in the service request, to obtain the IP addresses of the two isolated operation environments bound to the virtual IP address of the target service; and then according to the load balancing strategy, the service request is forwarded to the isolated operation environment corresponding to any one of the IP addresses of the two isolated operation environments.
The load balancing policy refers to policy information for distributing access traffic of the same service to the first device and the at least one backup device, and the load balancing policy is determined by the LVS load balancing service, for example, may be a random forwarding policy or forwarding according to a set traffic ratio. For the Clone application service, the ratio of the access traffic of the first device to the access traffic of the second device is 6:4, and then for 100 Clone application service requests, 60 Clone application service requests can be randomly selected to be forwarded to the first device, and the remaining 40 Clone application service requests can be forwarded to the second device. The foregoing method embodiment is mainly described from the perspective of the first device side, and in addition, the present application embodiment also provides a service deployment method 300 described from the perspective of the second device. The method 300 provided by the embodiment of the present application is executed by a second device, as shown in fig. 3, the method 300 includes the following steps:
301: the second device receives the executable code sent by the first device, wherein the executable code is generated by the first device according to the operating environment description information of at least one service.
302: the second device runs the executable code to create at least one isolated execution environment on the second device.
303: the second device receives the deployment file corresponding to the at least one service sent by the first device, and deploys the at least one service in the at least one isolated operation environment respectively according to the deployment file corresponding to the at least one service.
In this embodiment, the second device may successfully deploy at least one service on the second device under the control of the first device, so as to form a primary-standby relationship with the first device. For a detailed description of this embodiment, reference may be made to the foregoing embodiment, which is not described herein again.
It should be noted that, in the implementation of the program, according to the code running requirement and the code running logic, the build executable code installed on the first device may be divided into a plurality of modules, for example, a production configuration module, which is used to verify the description information of the running environment and generate a configuration file; the main program module is used for receiving various commands of the deployment personnel and sending the various commands to the corresponding modules, so that each module executes corresponding codes according to the commands; the file deployment module comprises all deployment files and is responsible for deploying and starting and stopping each service, and each deployment file has an independent function and strong expandability; a KVM (Kernel-based virtual Machine) virtual Machine management module, which is responsible for initializing the isolated operation environment of the first device and creating a corresponding isolated operation environment; the Saltstack command module calls a Saltsack channel, and issues a service deployment command, a service deployment file and the like to the isolated operation environment; and the service monitoring module is used for regularly carrying out health check on each service, and automatically executing service recovery operation when the service abnormity is found by continuously checking for multiple times.
According to the technical scheme of the application, the process of deploying the basic service in the proprietary cloud can comprise the following steps:
a1, responding to a trigger command of a deployment service, and reading a configuration file, wherein the configuration file comprises network configuration information and virtual machine configuration information corresponding to at least one basic service required by a proprietary cloud;
step a2, creating at least one virtual machine on the first device according to the network configuration information and the virtual machine configuration information corresponding to the at least one basic service;
step a3, respectively deploying at least one basic service in at least one virtual machine according to the deployment file corresponding to the at least one basic service.
Wherein the at least one base service required by the proprietary cloud may include, but is not limited to: for details of the service, reference may be made to the foregoing embodiments, and details of the service are not repeated herein.
In this embodiment, the virtual machine configuration information corresponding to the basic service includes some resource information required by the virtual machine, such as the number of CPU cores, the memory, the size of the hard disk, and the like. The network configuration information corresponding to the basic service mainly describes network information required by the basic service and external communication, and may include network segment information, an IP address, and the like where a virtual machine bearing the basic service is located.
The virtual machine is created on the first device according to the network configuration information corresponding to the basic service and the virtual machine configuration information, software and hardware resources required by the normal operation of the virtual machine are determined by the virtual machine configuration information, and network information required by the communication between the virtual machine and other devices is determined by the corresponding network configuration information.
After the virtual machine is created, at least one basic service can be respectively deployed in at least one virtual machine according to the deployment file corresponding to the at least one basic service, so that the basic services can be isolated from each other and do not affect each other.
Further, besides deploying the basic service on the first device, the basic service may also be deployed on a second device in the proprietary cloud, and the first device and the second device form an active-standby relationship, so that the second device may be used to share access traffic faced by each basic service on the first device. The method for realizing the basic service backup in the proprietary cloud comprises the following steps:
step b1, receiving an executable code sent by the first device in the private cloud, where the executable code is generated by the first device according to the network configuration information and the virtual machine configuration information corresponding to the at least one service required by the private cloud.
Step b2, running the executable code, creates at least one virtual machine on the second device.
Step b3, receiving a deployment file corresponding to the at least one basic service sent by the first device, and respectively deploying the at least one basic service in the at least one virtual machine according to the deployment file corresponding to the at least one basic service.
In this embodiment, the second device may successfully deploy at least one basic service on the second device under the control of the first device, so as to form a primary-standby relationship with the first device, so as to share part of the access traffic for each basic service on the first device. For a detailed description of this embodiment, reference may be made to the foregoing embodiment, which is not described herein again.
The following describes the technical solution of the present application in detail with reference to several exemplary application scenarios in combination with modular build executable code:
scenario example 1:
in a machine room of a proprietary cloud network environment, one physical device is randomly selected as a deployment platform of 9 basic services. On one hand, the deployment personnel copies the build executable code to the local storage area on the physical device through the USB flash disk, and on the other hand, inputs the IP address, the size of the hard disk, the number of CPU cores and other operation environment description information required by the virtual machine through the command input interface. The deployment personnel triggers the physical device to run the buid executable code to enter the service deployment process.
In the service deployment process, the physical equipment executes a main program module in the buid executable code to provide a command input interface for deployment personnel, the deployment personnel can input a check command in the command input interface, and the physical equipment responds to the check command to perform validity check on description information such as an IP address, a hard disk size, a CPU core number and the IP address required by OOB service, wherein the description information is required by the virtual machine; and after the verification is passed, generating a configuration file and storing the configuration file into a local storage area.
The deployment personnel inputs a trigger command through the input command interface, and the physical equipment responds to the trigger command to read the configuration file and acquire the information contained in the configuration file. The physical equipment reads a KVM management module in the buid executable code, sets information in the configuration file into the KVM management module, runs the KVM management module to create 9 virtual machines, each virtual machine has a unique IP address and a unique resource, and the virtual machines and the physical equipment are subjected to network bridging to realize a network communication function. After the virtual machine is created and the IP address and the resources are configured, the physical equipment continues to execute the main program module, so that prompt information of successful operation is displayed to deployment personnel; and the deployment personnel inputs a service deployment command, the physical equipment responds to the service deployment command, continues to execute a deployment script module in the buid executable code so as to obtain deployment scripts of 9 basic services in the local storage area, executes a Saltstack command module in the buid executable code, calls a SaltStack channel to respectively issue the 9 deployment scripts and the service deployment command to 9 virtual machines, and each virtual machine has only one deployment script. For each virtual machine, after receiving the service deployment command and the deployment script, running the received deployment script according to the service deployment command, and deploying the basic service in the virtual machine environment of the virtual machine.
In this scenario, the 9 virtual machines on the physical device respectively deploy Clone application service, OOB management service, installation process management service, YUM service, DNS service, NTP service, and Mysql data storage service. And when the service is successfully deployed, the physical equipment continues to execute the main program module in the buid executable code, so that service deployment success prompt information is displayed to deployment personnel so that the deployment personnel can know the service deployment success prompt information.
Then, other devices in the computer room may send a service request to the virtual machine according to the IP address of each virtual machine, and the other devices send a download service request to the virtual machine deployed with the YUM service, and after receiving the download service request, the virtual machine may download the software package manager through the virtual machine of the out-of-band network service, and return the software package manager to the other devices.
Scenario example 2:
in a machine room of a proprietary cloud network environment, two physical devices are randomly selected as deployment platforms of 9 basic services. One of the two physical devices is selected as a host machine, and the other is selected as a backup machine. On one hand, the deployment personnel can copy the buid executable code into a local storage area on the host machine through the USB flash disk. The host machine executes a main program module in the buid executable code to provide a command input interface for deployment personnel, and the deployment personnel can input the IP addresses, the sizes of the hard disks, the number of CPU cores and other operation environment description information required by each virtual machine for bearing 9 basic services through the command input interface.
And the deployment personnel operates the buid executable code and inputs a check command, the buid executable code of the host responds to the check command, and the validity check is carried out on the operation environment description information such as the IP address, the hard disk size, the CPU core number and the like required by the virtual machine. And after the verification is passed, generating a configuration file and storing the configuration file into a local storage area.
The deployment personnel inputs a trigger command, the host machine responds to the trigger command to read the configuration file to obtain information in the configuration file, reads a KVM management module in a preset local storage area, sets the configuration information of the host machine in the configuration file into the KVM management module, runs the KVM management module to create 9 virtual machines, each virtual machine has a unique IP address and a unique resource, and the virtual machines and the host machine are in network bridging to realize a network communication function.
In addition, the host runs the KVM management module to generate a creating code of the virtual machine of the backup machine, and the host logs in the backup machine through the SSH channel and sends the creating code for creating the virtual machine of the backup machine to the backup machine. After receiving the creation code for creating the virtual machine of the backup machine, the backup machine runs the creation code to create 9 virtual machines, each virtual machine has a unique IP address and a unique resource, and the virtual machines and the backup machine are in network bridge connection to realize a network communication function.
The deployment personnel inputs a service deployment command, the host computer responds to the service deployment command and continues to execute a deployment script module in the buid executable code so as to obtain deployment scripts of 9 basic services in the local storage area, executes a Saltstack command module in the buid executable code, calls a SaltStack channel to send the 9 deployment scripts and the service deployment command to the host computer and virtual machines on the backup computer, each virtual machine has only one deployment script, and after receiving the service deployment command and one deployment script, the virtual machines run the deployment scripts according to the service deployment command and deploy the basic services on the virtual machines of the virtual machines.
The system comprises a host machine, a backup machine and 9 virtual machines, wherein the 9 virtual machines on the host machine and the backup machine are respectively deployed with Clone application service, OOB management service, installation process management service, YUM service, DNS service, NTP service and Mysql data storage service. And when the backup machine is successfully deployed, the backup machine sends a message of completing service deployment to the host machine through the SaltStack channel, and after the host machine receives the message and completes service deployment, the host machine displays a prompt message of successful service deployment to deployment personnel so that the deployment personnel can know the prompt message.
At this time, other devices in the computer room may send service requests to the virtual machines of the host machine and the backup machine according to the IP addresses of each of the virtual machines of the host machine and the backup machine, and the virtual machines may provide basic services such as YUM service and OOB service for the other devices.
Further, in scenario embodiment 1 and scenario embodiment 2 described above, the basic service may further include an LVS load balancing service. Based on this, the deployment personnel also need to input the operating environment description information corresponding to the LVS load balancing service through the command input interface. The running environment description information corresponding to the LVS load balancing service includes network information and resource information required by the virtual machine of the LVS load balancing service.
Further, under the condition that the LVS load balancing service is deployed, only the virtual P addresses published to the outside by the other 9 basic services are known to other devices (except the hosting device and the backup device) in the network. Thus, when any service in 9 basic services needs to be used in the network, the virtual IP address of the required service (e.g., YUM service) can be carried in the service request and sent to the LVS load balancing service on the host, and the LVS load balancing service searches the local binding relationship of the virtual machine where the LVS load balancing service is located according to the virtual IP address carried in the request, so as to obtain the IP addresses of two virtual machines (i.e., the virtual machines carrying the YUM service on the host and the backup machine) corresponding to the virtual IP address; and the LVS load balancing service forwards the service request to a virtual machine carrying the YUM service on the host machine or forwards the service request to a virtual machine carrying the YUM service on the backup machine according to the load balancing strategy. Optionally, if the access flow of the YUM service on the current host is greater than the access flow of the YUM service on the backup machine, the LVS load balancing service forwards the service request to the virtual machine carrying the YUM service on the backup machine, and the virtual machine carrying the YUM service on the backup machine processes the service request after receiving the service request.
It should be noted that in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 201, 202, 203, etc., are merely used for distinguishing different operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
Fig. 4 is a schematic structural framework diagram of a service deployment apparatus according to an exemplary embodiment of the present application. The apparatus 400 may be applied to a first device, and the apparatus 400 includes a reading module 401, a creating module 402, and a deploying module 403, and the functions of the modules are described in detail below:
the reading module 401 is configured to read a configuration file in response to a trigger command for deploying a service, where the configuration file includes operating environment description information of at least one service.
A creating module 402, configured to create at least one isolated operating environment on the first device according to the operating environment description information of the at least one service.
A deployment module 403, configured to deploy the at least one service in the at least one isolated operating environment according to the deployment file corresponding to the at least one service. Alternatively, the deployment file may be an executable script file, but is not limited thereto.
In some examples, the apparatus 400 further comprises: the acquisition module is used for responding to information input operation and acquiring the operating environment description information of at least one service input by deployment personnel; the verification module is used for verifying the effectiveness of the operation environment description information of at least one service; and the storage module is used for writing the operation environment description information of at least one service into the configuration file after the verification is passed, and storing the configuration file under a preset path.
Optionally, the reading module 401 includes: the display unit is used for responding to the triggering operation of the deployment personnel and displaying the command input interface; the receiving unit is used for receiving a trigger command which indicates the deployment service and is input by deployment personnel in the command input interface; and the reading unit reads the configuration file from a preset path according to the trigger command.
Optionally, the operation environment description information of the at least one service includes: at least one service normally runs required network information and resource information; a creation module 402 comprising: the reading unit is used for reading at least one piece of resource information and network information required by normal operation of the service from the configuration file; the creating unit is used for creating at least one isolated operation object corresponding to at least one service on the first equipment according to the resource information and the network information required by the normal operation of the at least one service so as to obtain at least one isolated operation environment.
Optionally, the deployment module 403 includes: the issuing unit is used for responding to a service deployment command of deployment personnel and respectively issuing deployment files corresponding to at least one service to at least one isolated operation object; and the deployment unit is used for at least one isolated operation object to respectively operate the received deployment files so as to deploy the corresponding service in the isolated operation environment.
The issuing unit is specifically configured to invoke a Saltsack channel, and issue the deployment files corresponding to the at least one service to the at least one isolated operation object respectively; or calling an infrastructure channel, and respectively issuing the deployment file corresponding to at least one service to at least one isolated operation object; or respectively issuing the deployment files corresponding to the at least one service to the at least one isolated operation object through the SSH channel.
Optionally, at least one isolated running object is a virtual machine; or at least one isolated operational object is a container.
In some examples, after respectively deploying the at least one service in the at least one isolated operating environment, the apparatus 400 further comprises: and the output module is used for outputting the deployment completion prompt information of the at least one service.
Optionally, the at least one service comprises at least one of: storage services, provisioning application services, out-of-band network management services, installation process management services, software package manager download services, domain name resolution services, and time synchronization services.
In some examples, the apparatus 400 further comprises: a monitoring module for periodically monitoring an operational status of the at least one service deployed on the first device; and the recovery module is used for performing recovery operation on the service which is continuously monitored for many times and has the abnormal running state if the running state of the same service is continuously monitored for many times and is abnormal.
In some examples, the apparatus 400 further comprises: the generating module is used for generating executable codes according to the operating environment description information of at least one service; the first sending module is used for sending the executable code to second equipment in a network where the first equipment is located so that the second equipment creates at least one isolated operation environment on the second equipment by operating the executable code; the second sending module is configured to send the deployment file corresponding to the at least one service to the second device, so that the second device deploys the at least one service in at least one isolated operating environment on the second device respectively; the first device and the second device form a primary-standby relationship.
In some examples, the monitoring module is configured to periodically monitor an operational status of the at least one service deployed on the second device; and the recovery module is used for performing recovery operation on the service which is continuously monitored for many times and has the abnormal running state if the running state of the same service is continuously monitored for many times and is abnormal. Normal operation and normal operation
Optionally, the configuration file further comprises a binding relationship between the respective virtual IP address of the at least one service and the respective IP addresses of the isolated operating environments on the first device and on the second device. Based on this, the apparatus 400 further comprises: the balancing module is used for acquiring the virtual IP address of the target service requested to be accessed from the service request when the service request is received; inquiring the binding relation according to the virtual IP address of the target service to obtain the IP addresses of two isolated operating environments bound with the virtual IP address of the target service; and sending the service request to an isolated operation environment corresponding to any one of the IP addresses of the two isolated operation environments according to the load balancing strategy. Wherein the target service is any one of the at least one service.
Having described the internal functions and structure of the service deployment apparatus 400 shown in fig. 4, in one possible design, the structure of the service deployment apparatus 400 shown in fig. 4 may be implemented as an apparatus 600, as shown in fig. 6, where the apparatus 600 may include: memory 601, one or more processors 602, and a communications component 603;
the memory 601 is used for storing computer programs.
One or more processors 602 to execute the computer programs to: responding to a trigger command of deploying the service, and reading a configuration file, wherein the configuration file comprises the operation environment description information of at least one service; creating at least one isolated execution environment on the device 600 according to the execution environment description information of the at least one service; and respectively deploying the at least one service in at least one isolated operation environment according to the deployment file corresponding to the at least one service. Alternatively, the deployment file may be an executable script file, but is not limited thereto.
In some examples, the one or more processors 602 are further to: responding to information input operation, and acquiring running environment description information of at least one service input by deployment personnel; performing validity check on the operation environment description information of at least one service; and after the verification is passed, writing the operation environment description information of at least one service into a configuration file, and storing the configuration file under a preset path.
Optionally, the one or more processors 602 are specifically configured to: responding to the trigger operation of deployment personnel, and displaying a command input interface; the receiving unit is used for receiving a trigger command which indicates the deployment service and is input by deployment personnel in the command input interface; and the reading unit reads the configuration file from a preset path according to the trigger command.
Optionally, the operation environment description information of the at least one service includes: network information and resource information required for the normal operation of at least one service. Based on this, the one or more processors 602 are specifically configured to: reading resource information and network information required by normal operation of at least one service from the configuration file; at least one isolated operation object corresponding to at least one service is created on the device 600 according to the resource information and the network information required by the at least one service to operate normally, so as to obtain the at least one isolated operation environment.
Optionally, the communication component 603 is configured to respond to a service deployment command of a deployment worker, and issue a deployment file corresponding to at least one service to at least one isolated operation object respectively; and the at least one isolation operation object respectively operates the received deployment files so as to deploy the corresponding services in the isolation operation environment.
The communication component 603 is configured to invoke a saltback channel, and issue deployment files corresponding to at least one service to at least one isolated operation object respectively; or calling an infrastructure channel, and respectively issuing the deployment file corresponding to at least one service to at least one isolated operation object; or respectively issuing the deployment files corresponding to the at least one service to the at least one isolated operation object through the SSH channel.
Optionally, at least one isolated running object is a virtual machine; or at least one isolated operational object is a container.
In some examples, after respectively deploying the at least one service in the at least one isolated operating environment, the one or more processors 602 are further to: and outputting the deployment completion prompt information of the at least one service.
Optionally, the at least one service comprises at least one of: storage services, provisioning application services, out-of-band network management services, installation process management services, software package manager download services, domain name resolution services, and time synchronization services.
In some examples, the one or more processors 602 are further to: periodically monitoring an operational status of at least one service deployed on the device 600; and if the running state of the same service is monitored to be abnormal continuously for multiple times, recovering the service which is monitored to be abnormal continuously for multiple times.
In some examples, the one or more processors 602 are further to: generating executable code according to the operating environment description information of at least one service; a communication component 603 for sending the executable code to another device in the network in which the device 600 is located, so that the other device creates at least one isolated execution environment on the other device by executing the executable code; a communication component 603, configured to send a deployment file corresponding to at least one service to another device, so that the another device deploys the at least one service in at least one isolated operating environment on the another device respectively to deploy the at least one service respectively; wherein the device 600 forms a master-slave relationship with another device.
In some examples, the one or more processors 602 are further to: periodically monitoring an operational status of at least one service deployed on another device; and if the running state of the same service is monitored continuously for multiple times to be abnormal, restoring the service which is monitored continuously for multiple times to be abnormal in running state, operating normally and running normally.
Optionally, the configuration file further comprises a binding relationship between the respective virtual IP address of the at least one service and the respective IP addresses of the isolated operating environments on the device 600 and on the other device. Based thereon, the one or more processors 602, are further configured to: when a service request is received, acquiring a virtual IP address of a target service requested to be accessed from the service request; inquiring the binding relation according to the virtual IP address of the target service to obtain the IP addresses of two isolated operating environments bound with the virtual IP address of the target service; and sending the service request to an isolated operation environment corresponding to any one of the IP addresses of the two isolated operation environments according to the load balancing strategy. Wherein the target service is any one of the at least one service. The LVS load balancing service may be deployed on the device 600, and the LVS load balancing service is deployed in an isolated operating environment, so that when the LVS load balancing service is deployed, a binding relationship between a virtual IP address of at least one service and IP addresses of isolated operating environments on the device 600 and another device may be read from the configuration file, and the binding relationship is stored in the isolated operating environment where the LVS load balancing service is located. Based on this, the one or more processors 602 may execute the LVS load balancing service to implement load balancing, and in the process, may directly query the binding relationship in the isolated execution environment where the LVS load balancing service is located.
Further, the device 600 may also include other components, not shown, such as power components.
It is worth noting that the device 600 is applicable in a proprietary cloud scenario, and the one or more processors 602 of the device 600, when executing the computer program stored in the memory 601 thereof, may perform the following actions:
responding to a trigger command of a deployment service, and reading a configuration file, wherein the configuration file comprises network configuration information and virtual machine configuration information of at least one basic service required by the proprietary cloud; creating at least one virtual machine on the device 600 according to the network configuration information and the virtual machine configuration information corresponding to the at least one basic service; and respectively deploying the at least one basic service in the at least one virtual machine according to the deployment file corresponding to the at least one basic service.
Additionally, embodiments of the present invention provide a computer storage medium, where the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of the service deployment method in the method embodiment of fig. 2.
Fig. 5 is a schematic structural framework diagram of a service deployment apparatus according to an exemplary embodiment of the present application. The apparatus 500 may be applied to a first device, and the apparatus 500 includes a receiving module 501, an executing module 502, and a deploying module 503, and the functions of the modules are described in detail below:
a receiving module 501, configured to receive an executable code sent by a first device, where the executable code is an execution module 502 that is generated by the first device according to the execution environment description information of at least one service, and execute the executable code to create at least one isolated execution environment on the second device.
The deployment module 503 is configured to deploy the at least one service in the at least one isolated operating environment according to the deployment file corresponding to the at least one service. Alternatively, the deployment file may be an executable script file, but is not limited thereto.
Having described the internal functions and structure of the service deployment apparatus 500 shown in fig. 5, in one possible design, the structure of the service deployment apparatus 500 shown in fig. 5 may be implemented as an apparatus 700, as shown in fig. 7, where the apparatus 700 may include: memory 701, processor 702, and communications component 703;
a communication component 703 configured to receive executable code sent by a first device, where the executable code is generated by the first device according to the operating environment description information of at least one service; and receiving a deployment file corresponding to at least one service sent by the first device.
A memory 701 for storing a computer program.
A processor 702 for executing the computer program for: executing the executable code to create at least one isolated execution environment on the second device; and respectively deploying the at least one service in at least one isolated operation environment according to the deployment file corresponding to the at least one service. Alternatively, the deployment file may be an executable script file, but is not limited thereto.
Further, the device 700 may include other components, not shown, such as a power supply component.
It is worth noting that the device 700 is applicable in a proprietary cloud scenario, and the one or more processors 702 of the device 700, when executing the computer program stored in its memory 701, may perform the following actions:
receiving, by a communication component 703 of a device 700, executable code sent by another device that has deployed at least one basic service in the private cloud, where the executable code is generated by the other device according to network configuration information and virtual machine configuration information corresponding to at least one service required by the private cloud; running the executable code, creating at least one virtual machine on the device 700; and receiving a deployment file corresponding to the at least one basic service sent by another device, and respectively deploying the at least one basic service in the at least one virtual machine according to the deployment file corresponding to the at least one basic service.
Additionally, embodiments of the present invention provide a computer storage medium, where the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of the service deployment method in the method embodiment of fig. 3.
The memory of the above embodiments is used to store computer programs and may be configured to store other various data to support operations on a computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phonebook data, messages, pictures, videos, and so forth.
The memory in the above embodiments may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The communication component in the above embodiments is configured to facilitate communication between the device in which the communication component is located and other devices in a wired or wireless manner. The device in which the communication component is located may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
The power supply assembly of the above embodiments provides power to various components of the device in which the power supply assembly is located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable multimedia data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable multimedia data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable multimedia data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable multimedia data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by the device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (20)

1. A service deployment method applied to a first device, the method comprising:
responding to a trigger command of deploying services, and reading a configuration file, wherein the configuration file comprises operating environment description information of at least one service;
creating at least one isolated operating environment on the first device according to the operating environment description information of the at least one service;
and respectively deploying the at least one service in the at least one isolated operation environment according to the deployment file corresponding to the at least one service.
2. The method of claim 1, further comprising:
responding to information input operation, and acquiring the operating environment description information of the at least one service input by deployment personnel;
performing validity check on the operation environment description information of the at least one service;
and after the verification is passed, writing the operation environment description information of the at least one service into a configuration file, and storing the configuration file under a preset path.
3. The method of claim 2, wherein reading the configuration file in response to a trigger command to deploy the service comprises:
responding to the trigger operation of deployment personnel, and displaying a command input interface;
receiving a trigger command which is input in the command input interface by the deployment personnel and indicates that the service is deployed;
and reading the configuration file from the preset path according to the trigger command.
4. The method of claim 1, wherein the runtime environment description information of the at least one service comprises: network information and resource information required for normal operation of the at least one service;
creating at least one isolated operating environment on the first device according to the operating environment description information of the at least one service, comprising:
reading resource information and network information required by the normal operation of the at least one service from the configuration file;
and creating at least one isolated operation object corresponding to the at least one service on the first equipment according to the resource information and the network information required by the normal operation of the at least one service so as to obtain the at least one isolated operation environment.
5. The method according to claim 4, wherein respectively deploying the at least one service in the at least one isolated operating environment according to the deployment file corresponding to the at least one service comprises:
responding to a service deployment command of a deployment worker, and respectively issuing deployment files corresponding to the at least one service to the at least one isolated operation object;
and the at least one isolation operation object operates the received deployment file respectively so as to deploy the corresponding service in the isolation operation environment.
6. The method of claim 5, wherein responding to a service deployment command of a deployment worker, and issuing deployment files corresponding to the at least one service to the at least one isolated operation object respectively comprises:
calling a Saltsack channel, and respectively issuing deployment files corresponding to the at least one service to the at least one isolated operation object; or
Calling an infrastructure channel, and respectively issuing the deployment files corresponding to the at least one service to the at least one isolated operation object; or
And respectively issuing the deployment files corresponding to the at least one service to the at least one isolated operation object through an SSH channel.
7. The method of claim 4, wherein the at least one isolated runtime object is a virtual machine; alternatively, the at least one isolated operational object is a container.
8. The method according to any of claims 1-7, further comprising, after respectively deploying the at least one service in the at least one isolated operating environment:
and outputting the deployment completion prompt information of the at least one service.
9. The method according to any of claims 1-7, wherein the at least one service comprises at least one of: storage services, provisioning application services, out-of-band network management services, installation process management services, software package manager download services, domain name resolution services, and time synchronization services.
10. The method of any one of claims 1-7, further comprising:
periodically monitoring an operational status of the at least one service deployed on the first device;
and if the running state of the same service is monitored to be abnormal continuously for multiple times, recovering the service which is monitored to be abnormal continuously for multiple times.
11. The method of any one of claims 1-7, further comprising:
generating executable code according to the operating environment description information of the at least one service;
sending the executable code to a second device in a network where the first device is located, so that the second device creates at least one isolated operation environment on the second device by running the executable code;
sending a deployment file corresponding to the at least one service to the second device, so that the second device deploys the at least one service in at least one isolated operating environment on the second device respectively; the first device and the second device form a primary-standby relationship.
12. The method of claim 11, further comprising:
periodically monitoring an operational status of the at least one service deployed on the second device;
and if the running state of the same service is monitored to be abnormal continuously for multiple times, recovering the service which is monitored to be abnormal continuously for multiple times.
13. The method of claim 11, wherein the configuration file further comprises a binding relationship between a respective virtual IP address of the at least one service and an IP address of an isolated operating environment on the first device and the second device, respectively, the method further comprising:
when a service request is received, acquiring a virtual IP address of a target service requested to be accessed from the service request;
inquiring the binding relation according to the virtual IP address of the target service to obtain the IP addresses of two isolated operating environments bound with the virtual IP address of the target service;
and sending the service request to an isolated operation environment corresponding to any one of the IP addresses of the two isolated operation environments according to a load balancing strategy.
14. A service deployment method applied to a second device, the method comprising:
receiving executable code sent by a first device, wherein the executable code is generated by the first device according to the operating environment description information of at least one service;
executing the executable code to create at least one isolated execution environment on the second device;
receiving a deployment file corresponding to at least one basic service sent by a first device, and respectively deploying the at least one service in the at least one isolated operation environment according to the deployment file corresponding to the at least one service.
15. An apparatus, comprising: a memory and a processor;
the memory for storing a computer program;
the processor to execute the computer program to:
responding to a trigger command of deploying services, and reading a configuration file, wherein the configuration file comprises operating environment description information of at least one service;
creating at least one isolated operating environment on the first device according to the operating environment description information of the at least one service;
and respectively deploying the at least one service in the at least one isolated operation environment according to the deployment file corresponding to the at least one service.
16. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of the method of any one of claims 1-13.
17. An apparatus, comprising: a memory, a processor, and a communication component;
the communication component is used for receiving the executable code sent by the first equipment and receiving a deployment file corresponding to at least one service sent by the first equipment; the executable code is generated by the first device according to the running environment description information of the at least one service;
the memory for storing a computer program;
the processor to execute the computer program to:
executing the executable code to create at least one isolated execution environment on the device;
and respectively deploying the at least one service in the at least one isolated operation environment according to the deployment file corresponding to the at least one service.
18. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by one or more processors, causes the one or more processors to perform the steps of the method of claim 14.
19. A method for deploying a service in a proprietary cloud, the method being applied to a first device in the proprietary cloud, the method comprising:
responding to a trigger command of a deployment service, and reading a configuration file, wherein the configuration file comprises network configuration information and virtual machine configuration information of at least one basic service required by the proprietary cloud;
creating at least one virtual machine on the first device according to the network configuration information and the virtual machine configuration information corresponding to the at least one basic service;
and respectively deploying the at least one basic service in the at least one virtual machine according to the deployment file corresponding to the at least one basic service.
20. A method for deploying a service in a proprietary cloud, the method being applied to a second device in the proprietary cloud, the method comprising:
receiving an executable code sent by a first device in the private cloud, wherein the executable code is generated by the first device according to network configuration information and virtual machine configuration information corresponding to at least one service required by the private cloud;
running the executable code to create at least one virtual machine on the second device;
receiving a deployment file corresponding to the at least one basic service sent by the first device, and respectively deploying the at least one basic service in the at least one virtual machine according to the deployment file corresponding to the at least one basic service.
CN201811527985.8A 2018-12-13 2018-12-13 Service deployment method, device and storage medium Pending CN111324412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811527985.8A CN111324412A (en) 2018-12-13 2018-12-13 Service deployment method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811527985.8A CN111324412A (en) 2018-12-13 2018-12-13 Service deployment method, device and storage medium

Publications (1)

Publication Number Publication Date
CN111324412A true CN111324412A (en) 2020-06-23

Family

ID=71166641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811527985.8A Pending CN111324412A (en) 2018-12-13 2018-12-13 Service deployment method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111324412A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112130962A (en) * 2020-09-29 2020-12-25 中国银行股份有限公司 Continuous delivery platform and method for deploying application system by using same
CN112148315A (en) * 2020-09-22 2020-12-29 京东数字科技控股股份有限公司 Software deployment method, device, server and storage medium
CN112596946A (en) * 2020-12-10 2021-04-02 长沙市到家悠享网络科技有限公司 Service running state control method and device, electronic equipment and storage medium
CN112860645A (en) * 2021-02-09 2021-05-28 恒安嘉新(北京)科技股份公司 Processing method and device for offline compressed file, computer equipment and medium
CN113504937A (en) * 2021-06-07 2021-10-15 广发银行股份有限公司 Split type development deployment platform
CN113612643A (en) * 2021-08-03 2021-11-05 北京百度网讯科技有限公司 Network configuration method, device, equipment and storage medium of cloud mobile phone
CN113721931A (en) * 2021-11-02 2021-11-30 苏州万店掌软件技术有限公司 Automatic service deployment method, system and computer readable storage medium
CN114500542A (en) * 2020-11-12 2022-05-13 中移信息技术有限公司 Service flow distribution method, device, equipment and computer storage medium
CN115361278A (en) * 2022-08-02 2022-11-18 青岛海尔科技有限公司 Cloud host deployment method, device and equipment
CN116932229A (en) * 2023-09-13 2023-10-24 新华三信息技术有限公司 Memory allocation method and device, network manager and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458002A (en) * 2013-08-15 2013-12-18 中电长城网际系统应用有限公司 One-key deployment method and device for cloud system
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN106874052A (en) * 2017-02-24 2017-06-20 北京中电普华信息技术有限公司 The dispositions method and device of a kind of application program
CN106897226A (en) * 2017-02-28 2017-06-27 郑州云海信息技术有限公司 The method and device of a kind of continuous integrating test
CN108551487A (en) * 2018-04-26 2018-09-18 Oppo广东移动通信有限公司 Application dispositions method, device, server and the storage medium of PaaS platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458002A (en) * 2013-08-15 2013-12-18 中电长城网际系统应用有限公司 One-key deployment method and device for cloud system
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN106874052A (en) * 2017-02-24 2017-06-20 北京中电普华信息技术有限公司 The dispositions method and device of a kind of application program
CN106897226A (en) * 2017-02-28 2017-06-27 郑州云海信息技术有限公司 The method and device of a kind of continuous integrating test
CN108551487A (en) * 2018-04-26 2018-09-18 Oppo广东移动通信有限公司 Application dispositions method, device, server and the storage medium of PaaS platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
丘晖;: "基于容器的持续集成和部署方法研究" *
欧阳国军;: "基于虚拟机的网络实训环境构建" *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148315A (en) * 2020-09-22 2020-12-29 京东数字科技控股股份有限公司 Software deployment method, device, server and storage medium
CN112130962B (en) * 2020-09-29 2023-09-19 中国银行股份有限公司 Continuous delivery platform and method for deploying application system by using same
CN112130962A (en) * 2020-09-29 2020-12-25 中国银行股份有限公司 Continuous delivery platform and method for deploying application system by using same
CN114500542A (en) * 2020-11-12 2022-05-13 中移信息技术有限公司 Service flow distribution method, device, equipment and computer storage medium
CN112596946A (en) * 2020-12-10 2021-04-02 长沙市到家悠享网络科技有限公司 Service running state control method and device, electronic equipment and storage medium
CN112860645A (en) * 2021-02-09 2021-05-28 恒安嘉新(北京)科技股份公司 Processing method and device for offline compressed file, computer equipment and medium
CN113504937A (en) * 2021-06-07 2021-10-15 广发银行股份有限公司 Split type development deployment platform
EP4106293A3 (en) * 2021-08-03 2023-01-11 Beijing Baidu Netcom Science Technology Co., Ltd. Network configuring method and apparatus for cloud mobile phone, device and storage medium
CN113612643A (en) * 2021-08-03 2021-11-05 北京百度网讯科技有限公司 Network configuration method, device, equipment and storage medium of cloud mobile phone
CN113721931A (en) * 2021-11-02 2021-11-30 苏州万店掌软件技术有限公司 Automatic service deployment method, system and computer readable storage medium
CN115361278A (en) * 2022-08-02 2022-11-18 青岛海尔科技有限公司 Cloud host deployment method, device and equipment
CN116932229A (en) * 2023-09-13 2023-10-24 新华三信息技术有限公司 Memory allocation method and device, network manager and storage medium
CN116932229B (en) * 2023-09-13 2023-12-12 新华三信息技术有限公司 Memory allocation method and device, network manager and storage medium

Similar Documents

Publication Publication Date Title
CN111324412A (en) Service deployment method, device and storage medium
US10802906B2 (en) Monitoring method and apparatus of server, and storage medium
CN108255497B (en) Application deployment method and device
US11146620B2 (en) Systems and methods for instantiating services on top of services
WO2017133691A1 (en) Intelligent device networking method and apparatus
US20150358392A1 (en) Method and system of virtual desktop infrastructure deployment studio
CN102609281B (en) Distributed software patch update method and system
CN103034527B (en) Hybrid virtualization cloud computing resources optimal control method and system
US20130138818A1 (en) Method for accessing an automation system and system operating according to the method
CN107544783B (en) Data updating method, device and system
CN106886434B (en) Distributed application installation method and device
WO2018095414A1 (en) Method and apparatus for detecting and recovering fault of virtual machine
CN106911648B (en) Environment isolation method and equipment
CN111104201A (en) System migration method and device, electronic equipment and storage medium
WO2016045439A1 (en) Vnfm disaster-tolerant protection method and device, nfvo and storage medium
CN112860282B (en) Cluster plug-in upgrading method, device and server
CN112148315A (en) Software deployment method, device, server and storage medium
CN109067599A (en) A kind of method and device for disposing cluster
CN110401729B (en) Cloud platform server network migration method, system, terminal and storage medium
CN110268378A (en) The method for creating the data backup of virtual automation solution, the computer program of implementation method and the virtual server run by method
CN113672336A (en) K8S container cluster deployment method, device, equipment and readable storage medium
CN113268254A (en) Cluster system installation method and device, electronic equipment and storage medium
CN112732285A (en) Upgrading method and device suitable for cloud computing linux operating system and electronic equipment
CN107707398B (en) Method and device for managing physical host in cloud computing system
CN109660575B (en) Method and device for realizing NFV service deployment

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