WO2019136798A1 - Gateway creation method and device, computer device and storage medium - Google Patents
Gateway creation method and device, computer device and storage medium Download PDFInfo
- Publication number
- WO2019136798A1 WO2019136798A1 PCT/CN2018/077130 CN2018077130W WO2019136798A1 WO 2019136798 A1 WO2019136798 A1 WO 2019136798A1 CN 2018077130 W CN2018077130 W CN 2018077130W WO 2019136798 A1 WO2019136798 A1 WO 2019136798A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- gateway
- container
- physical machine
- information
- creation
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0806—Configuration setting for initial configuration or provisioning, e.g. plug-and-play
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Definitions
- the present application relates to the field of gateway technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for creating a gateway.
- VPN gateway services are operating system-based virtualization technologies.
- virtualization technologies applied to VPN gateway services include KVM, XEN, and VMware.
- KVM KVM
- XEN XEN
- VMware XEN
- the virtual operating system using these virtualization technologies will occupy more physical machine resources, and the VPN gateway will also spend more time when starting and stopping.
- the application provides a method, a device, a computer device and a storage medium for creating a gateway.
- the gateway created by the method for creating a gateway has the advantages of occupying less physical resources, faster starting or stopping, and the like.
- the present application provides a method for creating a gateway, including: loading a container created by a container technology; loading a gateway system into the container to generate a gateway container; and receiving a gateway creation command sent by the controller And creating a gateway container to be configured according to the gateway container; receiving a gateway configuration file sent by the controller, where the gateway configuration file includes gateway configuration information; and performing, according to the gateway configuration information, the gateway container to be configured Configure to complete the creation of the gateway.
- the present application provides a method for creating a gateway, which includes: if a request for creating a gateway sent by a tenant terminal is received, obtaining a preset number of physical machine identification information according to the preset acquisition rule according to the request for creating a gateway; Sending a gateway instruction to the physical machine corresponding to the physical machine identification information, so that the physical machine creates a to-be-configured gateway container according to the gateway container after receiving the creating the gateway instruction; generating a gateway configuration file, where the gateway configuration The file includes gateway configuration information; the gateway configuration file is sent to the physical machine to enable the physical machine to configure the to-be-configured gateway container according to the gateway configuration information to complete the creation of the gateway.
- the application provides a gateway creation apparatus, which is applied to a physical machine, and includes:
- a container loading unit for loading a container created by the container technology
- a gateway loading unit configured to load a gateway system into the container to generate a gateway container
- a creating unit configured to: if a gateway command sent by the controller is received, create a to-be-configured gateway container according to the gateway container;
- a file receiving unit configured to receive a gateway configuration file sent by the controller, where the gateway configuration file includes gateway configuration information
- a configuration unit configured to configure the to-be-configured gateway container according to the gateway configuration information to complete the creation of the gateway.
- the application provides a gateway creation apparatus, which is applied to a controller, and includes:
- the identifier information acquiring unit is configured to obtain a preset number of physical machine identification information according to the preset acquisition rule, if the request for creating a gateway sent by the tenant terminal is received;
- the instruction sending unit is configured to send a gateway instruction to the physical machine corresponding to the physical machine identification information, so that the physical machine creates a to-be-configured gateway container according to the gateway container after receiving the creation gateway instruction;
- a file generating unit configured to generate a gateway configuration file, where the gateway configuration file includes gateway configuration information
- a file sending unit configured to send the gateway configuration file to the physical machine, so that the physical machine configures the to-be-configured gateway container according to the gateway configuration information to complete creation of a gateway.
- the present application further provides a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when the processor executes the program A method for creating a gateway according to the first aspect of the present application is implemented; or the method for creating a gateway provided by the second aspect of the present application is implemented when the processor executes the program.
- the present application also provides a storage medium, wherein the storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute the application
- the application provides a method, a device, a computer device and a storage medium for creating a gateway.
- the method can reduce the physical machine resources occupied by the gateway, and can reduce the time taken for the gateway to start and stop, and improve the speed at which the gateway starts and stops.
- FIG. 1 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure
- FIG. 2 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure
- FIG. 3 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure
- FIG. 4 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure
- FIG. 5 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure
- FIG. 6 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure
- FIG. 7 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure.
- FIG. 8 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure.
- FIG. 9 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure.
- FIG. 10 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure.
- FIG. 11 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure.
- FIG. 12 is a schematic block diagram of a computer device according to an embodiment of the present application.
- FIG. 13 is a schematic block diagram of a computer device according to an embodiment of the present application.
- FIG. 1 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present application.
- the method of creating the gateway is applied to the physical machine. As shown in FIG. 1, the method includes steps S101 to S105.
- the physical machine loads the container created by the container technology, wherein the container can be understood as a virtual operating system, and provides a running environment for the gateway, wherein the gateway can be a VPN gateway.
- the gateway system is loaded into the container, that is, the gateway system is installed in the container to form a gateway container.
- the physical machine stores the gateway container so that when a gateway needs to be created, a new gateway container is created with the gateway container as a template.
- the gateway container to be configured is created according to the gateway container.
- the tenant can send a request for creating a gateway to the controller through the tenant terminal, so that the controller can send a gateway creation instruction to the physical machine according to the request for creating the gateway.
- the controller is used to manage at least one physical machine.
- the physical machine When the physical machine receives the create gateway command, the physical machine reads the pre-stored gateway container and mirrors the gateway container to create a gateway container to be configured. Since the gateway container is composed of a container system and a container technology, the gateway container can save storage resources in the physical machine when mirroring.
- the first feedback information is sent to the controller.
- the controller After receiving the first feedback information, the controller sends a gateway configuration file to the physical machine.
- the physical machine will receive the gateway configuration file.
- the gateway configuration file includes gateway configuration information.
- the gateway configuration information may include network address information of the gateway, for example, an Internet Protocol Address (IP address) of the gateway.
- IP address Internet Protocol Address
- the gateway configuration information may also include information such as the type of the gateway, the bandwidth specification of the gateway, and the like, and is not specifically limited herein.
- the controller may send the creation gateway command and the gateway configuration file to the physical machine, and the physical machine will simultaneously receive the creation gateway instruction and the gateway configuration file sent by the controller. That is, the step S103 and the step S104 may be combined in one step, and the specific combination is: if the creation gateway instruction and the gateway configuration file sent by the controller are received, the gateway container to be configured is created according to the gateway container, wherein the The gateway configuration file includes gateway configuration information. There is no restriction on the order in which gateway commands and gateway profiles are created.
- the physical machine After receiving the gateway configuration file sent by the controller, the physical machine configures the gateway container according to the gateway configuration information in the gateway configuration file to pull up the gateway container to be configured, thereby completing the creation of the gateway.
- the container created by the container technology is used as the virtual operating system in this embodiment, the physical device resources are occupied in the process of creating the gateway, and the gateway creation can be completed quickly, and the speed of the gateway creation is improved.
- the physical opportunity sends the second feedback information to the controller.
- the controller sends the network address information of the gateway in the gateway configuration information to the tenant terminal.
- the tenant terminal can establish a communication connection with the gateway in the physical machine according to the network address information of the gateway, so that the tenant accesses the cloud host through the gateway.
- FIG. 2 is another schematic flowchart of a method for creating a gateway in the embodiment of the present application.
- the method for creating the gateway further includes steps S106 to S109.
- S106 Receive a network connection request sent by a tenant terminal, where the network connection request includes network address information of the tenant terminal.
- a network connection request is generated and the network connection request is sent to the physical machine.
- the physical machine will receive a network connection request sent by the tenant terminal.
- the network connection request may include network address information of the tenant terminal and network address information of the gateway.
- the network address information of the tenant terminal may be the IP address of the tenant terminal.
- step S107 is performed.
- the physical machine establishes a communication connection between the gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal, so that the tenant can access the cloud host through the gateway.
- the controller After establishing a communication connection between the gateway and the tenant terminal, the controller monitors whether the gateway is in a normal working state.
- the controller may send an inquiry signal to the gateway in response form to monitor whether the gateway is in a normal operating state. If the gateway is in normal working state, that is, the gateway can normally provide the gateway service to the tenant, the gateway will send an acknowledgement signal to the controller. If the gateway is down, the virtual operating system crashes, the operation is stuck, etc., the gateway cannot provide the gateway service to the tenant normally. At this time, the gateway is in an abnormal working state, and the gateway will not send a response signal to the controller. When the controller detects that the gateway is in an abnormal working state, it sends a restart command to the physical machine. At this time, the physical machine will receive the restart instruction and execute step S109.
- the physical machine After receiving the restart command, the physical machine restarts the gateway in an abnormal working state according to the restart instruction, so that the gateway is in the available state again. Since the gateway runs in a container created by the container technology, the time to restart the gateway is short, and the gateway can be quickly restarted.
- the gateway when the gateway is in the available state again, the gateway may re-provide the gateway service for the tenant, or the gateway may be in the standby state.
- the gateway in the standby state may be connected to the tenant terminal. Establish a communication connection.
- a container created by using a container technology is used as a virtual operating system, and a gateway system is loaded in the container to generate a gateway container.
- the gateway creation command sent by the controller is received, the gateway container to be configured is created according to the gateway container, and the gateway container is configured according to the gateway configuration information in the gateway configuration file configuration sent by the controller to complete the creation of the gateway.
- This method can reduce the resources of the physical machine occupied by the gateway creation process and improve the speed of the gateway creation.
- the gateway created by the method has the advantages of short time for restarting and fast restarting, which can enable the gateway to better provide gateway services for tenants.
- FIG. 3 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present application.
- the method of creating the gateway is applied to the physical machine. As shown in FIG. 3, the method includes steps S201 to S210.
- the physical machine loads the container created by the container technology, wherein the container can be understood as a virtual operating system, and provides a running environment for the gateway, wherein the gateway can be a VPN gateway.
- the gateway system is loaded into the container, that is, the gateway system is installed in the container to form a gateway container.
- the physical machine stores the gateway container so that when a gateway needs to be created, a new gateway container is created with the gateway container as a template.
- the tenant can send a request to create a gateway to the controller through the tenant terminal.
- the controller receives the request to create a gateway, it sends a create gateway command to the physical machine, so that after receiving the create gateway command, the physical machine creates at least two gateway containers to be configured according to the gateway container.
- the physical machine reads the pre-stored gateway container and mirrors the gateway container, thereby creating at least two gateway containers to be configured.
- At least two gateway containers to be configured are created in the same physical machine. That is, after receiving the request for creating a gateway sent by the tenant terminal, the controller acquires a physical machine identification information and generates a creation gateway instruction, where the creation gateway instruction includes physical machine identification information and the number of gateways to be created. It can be understood that the number of gateways to be created in the creation of the gateway instruction is the total number of gateways that the controller needs to create.
- the controller sends a create gateway command to the physical machine corresponding to the physical machine identification information. In this way, the physical machine that creates the gateway command can create a gateway container to be configured corresponding to the number of gateways to be created according to the gateway container.
- the physical machine identification information is a number programmed by the controller for the physical machine.
- the physical machine identification information is 001, indicating that the physical machine is numbered 001.
- the number of the gateways to be created is three. After receiving the gateway command, the physical machine numbered 001 creates three gateway containers to be configured according to the gateway container.
- the physical machine identification information is not limited to the number programmed by the controller for the physical machine, and may also be other identification information.
- the physical machine identification information may also be information such as the IP address of the physical machine. As long as the corresponding physical machine can be uniquely identified according to the physical machine identification information, no specific limitation is imposed herein.
- the at least two gateway containers to be configured are created in at least two physical machines.
- the controller acquires at least two physical machine identification information, and generates at least two creation gateway instructions, where the creation gateway instruction includes physical machine identification information and to be created.
- the number of gateways is the sum of the number of gateways to be created in at least two of the created gateway instructions.
- the controller sends at least two create gateway instructions to the corresponding physical machine.
- At least two physical opportunities receive corresponding gateway creation instructions, and each physical machine mirrors the gateway container according to the number of gateways to be created in the created gateway instruction to create a corresponding number of gateway containers to be configured, and finally At least two physical machines collectively form at least two gateway containers to be configured.
- the controller After receiving the request to create a gateway, the controller obtains two physical machine identification information, which are marked as 001 and 002 respectively.
- the controller generates two creation gateway instructions, each of which creates a physical machine identification information and a corresponding number of gateways to be created.
- the number of gateways to be created here is one.
- a gateway container to be configured is created according to the gateway container.
- the physical machine whose physical machine identification information is 002 will create a gateway container to be configured according to the gateway container. This will result in two gateway containers to be configured.
- the number of gateways to be created in each of the created gateway instructions is not limited to one, and may be more. In this way, multiple gateway containers to be configured can be created in each physical machine.
- the number of gateways to be created in the multiple created gateway commands may also be different from each other. For example, in the creation of a gateway command received by a physical machine whose physical machine identification information is 001, the number of gateways to be created is one, and the physical machine If the number of the gateway to be created is two, the physical machine with the physical machine identification information of 001 and the physical machine with the physical machine identification information of 002 complete the gateway container to be configured. After creation, a total of three gateway containers to be configured are generated.
- Creating at least two gateway containers to be configured in at least two physical machines may cause at least two gateways to be subsequently created to be in at least two physical machines.
- the tenant terminal establishes a communication connection with one of the gateways, if the physical machine in which the gateway providing the gateway service is located is powered off or damaged, the gateway in the other physical machine can continue to provide the gateway service for the tenant. Avoid the failure of the physical machine to cause the tenant to enjoy the gateway service and improve the user experience of the gateway service.
- the first feedback information is sent to the controller.
- the controller After receiving the first feedback information, the controller sends a gateway configuration file to each physical machine. Each physical machine receives a gateway configuration file.
- the gateway configuration file includes gateway configuration information.
- the gateway configuration information may include network address information of the gateway, for example, an Internet Protocol Address (IP address) of the gateway.
- IP address Internet Protocol Address
- the gateway configuration information may also include information such as the type of the gateway, the bandwidth specification of the gateway, and the like, and is not specifically limited herein.
- the controller may send the creation gateway command and the gateway configuration file to the corresponding physical machine, and the physical machine will simultaneously receive the creation gateway instruction and the gateway configuration file sent by the controller. That is, step S203 and step S204 may be combined in one step, specifically combining: if receiving the creation gateway instruction and the gateway configuration file sent by the controller, creating at least two gateway containers to be configured according to the gateway container, wherein The gateway configuration file includes gateway configuration information. There is no restriction on the order in which gateway commands and gateway profiles are created.
- each physical machine After receiving the gateway configuration file, each physical machine configures the gateway container according to the gateway configuration information in the gateway configuration file to pull up the gateway container to be configured, thereby completing the creation of the gateway. After each physical machine pulls up the gateway container to be configured, a total of at least two gateways will be generated.
- the gateway configuration information includes the network address information of the gateway, and the network address information of the gateway in the gateway configuration file is received by each physical machine. Therefore, the network address information of the gateway corresponding to the at least two gateways created is also the same. That is, at least two gateways share the same network address information.
- the container created by the container technology is used as the virtual operating system in this embodiment, the physical machine resources are occupied in the process of creating the gateway, so that the resources of the physical machine are rationally utilized.
- S206 Receive a network connection request sent by a tenant terminal, where the network connection request includes network address information of the tenant terminal.
- the physical opportunity sends the second feedback information to the controller.
- the controller sends the network address information of the gateway to the tenant terminal.
- the tenant terminal sends a network connection request to the physical machine through the tenant terminal, where the network connection request includes the network address information of the tenant terminal.
- step S207 is performed.
- the Keepalived application software is installed in each physical machine, and the Keepalived software has a VRRP module.
- Each gateway is configured with priority information when it is created.
- the priority information includes a priority value. The higher the priority value, the higher the priority level.
- the generated at least two gateways form a gateway group corresponding to the tenant.
- At least two gateways in the gateway group send multicast packets through VRRP.
- the multicast packet carries the priority information of the gateway.
- Each gateway obtains the priority information of other gateways according to the received multicast packets, and then filters out the gateway with the highest priority in the gateway group as the primary gateway according to its own priority information and the priority information of other gateways. As a backup gateway.
- the gateway group includes the gateway A and the gateway B.
- the priority value of the gateway A is 100, and the priority value of the gateway B is 99.
- the two gateways obtain the priority value of the other party by sending a multicast packet.
- the gateway A receives the priority value of the gateway B, it determines that its own priority value is greater than the priority value of the gateway B, and sets itself as the primary gateway.
- gateway B receives the priority value of gateway A, it determines that its own priority value is smaller than the priority value of gateway A, and sets itself as the standby gateway.
- the primary gateway After the primary gateway is determined, the primary gateway will be configured with the network address information of the gateway, and the standby gateway will not be configured with the network address information of the gateway. That is to say, at this time, only the primary gateway can provide the gateway service to the tenant, and the standby gateway is in the standby state.
- the physical machine of the primary gateway establishes a communication connection between the primary gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal, so that the tenant can access the cloud host through the primary gateway.
- the primary gateway After the communication connection is established between the primary gateway and the tenant terminal, the primary gateway sends multicast packets to other backup gateways through the Keepalived application software to inform them that they are in normal working state.
- the other backup gateways can also receive multicast packets sent by the primary gateway periodically through the Keepalived application.
- the primary gateway When the primary gateway is in the abnormal working state, the primary gateway cannot send multicast packets, and other standby gateways will not receive multicast packets from the primary gateway.
- the other backup gateways determine that the primary gateway is in an abnormal working state, and other standby gateways can send multicast packets to each other to re-confirm a new primary gateway from other standby gateways according to the priority information. That is to find the gateway with the highest priority value among other standby gateways as the new primary gateway.
- the new primary gateway After confirming the new primary gateway, the new primary gateway will be configured with the network address information of the gateway, so that the new primary gateway can provide the gateway service to the tenant.
- the abnormal working state may include a failure of the primary gateway, a virtual operating system crash, a running stuck, and the like, and no specific limitation is imposed herein.
- the physical machine corresponding to the new primary gateway re-establishes a new communication connection between the primary gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal. So that the new primary gateway can provide gateway services to tenants.
- the method further includes: if the primary gateway is in an abnormal working state, receiving a restart instruction sent by the controller, and restarting the primary gateway according to the restart instruction.
- the controller monitors whether the primary gateway is in a normal working state.
- the controller may send an inquiry signal to the primary gateway in the form of a response. If the primary gateway is in an abnormal working state, the primary gateway will not send an acknowledgement signal to the controller, and the physical machine where the primary gateway is located receives the restart command sent by the controller, and restarts the primary gateway according to the restart command, so that The primary gateway is available again. Since the primary gateway runs in a container created by the container technology, the time to restart the primary gateway is short, and the primary gateway can be quickly restarted.
- a container created by using a container technology is used as a virtual operating system, and a gateway system is loaded in the container to generate a gateway container.
- a gateway system is loaded in the container to generate a gateway container.
- the container is configured to complete the creation of at least two gateways.
- This method can reduce the resources of the physical machine occupied by the gateway creation process and improve the speed of the gateway creation.
- the method creates at least two gateways.
- FIG. 4 is another schematic flowchart of a method for creating a gateway according to an embodiment of the present application.
- the method for creating a gateway in this embodiment is applied to a controller.
- the controller is used to manage at least one physical machine.
- the method includes steps S301 to S304.
- the controller is equipped with a distributed MESOS framework, that is, a distributed resource management framework.
- the controller may acquire a preset number of physical machine identification information based on the distributed MESO framework. Specifically, based on the distributed MESOS framework, a preset number of physical machine identification information corresponding to the relatively idle physical machine is obtained according to the number of gateways in each physical machine.
- the controller acquires a physical machine status table according to a request to create a gateway.
- the physical machine status table includes all physical machine identification information and the corresponding number of gateways.
- the number of gateways may refer to the total number of gateways in the physical machine corresponding to the physical machine identification information.
- the controller acquires a preset number of physical machine identification information according to a preset rule according to the number of gateways. Specifically, the controller acquires physical machine identification information corresponding to the preset number of gateways with a smaller number of values. It can be understood that the value of the number of gateways is small, indicating that the physical machine corresponding to the number of gateways is relatively idle and can accommodate more gateways.
- the controller obtains the physical device identification information of 10 and 15 corresponding gateways, that is, obtains two physical machine identification information, which are 001 and 004 respectively.
- the preset rule is not limited to obtaining physical machine identification information corresponding to the number of gateways with a smaller value, and may also be other rules, and no specific limitation is imposed herein.
- the controller in this embodiment can reasonably utilize the physical machine resources, balance the number of gateways in all physical machines, avoid the problem that the number of gateways is not uniform, and some physical machines are idle more resources, and some physical machines are overloaded.
- the preset number may be one or at least two.
- the controller acquires a physical machine identification information, and at least one gateway can be created in the physical machine corresponding to the physical machine identification information.
- the controller acquires at least two physical machine identification information, and then two less gateways can be created in the physical machine corresponding to the at least two physical machine identification information.
- the specific number of preset numbers can be set according to actual needs, and no specific restrictions are imposed here.
- the controller generates a create gateway command according to the physical machine identification information, where the create gateway command includes the physical machine identification information.
- the controller sends the create gateway command to the physical machine corresponding to the physical machine identification information.
- the physical machine can create a gateway container to be configured according to the gateway container after receiving the gateway creation instruction.
- the controller when the number of physical machine identification information acquired in step S301 is at least two, that is, the preset number is at least two, the controller generates a corresponding creation gateway according to each physical machine identification information.
- the instruction includes a physical machine identification information in each creation gateway instruction.
- the controller sends at least two creation gateway instructions to the physical machine corresponding to the physical machine identification information, so that at least two physical machines create at least two gateway containers to be configured according to the gateway container.
- the creation gateway instruction further includes the number of gateways to be created.
- the number of the gateway to be created may be one or two or more, and is not specifically limited herein.
- the controller when the tenant applies for a gateway, is configured to create at least two gateways to the tenant, wherein the network address information of the gateway corresponding to the at least two gateways is the same. In this way, at least two gateways can alternately provide a gateway service to the tenant by sharing one network address information.
- the at least two gateways can be created in the same physical machine.
- the number of presets is one, that is, step S301 will acquire a physical machine identification information, so that the number of gateways to be created in the creation of the gateway instruction will be configured to be at least two, that is, in the creation of the gateway instruction
- the number of gateways to be created is the total number of gateways that the controller needs to create.
- the at least two gateways may be created in at least two physical machines.
- the preset number of the at least two gateways is at least two, that is, step S301 acquires at least two physical machine identification information.
- the number of gateways to be created in each creation gateway instruction may be configured as one, or may be configured as two or more.
- the preset number is two and the controller is configured to create three gateways for each gateway of each tenant
- the number of gateways to be created in one creation gateway instruction will be configured as one
- the other The number of gateways to be created in creating gateway instructions will be configured to two. That is to say, the sum of the number of gateways to be created in the two created gateway instructions is the total number of gateways that the controller needs to create.
- three gateway containers to be configured are created, and then three gateways are obtained.
- the controller receives the first feedback information. After receiving the first feedback information, the controller generates a gateway configuration file.
- the gateway configuration file includes gateway configuration information.
- the gateway configuration information may include network address information of the gateway, for example, an Internet Protocol Address (IP address) of the gateway.
- IP address Internet Protocol Address
- the gateway configuration information may also include information such as the type of the gateway, the bandwidth specification of the gateway, and the like, and is not specifically limited herein.
- the controller sends the gateway configuration file to the physical machine corresponding to the physical machine identification information, so that the physical machine configures the gateway container according to the gateway configuration file, thereby completing the creation of the gateway.
- step S301 is performed
- step S303 is performed, that is, the step of generating a gateway configuration file is performed
- steps S302 and S304 are combined into one step, that is, sending a creation gateway instruction and a gateway configuration file to the physical machine identification information. Physical machine.
- the controller after receiving the second feedback information sent by the physical machine, the controller sends the network address information of the gateway to the tenant terminal, so that the tenant terminal establishes a communication connection with the gateway.
- FIG. 5 is another schematic flowchart of a method for creating a gateway according to an embodiment of the present application. After step S304, the method further includes:
- the controller monitors whether the gateway is in a normal working state.
- the controller may send an inquiry signal to the gateway in the form of a response. If the gateway is in a normal working state, that is, the gateway can normally provide the gateway service to the tenant, the controller receives the response signal sent by the gateway. If the gateway is down, the virtual operating system crashes, the operation is stuck, etc., that is, the gateway is in an abnormal working state, the controller will not receive the response signal sent by the gateway. When the controller does not receive the response signal sent by the gateway, the controller determines that the gateway is in an abnormal working state. At this time, the controller sends a restart instruction to the physical machine corresponding to the gateway, so that the physical machine restarts the gateway according to the restart instruction.
- the tenant may establish a communication connection with one of the at least two gateways through the tenant terminal.
- a gateway that establishes a communication connection with a tenant terminal is called a primary gateway, and other gateways are called a standby gateway.
- the controller monitors whether the primary gateway is in a normal working state. When the controller detects that the primary gateway is in an abnormal working state, sends a restart command to the physical device corresponding to the primary gateway, so that the physical device corresponding to the primary gateway restarts the primary gateway according to the restart instruction.
- the steps performed by the above controller are based on the premise that the tenant only applies for one gateway. That is, the tenant requests to apply for only one gateway by creating a gateway request. It can be understood that the tenant can also apply for two or more gateways at the same time through one creation gateway request, and the controller can perform the above steps for each gateway applied by the tenant.
- the method for creating a gateway in this embodiment can make full use of resources of multiple physical machines managed by the controller, balance the number of gateways in multiple physical machines, and improve the efficiency of physical machine resource management.
- the embodiment of the present application further provides a device for creating a gateway, where the device for creating a gateway is applied to a physical machine, and is used to execute a method for creating a gateway applied to a physical machine.
- FIG. 6 is a schematic block diagram of a gateway creation apparatus according to an embodiment of the present application.
- the gateway creation device 400 includes a container loading unit 401, a gateway loading unit 402, a creation unit 403, a file receiving unit 404, and a configuration unit 405.
- a container loading unit 401 is configured to load a container created by the container technology.
- the gateway loading unit 402 is configured to load a gateway system into the container to generate a gateway container.
- the creating unit 403 is configured to: when the gateway command sent by the controller is received, create a gateway container to be configured according to the gateway container.
- the file receiving unit 404 is configured to receive a gateway configuration file sent by the controller, where the gateway configuration file includes gateway configuration information.
- the configuration unit 405 is configured to configure the to-be-configured gateway container according to the gateway configuration information to complete the creation of the gateway.
- FIG. 7 is another schematic structural diagram of a gateway creation apparatus according to an embodiment of the present application.
- the gateway creation apparatus 400 further includes a request receiving unit 406, a communication establishing unit 407, an instruction receiving unit 408, and a restarting unit 409.
- the request receiving unit 406 is configured to receive a network connection request sent by the tenant terminal, where the network connection request includes network address information of the tenant terminal.
- the communication establishing unit 407 is configured to establish a communication connection between the gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal.
- the instruction receiving unit 408 is configured to receive a restart instruction sent by the controller if the gateway is in an abnormal working state.
- the restarting unit 409 is configured to restart the gateway according to the restart instruction.
- the gateway creation device 400 in this embodiment can reduce the resources of the physical machine occupied by the gateway during the process of creating the gateway, and improve the speed of the gateway creation.
- the gateway created by the device 400 has the advantages of short time for restarting and fast restarting, which can enable the gateway to better provide gateway services for tenants.
- FIG. 8 is another schematic structural diagram of a device for creating a gateway according to an embodiment of the present application.
- the gateway creation device 500 is applied to a physical machine for performing a method of creating a gateway applied to a physical machine in any of the foregoing.
- the gateway creation apparatus 500 includes a container loading unit 501, a gateway loading unit 502, a creating unit 503, a file receiving unit 504, a configuration unit 505, a request receiving unit 506, a communication establishing unit 507, and a confirming unit 508. .
- a container loading unit 501 is configured to load a container created by the container technology.
- the gateway loading unit 502 is configured to load a gateway system into the container to generate a gateway container.
- the creating unit 503 is configured to: when receiving the create gateway command sent by the controller, create at least two of the to-be-configured gateway containers according to the gateway container.
- the file receiving unit 504 is configured to receive a gateway configuration file sent by the controller, where the gateway configuration file includes gateway configuration information.
- the configuration unit 505 is configured to configure at least two of the to-be-configured gateway containers according to the gateway configuration information to complete creation of at least two gateways.
- the request receiving unit 506 is configured to receive a network connection request sent by the tenant terminal, where the network connection request includes network address information of the tenant terminal.
- the communication establishing unit 507 is configured to confirm the primary gateway and the backup gateway according to the priority information of the at least two gateways, where the network address information of the primary gateway and the backup gateway are the same; and according to the network address information of the gateway
- the network address information of the tenant terminal establishes a communication connection between the primary gateway and the tenant terminal.
- the confirming unit 508 is configured to confirm the new primary gateway from the standby gateway according to the priority information if the primary gateway is in an abnormal working state.
- the communication establishing unit 507 corresponding to the new primary gateway configures the new primary gateway with the network address information of the gateway, and establishes a new network according to the network address information of the gateway and the network address information of the tenant terminal. A communication connection between the primary gateway and the tenant terminal. In this way, the new primary gateway can provide gateway services to tenants.
- FIG. 9 is another schematic structural diagram of a gateway creation apparatus according to an embodiment of the present application.
- the gateway creation device 500 further includes an instruction receiving unit 509 and a restart unit 510.
- the instruction receiving unit 509 is configured to receive a restart instruction sent by the controller if the main gateway is in an abnormal working state.
- the restarting unit 510 is configured to restart the primary gateway according to the restart instruction.
- the gateway creation device 500 in this embodiment can reduce the resources of the physical machine occupied by the gateway during the gateway creation process, and improve the speed of the gateway creation. At the same time, the device 500 creates at least two gateways. When the primary gateway that provides the gateway service to the tenant is in an abnormal working state, the other backup gateways can be used as the new primary gateway to continue providing the gateway service to the tenant, thereby improving the experience of the gateway service.
- FIG. 10 is a schematic structural diagram of a device for creating a gateway according to an embodiment of the present application.
- the gateway creation device 600 is applied to a controller for performing a method of creating a gateway applied to a controller in any of the foregoing.
- the controller is used to manage at least one physical machine.
- the gateway creation apparatus 600 includes an identification information acquisition unit 601, an instruction transmission unit 602, a file generation unit 603, and a file transmission unit 604.
- the identifier information obtaining unit 601 is configured to obtain a preset number of physical machine identification information according to the preset acquisition rule, according to the request for creating a gateway sent by the tenant terminal.
- the identification information obtaining unit 601 acquires a physical machine status table according to the creation gateway request.
- the physical machine status table includes all physical machine identification information and the corresponding number of gateways.
- the number of gateways may refer to the total number of gateways in the physical machine corresponding to the physical machine identification information.
- the identification information obtaining unit 601 acquires a preset number of physical machine identification information according to a preset rule according to the number of gateways.
- the instruction sending unit 602 is configured to send a gateway instruction to the physical machine corresponding to the physical machine identification information, so that the physical machine creates a to-be-configured gateway container according to the gateway container after receiving the creation gateway instruction.
- the file generating unit 603 is configured to generate a gateway configuration file, where the gateway configuration file includes gateway configuration information.
- the file sending unit 604 is configured to send the gateway configuration file to the physical machine, so that the physical machine configures the to-be-configured gateway container according to the gateway configuration information to complete the creation of the gateway.
- FIG. 11 is another schematic structural diagram of a gateway creation apparatus according to an embodiment of the present application.
- the gateway creation device 600 further includes a restart instruction transmitting unit 605.
- a restart instruction sending unit 605 configured to send a restart instruction to the physical machine corresponding to the gateway if the gateway is in an abnormal working state, so that the physical machine corresponding to the gateway restarts the gateway according to the restart instruction .
- the gateway creation device 600 in this embodiment can reasonably utilize resources of multiple physical machines, balance the number of gateways in multiple physical machines, and improve the efficiency of physical machine resource management.
- FIG. 12 is a schematic block diagram of a computer device according to an embodiment of the present application.
- the computer device 700 device may be the physical machine in the previous embodiment.
- the computer device 700 includes a processor 702, a memory and a network interface 705 connected by a system bus 701, wherein the memory can include a non-volatile storage medium 703 and an internal memory 704.
- the non-volatile storage medium 703 can store an operating system 7031 and a computer program 7032.
- the computer program 7032 includes program instructions that, when executed, may cause the processor 702 to perform a method of creating a gateway applied to the physical machine.
- the processor 702 is configured to provide computing and control capabilities to support operation of the entire computer device 700.
- the internal memory 704 provides an environment for operation of the computer program 7032 in the non-volatile storage medium 703, which when executed by the processor 702, may cause the processor 702 to perform creation of a gateway applied to the physical machine. method.
- the network interface 705 is used for network communication, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG.
- FIG. 12 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device 700 to which the solution of the present application is applied, and a specific computer device. 700 may include more or fewer components than shown, or some components may be combined, or have different component arrangements.
- the processor 702 is configured to run a computer program 7032 stored in the memory to implement a function of: loading a container created by the container technology; loading a gateway system into the container to generate a gateway container; and receiving the control Creating a gateway command sent by the device, creating a to-be-configured gateway container according to the gateway container; receiving a gateway configuration file sent by the controller, wherein the gateway configuration file includes gateway configuration information; and The configuration of the gateway container is configured to complete the creation of the gateway.
- the gateway configuration information includes network address information of the gateway.
- the processor 702 After performing the configuration of the gateway container to be configured according to the gateway configuration information to complete the creation of the gateway, the processor 702 further performs the following a program: receiving a network connection request sent by a tenant terminal, where the network connection request includes network address information of the tenant terminal; and establishing the gateway and the location according to network address information of the gateway and network address information of the tenant terminal The communication connection between the tenant terminals.
- the processor 702 after performing the communication connection between the gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal, the processor 702 further performs the following procedure: The gateway is in an abnormal working state, receives a restart instruction sent by the controller, and restarts the gateway according to the restart instruction.
- the processor 702 when the processor 702 is configured to create a to-be-configured gateway container according to the gateway container, the following is specifically performed: creating at least two of the to-be-configured gateway containers according to the gateway container.
- the processor 702 when the processor 702 performs the configuration of the gateway container to be configured according to the gateway configuration information to complete the creation of the gateway, the following is specifically performed: at least two gateways to be configured according to the gateway configuration information.
- the container is configured to complete the creation of at least two gateways.
- the processor 702 when the processor 702 performs the communication connection between the gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal, the processor 702 specifically executes the following procedure: according to at least two The priority information of the gateway confirms the primary gateway and the standby gateway, wherein the network address information of the primary gateway and the backup gateway are the same; and the primary gateway and the location are established according to the network address information of the gateway and the network address information of the tenant terminal.
- the communication connection between the tenant terminals according to at least two The priority information of the gateway confirms the primary gateway and the standby gateway, wherein the network address information of the primary gateway and the backup gateway are the same; and the primary gateway and the location are established according to the network address information of the gateway and the network address information of the tenant terminal.
- the processor 702 further performs the following procedure: The primary gateway is in an abnormal working state, and the new primary gateway is confirmed from the standby gateway according to the priority information; and the new primary gateway is established according to the network address information of the gateway and the network address information of the tenant terminal. A communication connection between the tenant terminals.
- At least two of the gateway containers to be configured are created in at least two physical machines.
- the processor 702 may be a central processing unit (CPU), and the processor 702 may also be another general-purpose processor, a digital signal processor (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
- the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
- FIG. 13 is a schematic block diagram of a computer device according to an embodiment of the present application.
- the computer device 800 device may be the controller in the previous embodiment.
- the computer device 800 includes a processor 802, a memory and a network interface 805 connected by a system bus 801, wherein the memory can include a non-volatile storage medium 803 and an internal memory 804.
- the nonvolatile storage medium 803 can store an operating system 8031 and a computer program 8032.
- the computer program 8032 includes program instructions that, when executed, may cause the processor 802 to execute a method of creating a gateway that is applied to the controller.
- the processor 802 is used to provide computing and control capabilities to support the operation of the entire computer device 800.
- the internal memory 804 provides an environment for operation of the computer program 8032 in the non-volatile storage medium 803, which when executed by the processor 802, can cause the processor 802 to perform creation of a gateway applied to the controller method.
- the network interface 805 is used for network communication, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG.
- FIG. 13 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device 800 to which the solution of the present application is applied, and a specific computer device. 800 may include more or fewer components than shown, or some components may be combined, or have different component arrangements.
- the processor 802 is configured to run the computer program 8032 stored in the memory to implement the following functions: if the request for creating a gateway sent by the tenant terminal is received, the preset number is obtained according to the preset acquisition rule according to the request for creating the gateway. Physical machine identification information; sending a gateway instruction to the physical machine corresponding to the physical machine identification information, so that the physical machine creates a to-be-configured gateway container according to the gateway container after receiving the creation gateway instruction; generating a gateway configuration file And the gateway configuration file includes gateway configuration information; and the gateway configuration file is sent to the physical machine, so that the physical machine configures the to-be-configured gateway container according to the gateway configuration information to complete creation of a gateway.
- the processor 802 performs sending the gateway configuration file to the physical machine to cause the physical machine to perform configuration information according to the gateway.
- the gateway container to be configured is configured to complete the creation of the gateway, the following procedure is further executed: if the gateway is detected to be in an abnormal working state, a restart instruction is sent to the physical machine corresponding to the gateway, so that the gateway is The corresponding physical machine restarts the gateway according to the restart instruction.
- the processor 802 when the processor 802 performs the process of acquiring the preset number of physical machine identification information according to the preset acquisition rule, the processor 802 specifically executes the following procedure: acquiring the physical machine status table according to the creation gateway request, The physical machine status table includes all physical machine identification information and a corresponding number of gateways; and at least two physical machine identification information are acquired according to the preset number according to the number of the gateways.
- the processor 802 when executing the sending the creation of the gateway instruction to the physical machine corresponding to the physical machine identification information, the processor 802 specifically executes: generating a corresponding creation gateway instruction according to each of the physical machine identification information; and transmitting the Creating a gateway instruction to the physical machine corresponding to the physical machine identification information, so that at least two of the physical machines create at least two of the to-be-configured gateway containers according to the gateway container.
- the computer program can be stored in a storage medium, which is a computer readable storage medium.
- the computer program can be stored in a storage medium of a computer device, the computer program comprising program instructions executed by at least one of the computer devices to implement an implementation comprising the methods as described above.
- the storage medium may be a medium that can store program codes, such as a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
- the integrated unit can be stored in a storage medium if it is implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present application may be in essence or part of the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. There are a number of instructions for causing a computer device (which may be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
- a computer device which may be a personal computer, terminal, or network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本申请要求于2018年1月12日提交中国专利局、申请号为201810030222.6、发明名称为“一种网关的创建方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201810030222.6, entitled "A Method for Creating a Gateway, Apparatus, Computer Equipment, and Storage Medium", which is filed on January 12, 2018, the entire contents of which are incorporated herein by reference. This is incorporated herein by reference.
本申请涉及网关技术领域,尤其涉及一种网关的创建方法、装置、计算机设备及存储介质。The present application relates to the field of gateway technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for creating a gateway.
大部分公有云的虚拟专用网络(Virtual Private Network,简称VPN)网关服务是基于操作系统的虚拟化技术,目前应用于VPN网关服务的虚拟化技术包括KVM、XEN、Vmware等。然而,采用上述这些虚拟化技术虚拟的操作系统会占用较多的物理机资源,VPN网关在启动、停止时也会花费较多时间。Most of the public cloud virtual private network (VPN) gateway services are operating system-based virtualization technologies. Currently, virtualization technologies applied to VPN gateway services include KVM, XEN, and VMware. However, the virtual operating system using these virtualization technologies will occupy more physical machine resources, and the VPN gateway will also spend more time when starting and stopping.
发明内容Summary of the invention
本申请提供了一种网关的创建方法、装置、计算机设备及存储介质,该网关的创建方法创建的网关具有占用物理机资源少、启动或停止速度快等优点。The application provides a method, a device, a computer device and a storage medium for creating a gateway. The gateway created by the method for creating a gateway has the advantages of occupying less physical resources, faster starting or stopping, and the like.
第一方面,本申请提供了一种网关的创建方法,其包括:加载通过容器技术创建的容器;将网关系统加载至所述容器中以生成网关容器;若接收到控制器发送的创建网关指令,根据所述网关容器创建待配置网关容器;接收所述控制器发送的网关配置文件,其中,所述网关配置文件包括网关配置信息;以及根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。In a first aspect, the present application provides a method for creating a gateway, including: loading a container created by a container technology; loading a gateway system into the container to generate a gateway container; and receiving a gateway creation command sent by the controller And creating a gateway container to be configured according to the gateway container; receiving a gateway configuration file sent by the controller, where the gateway configuration file includes gateway configuration information; and performing, according to the gateway configuration information, the gateway container to be configured Configure to complete the creation of the gateway.
第二方面,本申请提供了一种网关的创建方法,其包括:若接收到租户终端发送的创建网关请求,根据所述创建网关请求按照预设获取规则获取预设数量的物理机标识信息;发送创建网关指令至所述物理机标识信息对应的物理机,以使得所述物理机在接收到所述创建网关指令后根据网关容器创建待配置网关容器;生成网关配置文件,其中所述网关配置文件包括网关配置信息;发送所 述网关配置文件至所述物理机以使得所述物理机根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。In a second aspect, the present application provides a method for creating a gateway, which includes: if a request for creating a gateway sent by a tenant terminal is received, obtaining a preset number of physical machine identification information according to the preset acquisition rule according to the request for creating a gateway; Sending a gateway instruction to the physical machine corresponding to the physical machine identification information, so that the physical machine creates a to-be-configured gateway container according to the gateway container after receiving the creating the gateway instruction; generating a gateway configuration file, where the gateway configuration The file includes gateway configuration information; the gateway configuration file is sent to the physical machine to enable the physical machine to configure the to-be-configured gateway container according to the gateway configuration information to complete the creation of the gateway.
第三方面,本申请提供了一种网关的创建装置,应用于物理机中,其包括:In a third aspect, the application provides a gateway creation apparatus, which is applied to a physical machine, and includes:
容器加载单元,用于加载通过容器技术创建的容器;a container loading unit for loading a container created by the container technology;
网关加载单元,用于将网关系统加载至所述容器中以生成网关容器;a gateway loading unit, configured to load a gateway system into the container to generate a gateway container;
创建单元,用于若接收到控制器发送的创建网关指令,根据所述网关容器创建待配置网关容器;a creating unit, configured to: if a gateway command sent by the controller is received, create a to-be-configured gateway container according to the gateway container;
文件接收单元,用于接收所述控制器发送的网关配置文件,其中,所述网关配置文件包括网关配置信息;以及a file receiving unit, configured to receive a gateway configuration file sent by the controller, where the gateway configuration file includes gateway configuration information;
配置单元,用于根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。And a configuration unit, configured to configure the to-be-configured gateway container according to the gateway configuration information to complete the creation of the gateway.
第四方面,本申请提供了一种网关的创建装置,应用于控制器中,其包括:In a fourth aspect, the application provides a gateway creation apparatus, which is applied to a controller, and includes:
标识信息获取单元,用于若接收到租户终端发送的创建网关请求,根据所述创建网关请求按照预设获取规则获取预设数量的物理机标识信息;The identifier information acquiring unit is configured to obtain a preset number of physical machine identification information according to the preset acquisition rule, if the request for creating a gateway sent by the tenant terminal is received;
指令发送单元,用于发送创建网关指令至所述物理机标识信息对应的物理机,以使得所述物理机在接收到所述创建网关指令后根据网关容器创建待配置网关容器;The instruction sending unit is configured to send a gateway instruction to the physical machine corresponding to the physical machine identification information, so that the physical machine creates a to-be-configured gateway container according to the gateway container after receiving the creation gateway instruction;
文件生成单元,用于生成网关配置文件,其中所述网关配置文件包括网关配置信息;a file generating unit, configured to generate a gateway configuration file, where the gateway configuration file includes gateway configuration information;
文件发送单元,用于发送所述网关配置文件至所述物理机以使得所述物理机根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。And a file sending unit, configured to send the gateway configuration file to the physical machine, so that the physical machine configures the to-be-configured gateway container according to the gateway configuration information to complete creation of a gateway.
第五方面,本申请又提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现本申请第一方面提供的所述的网关的创建方法;或者,所述处理器执行所述程序时实现本申请第二方面提供的所述的网关的创建方法。In a fifth aspect, the present application further provides a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when the processor executes the program A method for creating a gateway according to the first aspect of the present application is implemented; or the method for creating a gateway provided by the second aspect of the present application is implemented when the processor executes the program.
第六方面,本申请还提供了一种存储介质,其中所述存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行本申请第一方面提供的所述的网关的创建方法;或者,所述程序指令当被处理器执行时使所述处理器执行本申请第二方面提供的所述的网关的创建方法。In a sixth aspect, the present application also provides a storage medium, wherein the storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute the application The method for creating a gateway provided by the first aspect; or the program instruction, when executed by a processor, causes the processor to perform the method for creating a gateway provided by the second aspect of the present application.
本申请提供一种网关的创建方法、装置、计算机设备及存储介质。该方法可以减少创建网关所占用的物理机资源,同时,可以降低网关的启动、停止所耗时间,提高网关启动、停止的速度。The application provides a method, a device, a computer device and a storage medium for creating a gateway. The method can reduce the physical machine resources occupied by the gateway, and can reduce the time taken for the gateway to start and stop, and improve the speed at which the gateway starts and stops.
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are some embodiments of the present application, For the ordinary technicians, other drawings can be obtained based on these drawings without any creative work.
图1为本申请实施例提供的一种网关的创建方法的一示意流程图;FIG. 1 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure;
图2为本申请实施例提供的一种网关的创建方法的一示意流程图;FIG. 2 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure;
图3为本申请实施例提供的一种网关的创建方法的一示意流程图;FIG. 3 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure;
图4为本申请实施例提供的一种网关的创建方法的一示意流程图;FIG. 4 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure;
图5为本申请实施例提供的一种网关的创建方法的一示意流程图;FIG. 5 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present disclosure;
图6为本申请实施例提供的一种网关的创建装置的一示意性框图;FIG. 6 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure;
图7为本申请实施例提供的一种网关的创建装置的一示意性框图;FIG. 7 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure;
图8为本申请实施例提供的一种网关的创建装置的一示意性框图;FIG. 8 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure;
图9为本申请实施例提供的一种网关的创建装置的一示意性框图;FIG. 9 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure;
图10为本申请实施例提供的一种网关的创建装置的一示意性框图;FIG. 10 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure;
图11为本申请实施例提供的一种网关的创建装置的一示意性框图;FIG. 11 is a schematic block diagram of a device for creating a gateway according to an embodiment of the present disclosure;
图12为本申请实施例提供的一种计算机设备的一示意性框图;FIG. 12 is a schematic block diagram of a computer device according to an embodiment of the present application;
图13为本申请实施例提供的一种计算机设备的一示意性框图。FIG. 13 is a schematic block diagram of a computer device according to an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
请参阅图1,图1是本申请实施例提供的一种网关的创建方法的示意流程图。该网关的创建方法应用于物理机中。如图1所示,该方法包括步骤S101~S105。Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present application. The method of creating the gateway is applied to the physical machine. As shown in FIG. 1, the method includes steps S101 to S105.
S101、加载通过容器技术创建的容器。S101. Load a container created by a container technology.
在本实施例中,物理机加载容器技术创建的容器,其中,该容器可以理解为虚拟操作系统,为网关提供运行环境,其中,该网关可以为VPN网关。In this embodiment, the physical machine loads the container created by the container technology, wherein the container can be understood as a virtual operating system, and provides a running environment for the gateway, wherein the gateway can be a VPN gateway.
S102、将网关系统加载至所述容器中以生成网关容器。S102. Load a gateway system into the container to generate a gateway container.
在物理机成功加载容器后,将网关系统加载至容器中,即将网关系统安装在容器中,以形成网关容器。物理机将网关容器存储起来,以便于后续在需要创建网关时,以网关容器为模板创建出新的网关容器。After the physical machine successfully loads the container, the gateway system is loaded into the container, that is, the gateway system is installed in the container to form a gateway container. The physical machine stores the gateway container so that when a gateway needs to be created, a new gateway container is created with the gateway container as a template.
S103、若接收到控制器发送的创建网关指令,根据所述网关容器创建待配置网关容器。S103. If a gateway command sent by the controller is received, the gateway container to be configured is created according to the gateway container.
当租户需要申请网关时,租户可以通过租户终端向控制器发送创建网关请求,这样控制器就可以根据创建网关请求向物理机发送创建网关指令。其中,该控制器用于管理至少一个物理机。When the tenant needs to apply for a gateway, the tenant can send a request for creating a gateway to the controller through the tenant terminal, so that the controller can send a gateway creation instruction to the physical machine according to the request for creating the gateway. The controller is used to manage at least one physical machine.
当物理机接收到创建网关指令时,物理机将读取预先存储的网关容器,并将该网关容器进行镜像,从而创建出待配置网关容器。由于网关容器是由网关系统和容器技术创建的容器组成,该网关容器在进行镜像时,可以节省物理机中存储资源。When the physical machine receives the create gateway command, the physical machine reads the pre-stored gateway container and mirrors the gateway container to create a gateway container to be configured. Since the gateway container is composed of a container system and a container technology, the gateway container can save storage resources in the physical machine when mirroring.
S104、接收所述控制器发送的网关配置文件,其中,所述网关配置文件包括网关配置信息。S104. Receive a gateway configuration file sent by the controller, where the gateway configuration file includes gateway configuration information.
在一实施例中,物理机创建完待配置网关容器后,会向控制器发送第一反馈信息。控制器在接收到第一反馈信息后,会向物理机发送网关配置文件。物理机将接收该网关配置文件。其中,该网关配置文件包括网关配置信息。In an embodiment, after the physical machine creates the gateway container to be configured, the first feedback information is sent to the controller. After receiving the first feedback information, the controller sends a gateway configuration file to the physical machine. The physical machine will receive the gateway configuration file. The gateway configuration file includes gateway configuration information.
在一实施例中,该网关配置信息可以包括网关的网络地址信息,譬如,网关的互联网协议地址(Internet Protocol Address,简称IP地址)。该网关配置信息还可以包括网关的类型、网关的带宽规格等信息,在此不做具体限制。In an embodiment, the gateway configuration information may include network address information of the gateway, for example, an Internet Protocol Address (IP address) of the gateway. The gateway configuration information may also include information such as the type of the gateway, the bandwidth specification of the gateway, and the like, and is not specifically limited herein.
需要说明的是,在其他实施例中,控制器可以将创建网关指令和网关配置文件一起发送给物理机,此时物理机将同时接收到控制器发送的创建网关指令和网关配置文件。也就是说,步骤S103和步骤S104可以合并在一个步骤中,具体合并为:若接收到控制器发送的创建网关指令和网关配置文件,根据所述网关容器创建待配置网关容器,其中,所述网关配置文件包括网关配置信息。在此不对创建网关指令和网关配置文件发送的顺序做限制。It should be noted that, in other embodiments, the controller may send the creation gateway command and the gateway configuration file to the physical machine, and the physical machine will simultaneously receive the creation gateway instruction and the gateway configuration file sent by the controller. That is, the step S103 and the step S104 may be combined in one step, and the specific combination is: if the creation gateway instruction and the gateway configuration file sent by the controller are received, the gateway container to be configured is created according to the gateway container, wherein the The gateway configuration file includes gateway configuration information. There is no restriction on the order in which gateway commands and gateway profiles are created.
S105、根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。S105. Configure the to-be-configured gateway container according to the gateway configuration information to complete the creation of the gateway.
物理机接收到控制器发送的网关配置文件后,就会根据该网关配置文件中的网关配置信息对待配置网关容器进行配置,以将待配置网关容器拉起,从而完成网关的创建。After receiving the gateway configuration file sent by the controller, the physical machine configures the gateway container according to the gateway configuration information in the gateway configuration file to pull up the gateway container to be configured, thereby completing the creation of the gateway.
由于本实施例中采用了容器技术创建的容器作为虚拟操作系统,使得创建网关的过程中占用物理机资源较少,可以快速地完成网关的创建,提高网关创建的速度。Because the container created by the container technology is used as the virtual operating system in this embodiment, the physical device resources are occupied in the process of creating the gateway, and the gateway creation can be completed quickly, and the speed of the gateway creation is improved.
在一实施例中,物理机在完成网关的创建之后,物理机会向控制器发送第二反馈信息。控制器在接收到第二反馈信息后,会将网关配置信息中网关的网络地址信息发送至租户终端。这样租户终端在需要访问云主机时,可以根据网关的网络地址信息与物理机中的网关建立通信连接,进而使得租户通过网关访问云主机。In an embodiment, after the physical machine completes the creation of the gateway, the physical opportunity sends the second feedback information to the controller. After receiving the second feedback information, the controller sends the network address information of the gateway in the gateway configuration information to the tenant terminal. When the tenant terminal needs to access the cloud host, the tenant terminal can establish a communication connection with the gateway in the physical machine according to the network address information of the gateway, so that the tenant accesses the cloud host through the gateway.
具体地,如图2所示,图2为本申请实施例中网关的创建方法的另一流程示意图。该网关的创建方法还包括步骤S106至S109。Specifically, as shown in FIG. 2, FIG. 2 is another schematic flowchart of a method for creating a gateway in the embodiment of the present application. The method for creating the gateway further includes steps S106 to S109.
S106、接收租户终端发送的网络连接请求,其中,所述网络连接请求包括所述租户终端的网络地址信息。S106. Receive a network connection request sent by a tenant terminal, where the network connection request includes network address information of the tenant terminal.
在该实施例中,当租户终端需要访问云主机时,会生成网络连接请求,并将该网络连接请求发送至物理机。物理机将接收到租户终端发送的网络连接请求。其中,该网络连接请求可以包括租户终端的网络地址信息和网关的网络地址信息。该租户终端的网络地址信息可以为租户终端的IP地址。In this embodiment, when the tenant terminal needs to access the cloud host, a network connection request is generated and the network connection request is sent to the physical machine. The physical machine will receive a network connection request sent by the tenant terminal. The network connection request may include network address information of the tenant terminal and network address information of the gateway. The network address information of the tenant terminal may be the IP address of the tenant terminal.
物理机接收到该网络连接请求后,将执行步骤S107。After the physical machine receives the network connection request, step S107 is performed.
S107、根据所述网关的网络地址信息和租户终端的网络地址信息建立所述网关与所述租户终端之间的通信连接。S107. Establish a communication connection between the gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal.
物理机根据网关的网络地址信息与租户终端的网络地址信息建立网关与租户终端之间的通信连接,这样租户就可以通过网关访问云主机。The physical machine establishes a communication connection between the gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal, so that the tenant can access the cloud host through the gateway.
S108、若所述网关处于非正常工作状态,接收所述控制器发送的重启指令。S108. If the gateway is in an abnormal working state, receive a restart instruction sent by the controller.
在网关与租户终端之间建立通信连接之后,控制器会监测网关是否处于正常工作状态。After establishing a communication connection between the gateway and the tenant terminal, the controller monitors whether the gateway is in a normal working state.
具体地,在一实施例中,控制器可以以应答形式向网关发送询问信号以监 测网关是否处于正常工作状态。若网关处于正常工作状态,即网关可以正常地向租户提供网关服务,此时网关会向控制器发送应答信号。若网关出现宕机、虚拟操作系统崩溃、运行卡住等情况,网关就不能正常地向租户提供网关服务,此时网关就处于非正常工作状态,网关就不会向控制器发送应答信号。当控制器监测到网关处于非正常工作状态时,会向物理机发送重启指令。此时物理机将接收到重启指令,并执行步骤S109。Specifically, in an embodiment, the controller may send an inquiry signal to the gateway in response form to monitor whether the gateway is in a normal operating state. If the gateway is in normal working state, that is, the gateway can normally provide the gateway service to the tenant, the gateway will send an acknowledgement signal to the controller. If the gateway is down, the virtual operating system crashes, the operation is stuck, etc., the gateway cannot provide the gateway service to the tenant normally. At this time, the gateway is in an abnormal working state, and the gateway will not send a response signal to the controller. When the controller detects that the gateway is in an abnormal working state, it sends a restart command to the physical machine. At this time, the physical machine will receive the restart instruction and execute step S109.
S109、根据所述重启指令重启所述网关。S109. Restart the gateway according to the restart instruction.
物理机接收到重启指令后,根据该重启指令重启处于非正常工作状态的网关,以使得该网关重新处于可用状态。由于网关运行在容器技术创建的容器中,使得重启该网关的时间较短,可以使网关快速地重新启动。After receiving the restart command, the physical machine restarts the gateway in an abnormal working state according to the restart instruction, so that the gateway is in the available state again. Since the gateway runs in a container created by the container technology, the time to restart the gateway is short, and the gateway can be quickly restarted.
需要说明的是,网关重新处于可用状态可以包括网关重新为租户提供网关服务,也可以包括网关处于备用状态,当需要该网关为租户提供网关服务时,该处于备用状态的网关就可以与租户终端建立通信连接。It should be noted that, when the gateway is in the available state again, the gateway may re-provide the gateway service for the tenant, or the gateway may be in the standby state. When the gateway is required to provide the gateway service for the tenant, the gateway in the standby state may be connected to the tenant terminal. Establish a communication connection.
本实施例中的网关的创建方法,其采用容器技术创建的容器作为虚拟操作系统,在容器中加载网关系统以生成网关容器。当接收到控制器发送的创建网关指令时,根据该网关容器创建待配置网关容器,再根据控制器发送的网关配置文件配置中的网关配置信息对待配置网关容器进行配置以完成网关的创建。该方法可以减少网关创建过程中所占物理机的资源,提高网关创建的速度。同时该方法创建的网关还具有重启所耗时间短、重启速度快等优点,可以使得网关更好地为租户提供网关服务。In the method for creating a gateway in this embodiment, a container created by using a container technology is used as a virtual operating system, and a gateway system is loaded in the container to generate a gateway container. When the gateway creation command sent by the controller is received, the gateway container to be configured is created according to the gateway container, and the gateway container is configured according to the gateway configuration information in the gateway configuration file configuration sent by the controller to complete the creation of the gateway. This method can reduce the resources of the physical machine occupied by the gateway creation process and improve the speed of the gateway creation. At the same time, the gateway created by the method has the advantages of short time for restarting and fast restarting, which can enable the gateway to better provide gateway services for tenants.
请参阅图3,图3为本申请实施例中网关的创建方法的流程示意图。该网关的创建方法应用于物理机中。如图3所示,该方法包括步骤S201~S210。Please refer to FIG. 3. FIG. 3 is a schematic flowchart of a method for creating a gateway according to an embodiment of the present application. The method of creating the gateway is applied to the physical machine. As shown in FIG. 3, the method includes steps S201 to S210.
S201、加载通过容器技术创建的容器。S201. Load a container created by the container technology.
在本实施例中,物理机加载容器技术创建的容器,其中,该容器可以理解为虚拟操作系统,为网关提供运行环境,其中,该网关可以为VPN网关。In this embodiment, the physical machine loads the container created by the container technology, wherein the container can be understood as a virtual operating system, and provides a running environment for the gateway, wherein the gateway can be a VPN gateway.
S202、将网关系统加载至所述容器中以生成网关容器。S202. Load a gateway system into the container to generate a gateway container.
在物理机成功加载容器后,将网关系统加载至容器中,即将网关系统安装在容器中,以形成网关容器。物理机将网关容器存储起来,以便于后续在需要创建网关时,以网关容器为模板创建出新的网关容器。After the physical machine successfully loads the container, the gateway system is loaded into the container, that is, the gateway system is installed in the container to form a gateway container. The physical machine stores the gateway container so that when a gateway needs to be created, a new gateway container is created with the gateway container as a template.
S203、若接收到控制器发送的创建网关指令,根据所述网关容器创建至少两个所述待配置网关容器。S203. If receiving a create gateway command sent by the controller, create at least two of the to-be-configured gateway containers according to the gateway container.
当租户需要申请网关时,租户可以通过租户终端向控制器发送创建网关请求。当控制器接收到创建网关请求时,会向物理机发送创建网关指令,以使得物理机在接收到创建网关指令后,根据网关容器创建至少两个待配置网关容器。When a tenant needs to apply for a gateway, the tenant can send a request to create a gateway to the controller through the tenant terminal. When the controller receives the request to create a gateway, it sends a create gateway command to the physical machine, so that after receiving the create gateway command, the physical machine creates at least two gateway containers to be configured according to the gateway container.
具体地,物理机在接收到创建网关指令后,读取预先存储的网关容器,并将该网关容器进行镜像,从而创建出至少两个待配置网关容器。Specifically, after receiving the create gateway command, the physical machine reads the pre-stored gateway container and mirrors the gateway container, thereby creating at least two gateway containers to be configured.
在一实施例中,至少两个待配置网关容器创建在同一个物理机中。也就是说,控制器在接收到租户终端发送的创建网关请求后,会获取一个物理机标识信息,并生成创建网关指令,其中,该创建网关指令包括物理机标识信息和待创建网关的数量。可以理解的是,该创建网关指令中的待创建网关的数量即为控制器所需创建的网关的总数量。控制器将创建网关指令发送至物理机标识信息对应的物理机中。这样收到创建网关指令的物理机就可以根据网关容器创建出与待创建网关的数量对应的待配置网关容器。In an embodiment, at least two gateway containers to be configured are created in the same physical machine. That is, after receiving the request for creating a gateway sent by the tenant terminal, the controller acquires a physical machine identification information and generates a creation gateway instruction, where the creation gateway instruction includes physical machine identification information and the number of gateways to be created. It can be understood that the number of gateways to be created in the creation of the gateway instruction is the total number of gateways that the controller needs to create. The controller sends a create gateway command to the physical machine corresponding to the physical machine identification information. In this way, the physical machine that creates the gateway command can create a gateway container to be configured corresponding to the number of gateways to be created according to the gateway container.
譬如,该物理机标识信息为控制器为物理机编排的编号,如,物理机标识信息为001,表示编号为001的物理机。该待创建网关的数量为三个,此时编号为001的物理机收到该创建网关指令后,根据网关容器创建出三个待配置网关容器。For example, the physical machine identification information is a number programmed by the controller for the physical machine. For example, the physical machine identification information is 001, indicating that the physical machine is numbered 001. The number of the gateways to be created is three. After receiving the gateway command, the physical machine numbered 001 creates three gateway containers to be configured according to the gateway container.
需要说明的是,物理机标识信息不局限于控制器为物理机编排的编号,还可以为其他标识信息,譬如,物理机标识信息还可以为物理机的IP地址等信息。只要根据该物理机标识信息可以唯一识别出对应的物理机即可,在此不做具体限制。It should be noted that the physical machine identification information is not limited to the number programmed by the controller for the physical machine, and may also be other identification information. For example, the physical machine identification information may also be information such as the IP address of the physical machine. As long as the corresponding physical machine can be uniquely identified according to the physical machine identification information, no specific limitation is imposed herein.
在另一实施例中,该至少两个待配置网关容器创建在至少两个物理机中。此时,控制器在接收到租户终端发送的创建网关请求后,会获取至少两个物理机标识信息,并生成至少两个创建网关指令,其中,该创建网关指令包括物理机标识信息和待创建网关的数量。这里,至少两个创建网关指令中的待创建网关的数量之和才是控制器需要创建的网关的总数量。控制器将至少两个创建网关指令分别发送至对应的物理机中。这样至少两个物理机会接收到对应的创建网关指令,每个物理机根据接收到的创建网关指令中的待创建网关的数量,将网关容器进行镜像以创建出相应数量的待配置网关容器,最后至少两个物理机 总计形成至少两个待配置网关容器。In another embodiment, the at least two gateway containers to be configured are created in at least two physical machines. At this time, after receiving the request for creating a gateway sent by the tenant terminal, the controller acquires at least two physical machine identification information, and generates at least two creation gateway instructions, where the creation gateway instruction includes physical machine identification information and to be created. The number of gateways. Here, the sum of the number of gateways to be created in at least two of the created gateway instructions is the total number of gateways that the controller needs to create. The controller sends at least two create gateway instructions to the corresponding physical machine. In this way, at least two physical opportunities receive corresponding gateway creation instructions, and each physical machine mirrors the gateway container according to the number of gateways to be created in the created gateway instruction to create a corresponding number of gateway containers to be configured, and finally At least two physical machines collectively form at least two gateway containers to be configured.
譬如,控制器在接收到创建网关请求后,获取两个物理机标识信息,分别标记为001和002。控制器生成两个创建网关指令,每个创建网关指令中携带一个物理机标识信息和对应的待创建网关的数量。这里待创建网关的数量均取值为一。这样物理机标识信息为001的物理机接收到对应的创建网关指令后,将根据网关容器创建出一个待配置网关容器。同理,物理机标识信息为002的物理机接收到对应的创建网关指令后,将根据网关容器创建出一个待配置网关容器。这样就可以获得两个待配置网关容器。For example, after receiving the request to create a gateway, the controller obtains two physical machine identification information, which are marked as 001 and 002 respectively. The controller generates two creation gateway instructions, each of which creates a physical machine identification information and a corresponding number of gateways to be created. The number of gateways to be created here is one. After the physical machine whose physical machine identification information is 001 receives the corresponding creation gateway command, a gateway container to be configured is created according to the gateway container. Similarly, after receiving the corresponding gateway creation command, the physical machine whose physical machine identification information is 002 will create a gateway container to be configured according to the gateway container. This will result in two gateway containers to be configured.
可以理解的是,每个创建网关指令中的待创建网关的数量不局限于一个,还可以为更多个。这样每台物理机中可以创建多个待配置网关容器。另外,多个创建网关指令中的待创建网关的数量也可以互不相同,譬如,物理机标识信息为001的物理机接收到的创建网关指令中,待创建网关的数量为一,而物理机标识信息为002的物理机接收到的创建网关指令中,待创建网关的数量为二,那么在物理机标识信息为001的物理机和物理机标识信息为002的物理机完成待配置网关容器的创建之后,总共会生成三个待配置网关容器。It can be understood that the number of gateways to be created in each of the created gateway instructions is not limited to one, and may be more. In this way, multiple gateway containers to be configured can be created in each physical machine. In addition, the number of gateways to be created in the multiple created gateway commands may also be different from each other. For example, in the creation of a gateway command received by a physical machine whose physical machine identification information is 001, the number of gateways to be created is one, and the physical machine If the number of the gateway to be created is two, the physical machine with the physical machine identification information of 001 and the physical machine with the physical machine identification information of 002 complete the gateway container to be configured. After creation, a total of three gateway containers to be configured are generated.
将至少两个待配置网关容器创建在至少两个物理机中,可以使得后续创建的至少两个网关处在至少两个物理机中。当租户终端与其中一个网关建立通信连接时,若该正在提供网关服务的网关所处的物理机发生断电、坏损等状况,可以使用在其他物理机中的网关继续为租户提供网关服务,避免因物理机故障而导致租户不能正常享受网关服务,提高网关服务的用户体验度。Creating at least two gateway containers to be configured in at least two physical machines may cause at least two gateways to be subsequently created to be in at least two physical machines. When the tenant terminal establishes a communication connection with one of the gateways, if the physical machine in which the gateway providing the gateway service is located is powered off or damaged, the gateway in the other physical machine can continue to provide the gateway service for the tenant. Avoid the failure of the physical machine to cause the tenant to enjoy the gateway service and improve the user experience of the gateway service.
S204、接收所述控制器发送的网关配置文件,其中,所述网关配置文件包括网关配置信息。S204. Receive a gateway configuration file sent by the controller, where the gateway configuration file includes gateway configuration information.
在一实施例中,每个物理机创建完待配置网关容器后,会向控制器发送第一反馈信息。控制器在接收到第一反馈信息后,会向每个物理机发送网关配置文件。每个物理机均会接收到网关配置文件。其中,该网关配置文件包括网关配置信息。In an embodiment, after each physical machine creates a gateway container to be configured, the first feedback information is sent to the controller. After receiving the first feedback information, the controller sends a gateway configuration file to each physical machine. Each physical machine receives a gateway configuration file. The gateway configuration file includes gateway configuration information.
在一实施例中,该网关配置信息可以包括网关的网络地址信息,譬如,网关的互联网协议地址(Internet Protocol Address,简称IP地址)。该网关配置信息还可以包括网关的类型、网关的带宽规格等信息,在此不做具体限制。In an embodiment, the gateway configuration information may include network address information of the gateway, for example, an Internet Protocol Address (IP address) of the gateway. The gateway configuration information may also include information such as the type of the gateway, the bandwidth specification of the gateway, and the like, and is not specifically limited herein.
需要说明的是,在其他实施例中,控制器可以将创建网关指令和网关配置 文件一起发送给对应的物理机,此时物理机将同时接收到控制器发送的创建网关指令和网关配置文件。也就是说,步骤S203和步骤S204可以合并在一个步骤中,具体合并为:若接收到控制器发送的创建网关指令和网关配置文件,根据所述网关容器创建至少两个待配置网关容器,其中,所述网关配置文件包括网关配置信息。在此不对创建网关指令和网关配置文件发送的顺序做限制。It should be noted that, in other embodiments, the controller may send the creation gateway command and the gateway configuration file to the corresponding physical machine, and the physical machine will simultaneously receive the creation gateway instruction and the gateway configuration file sent by the controller. That is, step S203 and step S204 may be combined in one step, specifically combining: if receiving the creation gateway instruction and the gateway configuration file sent by the controller, creating at least two gateway containers to be configured according to the gateway container, wherein The gateway configuration file includes gateway configuration information. There is no restriction on the order in which gateway commands and gateway profiles are created.
S205、根据所述网关配置信息对至少两个所述待配置网关容器进行配置以完成至少两个网关的创建。S205. Configure at least two of the to-be-configured gateway containers according to the gateway configuration information to complete creation of at least two gateways.
每个物理机接收到网关配置文件后,就会根据该网关配置文件中的网关配置信息对待配置网关容器进行配置,以将待配置网关容器拉起,从而完成网关的创建。在每个物理机将待配置网关容器拉起后,将总共生成至少两个网关。After receiving the gateway configuration file, each physical machine configures the gateway container according to the gateway configuration information in the gateway configuration file to pull up the gateway container to be configured, thereby completing the creation of the gateway. After each physical machine pulls up the gateway container to be configured, a total of at least two gateways will be generated.
在本实施例中,网关配置信息包括网关的网络地址信息,每个物理机接收到网关配置文件中的网关的网络地址信息相同,因此,创建的至少两个网关对应的网关的网络地址信息也相同。也就是说,至少两个网关公用同一个网络地址信息。In this embodiment, the gateway configuration information includes the network address information of the gateway, and the network address information of the gateway in the gateway configuration file is received by each physical machine. Therefore, the network address information of the gateway corresponding to the at least two gateways created is also the same. That is, at least two gateways share the same network address information.
由于本实施例中采用了容器技术创建的容器作为虚拟操作系统,使得创建网关的过程中占用较少的物理机资源,使得物理机的资源得到合理利用。Because the container created by the container technology is used as the virtual operating system in this embodiment, the physical machine resources are occupied in the process of creating the gateway, so that the resources of the physical machine are rationally utilized.
S206、接收租户终端发送的网络连接请求,其中,所述网络连接请求包括所述租户终端的网络地址信息。S206. Receive a network connection request sent by a tenant terminal, where the network connection request includes network address information of the tenant terminal.
在本实施例中,物理机在完成网关的创建之后,物理机会向控制器发送第二反馈信息。控制器接收到第二反馈信息后,会将网关的网络地址信息发送至租户终端。这样租户在需要访问云主机时,会通过租户终端向物理机发送网络连接请求,其中,该网络连接请求包括租户终端的网络地址信息。In this embodiment, after the physical machine completes the creation of the gateway, the physical opportunity sends the second feedback information to the controller. After receiving the second feedback information, the controller sends the network address information of the gateway to the tenant terminal. When the tenant needs to access the cloud host, the tenant terminal sends a network connection request to the physical machine through the tenant terminal, where the network connection request includes the network address information of the tenant terminal.
物理机接收到该网络连接请求后,将执行步骤S207。After the physical machine receives the network connection request, step S207 is performed.
S207、根据至少两个所述网关的优先级信息确认主网关和备网关,其中,所述主网关和备网关的网络地址信息相同。S207. Confirm the primary gateway and the backup gateway according to the priority information of the at least two gateways, where the network address information of the primary gateway and the backup gateway are the same.
在本实施例中,每个物理机中安装有Keepalived应用软件,该Keepalived软件中有VRRP模块。每个网关在创建时都会配置有优先级信息。其中,该优先级信息包括优先级值。该优先级值越高,优先等级越高。In this embodiment, the Keepalived application software is installed in each physical machine, and the Keepalived software has a VRRP module. Each gateway is configured with priority information when it is created. The priority information includes a priority value. The higher the priority value, the higher the priority level.
在本实施例中,生成的至少两个网关形成一个与租户对应的网关组。该网关组内的至少两个网关相互之间通过VRRP协议发送组播报文。该组播报文中 携带有网关的优先级信息。各个网关根据接收到的组播报文来获取其他网关的优先级信息,然后根据自己的优先级信息和其他网关的优先级信息筛选出网关组内优先等级高的网关作为主网关,其他网关均作为备网关。In this embodiment, the generated at least two gateways form a gateway group corresponding to the tenant. At least two gateways in the gateway group send multicast packets through VRRP. The multicast packet carries the priority information of the gateway. Each gateway obtains the priority information of other gateways according to the received multicast packets, and then filters out the gateway with the highest priority in the gateway group as the primary gateway according to its own priority information and the priority information of other gateways. As a backup gateway.
譬如,网组内包括网关A和网关B,其中,网关A的优先级值为100,网关B的优先级值为99。两个网关通过发送组播报文来获取对方的优先级值。当网关A接收到网关B的优先级值时,会判断出自己的优先级值大于网关B的优先级值,并将自己设置为主网关。同理,当网关B接收到网关A的优先级值时,会判断出自己的优先级值小于网关A的优先级值,并将自己设置为备网关。For example, the gateway group includes the gateway A and the gateway B. The priority value of the gateway A is 100, and the priority value of the gateway B is 99. The two gateways obtain the priority value of the other party by sending a multicast packet. When the gateway A receives the priority value of the gateway B, it determines that its own priority value is greater than the priority value of the gateway B, and sets itself as the primary gateway. Similarly, when gateway B receives the priority value of gateway A, it determines that its own priority value is smaller than the priority value of gateway A, and sets itself as the standby gateway.
当确定出主网关后,主网关将被配置上网关的网络地址信息,而备网关将不会被配置上该网关的网络地址信息。也就是说,此时只有主网关可以向租户提供网关服务,而备网关处于备用状态。After the primary gateway is determined, the primary gateway will be configured with the network address information of the gateway, and the standby gateway will not be configured with the network address information of the gateway. That is to say, at this time, only the primary gateway can provide the gateway service to the tenant, and the standby gateway is in the standby state.
S208、根据所述网关的网络地址信息和租户终端的网络地址信息建立所述主网关与所述租户终端之间的通信连接。S208. Establish a communication connection between the primary gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal.
当确定出主网关后,主网关的物理机根据网关的网络地址信息与租户终端的网络地址信息建立主网关与租户终端之间的通信连接,这样租户就可以通过主网关访问云主机。After the primary gateway is determined, the physical machine of the primary gateway establishes a communication connection between the primary gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal, so that the tenant can access the cloud host through the primary gateway.
S209、若所述主网关处于非正常工作状态,根据所述优先级信息从所述备网关中确认新的主网关。S209. If the primary gateway is in an abnormal working state, confirm a new primary gateway from the standby gateway according to the priority information.
在主网关与租户终端之间建立通信连接之后,主网关会通过Keepalived应用软件向其他备网关发送组播报文以告知自己处于正常工作状态。而其他备网关也可以通过Keepalived应用软件定期接收主网关发送的组播报文。After the communication connection is established between the primary gateway and the tenant terminal, the primary gateway sends multicast packets to other backup gateways through the Keepalived application software to inform them that they are in normal working state. The other backup gateways can also receive multicast packets sent by the primary gateway periodically through the Keepalived application.
当主网关处于非正常工作状态时,主网关就无法发送组播报文,其他备网关也就不会接到主网关发送的组播报文。此时其他备网关判定主网关处于非正常工作状态,其他备网关就可以相互发送组播报文,以根据优先级信息从其他备网关中重新确认一个新的主网关。也就是在其他备网关中寻找出优先级值最高的网关作为新的主网关。确认出新的主网关后,该新的主网关将被配置网关的网络地址信息,这样该新的主网关可以向租户提供网关服务。When the primary gateway is in the abnormal working state, the primary gateway cannot send multicast packets, and other standby gateways will not receive multicast packets from the primary gateway. At this time, the other backup gateways determine that the primary gateway is in an abnormal working state, and other standby gateways can send multicast packets to each other to re-confirm a new primary gateway from other standby gateways according to the priority information. That is to find the gateway with the highest priority value among other standby gateways as the new primary gateway. After confirming the new primary gateway, the new primary gateway will be configured with the network address information of the gateway, so that the new primary gateway can provide the gateway service to the tenant.
需要说明的是,该非正常工作状态可以包括主网关出现宕机、虚拟操作系统崩溃、运行卡住等,在此不做具体限制。It should be noted that the abnormal working state may include a failure of the primary gateway, a virtual operating system crash, a running stuck, and the like, and no specific limitation is imposed herein.
S210、根据所述网关的网络地址信息和租户终端的网络地址信息建立所述 新的主网关与所述租户终端之间的通信连接。S210. Establish a communication connection between the new primary gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal.
当新的主网关被配置网关的网络地址信息后,新的主网关对应的物理机将根据网关的网络地址信息和租户终端的网络地址信息重新建立新的主网关与租户终端之间的通信连接,这样新的主网关就可以向租户提供网关服务。After the new primary gateway is configured with the network address information of the gateway, the physical machine corresponding to the new primary gateway re-establishes a new communication connection between the primary gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal. So that the new primary gateway can provide gateway services to tenants.
在一实施例中,在步骤S208之后,还包括:若所述主网关处于非正常工作状态,接收所述控制器发送的重启指令,并根据所述重启指令重启所述主网关。在主网关与租户终端建立通信连接之后,控制器会监测主网关是否处于正常工作状态。In an embodiment, after step S208, the method further includes: if the primary gateway is in an abnormal working state, receiving a restart instruction sent by the controller, and restarting the primary gateway according to the restart instruction. After the primary gateway establishes a communication connection with the tenant terminal, the controller monitors whether the primary gateway is in a normal working state.
具体地,控制器可以以应答形式向主网关发送询问信号。若主网关处于非正常工作状态,主网关就不会向控制器发送应答信号,主网关所在的物理机就会接收到控制器发送的重启指令,并根据该重启指令重启该主网关,以使得主网关重新处于可用状态。由于主网关运行在容器技术创建的容器中,使得重启该主网关的时间较短,可以使主网关快速地重新启动。Specifically, the controller may send an inquiry signal to the primary gateway in the form of a response. If the primary gateway is in an abnormal working state, the primary gateway will not send an acknowledgement signal to the controller, and the physical machine where the primary gateway is located receives the restart command sent by the controller, and restarts the primary gateway according to the restart command, so that The primary gateway is available again. Since the primary gateway runs in a container created by the container technology, the time to restart the primary gateway is short, and the primary gateway can be quickly restarted.
本实施例中的网关的创建方法,其采用容器技术创建的容器作为虚拟操作系统,在容器中加载网关系统以生成网关容器。当接收到控制器发送的创建网关指令时,对该网关容器进行镜像以创建至少两个待配置网关容器,再根据控制器发送的网关配置文件配置中的网关配置信息对至少两个待配置网关容器进行配置以完成至少两个网关的创建。该方法可以减少网关创建过程中所占物理机的资源,提高网关创建的速度。同时该方法创建至少两个网关,当向租户提供网关服务的主网关处于非正常工作状态时,可以使用其他备网关作为新的主网关继续向租户提供网关服务,提高网关服务的体验度。In the method for creating a gateway in this embodiment, a container created by using a container technology is used as a virtual operating system, and a gateway system is loaded in the container to generate a gateway container. When receiving the create gateway command sent by the controller, mirroring the gateway container to create at least two gateway containers to be configured, and then configuring at least two gateways to be configured according to the gateway configuration information in the gateway profile configuration sent by the controller. The container is configured to complete the creation of at least two gateways. This method can reduce the resources of the physical machine occupied by the gateway creation process and improve the speed of the gateway creation. At the same time, the method creates at least two gateways. When the primary gateway that provides the gateway service to the tenant is in an abnormal working state, the other backup gateways can be used as the new primary gateway to continue providing the gateway service to the tenant, thereby improving the experience of the gateway service.
请参阅图4,图4为本申请实施例提供的一种网关的创建方法的另一流程示意图。本实施例中的网关的创建方法应用于控制器中。该控制器用于管理至少一个物理机。该方法包括步骤S301至S304。Referring to FIG. 4, FIG. 4 is another schematic flowchart of a method for creating a gateway according to an embodiment of the present application. The method for creating a gateway in this embodiment is applied to a controller. The controller is used to manage at least one physical machine. The method includes steps S301 to S304.
S301、若接收到租户终端发送的创建网关请求,根据所述创建网关请求按照预设获取规则获取预设数量的物理机标识信息。S301. If the request for creating a gateway sent by the tenant terminal is received, obtain a preset number of physical machine identification information according to the preset acquisition rule according to the request for creating the gateway.
在本实施例中,该控制器内搭载了分布式MESOS框架,即分布式资源管理框架。控制器可以基于分布式MESOS框架来获取预设数量的物理机标识信息。具体地,基于分布式MESOS框架,根据每个物理机中的网关数量来获取预设数 量的相对空闲的物理机对应的物理机标识信息。In this embodiment, the controller is equipped with a distributed MESOS framework, that is, a distributed resource management framework. The controller may acquire a preset number of physical machine identification information based on the distributed MESO framework. Specifically, based on the distributed MESOS framework, a preset number of physical machine identification information corresponding to the relatively idle physical machine is obtained according to the number of gateways in each physical machine.
具体地,在一实施例中,控制器根据创建网关请求获取物理机状态表。其中,物理机状态表包括所有物理机标识信息及对应的网关数量。这里,网关数量可以指物理机标识信息对应的物理机中网关的总数。Specifically, in an embodiment, the controller acquires a physical machine status table according to a request to create a gateway. The physical machine status table includes all physical machine identification information and the corresponding number of gateways. Here, the number of gateways may refer to the total number of gateways in the physical machine corresponding to the physical machine identification information.
控制器根据网关数量按照预设规则获取预设数量的物理机标识信息。具体地,控制器获取预设数量的数值较小的网关数量对应的物理机标识信息。可以理解的是,网关数量的数值较小,说明该网关数量对应的物理机比较空闲,可以容纳更多的网关。The controller acquires a preset number of physical machine identification information according to a preset rule according to the number of gateways. Specifically, the controller acquires physical machine identification information corresponding to the preset number of gateways with a smaller number of values. It can be understood that the value of the number of gateways is small, indicating that the physical machine corresponding to the number of gateways is relatively idle and can accommodate more gateways.
譬如,控制器所管理的物理机共四个,对应的物理机标识信息分别标记为001、002、003和004。其中001对应的物理机中网关数量为10个,002对应的物理机中网关数量为20个,003对应的物理机中网关数量为30个,004对应的物理机中网关数量为15个。假设预设数量为两个,那么控制器会获取网关数量为10个和15个对应的物理机标识信息,即获取到两个物理机标识信息,分别为001和004。For example, there are four physical machines managed by the controller, and the corresponding physical machine identification information is marked as 001, 002, 003, and 004, respectively. The number of gateways in the physical machine corresponding to 001 is 10, the number of gateways in the physical machine corresponding to 002 is 20. The number of gateways in the physical machine corresponding to 003 is 30, and the number of gateways in the physical machine corresponding to 004 is 15. Assuming that the preset number is two, the controller obtains the physical device identification information of 10 and 15 corresponding gateways, that is, obtains two physical machine identification information, which are 001 and 004 respectively.
需要说明的是,其他实施例中,预设规则不局限于获取数值较小的网关数量对应的物理机标识信息,还可以为其他规则,在此不做具体限制。It should be noted that, in other embodiments, the preset rule is not limited to obtaining physical machine identification information corresponding to the number of gateways with a smaller value, and may also be other rules, and no specific limitation is imposed herein.
本实施例中的控制器可以合理利用物理机资源,均衡所有物理机中网关的数量,避免网关的数量不均匀而导致部分物理机空闲较多资源,部分物理机超负荷运行等问题。The controller in this embodiment can reasonably utilize the physical machine resources, balance the number of gateways in all physical machines, avoid the problem that the number of gateways is not uniform, and some physical machines are idle more resources, and some physical machines are overloaded.
在一实施例中,预设数量可以为一个,也可以为至少两个。当预设数量为一个时,控制器会获取一个物理机标识信息,那么在该物理机标识信息对应的物理机中可以创建至少一个网关。预设数量为至少两个时,控制器会获取至少两个物理机标识信息,那么在该至少两个物理机标识信息对应的物理机中可以创建出少两个网关。预设数量的具体数值可以根据实际需求进行设置,在此不做具体限制。In an embodiment, the preset number may be one or at least two. When the preset number is one, the controller acquires a physical machine identification information, and at least one gateway can be created in the physical machine corresponding to the physical machine identification information. When the preset number is at least two, the controller acquires at least two physical machine identification information, and then two less gateways can be created in the physical machine corresponding to the at least two physical machine identification information. The specific number of preset numbers can be set according to actual needs, and no specific restrictions are imposed here.
S302、发送创建网关指令至所述物理机标识信息对应的物理机,以使得所述物理机在接收到所述创建网关指令后根据网关容器创建待配置网关容器。S302. Send a gateway instruction to the physical machine corresponding to the physical machine identification information, so that the physical machine creates a to-be-configured gateway container according to the gateway container after receiving the creation gateway instruction.
在本实施例中,控制器根据物理机标识信息生成创建网关指令,其中,该创建网关指令包括该物理机标识信息。控制器将该创建网关指令发送到物理机标识信息对应的物理机中。这样物理机就可以在接收到创建网关指令后,根据 网关容器创建待配置网关容器。In this embodiment, the controller generates a create gateway command according to the physical machine identification information, where the create gateway command includes the physical machine identification information. The controller sends the create gateway command to the physical machine corresponding to the physical machine identification information. In this way, the physical machine can create a gateway container to be configured according to the gateway container after receiving the gateway creation instruction.
在一实施例中,当步骤S301获取到的物理机标识信息的个数为至少两个,即预设数量为至少两个时,此时控制器根据每个物理机标识信息生成对应的创建网关指令,每个创建网关指令中包括一个物理机标识信息。控制器将至少两个创建网关指令分别发送至物理机标识信息对应的物理机中,使得至少两个物理机根据网关容器创建至少两个待配置网关容器。In an embodiment, when the number of physical machine identification information acquired in step S301 is at least two, that is, the preset number is at least two, the controller generates a corresponding creation gateway according to each physical machine identification information. The instruction includes a physical machine identification information in each creation gateway instruction. The controller sends at least two creation gateway instructions to the physical machine corresponding to the physical machine identification information, so that at least two physical machines create at least two gateway containers to be configured according to the gateway container.
在一实施例中,该创建网关指令中还包括待创建网关的数量。该待创建网关的数量可以为一个,也可以为两个或更多个,在此不做具体限制。In an embodiment, the creation gateway instruction further includes the number of gateways to be created. The number of the gateway to be created may be one or two or more, and is not specifically limited herein.
在一实施例中,当租户申请一个网关时,控制器被配置为创建至少两个网关给租户,其中,该至少两个网关对应的网关的网络地址信息相同。这样至少两个网关可以公用一个网络地址信息交替地为租户提供网关服务。In an embodiment, when the tenant applies for a gateway, the controller is configured to create at least two gateways to the tenant, wherein the network address information of the gateway corresponding to the at least two gateways is the same. In this way, at least two gateways can alternately provide a gateway service to the tenant by sharing one network address information.
其中,该至少两个网关可以创建在同一个物理机中。此时预设数量的个数为一个,即步骤S301将获取到一个物理机标识信息,这样创建网关指令中的待创建网关的数量将配置为至少两个,也就是说,该创建网关指令中的待创建网关的数量即为控制器所需创建网关的总数。当物理机接收到创建网关指令后,将生成至少两个待配置网关容器。The at least two gateways can be created in the same physical machine. At this time, the number of presets is one, that is, step S301 will acquire a physical machine identification information, so that the number of gateways to be created in the creation of the gateway instruction will be configured to be at least two, that is, in the creation of the gateway instruction The number of gateways to be created is the total number of gateways that the controller needs to create. When the physical machine receives the create gateway command, it will generate at least two gateway containers to be configured.
当然,该至少两个网关也可以创建在至少两个物理机中,此时预设数量的个数为至少两个,即步骤S301将获取到至少两个物理机标识信息。每个创建网关指令中的待创建网关的数量可以被配置为一个,也可以被配置为两个或更多个。譬如,当预设数量为两个,控制器被配置为为每个租户的每个网关创建三个网关时,那么一个创建网关指令中的待创建网关的数量将被配置为一个,而另一个创建网关指令中的待创建网关的数量将被配置为两个。也就是说,该两个创建网关指令中的待创建网关的数量之和即为控制器所需创建网关的总数。这样两个物理机接收到对应的创建网关指令时,会创建出三个待配置网关容器,进而后续得到三个网关。Of course, the at least two gateways may be created in at least two physical machines. In this case, the preset number of the at least two gateways is at least two, that is, step S301 acquires at least two physical machine identification information. The number of gateways to be created in each creation gateway instruction may be configured as one, or may be configured as two or more. For example, when the preset number is two and the controller is configured to create three gateways for each gateway of each tenant, then the number of gateways to be created in one creation gateway instruction will be configured as one, and the other The number of gateways to be created in creating gateway instructions will be configured to two. That is to say, the sum of the number of gateways to be created in the two created gateway instructions is the total number of gateways that the controller needs to create. When the two physical machines receive the corresponding create gateway command, three gateway containers to be configured are created, and then three gateways are obtained.
S303、生成网关配置文件,其中所述网关配置文件包括网关配置信息。S303. Generate a gateway configuration file, where the gateway configuration file includes gateway configuration information.
在一实施例中,当物理机创建完待配置网关容器后,控制器会接收到第一反馈信息。控制器接收到第一反馈信息后,生成网关配置文件。其中,该网关配置文件包括网关配置信息。In an embodiment, after the physical machine creates the gateway container to be configured, the controller receives the first feedback information. After receiving the first feedback information, the controller generates a gateway configuration file. The gateway configuration file includes gateway configuration information.
在一实施例中,该网关配置信息可以包括网关的网络地址信息,譬如,网 关的互联网协议地址(Internet Protocol Address,简称IP地址)。该网关配置信息还可以包括网关的类型、网关的带宽规格等信息,在此不做具体限制。In an embodiment, the gateway configuration information may include network address information of the gateway, for example, an Internet Protocol Address (IP address) of the gateway. The gateway configuration information may also include information such as the type of the gateway, the bandwidth specification of the gateway, and the like, and is not specifically limited herein.
S304、发送所述网关配置文件至所述物理机以使得所述物理机根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。S304. Send the gateway configuration file to the physical machine, so that the physical machine configures the to-be-configured gateway container according to the gateway configuration information to complete creation of a gateway.
控制器将网关配置文件发送至物理机标识信息对应的物理机中,以便于物理机根据网关配置文件对待配置网关容器进行配置,从而完成网关的创建。The controller sends the gateway configuration file to the physical machine corresponding to the physical machine identification information, so that the physical machine configures the gateway container according to the gateway configuration file, thereby completing the creation of the gateway.
需要说明的是,图4所示的各个步骤的先后顺序可以根据实际需求进行调整。譬如,在执行完步骤S301后,执行步骤S303,即执行生成网关配置文件的步骤,然后将步骤S302和S304合并成一个步骤,即发送创建网关指令和网关配置文件至所述物理机标识信息对应的物理机。It should be noted that the sequence of the steps shown in FIG. 4 can be adjusted according to actual needs. For example, after step S301 is performed, step S303 is performed, that is, the step of generating a gateway configuration file is performed, and then steps S302 and S304 are combined into one step, that is, sending a creation gateway instruction and a gateway configuration file to the physical machine identification information. Physical machine.
在本实施例中,当控制器接收到物理机发送的第二反馈信息后,会将网关的网络地址信息发送至租户终端,以便于租户终端与网关建立通信连接。In this embodiment, after receiving the second feedback information sent by the physical machine, the controller sends the network address information of the gateway to the tenant terminal, so that the tenant terminal establishes a communication connection with the gateway.
在一实施例中,如图5所示,图5为本申请一实施例中网关的创建方法的另一流程示意图。在步骤S304之后,还包括:In an embodiment, as shown in FIG. 5, FIG. 5 is another schematic flowchart of a method for creating a gateway according to an embodiment of the present application. After step S304, the method further includes:
S305、若监测到所述网关处于非正常工作状态,向所述网关对应的物理机发送重启指令,以使得所述网关对应的物理机根据所述重启指令重启所述网关。S305. If it is detected that the gateway is in an abnormal working state, send a restart instruction to the physical machine corresponding to the gateway, so that the physical machine corresponding to the gateway restarts the gateway according to the restart instruction.
在租户终端与网关建立通信连接后,控制器会监测网关是否处于正常工作状态。After the tenant terminal establishes a communication connection with the gateway, the controller monitors whether the gateway is in a normal working state.
具体地,控制器可以以应答形式向网关发送询问信号。若网关处于正常工作状态,即网关可以正常地向租户提供网关服务,控制器会接收到网关发送的应答信号。若网关出现宕机、虚拟操作系统崩溃、运行卡住等情况,即网关处于非正常工作状态,控制器就不会接收到网关发送的应答信号。当控制器接收不到网关发送的应答信号时,控制器就判定网关处于非正常工作状态。此时控制器会向该网关对应的物理机发送重启指令,以使得物理机根据重启指令重新启动该网关。Specifically, the controller may send an inquiry signal to the gateway in the form of a response. If the gateway is in a normal working state, that is, the gateway can normally provide the gateway service to the tenant, the controller receives the response signal sent by the gateway. If the gateway is down, the virtual operating system crashes, the operation is stuck, etc., that is, the gateway is in an abnormal working state, the controller will not receive the response signal sent by the gateway. When the controller does not receive the response signal sent by the gateway, the controller determines that the gateway is in an abnormal working state. At this time, the controller sends a restart instruction to the physical machine corresponding to the gateway, so that the physical machine restarts the gateway according to the restart instruction.
在一实施例中,当控制器被配置为为每个租户的每个网关创建至少两个网关时,租户可以通过租户终端与至少两个网关中的一个网关建立通信连接。其中,将与租户终端建立通信连接的网关称为主网关,其他网关称为备网关。在租户终端与主网关建立通信连接后,控制器会监测主网关是否处于正常工作状态。当控制器监测到主网关处于非正常工作状态,向主网关对应的物理机发送 重启指令,以使得主网关对应的物理机根据所述重启指令重启主网关。In an embodiment, when the controller is configured to create at least two gateways for each gateway of each tenant, the tenant may establish a communication connection with one of the at least two gateways through the tenant terminal. Among them, a gateway that establishes a communication connection with a tenant terminal is called a primary gateway, and other gateways are called a standby gateway. After the tenant terminal establishes a communication connection with the primary gateway, the controller monitors whether the primary gateway is in a normal working state. When the controller detects that the primary gateway is in an abnormal working state, sends a restart command to the physical device corresponding to the primary gateway, so that the physical device corresponding to the primary gateway restarts the primary gateway according to the restart instruction.
需要说明的是,上述控制器所执行的各个步骤是以租户只申请一个网关为前提。也就是说,租户通过创建网关请求只申请一个网关。可以理解的是,租户也可以通过一个创建网关请求同时申请两个或更多个网关,此时控制器可以为租户所申请的每个网关执行上述各个步骤。It should be noted that the steps performed by the above controller are based on the premise that the tenant only applies for one gateway. That is, the tenant requests to apply for only one gateway by creating a gateway request. It can be understood that the tenant can also apply for two or more gateways at the same time through one creation gateway request, and the controller can perform the above steps for each gateway applied by the tenant.
本实施例中的网关的创建方法,可以使得控制器所管理的多个物理机的资源得到充分利用,平衡多个物理机中网关的数量,提高物理机资源管理的有效率。The method for creating a gateway in this embodiment can make full use of resources of multiple physical machines managed by the controller, balance the number of gateways in multiple physical machines, and improve the efficiency of physical machine resource management.
本申请实施例还提供一种网关的创建装置,该网关的创建装置应用于物理机中,用于执行前述任一项应用于物理机中的网关的创建方法。具体地,请参阅图6,图6是本申请实施例提供的一种网关的创建装置的示意性框图。网关的创建装置400包括容器加载单元401、网关加载单元402、创建单元403、文件接收单元404和配置单元405。The embodiment of the present application further provides a device for creating a gateway, where the device for creating a gateway is applied to a physical machine, and is used to execute a method for creating a gateway applied to a physical machine. Specifically, please refer to FIG. 6. FIG. 6 is a schematic block diagram of a gateway creation apparatus according to an embodiment of the present application. The
容器加载单元401,用于加载通过容器技术创建的容器。A
网关加载单元402,用于将网关系统加载至所述容器中以生成网关容器。The
创建单元403,用于若接收到控制器发送的创建网关指令,根据所述网关容器创建待配置网关容器。The creating
文件接收单元404,用于接收所述控制器发送的网关配置文件,其中,所述网关配置文件包括网关配置信息。The
配置单元405,用于根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。The
在一实施例中,如图7所示,图7为本申请实施例中网关的创建装置的另一结构示意图。该网关的创建装置400还包括请求接收单元406、通信建立单元407、指令接收单元408和重启单元409。In an embodiment, as shown in FIG. 7, FIG. 7 is another schematic structural diagram of a gateway creation apparatus according to an embodiment of the present application. The
请求接收单元406,用于接收租户终端发送的网络连接请求,其中,所述网络连接请求包括所述租户终端的网络地址信息。The
通信建立单元407,用于根据所述网关的网络地址信息和租户终端的网络地址信息建立所述网关与所述租户终端之间的通信连接。The
指令接收单元408,用于若所述网关处于非正常工作状态,接收所述控制器发送的重启指令。The
重启单元409,用于根据所述重启指令重启所述网关。The restarting
本实施例中的网关的创建装置400,可以减少网关创建过程中所占物理机的资源,提高网关创建的速度。同时该装置400创建的网关还具有重启所耗时间短、重启速度快等优点,可以使得网关更好地为租户提供网关服务。The
请参阅图8,图8为本申请实施例中网关的创建装置的另一结构示意图。该网关的创建装置500应用于物理机中,用于执行前述任一项应用于物理机中的网关的创建方法。如图8所示,该网关的创建装置500包括:容器加载单元501、网关加载单元502、创建单元503、文件接收单元504、配置单元505、请求接收单元506、通信建立单元507和确认单元508。Please refer to FIG. 8. FIG. 8 is another schematic structural diagram of a device for creating a gateway according to an embodiment of the present application. The
容器加载单元501,用于加载通过容器技术创建的容器。A
网关加载单元502,用于将网关系统加载至所述容器中以生成网关容器。The
创建单元503,用于若接收到控制器发送的创建网关指令,根据所述网关容器创建至少两个所述待配置网关容器。The creating
文件接收单元504,用于接收所述控制器发送的网关配置文件,其中,所述网关配置文件包括网关配置信息。The
配置单元505,用于根据所述网关配置信息对至少两个所述待配置网关容器进行配置以完成至少两个网关的创建。The
请求接收单元506,用于接收租户终端发送的网络连接请求,其中,所述网络连接请求包括所述租户终端的网络地址信息。The
通信建立单元507,用于根据至少两个所述网关的优先级信息确认主网关和备网关,其中,所述主网关和备网关的网络地址信息相同;以及根据所述网关的网络地址信息和租户终端的网络地址信息建立所述主网关与所述租户终端之间的通信连接。The
确认单元508,用于若所述主网关处于非正常工作状态,根据所述优先级信息从所述备网关中确认新的主网关。The confirming
确认出新的主网关后,该新的主网关对应的通信建立单元507将该新的主网关配置上网关的网络地址信息,并根据网关的网络地址信息和租户终端的网络地址信息建立新的主网关与租户终端之间的通信连接。这样该新的主网关可以向租户提供网关服务。After confirming the new primary gateway, the
在一实施例中,如图9所示,图9为本申请实施例中网关的创建装置的另 一结构示意图。该网关的创建装置500还包括:指令接收单元509和重启单元510。In an embodiment, as shown in FIG. 9, FIG. 9 is another schematic structural diagram of a gateway creation apparatus according to an embodiment of the present application. The
指令接收单元509,用于若所述主网关处于非正常工作状态,接收所述控制器发送的重启指令。The
重启单元510,用于根据所述重启指令重启所述主网关。The restarting
本实施例中的网关的创建装置500,其可以减少网关创建过程中所占物理机的资源,提高网关创建的速度。同时该装置500创建至少两个网关,当向租户提供网关服务的主网关处于非正常工作状态时,可以使用其他备网关作为新的主网关继续向租户提供网关服务,提高网关服务的体验度。The
请参阅图10,图10为本申请一实施例中网关的创建装置的结构示意图。该网关的创建装置600应用于控制器中,用于执行前述任一项应用于控制器中的网关的创建方法。该控制器用于管理至少一个物理机。该网关的创建装置600包括:标识信息获取单元601、指令发送单元602、文件生成单元603和文件发送单元604。Referring to FIG. 10, FIG. 10 is a schematic structural diagram of a device for creating a gateway according to an embodiment of the present application. The
标识信息获取单元601,用于若接收到租户终端发送的创建网关请求,根据所述创建网关请求按照预设获取规则获取预设数量的物理机标识信息。The identifier
具体地,在一实施例中,标识信息获取单元601根据创建网关请求获取物理机状态表。其中,物理机状态表包括所有物理机标识信息及对应的网关数量。这里,网关数量可以指物理机标识信息对应的物理机中网关的总数。标识信息获取单元601根据网关数量按照预设规则获取预设数量的物理机标识信息。Specifically, in an embodiment, the identification
指令发送单元602,用于发送创建网关指令至所述物理机标识信息对应的物理机,以使得所述物理机在接收到所述创建网关指令后根据网关容器创建待配置网关容器。The
文件生成单元603,用于生成网关配置文件,其中所述网关配置文件包括网关配置信息。The
文件发送单元604,用于发送所述网关配置文件至所述物理机以使得所述物理机根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。The
在一实施例中,如图11所示,图11为本申请一实施例中网关的创建装置的另一结构示意图。该网关的创建装置600还包括重启指令发送单元605。In an embodiment, as shown in FIG. 11, FIG. 11 is another schematic structural diagram of a gateway creation apparatus according to an embodiment of the present application. The
重启指令发送单元605,用于若监测到所述网关处于非正常工作状态,向所 述网关对应的物理机发送重启指令,以使得所述网关对应的物理机根据所述重启指令重启所述网关。a restart
本实施例中的网关的创建装置600,可以合理利用多个物理机的资源,平衡多个物理机中网关的数量,提高物理机资源管理的有效率。The
请参阅图12,图12是本申请实施例提供的一种计算机设备的示意性框图。该计算机设备700设备可以为前述实施例中的物理机。该计算机设备700包括通过系统总线701连接的处理器702、存储器和网络接口705,其中,存储器可以包括非易失性存储介质703和内存储器704。Referring to FIG. 12, FIG. 12 is a schematic block diagram of a computer device according to an embodiment of the present application. The
该非易失性存储介质703可存储操作系统7031和计算机程序7032。该计算机程序7032包括程序指令,该程序指令被执行时,可使得处理器702执行应用于物理机中的一种网关的创建方法。该处理器702用于提供计算和控制能力,支撑整个计算机设备700的运行。该内存储器704为非易失性存储介质703中的计算机程序7032的运行提供环境,该计算机程序7032被处理器702执行时,可使得处理器702执行应用于物理机中的一种网关的创建方法。该网络接口705用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图12中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备700的限定,具体的计算机设备700可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The
其中,所述处理器702用于运行存储在存储器中的计算机程序7032,以实现如下功能:加载通过容器技术创建的容器;将网关系统加载至所述容器中以生成网关容器;若接收到控制器发送的创建网关指令,根据所述网关容器创建待配置网关容器;接收所述控制器发送的网关配置文件,其中,所述网关配置文件包括网关配置信息;以及根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。The
在一实施例中,所述网关配置信息包括所述网关的网络地址信息;处理器702在执行根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建之后,还执行如下程序:接收租户终端发送的网络连接请求,其中,所述网络连接请求包括所述租户终端的网络地址信息;以及根据所述网关的网络地址信息和租户终端的网络地址信息建立所述网关与所述租户终端之间的通信 连接。In an embodiment, the gateway configuration information includes network address information of the gateway. After performing the configuration of the gateway container to be configured according to the gateway configuration information to complete the creation of the gateway, the
在一实施例中,处理器702在执行根据所述网关的网络地址信息和租户终端的网络地址信息建立所述网关与所述租户终端之间的通信连接之后,还执行如下程序:若所述网关处于非正常工作状态,接收所述控制器发送的重启指令;以及根据所述重启指令重启所述网关。In an embodiment, after performing the communication connection between the gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal, the
在一实施例中,处理器702在执行根据所述网关容器创建待配置网关容器时,具体执行如下程序:根据所述网关容器创建至少两个所述待配置网关容器。In an embodiment, when the
相应地,处理器702在执行根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建时,具体执行如下程序:根据所述网关配置信息对至少两个所述待配置网关容器进行配置以完成至少两个网关的创建。Correspondingly, when the
相应地,处理器702在执行根据所述网关的网络地址信息和租户终端的网络地址信息建立所述网关与所述租户终端之间的通信连接时,具体执行如下程序:根据至少两个所述网关的优先级信息确认主网关和备网关,其中,所述主网关和备网关的网络地址信息相同;以及根据所述网关的网络地址信息和租户终端的网络地址信息建立所述主网关与所述租户终端之间的通信连接。Correspondingly, when the
在一实施例中,处理器702在执行根据所述网关的网络地址信息和租户终端的网络地址信息建立所述主网关与所述租户终端之间的通信连接之后,还执行如下程序:若所述主网关处于非正常工作状态,根据所述优先级信息从所述备网关中确认新的主网关;根据所述网关的网络地址信息和租户终端的网络地址信息建立所述新的主网关与所述租户终端之间的通信连接。In an embodiment, after performing the communication connection between the primary gateway and the tenant terminal according to the network address information of the gateway and the network address information of the tenant terminal, the
在一实施例中,至少两个所述待配置网关容器创建在至少两个物理机中。In an embodiment, at least two of the gateway containers to be configured are created in at least two physical machines.
应当理解,在本申请实施例中,处理器702可以是中央处理单元(Central Processing Unit,CPU),该处理器702还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present application, the
请参阅图13,图13是本申请实施例提供的一种计算机设备的示意性框图。该计算机设备800设备可以是前述实施例中的控制器。该计算机设备800包括 通过系统总线801连接的处理器802、存储器和网络接口805,其中,存储器可以包括非易失性存储介质803和内存储器804。Referring to FIG. 13, FIG. 13 is a schematic block diagram of a computer device according to an embodiment of the present application. The
该非易失性存储介质803可存储操作系统8031和计算机程序8032。该计算机程序8032包括程序指令,该程序指令被执行时,可使得处理器802执行应用于控制器中的一种网关的创建方法。该处理器802用于提供计算和控制能力,支撑整个计算机设备800的运行。该内存储器804为非易失性存储介质803中的计算机程序8032的运行提供环境,该计算机程序8032被处理器802执行时,可使得处理器802执行应用于控制器中的一种网关的创建方法。该网络接口805用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图13中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备800的限定,具体的计算机设备800可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The
其中,所述处理器802用于运行存储在存储器中的计算机程序8032,以实现如下功能:若接收到租户终端发送的创建网关请求,根据所述创建网关请求按照预设获取规则获取预设数量的物理机标识信息;发送创建网关指令至所述物理机标识信息对应的物理机,以使得所述物理机在接收到所述创建网关指令后根据网关容器创建待配置网关容器;生成网关配置文件,其中所述网关配置文件包括网关配置信息;发送所述网关配置文件至所述物理机以使得所述物理机根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建。The
在一实施例中,在所述租户终端与所述网关建立通信连接的情况下,处理器802在执行发送所述网关配置文件至所述物理机以使得所述物理机根据所述网关配置信息对所述待配置网关容器进行配置以完成网关的创建之后,还执行如下程序:若监测到所述网关处于非正常工作状态,向所述网关对应的物理机发送重启指令,以使得所述网关对应的物理机根据所述重启指令重启所述网关。In an embodiment, in a case where the tenant terminal establishes a communication connection with the gateway, the
在一实施例中,处理器802在执行根据所述创建网关请求按照预设获取规则获取预设数量的物理机标识信息时,具体执行如下程序:根据所述创建网关请求获取物理机状态表,其中,所述物理机状态表包括所有物理机标识信息及对应的网关数量;根据所述网关数量按照预设规则获取至少两个物理机标识信息。In an embodiment, when the
相应地,处理器802在执行发送创建网关指令至所述物理机标识信息对应 的物理机时,具体执行如下程序:根据每个所述物理机标识信息生成对应的创建网关指令;以及发送所述创建网关指令至所述物理机标识信息对应的物理机,以使得至少两个所述物理机根据所述网关容器创建至少两个所述待配置网关容器。Correspondingly, when executing the sending the creation of the gateway instruction to the physical machine corresponding to the physical machine identification information, the
本领域普通技术人员可以理解的是,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成。计算机程序可存储于一存储介质中,该存储介质为计算机可读存储介质。如本申请实施例中,该计算机程序可存储于计算机设备的存储介质中,该计算机程序包括程序指令,程序指令被该计算机设备中的至少一个处理器执行,以实现包括如上述各方法的实施例的流程步骤。该存储介质可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。It will be understood by those skilled in the art that all or part of the processes in the above embodiments may be implemented by a computer program to instruct related hardware. The computer program can be stored in a storage medium, which is a computer readable storage medium. In an embodiment of the present application, the computer program can be stored in a storage medium of a computer device, the computer program comprising program instructions executed by at least one of the computer devices to implement an implementation comprising the methods as described above. The process steps of the example. The storage medium may be a medium that can store program codes, such as a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现。为了描述的方便和简洁,上述描述的装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。本申请实施例装置中的单元可以根据实际需要进行合并、划分和删减。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. For the convenience and simplicity of the description, the specific working process of the device and the unit described above may be referred to the corresponding process in the foregoing method embodiment, and details are not described herein again. The steps in the method of the embodiment of the present application may be sequentially adjusted, merged, and deleted according to actual needs. The units in the apparatus of the embodiment of the present application may be combined, divided, and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,终端,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。The integrated unit can be stored in a storage medium if it is implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present application may be in essence or part of the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. There are a number of instructions for causing a computer device (which may be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any equivalents can be easily conceived by those skilled in the art within the technical scope disclosed in the present application. Modifications or substitutions are intended to be included within the scope of the present application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
Claims (20)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810030222.6A CN108234215B (en) | 2018-01-12 | 2018-01-12 | Gateway creating method and device, computer equipment and storage medium |
| CN201810030222.6 | 2018-01-12 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019136798A1 true WO2019136798A1 (en) | 2019-07-18 |
Family
ID=62640331
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/077130 Ceased WO2019136798A1 (en) | 2018-01-12 | 2018-02-24 | Gateway creation method and device, computer device and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108234215B (en) |
| WO (1) | WO2019136798A1 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110275776B (en) * | 2019-05-17 | 2024-05-31 | 平安科技(深圳)有限公司 | Container application shrinking method and device, computer equipment and storage medium |
| CN111459605A (en) * | 2020-02-26 | 2020-07-28 | 浙江工业大学 | A Docker-based edge computing gateway virtualization method |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8630296B2 (en) * | 2006-07-20 | 2014-01-14 | Oracle America, Inc. | Shared and separate network stack instances |
| CN105591820A (en) * | 2015-12-31 | 2016-05-18 | 北京轻元科技有限公司 | A highly scalable container network management system and method |
| CN105978781A (en) * | 2016-06-28 | 2016-09-28 | 浪潮电子信息产业股份有限公司 | Method and system for establishing network connection of Docker container, and client side |
| US9577916B1 (en) * | 2015-12-03 | 2017-02-21 | International Business Machines Corporation | Gateway flow plugin containers |
| US20170098092A1 (en) * | 2015-10-06 | 2017-04-06 | Symantec Corporation | Techniques for generating a virtual private container |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10467421B2 (en) * | 2015-10-23 | 2019-11-05 | Oracle International Corporation | Establishing trust between containers |
| CN106169994B (en) * | 2016-06-29 | 2019-02-26 | 中国联合网络通信集团有限公司 | Security control method and device for communication between containers |
| CN106302448B (en) * | 2016-08-15 | 2020-03-13 | 中国联合网络通信集团有限公司 | Remote access control method and device |
-
2018
- 2018-01-12 CN CN201810030222.6A patent/CN108234215B/en active Active
- 2018-02-24 WO PCT/CN2018/077130 patent/WO2019136798A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8630296B2 (en) * | 2006-07-20 | 2014-01-14 | Oracle America, Inc. | Shared and separate network stack instances |
| US20170098092A1 (en) * | 2015-10-06 | 2017-04-06 | Symantec Corporation | Techniques for generating a virtual private container |
| US9577916B1 (en) * | 2015-12-03 | 2017-02-21 | International Business Machines Corporation | Gateway flow plugin containers |
| CN105591820A (en) * | 2015-12-31 | 2016-05-18 | 北京轻元科技有限公司 | A highly scalable container network management system and method |
| CN105978781A (en) * | 2016-06-28 | 2016-09-28 | 浪潮电子信息产业股份有限公司 | Method and system for establishing network connection of Docker container, and client side |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108234215B (en) | 2019-12-31 |
| CN108234215A (en) | 2018-06-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105743995B (en) | System and method for transplantable high-availability deployment and management of container cluster | |
| US11121906B2 (en) | Data plane API in a distributed computing network | |
| EP3316532A1 (en) | Computer device, system and method for implementing load balancing | |
| US8769040B2 (en) | Service providing system, a virtual machine server, a service providing method, and a program thereof | |
| US10313424B2 (en) | Cloud application processing method, cloud application deployment method, and related apparatus and system | |
| CN110224860B (en) | Load balancing application creation method and device, computer equipment and storage medium | |
| WO2019237588A1 (en) | Linux virtual server creation method, device, computer device and storage medium | |
| US11422843B2 (en) | Virtual machine migration method and apparatus having automatic user registration at a destination virtual machine | |
| WO2019237586A1 (en) | Method and apparatus for managing scheduled tasks, computer device and storage medium | |
| WO2019237584A1 (en) | Container management method, device, computer apparatus, and storage medium | |
| US20180349128A1 (en) | Containerized upgrade in operating system level virtualization | |
| US10884880B2 (en) | Method for transmitting request message and apparatus | |
| CN108984266A (en) | A kind of management method of virtual machine, apparatus and system | |
| CN108933844B (en) | Method and equipment for providing DHCP service | |
| EP3879875A1 (en) | Resource change method and device, apparatus, and storage medium | |
| WO2016155291A1 (en) | Method and apparatus for managing virtualized network function scaling | |
| WO2020232890A1 (en) | Load balancing application creation method and device, computer device and storage medium | |
| EP2822221B1 (en) | Processing method and processing device for automatically setting network access mode | |
| WO2019136798A1 (en) | Gateway creation method and device, computer device and storage medium | |
| CN109120680B (en) | Control system, method and related equipment | |
| CN111367722A (en) | Virtual machine backup method, device, equipment and readable storage medium | |
| CN105094947B (en) | The quota management method and system of a kind of virtual computing resource | |
| CN110058866B (en) | Cluster component installation method and equipment | |
| WO2017080499A1 (en) | Management method and device for managing instruction transmission and automatic vnf scaling function | |
| CN111045778B (en) | A method, device, server and storage medium for creating a virtual machine |
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: 18899659 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 13/10/2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18899659 Country of ref document: EP Kind code of ref document: A1 |