WO2020119377A1 - 应用模块的启动方法、容器、控制设备及可读存储介质 - Google Patents

应用模块的启动方法、容器、控制设备及可读存储介质 Download PDF

Info

Publication number
WO2020119377A1
WO2020119377A1 PCT/CN2019/118594 CN2019118594W WO2020119377A1 WO 2020119377 A1 WO2020119377 A1 WO 2020119377A1 CN 2019118594 W CN2019118594 W CN 2019118594W WO 2020119377 A1 WO2020119377 A1 WO 2020119377A1
Authority
WO
WIPO (PCT)
Prior art keywords
container
application module
starting
instruction
information
Prior art date
Application number
PCT/CN2019/118594
Other languages
English (en)
French (fr)
Inventor
吴兵
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020119377A1 publication Critical patent/WO2020119377A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Definitions

  • the embodiments of the present application relate to the technical field of communications, and in particular, to a method for starting an application module, a container, a control device, and a readable storage medium.
  • the container can remove cross-service dependencies and conflicts, it improves the developer's productivity, reduces the operation and maintenance complexity to a certain extent, improves the utilization rate of resources, reduces the total system investment, and makes the container technology get rapid development .
  • problems such as complicated application systems, cumbersome installation and deployment, and frequent development and updating are still encountered.
  • the value of the container cloud platform is gradually discovered, it can essentially solve the above problems better.
  • Application containerization is the focus of attention when building a container cloud platform.
  • the traditional applications are stateful, and their module components are complex.
  • the startup dependencies between application modules are particularly important. Therefore, in order to reduce the workload of containerization transformation of traditional applications, a method for controlling the startup sequence of application modules of applications in a simpler and more convenient manner is urgently needed.
  • the purpose of the embodiments of the present application is to provide a method for starting an application module, a container, a control device, and a readable storage medium, so that the implementation personnel can operate more conveniently and reduce the difficulty of operation and maintenance.
  • the embodiments of the present application provide a method for starting an application module, which is applied to a container, and includes the following steps: receiving instruction information sent by a control center, where the container is an N corresponding to an application in a container cloud platform
  • the instruction information is determined by the control center according to the preset startup conditions; according to the instruction information, it is determined whether the application module in the container meets the startup condition; according to the judgment result, it is determined whether to start the application module in the container, N is Positive integer.
  • the embodiment of the present application also provides a method for starting an application module, which is applied to a control center, and includes: determining instruction information according to a preset starting condition; sending the instruction information to a container; wherein, the container is a container cloud platform and application Corresponding to one of the N containers, the container receives the instruction information sent by the control center; according to the instruction information, it is judged whether the application module in the container meets the starting condition; according to the judgment result, it is determined whether to start the application module in the container, N is positive Integer.
  • An embodiment of the present application further provides a container including: at least one processor; and a memory communicatively connected to the at least one processor; and a communication component communicatively connected to the control device, the communication component is under the control of the processor Receiving and sending data; wherein, the memory stores instructions executable by at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method for starting the application module mentioned in the foregoing embodiment.
  • An embodiment of the present application further provides a control device, including: at least one processor; and a memory communicatively connected to the at least one processor; and a communication component communicatively connected to the container, the communication component is under the control of the processor Receiving and sending data; wherein, the memory stores instructions executable by at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method for starting the application module mentioned in the foregoing embodiment.
  • An embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the method for starting the application module mentioned in the foregoing embodiment is implemented.
  • An embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the method for starting the application module mentioned in the foregoing embodiment is implemented.
  • FIG. 1 is a flowchart of a method for starting an application module according to the first embodiment of the present application
  • FIG. 2 is a flowchart of a method for starting an application module according to a second embodiment of this application
  • FIG. 3 is a flowchart of a method for starting an application module according to a third embodiment of the present application.
  • FIG. 4 is a flowchart of a method for starting an application module according to a fourth embodiment of the present application.
  • FIG. 5 is a schematic diagram of the location of the control center in the container cloud platform structure of the fourth embodiment of the present application.
  • FIG. 6 is a schematic diagram of the interaction between the system and the outside world of the fourth embodiment of the present application.
  • FIG. 7 is a schematic flowchart of control logic of an SDDD entity according to the fourth embodiment of the present application.
  • FIG. 8 is a schematic diagram of the overall flow of the startup process of the application module according to the fourth embodiment of the present application.
  • FIG. 9 is a schematic diagram of the implementation process of the startup sequence of the application module in the container according to the fourth embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a container according to a fifth embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a control device according to a sixth embodiment of the present application.
  • the first embodiment of the present application relates to a method for starting an application module, which is applied to a container.
  • the method for starting the application module is shown in FIG. 1 and includes the following steps.
  • Step 101 Receive instruction information sent by the control center.
  • the instruction information is determined by the control center according to the preset start conditions.
  • the startup condition includes at least a condition determined according to a preset startup sequence of application modules in the container.
  • the control center loads a configuration file that stores the startup sequence of the application modules in the container.
  • the control center determines the startup conditions of the application modules in each container according to the startup sequence of the application modules in each container set in the configuration file.
  • the starting conditions may also include other conditions, for example, the configuration of the container needs to meet the conditions, etc., in order to highlight the innovative part of this application, this embodiment is not listed Conditions that are not closely related to solving the technical problems raised in this application, but this does not mean that the start-up conditions do not include other conditions.
  • the containers corresponding to application A include container a, container b, and container c.
  • the startup sequence of the application modules in each container configured in the configuration file is as follows: the application module in container a is started; the application module in container a is started After that, start the application module in the container b; after the application module in the container b is started, start the application module in the container c.
  • the control module determines that the starting condition of container a indicates that the application module in container a does not depend on other containers, and the starting condition of container b indicates that the application module in container b depends on the application module in container a,
  • the start condition indicates that the application module in the container c depends on the application module in the container b.
  • the instruction information may be a control instruction determined by the control center according to the startup condition, or the startup condition and status information of other containers, or a container that the application module in the container determined by the control center based on the startup condition depends on Status information, this embodiment does not limit the specific content and form of the indication information.
  • control center may return the instruction information after the container sends the query instruction to query the instruction information.
  • the query instruction is used to instruct the control center to return the instruction information.
  • the control center may also actively send the instruction information to the container, which is not limited in this embodiment The specific conditions for the control center to send instructions.
  • Step 102 According to the instruction information, determine whether the application module in the container meets the startup condition.
  • the following is an example of the method for the container to judge according to the indication information in different situations.
  • the instruction information is the control instruction determined by the control center according to the starting conditions.
  • the control center determines that the application module in the container meets the startup condition according to the startup condition, and then sends a control instruction to the container.
  • the container receives the control instruction and judges whether the control instruction is a startup instruction, wherein the startup instruction is used to indicate that the application module in the container meets the startup condition; if the determination is yes, the determination result is that the application module in the container meets the startup condition, if the determination is not, The determination result is that the application module in the container does not meet the starting condition.
  • control center judges whether the application modules in the container meet the starting conditions, which reduces the workload of the container.
  • Case 2 The instruction information is determined by the control center according to the starting conditions and the status information of other containers.
  • the other container is a container other than the container among the N containers, and the status information of the other container is used to indicate whether the application module in the other container is started.
  • the control center uses the startup conditions and the status information of other containers as instruction information.
  • the container determines whether the application module in the container depends on other containers according to the starting conditions; if it is determined that the application module in the container depends on other containers, the judgment result is determined according to the status information of the container on which the application module in the container depends; Of application modules do not depend on other containers, and the determination result is that the application modules in the container meet the starting conditions. In the case where the application module in the container depends on other containers, if the container determines that the status information of the dependent container indicates that the application module in the dependent container has been started, the determination result is that the application module in the container meets the start condition.
  • the indication information is the state information of the container that the application module in the container depends on, wherein the state information of the dependent container is determined by the control center according to the startup condition, and the state information of the dependent container is used to indicate the application module in the dependent container Whether to start. If the container determines that the state information of the container that the application module in the container depends on indicates that the application module in the container that the application module in the container depends on has been started, the determination result is that the application module in the container meets the starting condition.
  • the container judges whether the application module in the container meets the starting conditions, which reduces the pressure of the control center.
  • Step 103 Determine whether to start the application module in the container according to the judgment result.
  • the determination result is that the application module in the container meets the startup condition, it indicates that according to the preset startup sequence, the application module of the container that should be started before the application module of the container has completed startup. Therefore, start the Application module, otherwise, according to the preset startup sequence, the application module of the container that should be started before the application module of the container has not yet completed the startup, the container needs to wait for further instructions, or, after a period of time, request the instruction again information.
  • a query instruction is sent to the control center every 10 ms.
  • the container b sends an inquiry instruction to the control center, and the control center determines that the application module in the current container a has not completed the startup, so the determination instruction indicates that the container b does not meet the startup condition.
  • the container b After receiving the instruction information sent by the control center, the container b does not start the internal application module because the instruction information indicates that the start condition is not met.
  • the container b sends an inquiry instruction to the control center again.
  • the control center determines that the application module in the current container a has been started, and determines that the instruction information indicates that the container b meets the start condition. After the container b receives the instruction information sent by the control center, since the instruction information indicates that the starting condition is met, that is, according to the preset starting sequence, the application module in the container b is currently started, and the container starts the application module in the container b.
  • the container after starting the application module in the container, the container sends a state change instruction to the control center.
  • the state change instruction is used to indicate that the application module in the container starts successfully or fails to start.
  • the control center After receiving the state change instruction, the control center changes the state information of the container according to the state change instruction. For example, if the container determines that the application module in the container has not completed the startup within the startup time, it determines that the state change instruction indicates that the startup has failed. Among them, the start time can be set as needed.
  • the control center controls the starting process of the application modules in each container according to the starting conditions of the application modules in each container, so that each application module can
  • the set startup sequence starts to solve the problem of dependency of application modules in the container encountered in the process of containerizing the traditional application.
  • the implementation personnel can change the dependency relationship of the application modules in the container and reduce the workload of containerized transformation of the application.
  • the control center controls the startup sequence of the application modules in each container, and the startup sequence control is changed from the original manual control to the automatic control, which reduces the requirements on the implementation personnel's familiarity with the application, and can be controlled more simply and conveniently.
  • the startup sequence of applied application modules reduces the difficulty of operation and maintenance.
  • the second embodiment of the present application relates to a method for starting an application module. This embodiment is further improved on the basis of the first embodiment. The specific improvements are: before step 101 and after step 103, other Related steps.
  • steps 201 to 207 are included, wherein steps 202 to 204 are respectively the same as steps 101 to 103 in the first embodiment, and are not repeated here. Repeat. The main differences are described below.
  • Step 201 Send an inquiry instruction to the control center.
  • the query instruction is used to instruct the control center to return the instruction information.
  • the container when the application module in the container is not activated, the container periodically sends a query instruction to the control center until the indication information indicates that the application module in the container meets the activation condition.
  • Step 202 Receive instruction information sent by the control center.
  • Step 203 According to the instruction information, determine whether the application module in the container meets the startup condition.
  • Step 204 Determine whether to start the application module in the container according to the judgment result.
  • Step 205 Receive the restart signal sent by the control center.
  • step 204 there may be a case where the container fails to start, or the application module in the container has been started, but the control center has not received a state change instruction. In this case, the control center sends a restart signal, In this way, the container can determine whether to restart according to the restart signal.
  • Step 206 Determine whether the application module in the container is successfully started.
  • step 207 is performed.
  • Step 207 Restart the application module in the container.
  • the container re-executes the program module in the container, and the application module in the container has been started.
  • the container after the container fails to start last time, it can restart the application module in the container according to the restart signal, which improves the overall stability after the application containerization process.
  • the control center controls the starting process of the application modules in each container according to the starting conditions of the application modules in each container, so that each application module can
  • the set startup sequence starts to solve the problem of dependency of application modules in the container encountered in the process of containerizing the traditional application.
  • the implementation personnel can change the dependency relationship of the application modules in the container and reduce the workload of containerized transformation of the application.
  • the control center controls the startup sequence of the application modules in each container, and the startup sequence control is changed from the original manual control to the automatic control, which reduces the requirements on the implementation personnel's familiarity with the application, and can be controlled more simply and conveniently.
  • the startup sequence of applied application modules reduces the difficulty of operation and maintenance.
  • the container fails to start, it can restart the application module in the container after receiving the restart signal, which improves the overall stability of the application container.
  • the third embodiment of the present application relates to a method for starting an application module, which is applied to a control center.
  • the starting method of the application module is shown in Figure 3, including the following steps.
  • Step 301 Determine the instruction information according to the preset start condition.
  • the startup condition includes at least a condition determined according to a preset startup sequence of application modules in the container.
  • the following is an example of the process for the control center to determine the indication information according to the startup conditions.
  • the instruction information is a control instruction determined according to the starting conditions.
  • the control center determines whether the application module in the container depends on other containers according to the starting conditions; if it is determined to be, according to the status information of the container on which the application module in the container depends, determines whether the control command is a starting command.
  • the container is one of the N containers corresponding to the application in the container cloud platform, and the other containers are containers other than the container among the N containers. Specifically, if the control center determines that the status information of the container that the application module in the container depends on indicates that the application module in the container that the application module in the container depends on has been started, it determines that the control instruction is a startup instruction.
  • the containers corresponding to application B include container a, container b, and container c
  • the startup sequence of the application modules in each container configured in the configuration file is: startup of the application module in container a and startup of the application module in container b; After the application modules in container a and container b are both started, the application modules in container c are started. That is, the application module in the container a and the application module in the container b do not depend on other containers, and the application module in the container c depends on the container a and the container b. That is, the container can only be started after the container a and the container b are started. c.
  • the control center determines that container a and container b do not depend on other containers, and sends a start instruction to container a and container b. After receiving the start instruction, the container a and the container b run the internal program modules and start the respective internal application modules. After determining that the container a and the container b have completed the activation of their respective internal application modules, the control center determines that the container c meets the activation condition, and sends a startup instruction to the container c. At this point, the activation of all application modules of the application A is completed.
  • control center may continue to detect the state of the application module in the container that the application module in the container depends on until the application module in the container depends on The status of the application module in the container is activated, and then send a control command to the container.
  • the detection time can be set when the control center detects the applications in the container that the application modules in the container depend on When the status of the module has exceeded the detection time, it is determined that the application module in the container does not meet the startup condition, and the startup fails.
  • the indication information is determined according to the startup conditions and the status information of other containers.
  • the other containers are containers other than containers among the N containers, and the status information of the other containers is used to indicate whether application modules in other containers are started.
  • the control center uses the starting conditions and the status information of all other containers as instruction information.
  • the indication information is the status information of the container that the application module in the container depends on the startup condition and depends on.
  • the state information of the dependent container is determined by the control center according to the startup condition.
  • the state information of the container that the application module in the container depends on is used to indicate whether the application module in the container that the application module in the container depends on is started.
  • the control center determines the container that the application module in the container depends on according to the startup condition; the state information of the container that the application module in the container depends on is used as the instruction information.
  • the specific content of the indication information can be determined as needed, for example, the start time of the container is added to the indication information, so that the container or the control center can judge based on the start time Whether the container is successfully started, this embodiment does not limit the specific content of the indication information.
  • Step 302 Send instruction information to the container.
  • the container receives the instruction information sent by the control center; according to the instruction information, it is judged whether the application module in the container meets the activation condition; according to the judgment result, it is determined whether to activate the application module in the container.
  • the container determines whether the application module in the container meets the starting condition according to the instruction information, please refer to the related descriptions of the first embodiment and the second embodiment, which will not be repeated here.
  • the following is an example of how to trigger the control center to send instruction information.
  • control center receives the query instruction sent by the container before sending the instruction information to the container.
  • the query instruction is used to instruct the control center to return the instruction information.
  • control center sends instruction information intermittently. For example, when the state information of the container indicates that the container is not started, the control center sends the instruction information every 1s.
  • control center sends instruction information after determining that the application module in the container satisfies the startup condition.
  • the trigger conditions for the control center to send the instruction information can be set as needed.
  • this embodiment does not limit the trigger conditions for the control center to send the instruction information.
  • the control center actively sends the instruction information to the container to avoid that the control container cannot obtain the instruction information due to the packet loss of the container's query instruction, which in turn leads to the application modules in the container Start failure.
  • the control center controls the starting process of the application modules in each container according to the starting conditions of the application modules in each container, so that each application module can
  • the set startup sequence starts to solve the problem of dependency of application modules in the container encountered in the process of containerizing the traditional application.
  • the implementation personnel can change the dependency relationship of the application modules in the container and reduce the workload of containerized transformation of the application.
  • the control center controls the startup sequence of the application modules in each container, and the startup sequence control is changed from the original manual control to the automatic control, which reduces the requirements on the implementation personnel's familiarity with the application, and can be controlled more simply and conveniently.
  • the startup sequence of applied application modules reduces the difficulty of operation and maintenance.
  • the fourth embodiment of the present application relates to a method for starting an application module. This embodiment is further improved on the basis of the third embodiment. The specific improvement is that after step 302, other related steps are added.
  • this embodiment includes steps 401 to 404, where step 401 and step 402 are substantially the same as step 301 and step 302 in the third embodiment, and are not repeated here. Repeat. The main differences are described below.
  • Step 403 Receive the state change instruction sent by the container, and update the state information of the container according to the state change instruction.
  • the state change instruction is used to indicate that the application module in the container has started successfully or has failed to start.
  • the control center before updating the container's status information according to the status change instruction, the control center needs to first check the status of the application module in the container, determine the first detection result, and determine whether the state change instruction is correct according to the first detection result.
  • the first detection result indicates that the state change instruction is correct, and the state information of the container is updated. If it is determined that the first detection result indicates that the state change instruction is incorrect, the state information of the container is not updated.
  • the state change instruction indicates that the application module in the container is successfully started. If the first detection result detected by the control center indicates that the application module in the container is not started, it means that the state change instruction is incorrect, and the control center does not change the state information of the container . On the contrary, if the first detection result detected by the control center indicates that the application module in the container has been started, it means that the state change instruction is correct, and the control center changes the state information of the container.
  • the state change instruction is verified to ensure the accuracy of the state information of the container in the control center, thereby ensuring that each container can follow the correct Start sequentially.
  • the control center can detect the state of the application module in the container to determine the second detection result; and update the state information of the container according to the second detection result. For example, the control center determines that the second detection result indicates that the application module in the container has been started, and then changes the state information of the container to that the application module in the container has been started.
  • control center detects the status of the application module in the container, and the specific process of determining the second detection result is: the control center intermittently detects the status of the application module in the container. If the preset start time is exceeded, the application If the state of the module is still not started, it is determined that the second detection result is that the application module in the container has failed to start.
  • control center automatically detects the status of the application module in the container to avoid the situation that the status information of the container is not updated in time due to the loss of the data packet carrying the state change instruction.
  • start detection interval and number of times in the SDDD entity can be configured according to actual conditions.
  • the method for the control center to detect the status of the application module in the container includes but is not limited to the following four.
  • Method 1 Port judgment.
  • the control center uses Telnet to connect to the port of the target container. If the connection is successful, the port is started, and the application module in the container is started successfully, otherwise it fails.
  • Method 2 Rest application programming interface (Application Programming Interface, API) judgment.
  • the control center obtains the result based on the access type and path configured by the SDDD entity, and compares it with the configured success value. If the returned result contains the configured successful return value, the API is available. If the application module in the container starts successfully, otherwise it fails.
  • API Application Programming Interface
  • Method 3 Uniform Resource Locator (URL) judgment. Its principle is basically similar to that of method 2. According to the returned result, it is judged whether the URL is available, and then it is determined whether the application module in the container is successfully started.
  • URL Uniform Resource Locator
  • Method 4 Custom script detection. When using this method, it is necessary to put the detection script in the container in advance, and determine whether the application module in the container is successfully started according to the path configured in the SDDD entity and return a successful result.
  • Step 404 Determine that the updated container status information indicates that the application module in the container fails to start, and send a restart signal to the container.
  • the control center After determining that the application module in the container fails to start, the control center will send a restart signal to the container, and the container receives the restart signal to restart the application module in the container.
  • the container after the container fails to start last time, it can restart the application module in the container according to the restart signal, which improves the overall stability after the application containerization process.
  • the control center controls the starting process of the application modules in each container according to the starting conditions of the application modules in each container, so that each application module can
  • the set startup sequence starts to solve the problem of dependence of application modules in the container encountered in the process of containerizing the traditional application.
  • the implementation personnel can change the dependency relationship of the application modules in the container and reduce the workload of the containerization transformation of the application.
  • the control center controls the startup sequence of the application modules in each container, and the startup sequence control is changed from the original manual control to the automatic control, which reduces the requirements on the implementation personnel's familiarity with the application, and can be controlled more simply and conveniently.
  • the startup sequence of application modules reduces the difficulty of operation and maintenance.
  • the control center verifies the state change instruction before changing the state information of the container according to the state change instruction, ensuring the accuracy of the state information of the container in the control center, and thus ensuring that each container can be in the correct order start up. After the container fails to start last time, it can restart the application module in the container according to the restart signal, which improves the overall stability after the application containerization process.
  • the following uses a container cloud platform based on an open source container engine (docker) as an example to describe the overall process of application containerization.
  • docker open source container engine
  • the entire application containerization system includes container application, container cloud platform and infrastructure.
  • multiple containers are set in the container application, and the service cloud registration center, resource monitoring management, continuous integration, data volume management, service management, log management, image management, application publishing, and tenant management are set in the container cloud platform.
  • a control center is added, which can also be called the service start control center (The Center Start Of Control Service, hereinafter referred to as TCOSCOS), and its position in the container cloud platform structure can refer to FIG. 5.
  • TCOSCOS The Center Start Of Control Service
  • the application is containerized, it is published on the container cloud platform.
  • the preset startup conditions are loaded into the control center, and the startup sequence of the application modules can be controlled during the startup of the container.
  • FIG. 6 A schematic diagram of the interaction between the system and the outside world is shown in FIG. 6. As can be seen from FIG. 6, when a user uses the system to containerize an application, he first logs in to the interface, enters the container cloud platform, and performs the following operations in the container cloud platform.
  • the first step is to determine the dockerfile and dependent files of the open source container engine of each container.
  • the image management module of the container cloud platform can build images based on dockerfile and dependent files.
  • the image management module encapsulates the agent program that communicates with the control center into the startup process when creating the image of the application container, so that the agent program can communicate with the control center at the first time when the container is started.
  • the second step is the orchestration service, which orchestrates the container and defines a system deployment definition descriptor (System Deployment Definition (hereinafter referred to as SDDD) entity).
  • SDDD System Deployment Definition
  • the SDDD entity is the configuration file mentioned above.
  • the SDDD entity may be another markup language (yaml) file.
  • the SDDD entity supports entities such as databases, files, and representational state transfer (Representational State Transfer, rest) interfaces. Its main role is to define the startup sequence and detection conditions of application modules in each container.
  • defining the SDDD entity includes the following operations: allocating the startup sequence of the application modules in the container; allocating the startup detection conditions of the application modules in the container, for example, setting the startup detection conditions to: use remote terminal protocol (Telnet) to connect
  • Telnet remote terminal protocol
  • the port of the container if the connection is successful, it means that the application module in the container has started successfully; the deployment of the application module in the container depends on the startup; the fault tolerance mechanism of the application module in the container is configured, for example, the number of detections and the detection time are allocated to prevent falling In the case of an endless loop that has been detected. For example, the detection time is set to 2s. If the application module in the container still does not meet the start condition after continuous detection for 2s, it is determined that the application module has failed to start.
  • the startup condition is loaded into the control center in a manner that the SDDD entity carries the startup condition.
  • the startup condition may be loaded into the control center using other methods.
  • FIG. 7 the schematic diagram of the control logic flow of the SDDD entity is shown in FIG. 7 and includes the following steps.
  • Step 601 Read the start condition.
  • Step 602 Determine whether the detection time is exceeded.
  • step 603 if it is not determined, step 603 is executed, otherwise, step 605 is executed.
  • the detection time can be set as needed.
  • Step 603 Determine whether the application module in the container meets the startup condition.
  • step 604 If yes, go to step 604; otherwise, go to step 602.
  • Step 604 Start the application module.
  • Step 605 Determine startup failure.
  • the third step, service deployment and application release will publish the orchestrated services and applications so that each container is in a running state.
  • the application After completing the above operations, the application has been released, and the application modules in each container will be started in sequence according to the configured startup sequence.
  • the overall flow diagram of the startup process of the application module is shown in FIG. 8 and includes the following steps.
  • Step 701 The user-defined SDDD entity.
  • Step 702 The control center loads the SDDD entity.
  • the information about the startup sequence of the application modules in each defined container is loaded into the control center, so that the control center can determine the startup conditions of each application module according to the preset startup sequence, and according to each container The starting conditions of the application modules of each control each container to start its own application module according to the preset starting sequence.
  • Step 703 The application container is started.
  • the process identification number (PID) of the container is set to 1, so that when the user enters, the container can be started immediately. Since the agent in the control center is encapsulated in the startup process, the agent will be started during the container startup process.
  • Step 704 The control center is started.
  • control center starts fault-tolerance judgment based on the information in the SDDD entity, determines the method of detecting the status of the application modules in the container, and starts the programs of each application module in turn according to the activation conditions in the SDDD entity.
  • Step 705 The application module is started.
  • FIG. 9 the schematic diagram of the implementation process of the application module startup sequence in the container is shown in FIG. 9.
  • 1, 2, 3, and 4 indicate the sequence of each step in the application module startup process in the container.
  • the container starts the process. Before the application module is started, the container needs to be started.
  • the agent program communicates with the control center to obtain instructions.
  • the agent program in the container is connected with the control center through the rest interface, and sends query instructions to obtain the instruction information.
  • the container determines whether to start the application module according to the instruction information. If the indication information indicates that the application module in the container meets the startup condition, the application module is started, and if it is not allowed, it continues to wait until it receives the indication information indicating that the application module in the container meets the startup condition or receives a signal that the startup fails.
  • the control center After receiving the query instruction sent by the agent program in the container, the control center according to the information in the SDDD entity. If the application module in the container corresponding to the agent program has no dependency, it returns instruction information indicating that the application module in the container meets the startup condition. If the application modules in the container have a dependency relationship, determine whether the application modules that the application modules in the container depend on are started, and if it is determined to be started, return an instruction message indicating that the application modules in the container meet the starting conditions; otherwise, return the application in the container The indication information that the module does not meet the start condition, or, the test is repeated until the result of the re-check is that the dependent application module has started or exceeded the preset test time. When the detection time is exceeded, an instruction message indicating that the application module in the container does not meet the start condition is returned.
  • the startup fails, record the failure and store it in the database.
  • the application modules of each container are sequentially started according to the startup sequence, the specific conditions of their startup are recorded, and the results are returned to the user interface.
  • the user interface displays various states of the container and the state of the application module according to the obtained results.
  • a fifth embodiment of the present application relates to a container, as shown in FIG. 10, including: at least one processor 801; and, a memory 802 communicatively connected to the at least one processor 801; and a communication component communicatively connected to the control device 803, the communication component 803 receives and sends data under the control of the processor 801; wherein, the memory 802 stores instructions executable by at least one processor 801, and the instructions are executed by at least one processor 801, so that at least one processor 801 The method for starting the application module mentioned in the above embodiment can be executed.
  • a sixth embodiment of the present application designs a control device, as shown in FIG. 11, including: at least one processor 901; and, a memory 902 communicatively connected to the at least one processor 901; and a communication component communicatively connected to the container 903, the communication component 903 receives and sends data under the control of the processor 901; wherein, the memory 902 stores instructions executable by at least one processor 901, and the instructions are executed by at least one processor 901, so that at least one processor 901 The method for starting the application module mentioned in the above embodiment can be executed.
  • one or more processors and a memory are used, and one processor is used as an example in FIGS. 10 and 11.
  • the processor and the memory may be connected through a bus or other methods. In FIGS. 10 and 11, connection through a bus is used as an example.
  • the memory can be used to store non-volatile software programs, non-volatile computer executable programs, and modules.
  • the processor executes various functional applications and data processing of the device by running non-volatile software programs, instructions, and modules stored in the memory, that is, the method for starting the application modules described above is implemented.
  • the memory may include a storage program area and a storage data area, where the storage program area may store an operating system and application programs required by at least one function; the storage data area may store a list of options, and the like.
  • the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory optionally includes memories remotely set with respect to the processor, and these remote memories may be connected to an external device through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
  • One or more modules are stored in the memory, and when executed by one or more processors, execute the method for starting the application module in any of the above method embodiments.
  • the seventh embodiment of the present application relates to a computer-readable storage medium that stores a computer program.
  • the computer program is executed by the processor, the method for starting the application module mentioned in the first embodiment and the second embodiment is realized.
  • the eighth embodiment of the present application relates to a computer-readable storage medium that stores a computer program.
  • the computer program is executed by the processor, the method for starting the application module mentioned in the third embodiment and the fourth embodiment is realized.
  • a program which is stored in a storage medium and includes several instructions to make a device ( It may be a single chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本申请实施例涉及通信技术领域,公开了一种应用模块的启动方法、容器、控制设备及可读存储介质。本申请中,应用模块的启动方法应用于容器,包括:接收控制中心发送的指示信息(101),其中,指示信息由控制中心根据预先设置的启动条件确定;根据指示信息,判断容器内的应用模块是否符合启动条件(102);根据判断结果,确定是否启动容器内的应用模块(103)。

Description

应用模块的启动方法、容器、控制设备及可读存储介质
交叉引用
本申请引用于2018年12月12日递交的名为“应用模块的启动方法、容器、控制设备及可读存储介质”的第201811518762.5号中国专利申请,其通过引用被全部并入本申请。
技术领域
本申请实施例涉及通信技术领域,特别涉及一种应用模块的启动方法、容器、控制设备及可读存储介质。
背景技术
由于容器能够移除跨服务依赖和冲突,提高了开发者的生产力,在一定的程度上降低了运维复杂性,提升了资源的使用率,降低了系统总投入,使得容器技术得到了快速发展。但是,使用容器的时候,还是遇到了应用系统复杂、安装部署繁琐、开发更新频繁等问题。随着容器技术的不断发展和完善,容器云平台的价值也逐渐发掘出来,它可以从本质上更好的解决上述的问题。应用容器化是建设容器云平台需要关注的重点。
然而,发明人发现相关技术中至少存在如下问题:传统应用系统使用容器云平台时需要进行容器化改造,而这其中会遭遇到一个问题,传统应用都是有状态的,其模块组件复杂,各个应用模块之间的启动依赖关系尤为重要。因此,为了减少传统应用的容器化改造的工作量,亟需一种能够更为简单、方便的控制应用的应用模块的启动顺序的方法。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
本申请实施例的目的在于提供一种应用模块的启动方法、容器、控制设备及可读存储介质,使得实施人员操作更为方便,且降低了运维的难度。
为解决上述技术问题,本申请的实施例提供了一种应用模块的启动方法,应用于容器, 包括以下步骤:接收控制中心发送的指示信息,其中,容器为容器云平台中与应用对应的N个容器中的一个容器,指示信息由控制中心根据预先设置的启动条件确定;根据指示信息,判断容器内的应用模块是否符合启动条件;根据判断结果,确定是否启动容器内的应用模块,N为正整数。
本申请的实施例还提供了一种应用模块的启动方法,应用于控制中心,包括:根据预先设置的启动条件,确定指示信息;发送指示信息至容器;其中,容器为容器云平台中与应用对应的N个容器中的一个容器,容器接收控制中心发送的指示信息;根据指示信息,判断容器内的应用模块是否符合启动条件;根据判断结果,确定是否启动容器内的应用模块,N为正整数。
本申请的实施例还提供了一种容器,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;以及,与控制设备通信连接的通信组件,通信组件在处理器的控制下接收和发送数据;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述实施例提及的应用模块的启动方法。
本申请的实施例还提供了一种控制设备,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;以及,与容器通信连接的通信组件,通信组件在处理器的控制下接收和发送数据;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述实施例提及的应用模块的启动方法。
本申请的实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述实施例提及的应用模块的启动方法。
本申请的实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述实施例提及的应用模块的启动方法。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是本申请的第一实施例的应用模块的启动方法的流程图;
图2是本申请的第二实施例的应用模块的启动方法的流程图;
图3是本申请的第三实施例的应用模块的启动方法的流程图;
图4是本申请的第四实施例的应用模块的启动方法的流程图;
图5是本申请的第四实施例的控制中心在容器云平台结构中的位置示意图;
图6是本申请的第四实施例的系统与外界的交互的示意图;
图7是本申请的第四实施例的SDDD实体的控制逻辑的流程示意图;
图8是本申请的第四实施例的应用模块的启动过程的整体流程示意图;
图9是本申请的第四实施例的应用模块的启动顺序在容器中实现过程的示意图;
图10是本申请的第五实施例的容器的结构示意图;
图11是本申请的第六实施例的控制设备的结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。
本申请的第一实施例涉及一种应用模块的启动方法,应用于容器。该应用模块的启动方法如图1所示,包括以下步骤。
步骤101:接收控制中心发送的指示信息。
具体地说,指示信息由控制中心根据预先设置的启动条件确定。启动条件至少包括根据预先设置的容器内的应用模块的启动顺序确定的条件。控制中心中加载有存储了容器内的应用模块的启动顺序的配置文件,控制中心根据该配置文件中设置的各个容器内的应用模块的启动顺序,确定各个容器内的应用模块的启动条件。
需要说明的是,本领域技术人员可以理解,实际应用中,启动条件中还可以包括其他条件,例如,容器的配置需要满足条件等,为了突出本申请的创新部分,本实施例中并没有列举与解决本申请所提出的技术问题关系不太密切的条件,但这并不表明启动条件中不包括其它条件。
例如,应用A对应的容器包括容器a、容器b和容器c,配置文件中配置的各个容器内的应用模块的启动顺序为:启动容器a内的应用模块;在容器a内的应用模块启动完成后,启动容器b内的应用模块;在容器b内的应用模块启动完成后,启动容器c内的应用模块。控制模块根据该配置文件,确定容器a的启动条件指示容器a中的应用模块不依赖于其他容器,容器b的启动条件指示容器b中的应用模块依赖于容器a中的应用模块,容器c的启动条件指示容器c中的应用模块依赖于容器b中的应用模块。
具体实现中,指示信息可以是控制中心根据启动条件确定的控制指令,也可以是启动条件和其他容器的状态信息,还可以是由控制中心根据启动条件确定的容器内的应用模块依赖的容器的状态信息,本实施例不限制指示信息的具体内容和形式。
需要说明的是,控制中心可以是在容器发送查询指令查询指示信息后,返回指示信息,查询指令用于指示控制中心返回指示信息,控制中心也可以主动发送指示信息至容器,本实施例不限制控制中心发送指示信息的具体条件。
步骤102:根据指示信息,判断容器内的应用模块是否符合启动条件。
以下对不同情况下,容器根据指示信息进行判断的方法进行举例说明。
情况1:指示信息为控制中心根据启动条件确定的控制指令。控制中心根据启动条件,确定容器内的应用模块符合启动条件后,发送控制指令至容器。容器接收控制指令,判断控制指令是否为启动指令,其中,启动指令用于指示容器内的应用模块符合启动条件;若确定是,确定判断结果为容器内的应用模块符合启动条件,若确定不是,确定判断结果为容器内的应用模块不符合启动条件。
值得一提的是,该情况下,控制中心对容器内的应用模块是否符合启动条件进行判断,减少了容器的工作量。
情况2:指示信息由控制中心根据启动条件和其他容器的状态信息确定。其中,其他容器为N个容器中除容器以外的容器,其他容器的状态信息用于指示其他容器内的应用模块是否启动。具体实现中,控制中心将启动条件和其他容器的状态信息作为指示信息。容器根据启动条件,判断容器内的应用模块是否依赖于其他容器;若确定容器内的应用模块依赖于其他容器,根据容器内的应用模块依赖的容器的状态信息,确定判断结果;若确定容器内的应用模块不依赖于其他容器,确定判断结果为容器内的应用模块符合启动条件。在容器内的应用模块依赖于其他容器的情况下,容器若确定依赖的容器的状态信息指示依赖的容器内的应用模块已启动,确定判断结果为容器内的应用模块符合启动条件。
情况3:指示信息为容器内的应用模块依赖的容器的状态信息,其中,依赖的容器的状态信息由控制中心根据启动条件确定,依赖的容器的状态信息用于指示依赖的容器内的应用模块是否启动。容器若确定该容器内的应用模块依赖的容器的状态信息指示容器内的应用模块依赖的容器内的应用模块已启动,确定判断结果为容器内的应用模块符合启动条件。
值得一提的是,由容器根据控制中心返回的数据,自行判断容器内的应用模块是否符合启动条件,降低了控制中心的压力。
步骤103:根据判断结果,确定是否启动容器内的应用模块。
具体地说,若确定判断结果为容器内的应用模块符合启动条件,说明根据预先设置的启动顺序,应当在该容器的应用模块之前启动的容器的应用模块已经完成启动,因此,启动容器内的应用模块,否则,说明根据预先设置的启动顺序,应当在该容器的应用模块之前启动的容器的应用模块还未完成启动,容器需要等待进一步地指令,或者,在间隔一段时间后,重新请求指示信息。
以下结合实际场景说明,举例说明该应用模块的启动方法。
例如,对于上文提及的应用A,在应用A中的容器b启动后,容器b中的应用模块启动前,每个10ms发送一次查询指令至控制中心。在第一时刻,容器b发送查询指令至控制中心,控制中心确定当前容器a内的应用模块未完成启动,故确定指示信息指示容器b不符合启动条件。容器b在接收到控制中心发送的指示信息后,由于指示信息指示不符合启动条件,故容器b不启动内部的应用模块。容器b在距离第一时刻10ms后,再次发送查询指令至控制中心,控制中心确定当前容器a内的应用模块已完成启动,确定指示信息指示容器b符合启动条件。容器b在接收到控制中心发送的指示信息后,由于指示信息指示符合启动条件,即按照预先设置的启动顺序,当前轮到容器b内的应用模块启动,容器启动容器b内的应用模块。
通过上述内容可知,当容器内的应用模块符合启动条件时,说明根据预先设置的启动顺序,轮到该容器内的应用模块启动,使得容器能够按照预先设置的启动顺序,启动该容器内的应用模块。
具体实现中,容器在启动容器内的应用模块后,发送状态更改指令至控制中心。状态更改指令用于指示容器内的应用模块启动成功或启动失败。控制中心在接收到状态更改指令后,根据该状态更改指令,更改该容器的状态信息。例如,容器若确定该容器内的应用模块在启动时间内未完成启动,则确定状态更改指令指示启动失败。其中,启动时间可以根据需要设置。
需要说明的是,以上仅为举例说明,并不对本申请的技术方案构成限定。
与现有技术相比,本实施例中提供的应用模块的启动方法,控制中心根据各个容器内的应用模块的启动条件,控制各个容器内的应用模块的启动过程,使得各个应用模块能够按照预先设置的启动顺序启动,解决了传统应用容器化过程中遇到的容器内的应用模块的依赖的问题。并且,实施人员通过修改控制中心中的启动条件,即可改变容器内的应用模块的依赖关系,减少应用的容器化改造的工作量。由控制中心控制各个容器内的应用模块的启动顺序,将启动顺序的控制由原本的人工控制变为了自动控制,降低了对实施人员对应用的熟悉 程度的要求,能够更为简单、方便的控制应用的应用模块的启动顺序,降低了运维的难度。
本申请的第二实施例涉及一种应用模块的启动方法,本实施例在第一实施例的基础上做了进一步改进,具体改进之处为:在步骤101之前和步骤103之后,增加了其他相关步骤。
具体的说,如图2所示,在本实施例中,包含步骤201至步骤207,其中,步骤202至步骤204分别与第一实施例中的步骤101至步骤103大致相同,此处不再赘述。下面主要介绍不同之处。
步骤201:发送查询指令至控制中心。
具体地说,查询指令用于指示控制中心返回指示信息。一个具体实现中,容器在容器内的应用模块未启动的情况下,周期性地发送查询指令至控制中心,直至指示信息指示容器内的应用模块符合启动条件。
步骤202:接收控制中心发送的指示信息。
步骤203:根据指示信息,判断容器内的应用模块是否符合启动条件。
步骤204:根据判断结果,确定是否启动容器内的应用模块。
步骤205:接收控制中心发送的重启信号。
具体地说,在执行步骤204之后,可能存在容器启动失败的情况,或者,容器内的应用模块已启动,但控制中心未收到状态更改指令的情况,该情况下,控制中心发送重启信号,使得容器可以根据该重启信号,判断是否需要重启。
步骤206:判断容器内的应用模块是否启动成功。
具体地说,若确定容器内的应用模块启动成功,则不对重启信号进行响应,若确定容器内的应用模块启动失败,执行步骤207。
步骤207:重启容器内的应用模块。
具体地说,容器重新执行容器内的程序模块,已启动容器内的应用模块。
值得一提的是,容器在上一次启动失败后,能够根据重启信号,重新启动容器内的应用模块,提高了应用容器化处理后的整体的稳定性。
需要说明的是,以上仅为举例说明,并不对本申请的技术方案构成限定。
与现有技术相比,本实施例中提供的应用模块的启动方法,控制中心根据各个容器内的应用模块的启动条件,控制各个容器内的应用模块的启动过程,使得各个应用模块能够按照预先设置的启动顺序启动,解决了传统应用容器化过程中遇到的容器内的应用模块的依赖的问题。并且,实施人员通过修改控制中心中的启动条件,即可改变容器内的应用模块的依赖关系,减少应用的容器化改造的工作量。由控制中心控制各个容器内的应用模块的启动顺 序,将启动顺序的控制由原本的人工控制变为了自动控制,降低了对实施人员对应用的熟悉程度的要求,能够更为简单、方便的控制应用的应用模块的启动顺序,降低了运维的难度。除此之外,容器在启动失败的情况下,能够在接收到重启信号后,重新启动容器内的应用模块,提高了应用容器化后的整体的稳定性。
本申请的第三实施例涉及一种应用模块的启动方法,应用于控制中心。应用模块的启动方法如图3所示,包括以下步骤。
步骤301:根据预先设置的启动条件,确定指示信息。
具体地说,启动条件至少包括根据预先设置的容器内的应用模块的启动顺序确定的条件。
以下对控制中心根据启动条件确定指示信息的过程进行举例说明。
第一种实现方式中,指示信息为根据启动条件确定的控制指令。控制中心根据启动条件,判断容器内的应用模块是否依赖于其他容器;若确定是,根据容器内的应用模块依赖的容器的状态信息,确定控制指令是否为启动指令。其中,容器为容器云平台中与应用对应的N个容器中的一个容器,其他容器为N个容器中除容器以外的容器。具体地说,控制中心若确定容器内的应用模块依赖的容器的状态信息指示容器内的应用模块依赖的容器内的应用模块已启动,确定控制指令为启动指令。例如,应用B对应的容器包括容器a、容器b和容器c,配置文件中配置的各个容器内的应用模块的启动顺序为:启动容器a内的应用模块和启动容器b内的应用模块;在容器a和容器b内的应用模块均启动后,启动容器c内的应用模块。即容器a内的应用模块和容器b内的应用模块不依赖于其他容器,容器c内的应用模块依赖于容器a和容器b,即在容器a和容器b均启动完成后,才可以启动容器c。第一时刻,控制中心确定容器a和容器b不依赖于其他容器,发送启动指令至容器a和容器b。容器a和容器b在接收到启动指令后,运行内部的程序模块,启动各自内部的应用模块。控制中心在确定容器a和容器b在完成各自内部的应用模块的启动后,确定容器c符合启动条件,发送启动指令至容器c,至此,完成应用A的所有应用模块的启动。
具体实现中,控制中心在确定容器内的应用模块依赖的容器内的应用模块未启动时,可以继续检测容器内的应用模块依赖的容器内的应用模块的状态,直至容器内的应用模块依赖的容器内的应用模块的状态为已启动,再发送控制指令至容器。
需要说明的是,为避免控制中心一直检测容器内的应用模块依赖的容器内的应用模块的状态,陷入死循环,可以设置检测时间,当控制中心检测容器内的应用模块依赖的容器内的应用模块的状态的时间已超过检测时间时,确定容器内的应用模块不符合启动条件,启动 失败。
第二种实现方式中,指示信息根据启动条件和其他容器的状态信息确定。其他容器为N个容器中除容器以外的容器,其他容器的状态信息用于指示其他容器内的应用模块是否启动。具体实现中,控制中心将启动条件和所其他容器的状态信息,作为指示信息。
第三种实现方式中,指示信息为根据启动条件确定的容器内的应用模块依赖的容器的状态信息。依赖的容器的状态信息由控制中心根据启动条件确定,容器内的应用模块依赖的容器的状态信息用于指示容器内的应用模块依赖的容器内的应用模块是否启动。具体地说,控制中心根据启动条件,确定容器内的应用模块依赖的容器;将容器内的应用模块依赖的容器的状态信息,作为指示信息。
需要说明的是,本领域技术人员可以理解,实际应用中,可以根据需要确定指示信息的具体内容,例如,在指示信息中增加该容器的启动时间,以便容器或控制中心根据该启动时间,判断容器是否启动成功,本实施例不限制指示信息的具体内容。
步骤302:发送指示信息至容器。
具体地说,容器接收控制中心发送的指示信息;根据指示信息,判断容器内的应用模块是否符合启动条件;根据判断结果,确定是否启动容器内的应用模块。其中,容器根据指示信息确定容器内的应用模块是否符合启动条件可参考第一实施例和第二实施例的相关描述,此处不再赘述。
以下对触发控制中心发送指示信息的方式进行举例说明。
具体实现中,控制中心在发送指示信息至容器之前,接收容器发送的查询指令,查询指令用于指示控制中心返回指示信息。
另一具体实现中,控制中心间断地发送指示信息。例如,控制中心在容器的状态信息指示该容器为未启动时,每隔1s发送一次指示信息。
又一具体实现中,控制中心在确定容器内的应用模块满足启动条件后,发送指示信息。
需要说明的是,本领域技术人员可以理解,实际应用中,可以根据需要设置控制中心发送指示信息的触发条件,例如,本实施例不限制控制中心发送指示信息的触发条件。
值得一提的是,控制中心在确定容器内的应用模块符合启动条件后,主动发送指示信息至容器,避免由于容器的查询指令丢包导致控制容器无法获得指示信息,进而导致容器内的应用模块启动失败的情况。
与现有技术相比,本实施例中提供的应用模块的启动方法,控制中心根据各个容器内的应用模块的启动条件,控制各个容器内的应用模块的启动过程,使得各个应用模块能够按 照预先设置的启动顺序启动,解决了传统应用容器化过程中遇到的容器内的应用模块的依赖的问题。并且,实施人员通过修改控制中心中的启动条件,即可改变容器内的应用模块的依赖关系,减少应用的容器化改造的工作量。由控制中心控制各个容器内的应用模块的启动顺序,将启动顺序的控制由原本的人工控制变为了自动控制,降低了对实施人员对应用的熟悉程度的要求,能够更为简单、方便的控制应用的应用模块的启动顺序,降低了运维的难度。
本申请第四实施例涉及一种应用模块的启动方法,本实施例在第三实施例的基础上做了进一步改进,具体改进之处为:在步骤302之后,增加了其他相关步骤。
具体的说,如图4所示,在本实施例中,包含步骤401至步骤404,其中,步骤401和步骤402分别与第三实施例中的步骤301和步骤302大致相同,此处不再赘述。下面主要介绍不同之处。
执行步骤401至步骤402。
步骤403:接收容器发送的状态更改指令,根据状态更改指令,更新容器的状态信息。
具体地说,状态更改指令用于指示容器内的应用模块启动成功或启动失败。
具体实现中,控制中心在根据状态更改指令,更新容器的状态信息之前,需要先检测容器内的应用模块的状态,确定第一检测结果,根据第一检测结果判断状态更改指令是否正确,若确定第一检测结果指示状态更改指令正确,更新容器的状态信息,若确定第一检测结果指示状态更改指令错误,不更新容器的状态信息。例如,状态更改指令指示容器内的应用模块启动成功,若控制中心检测得到的第一检测结果指示容器内的应用模块未启动,则说明状态更改指令不正确,控制中心不对容器的状态信息进行更改。相反的,若控制中心检测得到的第一检测结果指示容器内的应用模块已启动,说明状态更改指令正确,控制中心对容器的状态信息进行更改。
值得一提的是,控制中心在根据状态更改指令更改容器的状态信息之前,对状态更改指令进行验证,确保了控制中心中的容器的状态信息的准确性,进而确保了各个容器能够按照正确的顺序启动。
需要说明的是,本领域技术人员可以理解,控制中心可以在发送指示信息至容器之后,检测容器内的应用模块的状态,确定第二检测结果;根据第二检测结果,更新容器的状态信息。例如,控制中心确定第二检测结果指示容器内的应用模块已启动,则将容器的状态信息更改为容器内的应用模块已启动。
具体实现中,控制中心检测容器内的应用模块的状态,确定第二检测结果的具体过程为:控制中心间断性地检测容器内的应用模块的状态,若在超过预先设置的启动时间后,应 用模块的状态仍然为未启动,则确定第二检测结果为容器内的应用模块启动失败。
值得一提的是,控制中心根据自动检测容器内的应用模块的状态,避免由于携带状态更改指令的数据包丢失导致容器的状态信息更新不及时的情况。
需要说明的是,本领域技术人员可以理解,实际应用中,不同的应用模块的启动的时间不同,因此,可根据实际情况配置SDDD实体中的启动检测间隔时间及次数。
其中,控制中心检测容器内的应用模块的状态的方法包括但不限于以下4种。
方法1:端口判断。控制中心使用Telnet去连接目标容器的端口,若其连接成功,则端口启动完成,容器内的应用模块启动成功,反之失败。
方法2:rest的应用程序编程接口(Application Programming Interface,API)判断。控制中心根据SDDD实体配置的访问类型和路径来获取结果,并与配置的成功值比较,若返回结果中含有配置的成功返回值,则API可用,若容器内的应用模块启动成功,反之失败。
方法3:统一资源定位符(Uniform Resource Locator,URL)判断。它的原理基本与方法2类似,根据返回的结果来判断该URL是否可用,进而确定容器内的应用模块是否启动成功。
方法4:自定义脚本检测。使用该方法时,需要提前将检测脚本放入容器中,根据SDDD实体中配置的路径,返回成功结果等来判断容器内的应用模块是否启动成功。
步骤404:确定更新后的容器的状态信息指示容器内的应用模块启动失败,发送重启信号至容器。
具体地说,控制中心在确定容器内的应用模块启动失败后,将发送重启信号至容器,容器接收重启信号,重启容器内的应用模块。
值得一提的是,容器在上一次启动失败后,能够根据重启信号,重新启动容器内的应用模块,提高了应用容器化处理后的整体的稳定性。
与现有技术相比,本实施例中提供的应用模块的启动方法,控制中心根据各个容器内的应用模块的启动条件,控制各个容器内的应用模块的启动过程,使得各个应用模块能够按照预先设置的启动顺序启动,解决了传统应用容器化过程中遇到的容器内的应用模块的依赖的问题。并且,实施人员通过修改控制中心中的启动条件,即可改变容器内的应用模块的依赖关系,减少应用的容器化改造的工作量。由控制中心控制各个容器内的应用模块的启动顺序,将启动顺序的控制由原本的人工控制变为了自动控制,降低了对实施人员对应用的熟悉程度的要求,能够更为简单、方便的控制应用的应用模块的启动顺序,降低了运维的难度。除此之外,控制中心在根据状态更改指令更改容器的状态信息之前,对状态更改指令进行验 证,确保了控制中心中的容器的状态信息的准确性,进而确保了各个容器能够按照正确的顺序启动。容器在上一次启动失败后,能够根据重启信号,重新启动容器内的应用模块,提高了应用容器化处理后的整体的稳定性。
以下以基于开源容器的引擎(docker)的容器云平台为例,对应用容器化的整体过程进行说明。
首先,整个应用容器化的系统包括容器应用、容器云平台和基础设施三大部分。其中,容器应用内设置有多个容器,容器云平台中设置有服务注册中心、资源监控管理、持续集成、数据卷管理、服务管理、日志管理、镜像管理、应用发布和租户管理等功能块,在这些功能块的基础上,增加了控制中心,也可以称为服务启动控制中心(The Center Of Startup Control Of Service,以下简称TCOSCOS),其在容器云平台结构中的位置可参考图5。在将应用容器化后,将其发布在容器云平台,此时,将预先设置的启动条件加载至控制中心,即可在容器的启动过程中实现对应用模块启动顺序的控制。容器云平台上还部署有应用编排和容器引擎,便于用户进行应用的服务编排等。基础设施可以是物理机、虚拟机和基础设施即服务(Infrastructure as a Service,IAAS)。系统与外界的交互的示意图如图6所示,由图6可知,用户使用该系统将应用容器化时,先登录界面,进入容器云平台,在容器云平台中执行以下操作。
第一步、确定各个容器的开源容器的引擎的文件(dockerfile)和依赖文件。容器云平台的镜像管理模块可以根据dockerfile和依赖文件进行镜像构建。镜像管理模块在制作应用的容器的镜像时,将与控制中心进行通信的代理程序封装至启动进程中,以便代理程序能够在容器启动的第一时间与控制中心进行信息交流。
第二步、编排服务,对容器进行编排,定义系统部署定义描述符(System Deploy Define Description,以下简称SDDD)实体。
具体地说,SDDD实体即前文提及的配置文件。SDDD实体可以是另一种标记语言(yaml)文件。SDDD实体支持数据库、文件、表述性状态传递(Representational State Transfer,rest)接口等实体,它的主要作用是定义各个容器内的应用模块的启动顺序、检测条件等。
具体实现中,定义SDDD实体包括以下操作:调配容器内的应用模块的启动顺序;调配容器内的应用模块的启动检测条件,例如,将启动检测条件设置为:使用远程终端协议(Telnet)去连接容器的端口,若连接成功,则说明容器内的应用模块启动成功;调配容器内的应用模块的启动依赖;调配容器内的应用模块的容错机制,例如,调配检测次数及检测时间,以防止陷入一直检测的死循环的情况中。例如,设置检测时间为2s,若持续检测2s后, 容器内的应用模块仍然不符合启动条件,则确定应用模块启动失败。
需要说明的是,本实施例中以SDDD实体承载启动条件的方式将启动条件加载至控制中心,实际应用中,可以使用其他方式将启动条件加载至控制中心。
具体实现中,SDDD实体的控制逻辑流程示意图如图7所示,包括以下步骤。
步骤601:读取启动条件。
步骤602:判断是否超过检测时间。
具体地说,若确定不是,执行步骤603,否则,执行步骤605。其中,检测时间可以根据需要设置。
步骤603:判断容器内的应用模块是否符合启动条件。
若确定是,执行步骤604,否则,执行步骤602。
步骤604:启动应用模块。
步骤605:确定启动失败。
第三步、服务部署及应用发布,将编排好的服务、应用发布,使各容器处于运行状态。
在完成上述操作后,应用已经发布,各个容器中的应用模块会按照配置的启动顺序依次启动。应用模块的启动过程的整体流程示意图如图8所示,包括以下步骤。
步骤701:用户定义SDDD实体。
步骤702:控制中心加载SDDD实体。
具体地说,将定义好的各个容器内的应用模块启动顺序相关的信息加载至控制中心中,使得控制中心能够根据预先设置的启动顺序,确定每个应用模块的启动条件,并根据各个容器内的应用模块的启动条件,控制各个容器按照预先设置的启动顺序,启动自身的应用模块。
步骤703:应用的容器启动。
具体地说,将容器的进程识别号(Process Identification,PID)设置为1,使得用户进入时,容器能够立即启动。由于控制中心的代理程序封装至启动进程中,容器启动的过程中会将代理程序启动。
步骤704:控制中心启动。
具体地说,控制中心根据SDDD实体中的信息,启动容错判断,确定检测容器内的应用模块的状态的方法,并根据SDDD实体中的启动条件依次启动各应用模块的程序。
步骤705:应用模块启动。
具体地说,应用模块的启动顺序在容器中实现过程的示意图如图9所示,图9中,①、 ②、③和④表示容器内的应用模块启动过程中每个步骤的先后顺序。
①容器启动进程。在应用模块启动前,需要完成容器的启动。
②容器启动过程中,启动容器内的代理程序。
③代理程序与控制中心通信,获取指示信息。容器中的代理程序通过rest接口与控制中心连接,发送查询指令,获取指示信息。
④容器根据指示信息,确定是否启动应用模块。若指示信息指示容器内的应用模块符合启动条件,则启动应用模块,若不允许,则继续等待,直到接收到指示容器内的应用模块符合启动条件的指示信息或接收到启动失败的信号。
控制中心在接收到容器中的代理程序发送的查询指令后,根据SDDD实体中的信息。若代理程序对应的容器内的应用模块无依赖,则返回指示容器内的应用模块符合启动条件的指示信息。若容器内的应用模块有依赖关系,确定容器内的应用模块依赖的应用模块是否启动,若确定已经启动,则返回指示容器内的应用模块符合启动条件的指示信息;否则,返回容器内的应用模块不符合启动条件的指示信息,或者,重复检测,直至重新检测的结果为依赖的应用模块已启动或超过预设的检测时间。当超过检测时间时,返回指示容器内的应用模块不符合启动条件的指示信息。有选择地,在启动失败时,记录失败情况,并存储至数据库。
另外,在各个容器的应用模块根据启动顺序依次启动时,记录其启动的具体情况,并将结果返回给用户界面。用户界面根据获取的结果将容器的各个状态、应用模块的状态展示。
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。
本申请的第五实施例涉及一种容器,如图10所示,包括:至少一个处理器801;以及,与至少一个处理器801通信连接的存储器802;以及,与控制设备通信连接的通信组件803,通信组件803在处理器801的控制下接收和发送数据;其中,存储器802存储有可被至少一个处理器801执行的指令,指令被至少一个处理器801执行,以使至少一个处理器801能够执行上述实施例提及的应用模块的启动方法。
本申请的第六实施例设计一种控制设备,如图11所示,包括:至少一个处理器901;以及,与至少一个处理器901通信连接的存储器902;以及,与容器通信连接的通信组件903,通信组件903在处理器901的控制下接收和发送数据;其中,存储器902存储有可被至少一个处理器901执行的指令,指令被至少一个处理器901执行,以使至少一个处理器901能够 执行上述实施例提及的应用模块的启动方法。
第五实施例和第六实施例中,一个或多个处理器以及存储器,图10和图11中以一个处理器为例。处理器、存储器可以通过总线或者其他方式连接,图10和图11中以通过总线连接为例。存储器作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。处理器通过运行存储在存储器中的非易失性软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述应用模块的启动方法。
存储器可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储选项列表等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至外接设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
一个或者多个模块存储在存储器中,当被一个或者多个处理器执行时,执行上述任意方法实施例中的应用模块的启动方法。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果,未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
本申请第七实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现第一实施例和第二实施例提及的应用模块的启动方法。
本申请第八实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现第三实施例和第四实施例提及的应用模块的启动方法。
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。

Claims (22)

  1. 一种应用模块的启动方法,其特征在于,应用于容器,包括:
    接收控制中心发送的指示信息,其中,所述容器为容器云平台中与应用对应的N个容器中的一个容器,所述指示信息由所述控制中心根据预先设置的启动条件确定,N为正整数;
    根据所述指示信息,判断所述容器内的应用模块是否符合所述启动条件;
    根据判断结果,确定是否启动所述容器内的应用模块。
  2. 根据权利要求1所述的应用模块的启动方法,其特征在于,所述启动条件至少包括根据预先设置的所述容器内的应用模块的启动顺序确定的条件。
  3. 根据权利要求1所述的应用模块的启动方法,其特征在于,所述指示信息为所述控制中心根据所述启动条件确定的控制指令;或者,
    所述指示信息由所述控制中心根据所述启动条件和其他容器的状态信息确定;其中,所述其他容器为所述N个容器中除所述容器以外的容器,所述其他容器的状态信息用于指示所述其他容器内的应用模块是否启动;或者,
    所述指示信息为所述容器内的应用模块依赖的容器的状态信息,其中,所述依赖的容器的状态信息由所述控制中心根据所述启动条件确定,所述依赖的容器的状态信息用于指示所述依赖的容器内的应用模块是否启动。
  4. 根据权利要求3所述的应用模块的启动方法,其特征在于,若所述指示信息为所述控制中心根据启动条件确定的控制指令,所述根据所述指示信息,判断所述容器内的应用模块是否符合所述启动条件,包括:判断所述控制指令是否为启动指令,其中,所述启动指令用于指示所述容器内的应用模块符合所述启动条件;若确定是,确定所述判断结果为所述容器内的应用模块符合所述启动条件;
    若所述指示信息为所述启动条件和其他容器的状态信息,所述根据所述指示信息,判断所述容器内的应用模块是否符合所述启动条件,包括:根据所述启动条件,判断所述容器内的应用模块是否依赖于其他容器;若确定是,根据所述容器内的应用模块依赖的容器的状态信息,确定所述判断结果;若确定不是,确定所述判断结果为所述容器内的应用模块符合所述启动条件;
    若所述指示信息为所述容器内的应用模块依赖的容器的状态信息,所述根据所述指示信息,判断所述容器内的应用模块是否符合所述启动条件,包括:若确定所述依赖的容器的状态信息指示所述依赖的容器内的应用模块已启动,确定所述判断结果为所述容器内的应用模块符合所述启动条件。
  5. 根据权利要求4所述的应用模块的启动方法,其特征在于,所述根据所述容器内的应用模块依赖的容器的状态信息,确定所述判断结果,包括:
    若确定所述依赖的容器的状态信息指示所述依赖的容器内的应用模块已启动,确定所述判断结果为所述容器内的应用模块符合所述启动条件。
  6. 根据权利要求1至5中任一项所述的应用模块的启动方法,其特征在于,在所述接收控制中心发送的指示信息之前,所述应用模块的启动方法还包括:
    发送查询指令至所述控制中心;所述查询指令用于指示所述控制中心返回所述指示信息。
  7. 根据权利要求1至5中任一项所述的应用模块的启动方法,其特征在于,在所述根据判断结果,确定是否启动所述容器内的应用模块之后,所述应用模块的启动方法还包括:
    发送状态更改指令至所述控制中心,所述状态更改指令用于指示所述容器内的应用模块启动成功或启动失败。
  8. 根据权利要求1至5中任一项所述的应用模块的启动方法,其特征在于,在所述根据判断结果,确定是否启动所述容器内的应用模块之后,所述应用模块的启动方法还包括:
    接收所述控制中心发送的重启信号;
    判断所述容器内的应用模块是否启动成功;
    若确定不是,重启所述容器内的应用模块。
  9. 一种应用模块的启动方法,其特征在于,应用于控制中心,包括:
    根据预先设置的启动条件,确定指示信息;
    发送指示信息至容器;其中,所述容器为容器云平台中与应用对应的N个容器中的一个容器,所述容器接收控制中心发送的指示信息;根据所述指示信息,判断所述容器内的应用模块是否符合所述启动条件;根据判断结果,确定是否启动所述容器内的应用模块,N为正整数。
  10. 根据权利要求9所述的应用模块的启动方法,其特征在于,所述启动条件至少包括根据预先设置的所述容器内的应用模块的启动顺序确定的条件。
  11. 根据权利要求9所述的应用模块的启动方法,其特征在于,所述指示信息为根据所述启动条件确定的控制指令;或者,
    所述指示信息根据所述启动条件和其他容器的状态信息确定,其中,所述其他容器为所述N个容器中除所述容器以外的容器,所述其他容器的状态信息用于指示所述其他容器内的应用模块是否启动;或者,
    所述指示信息为所述容器内的应用模块依赖的容器的状态信息,其中,所述依赖的容器 的状态信息由所述控制中心根据所述启动条件确定,所述依赖的容器的状态信息用于指示所述依赖的容器内的应用模块是否启动。
  12. 根据权利要求11所述的应用模块的启动方法,其特征在于,若所述指示信息为所述控制指令,所述根据预先设置的启动条件,确定指示信息,包括:根据所述启动条件,判断所述容器内的应用模块是否依赖于其他容器;若确定是,根据所述容器内的应用模块依赖的容器的状态信息,确定所述控制指令是否为启动指令;若确定不是,确定所述控制指令为所述启动指令;其中,所述启动指令用于指示所述容器内的应用模块符合所述启动条件;
    若所述指示信息为所述启动条件和其他容器的状态信息,所述根据预先设置的启动条件,确定指示信息,包括:将所述启动条件和所述容器的状态信息,作为所述指示信息;
    若所述指示信息为所述容器内的应用模块依赖的容器的状态信息,所述根据预先设置的启动条件,确定指示信息,包括:根据所述启动条件,确定所述容器内的应用模块依赖的容器;将所述依赖的容器的状态信息,作为所述指示信息。
  13. 根据权利要求12所述的应用模块的启动方法,其特征在于,所述根据所述容器内的应用模块依赖的容器的状态信息,确定所述控制指令是否为启动指令,包括:
    若确定所述依赖的容器的状态信息指示所述依赖的容器内的应用模块已启动,确定所述控制指令为所述启动指令。
  14. 根据权利要求9至13中任一项所述的应用模块的启动方法,其特征在于,在所述发送指示信息至容器之前,所述应用模块的启动方法还包括:
    接收所述容器发送的查询指令;所述查询指令用于指示所述控制中心返回所述指示信息。
  15. 根据权利要求9所述的应用模块的启动方法,其特征在于,在所述发送指示信息至容器之后,所述应用模块的启动方法还包括:
    接收所述容器发送的状态更改指令;其中,所述状态更改指令用于指示所述容器内的应用模块启动成功或启动失败;
    根据所述状态更改指令,更新所述容器的状态信息。
  16. 根据权利要求15所述的应用模块的启动方法,其特征在于,在所述接收所述容器发送的状态更改指令之后,所述根据所述状态更改指令,更新所述容器的状态信息之前,所述应用模块的启动方法还包括:
    检测所述容器内的应用模块的状态,确定第一检测结果;
    确定所述第一检测结果指示所述状态更改指令正确。
  17. 根据权利要求9所述的应用模块的启动方法,其特征在于,在所述发送指示信息至 容器之后,所述应用模块的启动方法还包括:
    检测所述容器内的应用模块的状态,确定第二检测结果;
    根据所述第二检测结果,更新所述容器的状态信息。
  18. 根据权利要求15至17中任一项所述的应用模块的启动方法,其特征在于,在所述更新所述容器的状态信息之后,所述应用模块的启动方法还包括:
    若确定更新后的所述容器的状态信息指示所述容器内的应用模块启动失败,发送重启信号至所述容器;其中,所述容器接收所述重启信号,重启所述容器内的应用模块。
  19. 一种容器,其特征在于,包括:至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;以及,
    与控制设备通信连接的通信组件,所述通信组件在所述处理器的控制下接收和发送数据;
    其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至8中任一项所述的应用模块的启动方法。
  20. 一种控制设备,其特征在于,包括:至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;以及,
    与容器通信连接的通信组件,所述通信组件在所述处理器的控制下接收和发送数据;
    其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求9至18中任一项所述的应用模块的启动方法。
  21. 一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述的应用模块的启动方法。
  22. 一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求9至18中任一项所述的应用模块的启动方法。
PCT/CN2019/118594 2018-12-12 2019-11-14 应用模块的启动方法、容器、控制设备及可读存储介质 WO2020119377A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811518762.5 2018-12-12
CN201811518762.5A CN111324385A (zh) 2018-12-12 2018-12-12 应用模块的启动方法、容器、控制设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2020119377A1 true WO2020119377A1 (zh) 2020-06-18

Family

ID=71075412

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118594 WO2020119377A1 (zh) 2018-12-12 2019-11-14 应用模块的启动方法、容器、控制设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN111324385A (zh)
WO (1) WO2020119377A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596776A (zh) * 2020-12-10 2021-04-02 平安普惠企业管理有限公司 基于远程控制的软件发布方法、装置、设备及介质
CN113296888B (zh) * 2021-04-27 2022-11-22 优刻得科技股份有限公司 一种镜像处理方法及系统
CN113867145A (zh) * 2021-09-29 2021-12-31 中国第一汽车股份有限公司 一种应用控制方法、装置、电子设备及存储介质
CN114650318B (zh) * 2022-02-24 2024-04-19 阿里巴巴(中国)有限公司 开关推送方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140229951A1 (en) * 2011-10-24 2014-08-14 Huawei Technologies Co., Ltd. Method and System for Starting Application Program in Linux Container
CN108664291A (zh) * 2017-03-30 2018-10-16 中国移动通信集团山西有限公司 容器组的构建方法和装置
CN108718253A (zh) * 2018-05-11 2018-10-30 新华三技术有限公司 一种问题定位方法及装置
CN108762769A (zh) * 2018-06-04 2018-11-06 万惠投资管理有限公司 微服务应用编排和部署方法、装置及计算机终端

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765620B (zh) * 2014-01-02 2018-01-26 国际商业机器公司 一种程序模块部署的方法和系统
WO2018004403A1 (en) * 2016-06-28 2018-01-04 Telefonaktiebolaget Lm Ericsson (Publ) Managing a lifecycle of a software container
US10169156B2 (en) * 2016-07-21 2019-01-01 International Business Machines Corporation Automatic restarting of containers
CN107870771B (zh) * 2016-09-26 2021-12-17 平安科技(深圳)有限公司 应用程序构建与升级方法及系统
CN108132832B (zh) * 2016-12-01 2021-01-19 腾讯科技(深圳)有限公司 应用程序启动方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140229951A1 (en) * 2011-10-24 2014-08-14 Huawei Technologies Co., Ltd. Method and System for Starting Application Program in Linux Container
CN108664291A (zh) * 2017-03-30 2018-10-16 中国移动通信集团山西有限公司 容器组的构建方法和装置
CN108718253A (zh) * 2018-05-11 2018-10-30 新华三技术有限公司 一种问题定位方法及装置
CN108762769A (zh) * 2018-06-04 2018-11-06 万惠投资管理有限公司 微服务应用编排和部署方法、装置及计算机终端

Also Published As

Publication number Publication date
CN111324385A (zh) 2020-06-23

Similar Documents

Publication Publication Date Title
WO2020119377A1 (zh) 应用模块的启动方法、容器、控制设备及可读存储介质
US9875133B2 (en) Virtual machine disk image installation
US9348573B2 (en) Installation and fault handling in a distributed system utilizing supervisor and dependency manager nodes
US11256539B2 (en) Task processing method, apparatus, and system based on distributed system
CN101799751B (zh) 一种构建主机监控代理软件的方法
US8370802B2 (en) Specifying an order for changing an operational state of software application components
WO2018095414A1 (zh) 虚拟机故障的检测和恢复方法及装置
US7987463B2 (en) Device management scheduling method and apparatus thereof
CN111324412A (zh) 服务部署方法、设备及存储介质
CN110888889A (zh) 一种数据信息更新方法、装置及设备
JP7345921B2 (ja) マスタースレーブアーキテクチャのota差分更新方法とシステム
WO2010022246A2 (en) Process auto-restart systems and methods
US10721335B2 (en) Remote procedure call using quorum state store
CN109032758B (zh) 容器集群智能生命周期管理方法及装置
US20220188159A1 (en) Control unit for a vehicle and an operating system scheduling method thereof
CN111736809A (zh) 分布式机器人集群网络管理框架及其实现方法
CN111225007B (zh) 数据库连接方法、装置和系统
US20210011749A1 (en) Systems and methods to monitor a computing environment
WO2021057880A1 (zh) 物联网设备的程序升级方法、装置及物联网设备
CN114816662A (zh) 应用于Kubernetes的容器编排方法和系统
US20220019460A1 (en) Dynamically adjusting reconciliation time-delays
CN113032477B (zh) 基于gtid的长距离数据同步方法、装置及计算设备
CN112130886B (zh) 一种交通信号控制机的主控程序升级方法及装置
TWI690849B (zh) 應用升級與關閉應用之方法及裝置
CN113438206B (zh) 分布式事件驱动的物联网运行时系统、方法、终端及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19894697

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.10.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19894697

Country of ref document: EP

Kind code of ref document: A1