CN113765983A - Site service deployment method and device - Google Patents
Site service deployment method and device Download PDFInfo
- Publication number
- CN113765983A CN113765983A CN202110003274.6A CN202110003274A CN113765983A CN 113765983 A CN113765983 A CN 113765983A CN 202110003274 A CN202110003274 A CN 202110003274A CN 113765983 A CN113765983 A CN 113765983A
- Authority
- CN
- China
- Prior art keywords
- application
- service
- information
- site
- deployment
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000002955 isolation Methods 0.000 claims abstract description 72
- 230000001419 dependent effect Effects 0.000 claims abstract description 36
- 230000003044 adaptive effect Effects 0.000 claims description 19
- 238000012986 modification Methods 0.000 claims description 11
- 230000004048 modification Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 15
- 101150096185 PAAS gene Proteins 0.000 description 13
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000004806 packaging method and process Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000007726 management method Methods 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/02—Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
- H04L63/0272—Virtual private networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method and a device for deploying site services, and relates to the technical field of computers. One embodiment of the method comprises: transmitting the application resource of the first site service to an isolation environment to be deployed with a second site service; in an isolation environment, modifying relevant information in application resources of a first site service to obtain application resources of a second site service, wherein the relevant information is information required by starting and running of an application; and based on the application resources of the second site service, applying for creating a container cluster and carrying out basic deployment on the deployment platform, and then starting an application in the container cluster to finish the final deployment of the second site service. The implementation method can save network resources and physical machine resources, avoid the situations that a dependence package cannot be downloaded, the system version dependent on the operation of the application package is different from the provided server version and the like, can quickly copy the existing site service to an isolation environment, and realize quick site establishment.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for deploying site services.
Background
At present, a site is built in an isolation environment by the following steps: applying for physical machine resources including network, disk, network port, physical machine specification (such as CPU, memory); applying for a dependent middleware service; locally compiling and constructing an application package and packaging; connecting an isolation environment through a Virtual Private Network (VPN) to perform application package dependent environment deployment; and (3) setting a configuration file on a physical machine with a deployed dependent environment through a VPN (virtual private network) connection isolation environment, and carrying out online deployment on a site.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
because most of different sites or sub-services occupy the same port number, if several services are deployed, several deployment servers are needed, which causes occupation of network resources and waste of physical machine resources; the situations that some dependent packages cannot be downloaded and the system version dependent on the operation of the application package is different from the provided server version easily occur; existing site services are difficult to quickly copy into an isolation environment, and quick site establishment cannot be achieved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for deploying a site service, which can save network resources and physical machine resources, avoid situations that a dependent package cannot be downloaded, and a system version dependent on an application package operation differs from a provided server version, and can quickly copy an existing site service to an isolation environment, thereby realizing quick site establishment.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method for deploying a site service is provided.
A site service deployment method comprises the following steps: transmitting the application resource of the first site service to an isolation environment to be deployed with a second site service; in the isolation environment, modifying relevant information in the application resource of the first site service to obtain the application resource of the second site service, wherein the relevant information is information required by starting and running of the application; and applying for creating a container cluster and carrying out basic deployment on a deployment platform based on the application resources of the second site service, and then starting the application in the container cluster to finish the final deployment of the second site service.
Optionally, the modifying related information in the application resource serviced by the first site includes: and respectively modifying the application operation specification information, the application operation environment variable information and the application operation configuration information in the application resources of the first site service into the application operation specification information, the application operation environment variable information and the application operation configuration information which are adaptive to the isolation environment.
Optionally, the application running configuration information adapted to the isolation environment includes configured service dependency information and a configuration file; the application resource based on the second site service applies for creating a container cluster and performing basic deployment on a deployment platform, including: applying for creating the container cluster to the deployment platform according to the application running specification information adaptive to the isolation environment; setting the environment variable of the container cluster through a first interface of the deployment platform according to the application running environment variable information adaptive to the isolation environment; applying for the dependent service resources according to the service dependency information, and mounting the configuration file to the container cluster through a second interface of the deployment platform.
Optionally, the starting the application in the container cluster includes: detecting the state of the dependent service resource in the container cluster, and starting the application in the container cluster after detecting that the state of the dependent service resource is ready.
Optionally, the deployment platform is a platform, i.e., a service platform.
According to another aspect of the embodiments of the present invention, a deployment apparatus for a site service is provided.
A site service deployment apparatus, comprising: the application resource transmission module is used for transmitting the application resources of the first site service to an isolation environment to be deployed with a second site service; an application resource modification module, configured to modify, in the isolation environment, relevant information in the application resource served by the first site to obtain an application resource served by the second site, where the relevant information is information required for starting and running an application; and the deployment module is used for applying for creating a container cluster and carrying out basic deployment on a deployment platform based on the application resources of the second site service, and then starting the application in the container cluster to finish the final deployment of the second site service.
Optionally, the application resource modification module is further configured to: and respectively modifying the application operation specification information, the application operation environment variable information and the application operation configuration information in the application resources of the first site service into the application operation specification information, the application operation environment variable information and the application operation configuration information which are adaptive to the isolation environment.
Optionally, the application running configuration information adapted to the isolation environment includes configured service dependency information and a configuration file; the deployment module is further to: applying for creating the container cluster to the deployment platform according to the application running specification information adaptive to the isolation environment; setting the environment variable of the container cluster through a first interface of the deployment platform according to the application running environment variable information adaptive to the isolation environment; applying for the dependent service resources according to the service dependency information, and mounting the configuration file to the container cluster through a second interface of the deployment platform.
Optionally, the deployment module is further configured to: detecting the state of the dependent service resource in the container cluster, and starting the application in the container cluster after detecting that the state of the dependent service resource is ready.
Optionally, the deployment platform is a platform, i.e., a service platform.
An electronic device, comprising: one or more processors; a memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method for deploying a site service provided by an embodiment of the present invention.
According to yet another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements a method for deploying a site service provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: transmitting the application resource of the first site service to an isolation environment to be deployed with a second site service; in an isolation environment, modifying relevant information in application resources of a first site service to obtain application resources of a second site service, wherein the relevant information is information required by starting and running of an application; and based on the application resources of the second site service, applying for creating a container cluster and carrying out basic deployment on the deployment platform, and then starting an application in the container cluster to finish the final deployment of the second site service. The system and the method can save network resources and physical machine resources, avoid the situations that a dependence package cannot be downloaded, and the system version dependent on the operation of the application package is different from the provided server version, and the like, can quickly copy the existing site service to an isolation environment, and realize quick site establishment.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of the main steps of a deployment method of a site service according to an embodiment of the present invention;
FIG. 2 is a schematic flow diagram of exporting application resources from a deployment platform according to one embodiment of the present invention;
FIG. 3 is a schematic flow diagram of importing an application resource to a deployment platform according to an embodiment of the invention;
FIG. 4 is a schematic block diagram of a deployment apparatus for site services according to one embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main steps of a site service deployment method according to an embodiment of the present invention.
As shown in fig. 1, the method for deploying a site service according to an embodiment of the present invention mainly includes the following steps S101 to S103.
Step S101: and transmitting the application resource of the first site service to an isolation environment to be deployed with a second site service.
The isolation environment is physically and externally isolated on the network, namely, the network is isolated from the outside, and the network cannot be connected with the Internet. For example, a plurality of physical machines are arranged in a machine room of a logistics warehouse, and a small network is formed among the physical machines, is a local area network isolated from an external network (internet), and is an isolated environment.
A server (for short, an execution server) executing the site service deployment method according to the embodiment of the present invention may first connect to an isolation environment through a VPN, and log in the isolation environment to transmit an application resource of a first site service to the isolation environment. The execution server may be a server in a server cluster of the first site service, and the execution server may obtain the application resource of the first site service from the deployment platform or from inside the server cluster of the first site service.
The application resources served by the first site may be packaged for delivery to the isolation environment. The application resource served by the first site, that is, the relevant resource of the application of the first site, may specifically include an image file of the application of the first site, application operation specification information, application operation environment variable information, application operation configuration information, and the like. One application corresponds to one site, and the service provided after the application is started is the site service.
Step S102: in an isolation environment, relevant information in the application resource of the first site service is modified to obtain the application resource of the second site service, wherein the relevant information is information required by starting and running of the application.
The related information may specifically include application operation specification information, application operation environment variable information, and application operation configuration information.
Modifying the relevant information in the application resource served by the first site may include: and respectively modifying the application operation specification information, the application operation environment variable information and the application operation configuration information in the application resources of the first site service into the application operation specification information, the application operation environment variable information and the application operation configuration information which are adaptive to the isolation environment.
The application operation specification information includes information such as CPU specification, memory specification, data disk specification, and the like. Application execution environment variable information such as key and value of environment variable of the application, application execution configuration information such as domain name, port, dependent service resource (e.g., database resource, cache resource), and the like.
The application running specification information, the application running environment variable information and the application running configuration information which are adaptive to the isolation environment are determined according to the requirement of deploying the second site service in the isolation environment. The application running configuration information adapted to the isolation environment may include configured service dependency information and configuration files. The service dependency information indicates dependent service resources, such as dependent database resources, cache resources, and other middleware service resources. The configuration file can configure information such as domain name, IP, port and the like.
Step S103: and based on the application resources of the second site service, applying for creating a container cluster and carrying out basic deployment on the deployment platform, and then starting an application in the container cluster to finish the final deployment of the second site service.
Based on the application resource served by the second site, applying for creating a container cluster and performing basic deployment on a deployment platform, which may include: applying for creating a container cluster to a deployment platform according to application running specification information adaptive to an isolation environment; setting an environment variable of a container cluster through a first interface of a deployment platform according to application running environment variable information adaptive to an isolation environment; and applying for the service resources depended on according to the service dependence information, and mounting the configuration file to the container cluster through a second interface of the deployment platform.
Launching an application in a container cluster may include: detecting the state of the dependent service resource in the container cluster, and starting the application in the container cluster after detecting that the state of the dependent service resource is ready. When the application is started in the container cluster, the application is started by using the image file in the application resource of the second site service, and since the image file is not modified in the isolation environment, the image file in the application resource of the second site service is the same as the image file in the application resource of the first site service, and the image file contains service logic of the application, an Development kit (for example, JDK (Java Development kit)) on which the application is started and run, other dependent data, and the like.
The deployment platform may be a platform, i.e., a service platform.
The method for quickly copying and building the station in the isolation environment by utilizing the container technology in one embodiment of the invention specifically comprises the following steps: the method comprises the steps of obtaining an image file, an application running specification file, an application running environment variable file and an application running configuration file in a deployment platform (for example, a PAAS platform, namely a service platform) or a server cluster served by a first site, and creating an application package file (namely an application resource) for packaging and encrypting. And connecting to the isolation environment through the VPN, and transmitting the application package file to the isolation environment. And decrypting and decompressing the application package file in the isolation environment, and locally modifying the application operation specification file, the application operation environment variable file and the application operation configuration file in the application package file to obtain the application package file (namely the application resource of the second site service) corresponding to the site service in the isolation environment.
Importing an application package file corresponding to the site service in the isolation environment on the deployment platform, and creating a container cluster. The method comprises the steps of detecting the state of an upstream service (namely the state of a dependent service resource, such as a database resource, a cache resource and the like) in a container cluster, and starting an application in the container cluster after detecting that the state of the dependent service resource is ready to complete final deployment of the service.
The embodiment of the invention can well solve the problems of physical machine resource waste, troublesome environment-dependent deployment (such as incapability of downloading by depending on a package and system version difference depending on the running of an application package), incapability of quickly copying existing site services to an isolation environment and the like in the prior art based on a container technology. Firstly, regarding the problem of application dependent environment, the mirror image of the embodiment of the invention is a tool for packaging the application dependent environment and the application, so that the mirror image can be constructed and operated at one place; then, the problem of network resources is solved, the embodiment of the invention can well separate the container network from the physical machine network based on the container management tool without mutual influence, and the container network can be provided with an internal virtual network segment, so that the problem of resource waste caused by monopolizing server resources by application services is solved. Meanwhile, the embodiment of the invention defines a new container scheduling resource, namely application, and packages resources such as an image (image file), an application operation specification (base file), an application operation environment variable (env file), an application operation configuration file (conf directory) and the like in the application, transmits the resources to an isolation environment through a VPN (virtual private network), locally modifies the application operation specification (base file), the application operation environment variable (env file) and the application operation configuration file (conf directory) according to the requirement of site deployment in the isolation environment, applies for creating container resources on a PAAS platform, performs basic deployment based on the locally modified information, and starts the application in a container cluster, so that the service of an existing site is quickly copied to the isolation environment, and the purpose of quickly building the site is achieved.
FIG. 2 is a schematic flow diagram of exporting application resources from a deployment platform according to one embodiment of the present invention.
As shown in fig. 2, the process of exporting application resources from the PAAS platform is as follows: creating an application package directory; creating an image file under an application package directory, downloading an image file of a site service (namely a first site service) to be copied, and writing the image file into the created file; creating a base file under an application package directory, acquiring a specification file of an application (namely the application served by a first site) through a PAAS platform interface, and writing the specification file into a json file { "cpu": cpu specification, "memory": memory specification, "disk": data disk specification }; creating an env file under an application package directory, acquiring an environment variable of application operation through a PAAS platform interface, and writing the environment variable into the env file, wherein the file content format is json: { "ambient variable key", "ambient variable value" }; creating a conf directory under the application package directory, acquiring a configuration file list and contents (namely configuration files for application operation) through a PAAS platform interface, and creating files and writing files according to the acquired configuration file list and contents under the conf directory; and packaging and encrypting the application packet. The packaged application package includes the image file (image file), the base file (application operation specification file), the env file (application operation environment variable file), and the conf directory (application operation configuration information), where the conf directory may include service dependency information, such as a dependent database resource, a cache resource, and other middleware service resources, in addition to the configuration file.
After the packaging of the application resources (namely the application packages) is finished, after the isolated environment is logged in through the VPN, the application packages are imported into the isolated environment, the application packages are decrypted and decompressed, the application resources are obtained from the decompressed files, the application resources can be modified according to site services in the isolated environment according to user instructions, and the modified application resources are imported into the PAAS platform so as to be quickly copied and built for the site services through the PAAS platform.
FIG. 3 is a flow diagram illustrating importing an application resource into a deployment platform according to an embodiment of the invention.
The process of importing the application package to the PAAS platform is as follows: calling the PAAS platform, reading the specification file base (namely application operation specification information) in the modified application package, and applying for corresponding container resources on the PAAS platform to create a container cluster; reading application running environment variable information, and setting an environment variable of a container cluster through a PAAS platform interface (namely a first interface of a deployment platform); applying for other middleware service resources, such as database resources, cache resources and the like, on which the site service in the isolation environment depends; and traversing the configuration file directory of the application resource directory, and mounting the configuration file to the container cluster by calling the PAAS platform interface (namely, the second interface of the deployment platform).
Fig. 4 is a schematic block diagram of a deployment apparatus of a site service according to an embodiment of the present invention.
As shown in fig. 4, a site service deployment apparatus 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.
An application resource transmission module 401, configured to transmit the application resource of the first site service to the isolation environment where the second site service is to be deployed.
An application resource modification module 402, configured to modify, in an isolation environment, relevant information in an application resource served by a first site to obtain an application resource served by a second site, where the relevant information is information required for starting and running an application.
The deployment module 403 is configured to apply for creating a container cluster and performing basic deployment on the deployment platform based on the application resource of the second site service, and then start an application in the container cluster to complete final deployment of the second site service.
In one embodiment, the application resource modification module is specifically configured to: and respectively modifying the application operation specification information, the application operation environment variable information and the application operation configuration information in the application resources of the first site service into the application operation specification information, the application operation environment variable information and the application operation configuration information which are adaptive to the isolation environment.
In one embodiment, the application running configuration information adapted to the isolation environment includes configured service dependency information and configuration files; the deployment module is specifically configured to: applying for creating a container cluster to a deployment platform according to application running specification information adaptive to an isolation environment; setting an environment variable of a container cluster through a first interface of a deployment platform according to application running environment variable information adaptive to an isolation environment; and applying for the service resources depended on according to the service dependence information, and mounting the configuration file to the container cluster through a second interface of the deployment platform.
In one embodiment, the deployment module is specifically configured to: detecting the state of the dependent service resource in the container cluster, and starting the application in the container cluster after detecting that the state of the dependent service resource is ready.
In one embodiment, the deployment platform is a platform-as-a-service platform.
Fig. 5 shows an exemplary system architecture 500 of a site service deployment method or a site service deployment apparatus to which an embodiment of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the deployment method of the site service provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the deployment apparatus of the site service is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device or server implementing an embodiment of the invention is shown. The terminal device or the server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that 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 section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 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, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an application resource transfer module, an application resource modification module, and a deployment module. Where the names of these modules do not in some cases constitute a limitation on the modules themselves, for example, the application resource delivery module may also be described as a "module for delivering application resources of a first site service to an isolation environment where a second site service is to be deployed".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: transmitting the application resource of the first site service to an isolation environment to be deployed with a second site service; in an isolation environment, modifying relevant information in application resources of a first site service to obtain application resources of a second site service, wherein the relevant information is information required by starting and running of an application; and based on the application resources of the second site service, applying for creating a container cluster and carrying out basic deployment on the deployment platform, and then starting an application in the container cluster to finish the final deployment of the second site service.
According to the technical scheme of the embodiment of the invention, the application resource of the first site service is transmitted to an isolation environment to be deployed with the second site service; in an isolation environment, modifying relevant information in application resources of a first site service to obtain application resources of a second site service, wherein the relevant information is information required by starting and running of an application; and based on the application resources of the second site service, applying for creating a container cluster and carrying out basic deployment on the deployment platform, and then starting an application in the container cluster to finish the final deployment of the second site service. The system can save network resources and physical machine resources, avoid the situations that a dependence package cannot be downloaded, the system version dependent on the operation of the application package is different from the provided server version and the like, can quickly copy the existing site service to an isolation environment, and realize quick site establishment.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (11)
1. A method for deploying site services, comprising:
transmitting the application resource of the first site service to an isolation environment to be deployed with a second site service;
in the isolation environment, modifying relevant information in the application resource of the first site service to obtain the application resource of the second site service, wherein the relevant information is information required by starting and running of the application;
and applying for creating a container cluster and carrying out basic deployment on a deployment platform based on the application resources of the second site service, and then starting the application in the container cluster to finish the final deployment of the second site service.
2. The method of claim 1, wherein modifying the relevant information in the application resource served by the first site comprises:
and respectively modifying the application operation specification information, the application operation environment variable information and the application operation configuration information in the application resources of the first site service into the application operation specification information, the application operation environment variable information and the application operation configuration information which are adaptive to the isolation environment.
3. The method of claim 2, wherein the application running configuration information adapted to the isolation environment comprises configured service dependency information and configuration files;
the application resource based on the second site service applies for creating a container cluster and performing basic deployment on a deployment platform, including:
applying for creating the container cluster to the deployment platform according to the application running specification information adaptive to the isolation environment;
setting the environment variable of the container cluster through a first interface of the deployment platform according to the application running environment variable information adaptive to the isolation environment;
applying for the dependent service resources according to the service dependency information, and mounting the configuration file to the container cluster through a second interface of the deployment platform.
4. The method of claim 3, wherein the launching the application in the container cluster comprises:
detecting the state of the dependent service resource in the container cluster, and starting the application in the container cluster after detecting that the state of the dependent service resource is ready.
5. The method of claim 1, wherein the deployment platform is a platform-as-a-service platform.
6. An apparatus for deploying a site service, comprising:
the application resource transmission module is used for transmitting the application resources of the first site service to an isolation environment to be deployed with a second site service;
an application resource modification module, configured to modify, in the isolation environment, relevant information in the application resource served by the first site to obtain an application resource served by the second site, where the relevant information is information required for starting and running an application;
and the deployment module is used for applying for creating a container cluster and carrying out basic deployment on a deployment platform based on the application resources of the second site service, and then starting the application in the container cluster to finish the final deployment of the second site service.
7. The apparatus of claim 6, wherein the application resource modification module is further configured to:
and respectively modifying the application operation specification information, the application operation environment variable information and the application operation configuration information in the application resources of the first site service into the application operation specification information, the application operation environment variable information and the application operation configuration information which are adaptive to the isolation environment.
8. The apparatus of claim 7, wherein the application running configuration information adapted to the isolation environment comprises configured service dependency information and configuration files;
the deployment module is further to:
applying for creating the container cluster to the deployment platform according to the application running specification information adaptive to the isolation environment;
setting the environment variable of the container cluster through a first interface of the deployment platform according to the application running environment variable information adaptive to the isolation environment;
applying for the dependent service resources according to the service dependency information, and mounting the configuration file to the container cluster through a second interface of the deployment platform.
9. The apparatus of claim 8, wherein the deployment module is further configured to:
detecting the state of the dependent service resource in the container cluster, and starting the application in the container cluster after detecting that the state of the dependent service resource is ready.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110003274.6A CN113765983B (en) | 2021-01-04 | 2021-01-04 | Site service deployment method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110003274.6A CN113765983B (en) | 2021-01-04 | 2021-01-04 | Site service deployment method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113765983A true CN113765983A (en) | 2021-12-07 |
CN113765983B CN113765983B (en) | 2024-09-24 |
Family
ID=78786257
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110003274.6A Active CN113765983B (en) | 2021-01-04 | 2021-01-04 | Site service deployment method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113765983B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114721706A (en) * | 2022-03-22 | 2022-07-08 | 深圳北鲲云计算有限公司 | High performance computing platform application packaging method, system and storage medium |
CN115190010A (en) * | 2022-07-01 | 2022-10-14 | 北京友友天宇系统技术有限公司 | Distributed recommendation method and device based on software service dependency relationship |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103368785A (en) * | 2012-04-09 | 2013-10-23 | 鸿富锦精密工业(深圳)有限公司 | Server operation monitoring system and method |
CN106104467A (en) * | 2014-06-30 | 2016-11-09 | 北京新媒传信科技有限公司 | A kind of Automation arranging method and terminal |
CN106789339A (en) * | 2017-01-19 | 2017-05-31 | 北京仿真中心 | A kind of distributed cloud emulation mode and system based on lightweight virtualization architecture |
CN106843945A (en) * | 2017-01-04 | 2017-06-13 | 厦门亿力吉奥信息科技有限公司 | GIS applications dispositions method and system based on PaaS |
US9928059B1 (en) * | 2014-12-19 | 2018-03-27 | Amazon Technologies, Inc. | Automated deployment of a multi-version application in a network-based computing environment |
WO2019100605A1 (en) * | 2017-11-21 | 2019-05-31 | 平安科技(深圳)有限公司 | Platform-as-a-service paas container platform construction method, server, system, and storage medium |
CN109885316A (en) * | 2019-02-18 | 2019-06-14 | 国家计算机网络与信息安全管理中心 | Hdfs-hbase dispositions method and device based on kubernetes |
CN111324412A (en) * | 2018-12-13 | 2020-06-23 | 阿里巴巴集团控股有限公司 | Service deployment method, device and storage medium |
CN111610985A (en) * | 2020-05-13 | 2020-09-01 | 麒麟软件有限公司 | Kubernet cluster rapid deployment method on domestic platform |
CN111625316A (en) * | 2020-05-15 | 2020-09-04 | 苏州浪潮智能科技有限公司 | Environment deployment method and device, electronic equipment and storage medium |
WO2020186911A1 (en) * | 2019-03-15 | 2020-09-24 | 华为技术有限公司 | Resource management method and device for containerized virtualised network function vnf |
CN111897551A (en) * | 2020-08-03 | 2020-11-06 | 上海嗨酷强供应链信息技术有限公司 | A platform and method for rapidly cloning software environment in cloud environment |
-
2021
- 2021-01-04 CN CN202110003274.6A patent/CN113765983B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103368785A (en) * | 2012-04-09 | 2013-10-23 | 鸿富锦精密工业(深圳)有限公司 | Server operation monitoring system and method |
CN106104467A (en) * | 2014-06-30 | 2016-11-09 | 北京新媒传信科技有限公司 | A kind of Automation arranging method and terminal |
US9928059B1 (en) * | 2014-12-19 | 2018-03-27 | Amazon Technologies, Inc. | Automated deployment of a multi-version application in a network-based computing environment |
CN106843945A (en) * | 2017-01-04 | 2017-06-13 | 厦门亿力吉奥信息科技有限公司 | GIS applications dispositions method and system based on PaaS |
CN106789339A (en) * | 2017-01-19 | 2017-05-31 | 北京仿真中心 | A kind of distributed cloud emulation mode and system based on lightweight virtualization architecture |
WO2019100605A1 (en) * | 2017-11-21 | 2019-05-31 | 平安科技(深圳)有限公司 | Platform-as-a-service paas container platform construction method, server, system, and storage medium |
CN111324412A (en) * | 2018-12-13 | 2020-06-23 | 阿里巴巴集团控股有限公司 | Service deployment method, device and storage medium |
CN109885316A (en) * | 2019-02-18 | 2019-06-14 | 国家计算机网络与信息安全管理中心 | Hdfs-hbase dispositions method and device based on kubernetes |
WO2020186911A1 (en) * | 2019-03-15 | 2020-09-24 | 华为技术有限公司 | Resource management method and device for containerized virtualised network function vnf |
CN111610985A (en) * | 2020-05-13 | 2020-09-01 | 麒麟软件有限公司 | Kubernet cluster rapid deployment method on domestic platform |
CN111625316A (en) * | 2020-05-15 | 2020-09-04 | 苏州浪潮智能科技有限公司 | Environment deployment method and device, electronic equipment and storage medium |
CN111897551A (en) * | 2020-08-03 | 2020-11-06 | 上海嗨酷强供应链信息技术有限公司 | A platform and method for rapidly cloning software environment in cloud environment |
Non-Patent Citations (4)
Title |
---|
何震苇;严丽云;李慧云;张凌;陆钢;: "基于开源PaaS技术的互联网业务平台自动部署方案", 电信科学, no. 10, 20 October 2015 (2015-10-20) * |
傅志铭;: "基于LNMP搭建Wordpress多站点网站群", 电脑与信息技术, no. 02, 15 April 2017 (2017-04-15) * |
杨洪娇;: "基于Docker的高校网站自动部署应用", 无线互联科技, no. 16, 25 August 2017 (2017-08-25) * |
郑伟;闫晓飞;胡庆宝;: "分布式计算站点统一部署和监控系统的研究与实现", 科研信息化技术与应用, no. 03, 20 May 2018 (2018-05-20) * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114721706A (en) * | 2022-03-22 | 2022-07-08 | 深圳北鲲云计算有限公司 | High performance computing platform application packaging method, system and storage medium |
CN115190010A (en) * | 2022-07-01 | 2022-10-14 | 北京友友天宇系统技术有限公司 | Distributed recommendation method and device based on software service dependency relationship |
CN115190010B (en) * | 2022-07-01 | 2023-04-07 | 北京友友天宇系统技术有限公司 | Distributed recommendation method and device based on software service dependency relationship |
Also Published As
Publication number | Publication date |
---|---|
CN113765983B (en) | 2024-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2682863B1 (en) | Installing applications remotely | |
CN110311983B (en) | Service request processing method, device and system, electronic equipment and storage medium | |
CN112748962B (en) | Application loading method, device, electronic equipment and computer readable medium | |
CN111045833B (en) | Interface calling method and device | |
CN110377440B (en) | Information processing method and device | |
CN110572422A (en) | Data downloading method and device | |
CN107809470B (en) | Method and device for automatically deploying application program | |
CN110968331A (en) | Method and apparatus for running an application | |
CN113765983B (en) | Site service deployment method and device | |
CN110795741A (en) | Method and device for carrying out security processing on data | |
CN111343220B (en) | Repeater, distributed file transmission method, distributed file transmission system, medium and electronic equipment | |
CN109981546B (en) | Method and device for acquiring remote call relation between application modules | |
CN113157365B (en) | Program running method, program running device, electronic equipment and computer readable medium | |
CN113779122B (en) | Method and device for exporting data | |
CN109391658B (en) | Account data synchronization method and equipment, storage medium and terminal thereof | |
CN113760561A (en) | Data processing method and device | |
CN114860213A (en) | Application package generation method, device, equipment and medium | |
CN113760487A (en) | Service processing method and device | |
CN113946458A (en) | Method and device for realizing client proxy | |
CN112559001A (en) | Method and device for updating application | |
CN112835609A (en) | Method and device for modifying dependent package download address | |
CN111970338A (en) | Request processing method and device based on cloud function and computer readable medium | |
CN111163156A (en) | Data processing method, device and storage medium based on block chain | |
CN113778969B (en) | A log processing method and device | |
US11811878B1 (en) | Session manager providing bidirectional data transport |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |