A site service deployment method and device

By modifying and adapting the application resources of site services in an isolated environment, and creating container clusters on the deployment platform, the problem of resource waste and version matching in site service deployment is solved, and fast and efficient site service deployment and replication are achieved.

CN113765983BActive Publication Date: 2024-09-24BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110003274.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-04
Publication Date
2024-09-24
Estimated Expiration
2041-01-04

AI Technical Summary

Technical Problem

In the existing technology, the deployment of site services easily leads to a waste of network resources and physical machine resources, and the download of dependent packages fails or the system version does not match, making it difficult to quickly copy existing site services to an isolation environment.

Method used

By transferring the application resources of the first site service to the isolation environment, modifying the relevant information to adapt to the isolation environment, creating a container cluster and performing basic deployment, and starting the application to complete the final deployment of the site service.

Benefits of technology

It saves network and physical machine resources, avoids failure to download dependent packages, enables rapid replication and deployment of existing site services, and improves deployment efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113765983B
    Figure CN113765983B
Patent Text Reader

Abstract

The present invention discloses a method and device for deploying a site service, and relates to the field of computer technology. A specific implementation of the method includes: transmitting the application resources of the first site service to the isolated environment where the second site service is to be deployed; in the isolated environment, modifying the relevant information in the application resources of the first site service to obtain the application resources of the second site service, and the relevant information is the information required for the startup and operation of the application; based on the application resources of the second site service, applying to create a container cluster and perform basic deployment on the deployment platform, and then starting the application in the container cluster to complete the final deployment of the second site service. This implementation can save network resources and physical machine resources, avoid the situation where the dependent package cannot be downloaded, the system version on which the application package depends on running is different from the provided server version, etc., and can quickly copy the existing site service to the isolated environment to achieve rapid site building.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for deploying a site service. Background Art

[0002] Currently, the steps to build a site in an isolated environment are: apply for physical machine resources, including network, disk, network port, physical machine specifications (such as CPU, memory); apply for dependent middleware services; locally compile and build application packages and package them; connect to the isolated environment through VPN (Virtual Private Network) to deploy the application package in the dependent environment; connect to the isolated environment through VPN, set the configuration file on the physical machine where the dependent environment is deployed, and deploy the site online.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] Since different sites or sub-services mostly occupy the same port number, if several services are deployed, several deployment servers are required, resulting in the occupation of network resources and waste of physical machine resources; it is easy for some dependent packages to fail to download, and the system version that the application package depends on to run is different from the provided server version; existing site services are difficult to quickly copy to an isolated environment, and rapid site establishment cannot be achieved. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and device for deploying site services, which can save network resources and physical machine resources, avoid situations where dependent packages cannot be downloaded, and there is a difference between the system version on which the application package depends and the provided server version. Existing site services can be quickly copied to an isolated environment to achieve rapid site establishment.

[0006] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for deploying a site service is provided.

[0007] A method for deploying a site service comprises: transmitting application resources of a first site service to an isolated environment where a second site service is to be deployed; in the isolated environment, modifying relevant information in the application resources of the first site service to obtain application resources of the second site service, wherein the relevant information is information required for starting and running an application; based on the application resources of the second site service, applying to create a container cluster and perform basic deployment on a deployment platform, and then starting the application in the container cluster to complete the final deployment of the second site service.

[0008] Optionally, the modification of relevant information in the application resources of the first site service includes: modifying the application running specification information, application running environment variable information, and application running configuration information in the application resources of the first site service to application running specification information, application running environment variable information, and application running configuration information adapted to the isolation environment, respectively.

[0009] Optionally, the application running configuration information adapted to the isolated environment includes configured service dependency information and configuration files; the application resources based on the second site service apply for the creation of a container cluster and perform basic deployment on the deployment platform, including: applying to the deployment platform for the creation of the container cluster according to the application running specification information adapted to the isolated environment; setting the environment variables of the container cluster through the first interface of the deployment platform according to the application running environment variable information adapted to the isolated environment; applying for the dependent service resources according to the service dependency information, and mounting the configuration file to the container cluster through the second interface of the deployment platform.

[0010] Optionally, starting the application in the container cluster includes: detecting a state of the dependent service resources in the container cluster, and when detecting that the state of the dependent service resources is ready, starting the application in the container cluster.

[0011] Optionally, the deployment platform is a Platform as a Service platform.

[0012] According to another aspect of an embodiment of the present invention, a device for deploying a site service is provided.

[0013] A site service deployment device includes: an application resource transmission module, used to transmit the application resources of a first site service to an isolated environment where a second site service is to be deployed; an application resource modification module, used to modify relevant information in the application resources of the first site service in the isolated environment to obtain the application resources of the second site service, wherein the relevant information is information required for starting and running an application; and a deployment module, used to apply for creating a container cluster and performing basic deployment on a deployment platform based on the application resources of the second site service, and then start the application in the container cluster to complete the final deployment of the second site service.

[0014] Optionally, the application resource modification module is also used to: modify the application running specification information, application running environment variable information, and application running configuration information in the application resources served by the first site into application running specification information, application running environment variable information, and application running configuration information adapted to the isolation environment.

[0015] Optionally, the application running configuration information adapted to the isolated environment includes configured service dependency information and configuration files; the deployment module is also used to: apply to the deployment platform for creation of the container cluster according to the application running specification information adapted to the isolated environment; set the environment variables of the container cluster through the first interface of the deployment platform according to the application running environment variable information adapted to the isolated environment; apply for dependent service resources according to the service dependency information, and mount the configuration file to the container cluster through the second interface of the deployment platform.

[0016] Optionally, the deployment module is further used to: detect the state of the dependent service resources in the container cluster, and when it is detected that the state of the dependent service resources is ready, start the application in the container cluster.

[0017] Optionally, the deployment platform is a Platform as a Service platform.

[0018] An electronic device includes: one or more processors; a memory for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the deployment method of the site service provided by an embodiment of the present invention.

[0019] According to yet another aspect of an embodiment of the present invention, a computer readable medium is provided.

[0020] A computer readable medium stores a computer program, which, when executed by a processor, implements a method for deploying a website service provided by an embodiment of the present invention.

[0021] One embodiment of the above invention has the following advantages or beneficial effects: the application resources of the first site service are transmitted to the isolated environment where the second site service is to be deployed; in the isolated environment, the relevant information in the application resources of the first site service is modified to obtain the application resources of the second site service, and the relevant information is the information required for the startup and operation of the application; based on the application resources of the second site service, an application is made on the deployment platform to create a container cluster and perform basic deployment, and then the application is started in the container cluster to complete the final deployment of the second site service. It can save network resources and physical machine resources, avoid the situation where the dependent package cannot be downloaded, the system version on which the application package depends is different from the provided server version, etc., and can quickly copy the existing site service to the isolated environment to achieve rapid site building.

[0022] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0024] Figure 1 is a schematic diagram of main steps of a method for deploying a site service according to an embodiment of the present invention;

[0025] Figure 2 is a schematic diagram of a process of exporting application resources from a deployment platform according to an embodiment of the present invention;

[0026] Figure 3 is a schematic diagram of the process of importing application resources into a deployment platform according to an embodiment of the present invention;

[0027] Figure 4 is a schematic diagram of main modules of a deployment device for a site service according to an embodiment of the present invention;

[0028] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0029] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0031] Figure 1 It is a schematic diagram of main steps of a method for deploying a site service according to an embodiment of the present invention.

[0032] like Figure 1 As shown, a method for deploying a site service according to an embodiment of the present invention mainly includes the following steps S101 to S103.

[0033] Step S101: transmitting application resources of a first site service to an isolated environment where a second site service is to be deployed.

[0034] An isolated environment is an environment that is physically and network-isolated from the outside world. Network isolation from the outside world means being isolated from the external network and unable to connect to the Internet. For example, a logistics warehouse computer room is equipped with several physical machines, which form a small network. This small network is a local area network isolated from the external network (Internet). This environment is an isolated environment.

[0035] The server that executes the deployment method of the site service of the embodiment of the present invention (hereinafter referred to as the execution server) can first connect to the isolation environment through a VPN and log in to the isolation environment to transfer the application resources of the first site service to the isolation environment. The execution server can be a server in the server cluster of the first site service, and the execution server can obtain the application resources of the first site service from the deployment platform or the server cluster of the first site service.

[0036] The application resources of the first site service can be packaged and transmitted to the isolated environment. The application resources of the first site service are the related resources of the application of the first site, which can specifically include the image file of the application of the first site, application running specification information, application running environment variable information, application running configuration information, etc. One application corresponds to one site, and the service provided after the application is started is the site service.

[0037] Step S102: in the isolated environment, modify the relevant information in the application resources served by the first site to obtain the application resources served by the second site, where the relevant information is the information required for starting and running the application.

[0038] The relevant information may specifically include application running specification information, application running environment variable information, and application running configuration information.

[0039] Modifying the relevant information in the application resources of the first site service may include: modifying the application running specification information, application running environment variable information, and application running configuration information in the application resources of the first site service to application running specification information, application running environment variable information, and application running configuration information that are adapted to the isolation environment.

[0040] Application running specification information, such as CPU specifications, memory specifications, data disk specifications, etc. Application running environment variable information, such as the key and value of the application environment variable, and application running configuration information, such as domain name, port, dependent service resources (such as database resources, cache resources), etc.

[0041] The application operation specification information, application operation environment variable information, and application operation configuration information adapted to the isolated environment are determined according to the requirements for deploying the second site service in the isolated environment. The application operation configuration information adapted to the isolated environment may include configured service dependency information and configuration files. The service dependency information indicates the dependent service resources, such as the dependent database resources, cache resources, and other middleware service resources. The configuration file can configure information such as domain name, IP, port, etc.

[0042] Step S103: Based on the application resources of the second site service, apply to create a container cluster and perform basic deployment on the deployment platform, and then start the application in the container cluster to complete the final deployment of the second site service.

[0043] Based on the application resources of the second site service, applying for the creation of a container cluster and performing basic deployment on the deployment platform can include: applying to the deployment platform for the creation of a container cluster according to the application running specification information adapted to the isolation environment; setting the environment variables of the container cluster through the first interface of the deployment platform according to the application running environment variable information adapted to the isolation environment; applying for dependent service resources according to the service dependency information, and mounting the configuration file to the container cluster through the second interface of the deployment platform.

[0044] Starting an application in a container cluster may include: detecting the status of the dependent service resources in the container cluster, and when detecting that the status of the dependent service resources is ready, starting the application in the container cluster. When starting an application in a container cluster, the application is started using the image file in the application resources of the second site service. Since the image file is not modified in the isolated environment, the image file in the application resources of the second site service is the same as the image file in the application resources of the first site service. The image file contains the business logic of the application, the development kit (such as JDK (Java SE Development kit, Java Standard Edition Development Kit)) that the application depends on to start and run, and other dependent data.

[0045] The deployment platform may be a platform as a service platform.

[0046] A method for quickly replicating and building a website in an isolated environment using container technology according to an embodiment of the present invention specifically includes: obtaining image files, application operation specification files, application operation environment variable files, and application operation configuration files within a deployment platform (e.g., a PAAS platform, i.e., a platform as a service platform) or a server cluster of a first site service, and creating an application package file (i.e., application resources) for packaging and encryption. Connect to the isolated environment via VPN, and transfer the application package file to the isolated environment. Decrypt and decompress the application package file in the isolated environment, and perform localized modifications to the application operation specification file, application operation environment variable file, and application operation configuration file in the application package file to obtain the application package file corresponding to the site service in the isolated environment (i.e., the application resources of the second site service).

[0047] Import the application package file corresponding to the site service in the isolated environment on the deployment platform and create a container cluster. Detect the status of the upstream service (that is, the status of the dependent service resources, such as database resources, cache resources, etc.) in the container cluster. When it is detected that the status of the dependent service resources is ready, start the application in the container cluster to complete the final deployment of the service.

[0048] The embodiments of the present invention, based on container technology, can effectively solve the problems in the prior art that lead to waste of physical machine resources, difficult deployment of dependent environments (for example, dependent packages cannot be downloaded, and the system versions on which the application packages depend are different), and existing site services cannot be quickly copied to isolated environments. First, regarding the problem of application dependent environments, the mirror of the embodiments of the present invention is a tool that packages the application's dependent environment and application together, so that they can be built in one place and run everywhere; then there is the problem of network resources. The embodiments of the present invention, based on container management tools, can effectively isolate the container network and the physical machine network without affecting each other, and the container network can set up internal virtual network segments, which solves the problem of resource waste caused by application services monopolizing server resources. At the same time, the embodiment of the present invention defines a new container scheduling resource, namely, an application, which packages the image (image file), application running specifications (base file), application running environment variables (env file), application running configuration files (conf directory) and other resources in the application, and transmits them to the isolated environment through VPN. In the isolated environment, according to the requirements of site deployment in the isolated environment, the application running specifications (base file), application running environment variables (env file), and application running configuration files (conf directory) are locally modified, and then an application is applied to create container resources on the PAAS platform, and basic deployment is performed based on the above-mentioned locally modified information, and the application is started in the container cluster, thereby realizing the rapid replication of the services of an existing site to the isolated environment, thereby achieving the purpose of rapid site building.

[0049] Figure 2 The figure is a flow chart of exporting application resources from a deployment platform according to an embodiment of the present invention.

[0050] like Figure 2As shown, the process of exporting application resources from the PAAS platform is as follows: create an application package directory; create an image file in the application package directory, and download the image file of the site service to be copied (i.e., the first site service) and write it into the created file; create a base file in the application package directory, obtain the specification file of the application (i.e., the application of the first site service) through the PAAS platform interface, and write it into a json file {"cpu": cpu specification, "memory": memory specification, "disk": data disk specification}; create an env file in the application package directory, obtain the environment variables for the application to run through the PAAS platform interface, and write them into the env file. The file content format is json: {"environment variable key", "environment variable value"}; create a conf directory in the application package directory, obtain the configuration file list and content (i.e., the configuration file for the application to run) through the PAAS platform interface, and create and write files in the conf directory according to the obtained configuration file list and content; package and encrypt the application package. The packaged application package includes the above-mentioned image file (mirror file), base file (application running specification file), env file (application running environment variable file), and conf directory (application running configuration information). In addition to the above-mentioned configuration files, the conf directory can also include service dependency information, such as dependent database resources, cache resources, and other middleware service resources.

[0051] After completing the packaging of application resources (i.e., application packages), log in to the isolated environment through VPN, import the application package in the isolated environment, decrypt and decompress the application package, and obtain the application resources from the decompressed file. You can modify the application resources according to the site services in the isolated environment according to user instructions, and import the modified application resources into the PAAS platform to quickly copy and build site services through the PAAS platform.

[0052] Figure 3 The figure is a flow chart of importing application resources into a deployment platform according to an embodiment of the present invention.

[0053] The process of importing application packages to the PAAS platform is as follows: call the PAAS platform, read the specification file base (i.e., application running specification information) in the modified application package, and apply for corresponding container resources on the PAAS platform to create a container cluster; read the application running environment variable information, and set the environment variables of the container cluster through the PAAS platform interface (i.e., the first interface of the deployment platform); apply for other middleware service resources that the site service in the isolated environment depends on, such as database resources, cache resources and other service resources; traverse the configuration file directory of the application resource directory, and mount the configuration file to the container cluster by calling the PAAS platform interface (i.e., the second interface of the deployment platform).

[0054] Figure 4 4 is a schematic diagram of main modules of a deployment device for a site service according to an embodiment of the present invention.

[0055] like Figure 4 As shown, a site service deployment device 400 according to an embodiment of the present invention mainly includes: an application resource transmission module 401 , an application resource modification module 402 , and a deployment module 403 .

[0056] The application resource transmission module 401 is used to transmit the application resources of the first site service to the isolation environment where the second site service is to be deployed.

[0057] The application resource modification module 402 is used to modify the relevant information in the application resources of the first site service in an isolated environment to obtain the application resources of the second site service, where the relevant information is the information required for starting and running the application.

[0058] The deployment module 403 is used to apply for creating a container cluster and perform basic deployment on the deployment platform based on the application resources of the second site service, and then start the application in the container cluster to complete the final deployment of the second site service.

[0059] In one embodiment, the application resource modification module is specifically used to modify the application running specification information, application running environment variable information, and application running configuration information in the application resources of the first site service to application running specification information, application running environment variable information, and application running configuration information that are adapted to the isolation environment.

[0060] In one embodiment, the application running configuration information adapted to the isolated environment includes configured service dependency information and configuration files; the deployment module is specifically used to: apply to the deployment platform for the creation of a container cluster according to the application running specification information adapted to the isolated environment; set the environment variables of the container cluster through the first interface of the deployment platform according to the application running environment variable information adapted to the isolated environment; apply for dependent service resources according to the service dependency information, and mount the configuration file to the container cluster through the second interface of the deployment platform.

[0061] In one embodiment, the deployment module is specifically used to: detect the status of the dependent service resources in the container cluster, and when it is detected that the status of the dependent service resources is ready, start the application in the container cluster.

[0062] In one embodiment, the deployment platform is a platform as a service platform.

[0063] Figure 5 An exemplary system architecture 500 is shown to which the method for deploying a site service or the device for deploying a site service according to the embodiment of the present invention can be applied.

[0064] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0065] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0066] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0067] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0068] It should be noted that the site service deployment method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the site service deployment device is generally set in the server 505 .

[0069] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0070] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 6 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0071] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0072] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0073] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.

[0074] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0075] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0076] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes an application resource transmission module, an application resource modification module, and a deployment module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the application resource transmission module may also be described as "a module for transmitting application resources of a first site service to an isolated environment where a second site service is to be deployed."

[0077] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: transmitting the application resources of the first site service to the isolated environment where the second site service is to be deployed; in the isolated environment, modifying the relevant information in the application resources of the first site service to obtain the application resources of the second site service, the relevant information is the information required for the startup and operation of the application; based on the application resources of the second site service, applying to create a container cluster and perform basic deployment on the deployment platform, and then starting the application in the container cluster to complete the final deployment of the second site service.

[0078] According to the technical solution of the embodiment of the present invention, the application resources of the first site service are transmitted to the isolated environment where the second site service is to be deployed; in the isolated environment, the relevant information in the application resources of the first site service is modified to obtain the application resources of the second site service, and the relevant information is the information required for the startup and operation of the application; based on the application resources of the second site service, an application is made on the deployment platform to create a container cluster and perform basic deployment, and then the application is started in the container cluster to complete the final deployment of the second site service. It can save network resources and physical machine resources, avoid the situation where the dependent package cannot be downloaded, the system version that the application package depends on is different from the provided server version, etc., and can quickly copy the existing site service to the isolated environment to achieve rapid site building.

[0079] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for deploying a site service, characterized in that: include: Transmitting application resources of the first site service to the isolated environment where the second site service is to be deployed; In the isolated environment, modify the relevant information in the application resources of the first site service to obtain the application resources of the second site service, wherein the relevant information is information required for starting and running the application; Based on the application resources of the second site service, apply to create a container cluster and perform basic deployment on the deployment platform, and then start the application in the container cluster to complete the final deployment of the second site service.

2. The method according to claim 1, characterized in that The modifying of the relevant information in the application resource served by the first site includes: The application running specification information, application running environment variable information, and application running configuration information in the application resources served by the first site are modified to application running specification information, application running environment variable information, and application running configuration information adapted to the isolated environment.

3. The method according to claim 2, characterized in that The application running configuration information adapted to the isolation environment includes configured service dependency information and configuration files; The application resources based on the second site service apply for creating a container cluster and performing basic deployment on the deployment platform, including: Applying to the deployment platform to create the container cluster according to the application running specification information adapted to the isolation environment; According to the application running environment variable information adapted to the isolation environment, setting the environment variables of the container cluster through the first interface of the deployment platform; The dependent service resources are applied for according to the service dependency information, and the configuration file is mounted to the container cluster through the second interface of the deployment platform.

4. The method according to claim 3, characterized in that The starting the application in the container cluster includes: The state of the dependent service resource is detected in the container cluster, and when it is detected that the state of the dependent service resource is ready, the application is started in the container cluster.

5. The method according to claim 1, characterized in that The deployment platform is a platform as a service platform.

6. A site service deployment device, characterized in that: include: An application resource transmission module, used to transmit the application resources of the first site service to the isolation environment where the second site service is to be deployed; an application resource modification module, configured to modify relevant information in the application resource of the first site service in the isolated environment to obtain the application resource of the second site service, wherein the relevant information is information required for starting and running the application; A deployment module is used to apply for creating a container cluster and perform basic deployment on a deployment platform based on the application resources of the second site service, and then start the application in the container cluster to complete the final deployment of the second site service.

7. The device according to claim 6, characterized in that The application resource modification module is also used for: The application running specification information, application running environment variable information, and application running configuration information in the application resources served by the first site are modified to application running specification information, application running environment variable information, and application running configuration information adapted to the isolated environment.

8. The device according to claim 7, characterized in that The application running configuration information adapted to the isolation environment includes configured service dependency information and configuration files; The deployment module is also used to: Applying to the deployment platform to create the container cluster according to the application running specification information adapted to the isolation environment; According to the application running environment variable information adapted to the isolation environment, setting the environment variables of the container cluster through the first interface of the deployment platform; The dependent service resources are applied for according to the service dependency information, and the configuration file is mounted to the container cluster through the second interface of the deployment platform.

9. The device according to claim 8, characterized in that The deployment module is also used to: The state of the dependent service resource is detected in the container cluster, and when it is detected that the state of the dependent service resource is ready, the application is started in the container cluster.

10. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.