CN109656631B - Service deployment method and device - Google Patents

Service deployment method and device Download PDF

Info

Publication number
CN109656631B
CN109656631B CN201710943733.2A CN201710943733A CN109656631B CN 109656631 B CN109656631 B CN 109656631B CN 201710943733 A CN201710943733 A CN 201710943733A CN 109656631 B CN109656631 B CN 109656631B
Authority
CN
China
Prior art keywords
service
starting
program
identifier
service program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710943733.2A
Other languages
Chinese (zh)
Other versions
CN109656631A (en
Inventor
魏康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710943733.2A priority Critical patent/CN109656631B/en
Publication of CN109656631A publication Critical patent/CN109656631A/en
Application granted granted Critical
Publication of CN109656631B publication Critical patent/CN109656631B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The invention discloses a service deployment method and device, and relates to the technical field of computers. The invention mainly solves the problem of low efficiency of service deployment and service maintenance in the prior art. The method of the invention comprises the following steps: starting the container mirror image, wherein the container mirror image is generated based on a service bearing function, and the service bearing function comprises an address variable for positioning a service program and an identification variable for starting the service program; acquiring a storage address and a starting identifier of a service program; setting the storage address as the value of an address variable in the service bearing function, and setting the starting identifier as the value of an identifier variable in the service bearing function; and calling the service bearing function, acquiring the corresponding service program from the storage address, and starting the starting file of the service program according to the starting identifier so as to start the service program and finish the deployment of the service. The invention can be widely applied to the scene of service deployment.

Description

Service deployment method and device
Technical Field
The invention relates to the technical field of computers, in particular to a service deployment method and device.
Background
When a container technology based on a container cluster management system (kubernets) and an application container engine (Docker) is used for deploying services, a completely closed container mirror image needs to be created according to a service program and the running environment of the service program; and when the service is used subsequently, the corresponding service program can be started by loading the container mirror image.
However, due to the update of the service technology and the service requirement, the service program needs to be frequently updated, and because the completely closed container mirror cannot be modified, a new container mirror needs to be correspondingly and frequently created according to the updated service program, and the frequent creation operation greatly reduces the efficiency of service deployment. Moreover, after a new container image is created, the old container image that has failed will not be automatically deleted, and the container image created each time due to the update service will be stored in the server, resulting in a large amount of invalid data occupying the storage space of the server. And if the invalid data needs to be deleted, manual operation is also needed, so that the efficiency of service maintenance is reduced.
Disclosure of Invention
In view of the above, the present invention provides a service deployment method and apparatus, and mainly aims to overcome the problem of low efficiency of service deployment and service maintenance in the prior art, or at least partially solve the problem.
In order to solve the above problems, the present invention mainly provides the following technical solutions:
in one aspect, the present invention provides a service deployment method, including:
starting the container mirror image, wherein the container mirror image is generated based on a service bearing function, and the service bearing function comprises an address variable for positioning a service program and an identification variable for starting the service program;
acquiring a storage address and a starting identifier of a service program, wherein the starting identifier is a file identifier for triggering starting of a starting file in the service program;
setting the storage address as the value of an address variable in the service bearing function, and setting the starting identifier as the value of an identifier variable in the service bearing function;
and calling the service bearing function, acquiring the corresponding service program from the storage address, and starting the starting file of the service program according to the starting identifier so as to start the service program and finish the deployment of the service.
In another aspect, the present invention further provides a service deployment apparatus, including:
the starting unit is used for starting the container mirror image, the container mirror image is generated based on a service bearing function, and the service bearing function comprises an address variable used for positioning a service program and an identification variable used for starting the service program;
the device comprises an acquisition unit, a storage unit and a starting unit, wherein the acquisition unit is used for acquiring a storage address and a starting identifier of a service program, and the starting identifier is a file identifier used for triggering starting of a starting file in the service program;
a setting unit, configured to set the storage address as a value of an address variable in the service bearer function, and set the start identifier as a value of an identifier variable in the service bearer function;
and the calling unit is used for calling the service bearing function, acquiring the corresponding service program from the storage address, and starting the starting file of the service program according to the starting identifier so as to start the service program and finish the deployment of the service.
Optionally, the apparatus further comprises:
and the importing unit is used for importing the updated service program into the storage address by replacing the original service program if the service program is changed.
Optionally, the obtaining unit includes:
the execution module is used for executing a definition file of the container mirror image, wherein the definition file is used for defining that a service bearing function is started immediately after the container mirror image is started;
and the control module is used for controlling the service bearing function to acquire the storage address and the starting identifier.
Optionally, the obtaining unit is further configured to receive the input storage address and the start identifier; or acquiring the storage address and the starting identifier by receiving data sent by a replication controller, wherein the replication controller is a controller which is generated based on the container mirror image and is used for sending relevant data of the service to be deployed.
Optionally, the calling unit is further configured to, after acquiring the corresponding service program from the storage address, store the acquired service program in a specified local address, and start a start file of the local service program according to the start identifier.
In order to achieve the above object, according to another aspect of the present invention, there is provided a storage medium including a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the service deployment method as described above.
To achieve the above object, according to another aspect of the present invention, there is provided a processor for executing a program, wherein the program executes the data service deployment method as described above.
By the technical scheme, the technical scheme provided by the invention at least has the following advantages:
compared with the prior art that the service can be deployed only by regenerating the container mirror image based on the updated service program after the service program is updated, the container mirror image is generated based on the service bearing function, and the service bearing function is generated based on the address variable and the identification variable. When the storage address and/or the starting identifier of the service program are changed due to updating, the value of the address variable and/or the value of the identification variable in the service bearing function are set according to the current storage address and the starting identifier of the service program, so that the service bearing function can redirect the service program and start the service program, and the service deployment is completed quickly.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a service deployment method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another service deployment method provided by the embodiment of the invention;
FIG. 3 is a flow chart of another service deployment method provided by an embodiment of the invention;
FIG. 4 is a block diagram illustrating an architecture of a data service deployment apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating another service deployment apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, an embodiment of the present invention provides a service deployment method, which mainly includes:
101. the container mirror is started.
The container mirror is a mirror generated based on a service bearer function, and the service bearer function comprises an address variable for locating a service program and an identification variable for starting the service program.
The container image is generated based on a service bearer function, and the service bearer function is generated based on an address variable and an identification variable. Therefore, no matter whether the content, the storage address and the starting identifier of the service program are changed, the container mirror image is not influenced, and the content of the container mirror image is not changed. If the storage address and/or the start identifier of the service program are changed due to updating, the service bearer function can redirect and acquire the updated service program and start the service program only by changing the value of the address variable and/or the identifier variable in the service bearer function, so as to complete service deployment according to the updated service program.
102. And acquiring a storage address and a starting identifier of the service program.
The starting identifier is a file identifier for triggering starting of a starting file in the service program.
An input window may be set, and after the container mirror image is started, a user inputs a storage address and a start identifier of a service program to be deployed, so that the service bearer function obtains the storage address and the start identifier of the service program. Or, the storage address and the start identifier of the service program to be deployed may be stored in a definition file of a copy Controller (RC) in advance, and after the container image is started, the start copy Controller sends the stored storage address and the start identifier to the service bearer function, so that the service bearer function obtains the storage address and the start identifier of the service program.
103. And setting the storage address as the value of an address variable in the service bearing function, and setting the starting identifier as the value of an identifier variable in the service bearing function.
The service bearing function locates the service program to be acquired according to the value of the address variable. And after the service program is acquired, starting the acquired starting file of the service program according to the value of the identification variable, so that the starting file starts to execute, and starting the whole service program.
104. And calling the service bearing function, acquiring the corresponding service program from the storage address, and starting the starting file of the service program according to the starting identifier so as to start the service program and finish the deployment of the service.
When the service is deployed, the service bearing function is called through the container mirror image, the service program needing to be started is inquired by the service bearing function, and the service program is started to complete service deployment.
Compared with the prior art that the service can be deployed only by regenerating the container mirror image based on the updated service program after the service program is updated, the service deployment method provided by the embodiment of the invention has the advantages that the container mirror image is generated based on the service bearing function, and the service bearing function is generated based on the address variable and the identification variable. When the storage address and/or the starting identifier of the service program are changed due to updating, the value of the address variable and/or the value of the identification variable in the service bearing function are set according to the current storage address and the starting identifier of the service program, so that the service bearing function can redirect the service program and start the service program, and the service deployment is completed quickly.
The storage address of the service program and the start-up identification may be determined by user input or by receiving data stored in the copy controller. The following two embodiments are specifically described with respect to two cases, respectively, where the storage address of the service program and the start identifier require user input and the storage address of the service program and the start identifier require automatic transmission through the copy/receive controller.
Based on the service deployment method shown in fig. 1, another embodiment of the present invention further provides another service deployment method, which is shown with reference to fig. 2 and mainly includes:
201. the container mirror is started.
The implementation manner of step 201 is the same as that of step 101 in the above embodiment, and is not described herein again.
202. The definition file of the container image is executed.
The definition file is a file for defining that the service bearer function is started immediately after the container image is started.
When the service is deployed, the container image is started first, and then the service bearer function in the container image is started. Since the definition file of the container image is automatically executed when the container image is started, in order to reduce the number of operation steps, the service bearer function may be started immediately after the container image is started as indicated in the definition file of the container image, so that the service bearer function is started when the container image is started.
203. And controlling the service bearing function to receive the input storage address and the starting identifier.
For example, after the container mirror is started, an input box about the service to be deployed is popped up, so that the user can input the storage address and the start identification of the service program to be started. The service bearer function receives input data and sets a value of a corresponding variable according to the data.
204. And setting the storage address as the value of an address variable in the service bearing function, and setting the starting identifier as the value of an identifier variable in the service bearing function.
The implementation manner of step 204 is the same as that of step 103 in the above embodiment, and is not described herein again.
205. And calling the service bearing function, acquiring a corresponding service program from the storage address, and storing the service program in a specified local address.
In order to improve the deployment efficiency of the service, the service program can be stored in a local fixed folder after being acquired, the local service program is directly started when the service program is subsequently started, the execution process of the service program is completed locally, and the execution speed of the service program is improved, so that the deployment efficiency of the service is improved.
206. And starting a start file of a local service program according to the start identifier so as to start the service program and finish the deployment of the service.
Based on the service deployment method shown in fig. 1, another embodiment of the present invention further provides another service deployment method, which is shown with reference to fig. 3 and mainly includes:
301. the container mirror is started.
302. The definition file of the container image is executed.
The implementation manner of steps 301-302 is the same as that of steps 201-202 of the above embodiment, and will not be described herein again.
303. And controlling the service bearing function to acquire the storage address and the starting identifier by receiving data sent by the replication controller.
The replication controller is a controller which is generated based on the container mirror image and is used for sending relevant data of the service to be deployed.
In order to automatically acquire the storage address and the start identifier of the service program, a copy controller capable of transferring data for the container image may be generated based on the container image, and the related data of the service to be deployed may be stored in a definition file of the copy controller in advance. After the container mirror image is started, the service bearing function can read out the relevant data of the service to be deployed from the definition file sent by the corresponding copy controller, so that the service bearing function obtains the storage address and the start identifier of the service program. The data stored in the definition file of the copy controller cannot be automatically changed, manual input is not required to be waited after container mirroring is started every time, and the storage address and the starting identifier of the service program can be directly and automatically acquired from the corresponding copy controller.
304. And setting the storage address as the value of an address variable in the service bearing function, and setting the starting identifier as the value of an identifier variable in the service bearing function.
305. And calling the service bearing function, acquiring a corresponding service program from the storage address, and storing the service program in a specified local address.
306. And starting a start file of a local service program according to the start identifier so as to start the service program and finish the deployment of the service.
The implementation manner of step 304-306 is the same as that of step 204-206 of the above embodiment, and is not described herein again.
307. And replacing the original service program with the updated service program and importing the service program into the storage address.
If the service program changes, before calling the service bearer function, in order to enable the container mirror image to deploy the service through the updated service program, it is necessary to delete the original service program from the storage address and import the updated service program. The updated service program does not occupy other storage addresses of the server, so that the invalid data does not need to be deleted during subsequent service maintenance, and the service maintenance efficiency is improved.
Further, as an implementation of the method in the foregoing embodiment, a further embodiment of the present invention further provides a service deployment apparatus. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method.
Referring to fig. 4, the service deployment apparatus includes:
a starting unit 41, configured to start the container mirror, where the container mirror is a mirror generated based on a service bearer function, and the service bearer function includes an address variable used for locating a service program and an identification variable used for starting the service program;
an obtaining unit 42, configured to obtain a storage address and a start identifier of a service program, where the start identifier is a file identifier for triggering starting of a start file in the service program;
a setting unit 43, configured to set the storage address as a value of an address variable in the service bearer function, and set the start identifier as a value of an identifier variable in the service bearer function;
the calling unit 44 is configured to call the service bearer function, obtain the corresponding service program from the storage address, and start the start file of the service program according to the start identifier, so as to start the service program and complete service deployment.
Optionally, referring to fig. 5, the apparatus further includes:
an importing unit 45, configured to import, if the service program changes, the updated service program into the storage address in place of the original service program;
optionally, as shown in fig. 5, the obtaining unit 42 includes:
an executing module 421, configured to execute a definition file of the container image, where the definition file is a file for defining that a service bearer function is started immediately after the container image is started;
a control module 422, configured to control the service bearer function to obtain the storage address and the start identifier.
Optionally, the obtaining unit 42 is further configured to receive the input storage address and the start identifier; or acquiring the storage address and the starting identifier by receiving data sent by a replication controller, wherein the replication controller is a controller which is generated based on the container mirror image and is used for sending relevant data of the service to be deployed.
Optionally, the invoking unit 44 is further configured to, after acquiring the corresponding service program from the storage address and before starting the start file of the service program according to the start identifier, store the acquired service program in a specified local address, and start the start file of the local service program according to the start identifier.
Compared with the prior art that the service can be deployed only by regenerating the container mirror image based on the updated service program after the service program is updated, the service deployment device provided by the embodiment of the invention generates the container mirror image based on the service carrying function, and the service carrying function is generated based on the address variable and the identification variable. When the storage address and/or the starting identifier of the service program are changed due to updating, the value of the address variable and/or the value of the identification variable in the service bearing function are set according to the current storage address and the starting identifier of the service program, so that the service bearing function can redirect the service program and start the service program, and the service deployment is completed quickly.
In addition, if the service program is changed, the embodiment of the invention can also lead the updated service program to the storage address instead of the original service program, and does not occupy other storage addresses of the server, so that the invalid data does not need to be deleted during subsequent service maintenance, and the efficiency of service maintenance is improved.
The data storage device comprises a processor and a memory, wherein the starting unit, the obtaining unit, the setting unit, the calling unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem of low efficiency of service deployment and service maintenance in the prior art is solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the service deployment method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the service deployment method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps:
starting the container mirror image, wherein the container mirror image is generated based on a service bearing function, and the service bearing function comprises an address variable for positioning a service program and an identification variable for starting the service program;
acquiring a storage address and a starting identifier of a service program, wherein the starting identifier is a file identifier for triggering starting of a starting file in the service program;
setting the storage address as the value of an address variable in the service bearing function, and setting the starting identifier as the value of an identifier variable in the service bearing function;
and calling the service bearing function, acquiring the corresponding service program from the storage address, and starting the starting file of the service program according to the starting identifier so as to start the service program and finish the deployment of the service.
Optionally, if the service program changes, the method further includes:
and replacing the original service program with the updated service program and importing the service program into the storage address.
Optionally, the obtaining the storage address and the start identifier of the service program includes:
executing a definition file of the container mirror image, wherein the definition file is used for defining that a service bearing function is started immediately after the container mirror image is started;
and controlling the service bearing function to acquire the storage address and the starting identifier.
Optionally, the obtaining the storage address and the start identifier of the service program includes:
receiving the input storage address and the starting identifier; or
And acquiring the storage address and the starting identifier by receiving data sent by a replication controller, wherein the replication controller is a controller which is generated based on the container mirror image and is used for sending relevant data of the service to be deployed.
Optionally, after obtaining the corresponding service program from the storage address, the method further includes:
storing the service program in a specified local address;
and starting a starting file of a local service program according to the starting identifier.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform program code for initializing the following method steps when executed on a data processing device:
1. and starting the container mirror image, wherein the container mirror image is generated based on a service bearer function, and the service bearer function comprises an address variable for positioning a service program and an identification variable for starting the service program.
2. The method comprises the steps of obtaining a storage address and a starting identifier of a service program, wherein the starting identifier is a file identifier used for triggering starting of a starting file in the service program.
3. And setting the storage address as the value of an address variable in the service bearing function, and setting the starting identifier as the value of an identifier variable in the service bearing function.
4. And calling the service bearing function, acquiring the corresponding service program from the storage address, and starting the starting file of the service program according to the starting identifier so as to start the service program and finish the deployment of the service.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for service deployment, the method comprising:
starting a container mirror image, wherein the container mirror image is a mirror image generated based on a service bearing function, and the service bearing function comprises an address variable for positioning a service program and an identification variable for starting the service program;
acquiring a storage address and a starting identifier of a service program, wherein the starting identifier is a file identifier for triggering starting of a starting file in the service program;
setting the storage address as the value of an address variable in the service bearing function, and setting the starting identifier as the value of an identifier variable in the service bearing function;
and calling the service bearing function through the container mirror image, acquiring a corresponding service program from the storage address, and starting a starting file of the service program according to the starting identifier so as to start the service program and finish the deployment of the service.
2. The method of claim 1, wherein if the service procedure changes, the method further comprises:
and replacing the original service program with the updated service program and importing the service program into the storage address.
3. The method of claim 1 or 2, wherein obtaining the storage address and the start-up identification of the service program comprises:
executing a definition file of the container mirror image, wherein the definition file is used for defining that a service bearing function is started immediately after the container mirror image is started;
and controlling the service bearing function to acquire the storage address and the starting identifier.
4. The method of claim 1 or 2, wherein obtaining the storage address and the start-up identification of the service program comprises:
receiving the input storage address and the starting identifier; or
And acquiring the storage address and the starting identifier by receiving data sent by a replication controller, wherein the replication controller is a controller which is generated based on the container mirror image and is used for sending relevant data of the service to be deployed.
5. The method according to claim 1 or 2, wherein after retrieving the corresponding service program from the storage address, the method further comprises:
storing the service program in a specified local address;
and starting a starting file of a local service program according to the starting identifier.
6. A service deployment apparatus, characterized in that the apparatus comprises:
the system comprises a starting unit, a storage unit and a processing unit, wherein the starting unit is used for starting a container mirror image, the container mirror image is a mirror image generated based on a service bearing function, and the service bearing function comprises an address variable used for positioning a service program and an identification variable used for starting the service program;
the device comprises an acquisition unit, a storage unit and a starting unit, wherein the acquisition unit is used for acquiring a storage address and a starting identifier of a service program, and the starting identifier is a file identifier used for triggering starting of a starting file in the service program;
a setting unit, configured to set the storage address as a value of an address variable in the service bearer function, and set the start identifier as a value of an identifier variable in the service bearer function;
and the calling unit is used for calling the service bearing function through the container mirror image, acquiring the corresponding service program from the storage address, and starting the starting file of the service program according to the starting identifier so as to start the service program and finish the deployment of the service.
7. The apparatus of claim 6, further comprising:
and the importing unit is used for importing the updated service program into the storage address by replacing the original service program if the service program is changed.
8. The apparatus according to claim 6 or 7, wherein the obtaining unit comprises:
the execution module is used for executing a definition file of the container mirror image, wherein the definition file is used for defining that a service bearing function is started immediately after the container mirror image is started;
and the control module is used for controlling the service bearing function to acquire the storage address and the starting identifier.
9. A storage medium, comprising a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the service deployment method according to any one of claims 1 to 5.
10. A processor, configured to execute a program, wherein the program executes to perform the service deployment method of any one of claims 1 to 5.
CN201710943733.2A 2017-10-11 2017-10-11 Service deployment method and device Active CN109656631B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710943733.2A CN109656631B (en) 2017-10-11 2017-10-11 Service deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710943733.2A CN109656631B (en) 2017-10-11 2017-10-11 Service deployment method and device

Publications (2)

Publication Number Publication Date
CN109656631A CN109656631A (en) 2019-04-19
CN109656631B true CN109656631B (en) 2021-08-10

Family

ID=66108464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710943733.2A Active CN109656631B (en) 2017-10-11 2017-10-11 Service deployment method and device

Country Status (1)

Country Link
CN (1) CN109656631B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752676B (en) * 2020-05-28 2022-06-21 苏州浪潮智能科技有限公司 Docker-based homonymous mirror image removing method, system, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580519A (en) * 2015-01-29 2015-04-29 福建师范大学福清分校 Method for rapid deployment of openstack cloud computing platform
CN106533790A (en) * 2016-12-12 2017-03-22 郑州云海信息技术有限公司 Method, apparatus and system for deploying storage server, and storage server
CN106648741A (en) * 2016-10-18 2017-05-10 广州视睿电子科技有限公司 Method and device for deploying application system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580519A (en) * 2015-01-29 2015-04-29 福建师范大学福清分校 Method for rapid deployment of openstack cloud computing platform
CN106648741A (en) * 2016-10-18 2017-05-10 广州视睿电子科技有限公司 Method and device for deploying application system
CN106533790A (en) * 2016-12-12 2017-03-22 郑州云海信息技术有限公司 Method, apparatus and system for deploying storage server, and storage server

Also Published As

Publication number Publication date
CN109656631A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
CN110493067B (en) Method and device for updating API gateway service
CN105867947B (en) Data processing method and device after preset application program updating
CN109597626B (en) Component deployment method and device
CN111131352B (en) Theme switching method and device
CN106874328B (en) Data processing method and equipment
CN108616599B (en) Method and device for registering and updating application service
CN102368785B (en) Network file uploading method, device and system
CN109634682B (en) Configuration file updating method and device for application program
CN111104387A (en) Method and device for acquiring data set on server
CN106919620B (en) Single page processing method and device
CN109558143B (en) Method and device for deploying applications in cluster
CN113126893B (en) Method, device, storage medium and computer equipment for expanding system partition
CN114691153A (en) Kubernetes cluster deployment method and device
CN109656631B (en) Service deployment method and device
CN111666088A (en) Pod replacement method and device, electronic equipment and computer-readable storage medium
CN112667259A (en) SDN controller version upgrading method, device and medium
CN111459585A (en) Vehicle navigation system interface interaction method and system
CN110764930A (en) Request or response processing method and device based on message mode
CN112394933A (en) Method, device and equipment for replacing theme resources and readable storage medium
CN110968888B (en) Data processing method and device
CN111435342B (en) Poster updating method, poster updating system and poster management system
CN106681771B (en) System reinstallation method and device
CN111897623B (en) Cluster management method, device, equipment and storage medium
CN113778549B (en) Method, device, equipment and medium for realizing back-end environment variable replacement
CN109428915B (en) Data acquisition method and device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant