WO2020233002A1 - 容器实例ip切换方法、装置、计算机设备及存储介质 - Google Patents
容器实例ip切换方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2020233002A1 WO2020233002A1 PCT/CN2019/117360 CN2019117360W WO2020233002A1 WO 2020233002 A1 WO2020233002 A1 WO 2020233002A1 CN 2019117360 W CN2019117360 W CN 2019117360W WO 2020233002 A1 WO2020233002 A1 WO 2020233002A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- ips
- container instance
- container
- load balancing
- 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/5083—Techniques for rebalancing the load in a distributed system
-
- 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/4557—Distribution of virtual machine instances; Migration and load balancing
-
- 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/45595—Network integration; Enabling network access in virtual machine instances
Definitions
- This application relates to the field of cloud computing technology, and in particular to a container instance IP switching method, device, computer equipment, and storage medium.
- grayscale release is mainly to select some users according to certain strategies, and let these users experience the new version of the application first. By collecting feedback from these users on the new version of the application and commenting on the new version's functions, performance, stability and other indicators, And then decided to continue to enlarge the scope of the new version until the full upgrade or roll back to the old version. In this way, the new version of the application corresponding to the grayscale release is called the grayscale application, which can be tested on the grayscale application.
- the load balancing application of the original application and the gray-scale application corresponds to two different configuration files and two different domain names (from the perspective of resource allocation, it can also be understood that the original application and the gray-scale application are different applications. Any association).
- a user visits the application including the original application and the grayscale application
- you want to test the grayscale application you need to modify the corresponding configuration file, modify the routing, etc. to achieve it.
- the modification requires high professional knowledge, and the modification content is cumbersome, requires a lot of time and cost, and is prone to errors.
- the embodiments of the application provide a container instance IP switching method, device, computer equipment, and storage medium, which can access the original application through the original application's access domain name without modifying the configuration file of the original application, and can also access Grayscale application.
- an embodiment of the present application provides a container instance IP switching method, the method includes:
- the preset rule determines a first preset number of IPs from the container instance IPs of the original application, where the first preset number is less than the number of container instances of the original application; the determined first preset is disabled The number of IPs and the container instance corresponding to the first preset number of IPs, wherein the disabled IPs of the first preset number are recycled into a preset IP address pool;
- the second preset number of IPs to be activated is determined from the container instance IPs of the original application disabled by the preset IP address pool, where the second preset number is less than or equal to the number of disabled IPs;
- the information of the grayscale application allocates the IP to be activated to the newly added container instance of the grayscale application, so that both the original application and the grayscale application can be accessed through the access domain name of the
- an embodiment of the present application provides a container instance IP switching device, and the container instance IP switching device includes a unit corresponding to the method described in the first aspect.
- an embodiment of the present application provides a computer device that includes a memory and a processor connected to the memory; the memory is used to store a computer program, and the processor is used to run the memory A computer program stored in the computer program to perform the method described in the first aspect above.
- an embodiment of the present application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, implements the method described in the first aspect.
- the embodiment of the application does not need to modify the configuration file of the original application (the container instance IP of the configuration file is still the original IP, but the application corresponding to this IP includes the original application and grayscale application), and there is no need to modify the load balance corresponding to the original application.
- the domain name of the application the user uses the corresponding domain name and URL of the original application, that is, the user uses the same domain name or the same URL to access both the original application and the gray-scale application, which can facilitate the test of the gray-scale application.
- the switching speed of switching the container instance and IP of the disabled original application to the gray scale application is very fast, and can reach the second-level switching, which improves the efficiency and speed of switching the container instance and the IP of the container instance.
- Fig. 1 is a schematic flowchart of a container instance IP switching method provided by an embodiment of the present application
- FIG. 2 is a schematic diagram of a sub-flow of a container instance IP switching method provided by an embodiment of the present application
- FIG. 3 is a schematic diagram of a sub-flow of a container instance IP switching method provided by an embodiment of the present application
- FIG. 4 is a schematic flowchart of a container instance IP switching method provided by another embodiment of the present application.
- FIG. 5 is a schematic block diagram of a container instance IP switching device provided by an embodiment of the present application.
- Fig. 6 is a schematic block diagram of a disabling unit provided by an embodiment of the present application.
- FIG. 7 is a schematic block diagram of an enabling unit provided by an embodiment of the present application.
- Fig. 8 is a schematic block diagram of a computer device provided by an embodiment of the present application.
- FIG. 1 is a schematic flowchart of a container instance IP switching method provided by an embodiment of the present application. As shown in Figure 1, the method includes S101-S106.
- the server of the PaaS platform stores the container instance IP and the number of container instances created by all applications, so the original application can be directly obtained from the database or file that saves the container instance IP and the number of container instances created by the application
- the container instance IP and the number of container instances, and the information of grayscale applications includes the container instance IP of the gray-scale application, the number of the container instance of the gray-scale application, the application environment of the gray-scale application, and the area of the gray-scale application.
- S102 Use the container instance IP of the original application and the container instance IP of the grayscale application as a preset IP address pool.
- the IP is added to the shared preset IP address pool.
- the IP cannot be occupied by other applications and can only be used The container instance of the original application and the container instance of the grayscale application are used.
- the container instance IP of the original application and the container instance IP of the grayscale application are set to share the default IP address pool because, in general, after the container instance IP of an application is disabled, it will be recycled to the idle IP address pool, and idle
- the IP of the IP address pool can be assigned to any container application. In this way, if the container instance IP of the original application or the container instance IP of the grayscale application is deactivated, the deactivated IP is recycled to the free IP address pool and no longer belongs to the original application or the grayscale application.
- the default The IP in the IP address pool only belongs to the container instance of the original application and the container instance of the grayscale application, and will not be occupied by other applications.
- S103 Determine a first preset number of IPs from the container instance IPs of the original application according to a first preset rule, where the first preset number is less than the number of container instances of the original application.
- the first preset number of container instance IPs can be randomly determined from the container instance IPs of the original application, or the first preset number of container instance IPs can be determined from the container instance IPs of the original application in the order of the container instance IP allocation.
- the estimated number of user accesses of the grayscale application determines the first preset number of IPs, and the first preset number of IPs is also selected according to other rules.
- the first preset number is less than the number of container instances of the original application.
- the number of container instances of the original application is 8, and the first preset number may be 4, etc.
- the first preset number is less than the number of container instances of the original application in order to retain some container instances of the original application for user access.
- a corresponding management panel may be developed to display the correspondence between the application and the container instance IP of the application on the management panel.
- the original application displayed on the management panel and the container instance IP of the original application are obtained.
- Select a first preset number of container instance IPs according to the first preset rule from the displayed container instance IPs of the original application and receive the first preset number of container instance IPs selected according to the first preset rule as the determined The first preset number of IPs.
- S104 Deactivate the determined first preset number of IPs and the container instance corresponding to the first preset number of IPs, wherein the deactivated first preset number of IPs are recycled to the preset IP address pool. After the first preset number of container instance IPs are determined, the determined container instance IP and the container instance corresponding to the container instance IP are deactivated.
- step S104 includes the following steps S1041-S1044.
- S1041 Set the determined use state identifier of the first preset number of IPs to a disabled state. It should be noted that setting the use state of the first preset number of IP settings to the disabled state means that the IP still belongs to the application and cannot be used by other applications.
- S1042 Destroy the container instances corresponding to the first preset number of IPs. For example, a destruction instruction is issued to the host machine corresponding to the container instance through an orchestration tool, and the destruction instruction, such as a docker stop instruction, will destroy the corresponding container instance on the corresponding host machine. Among them, destroying the container instance can also be understood as shrinking the container instance. Destroying the container instance will release all the resources occupied by the container instance, such as including environmental information corresponding to the container instance, closing file input and output streams, and closing the connection to the database. , Modify the relevant information of the container instance stored in other databases, etc. Among them, orchestration tools such as marathon and so on.
- orchestration tools such as marathon and so on.
- S1043 Reclaim the IP whose use status is marked as disabled to a preset IP address pool.
- the IP in the preset IP address pool is an IP that can be shared by the original application and the grayscale application.
- the IP whose usage status is marked as disabled cannot be occupied by other applications.
- S1044 Modify the number of container instances of the original application according to the first preset number.
- the modified number of container instances is the number of original container instances of the original application minus the first preset number.
- step S1043 and step S1044 are not strictly limited, and step S1044 can also be executed first and then step S1043.
- S105 Determine a second preset number of IPs to be activated from the container instance IPs of the original application disabled by the preset IP address pool according to a second preset rule, where the second preset number is less than or equal to all The number of disabled IPs.
- the second preset number of container instance IPs can be randomly determined from the container instance IP of the original application whose usage status is identified as disabled in the preset IP address pool, or the container of the original application whose usage status is identified as disabled In the instance IP, the second preset number of container instance IPs, etc. are determined according to the sequence in which the IP usage status identifier changes to the disabled state, and the second preset number of container instance IPs may also be determined according to other rules.
- the second preset number is less than the number of disabled IPs, it means that a part of the disabled IPs will be allocated to the newly added container instances of the grayscale application, which means that the grayscale application needs to add the number of container instances. Less than the number of container instances destroyed by the original application. If the second preset number is equal to the number of disabled IPs, it means that all the disabled IPs are used to allocate the newly added container instances of the grayscale application. That means how many container instances of the original application are destroyed, and how many new container instances need to be added to the grayscale application.
- the disabled IPs in the preset IP address pool may be greater than the first preset number of IPs disabled this time. It can be understood that before this time the container instance IP of the original application was deactivated, the container instance IP of the original application was also deactivated. As a result, the container instance IP of the deactivated original application in the preset IP address pool was greater than the original one. The first preset number of IPs to be disabled at the time.
- the corresponding relationship between the application and the container instance IP of the application and the usage status identifier of the IP can be displayed on the management panel.
- the container IP corresponding to the original application and the gray-scale application and the usage status identifier of the container IP are obtained and displayed on the management panel; the second preset number of IPs to be activated are selected from the IP whose usage status is identified as disabled, Receive the selected IP to be activated as the determined IP to be activated.
- S106 Assign the IP to be activated to the newly added container instance of the grayscale application according to the information of the grayscale application. Therefore, both the original application and the grayscale application can be accessed through the original application's access domain name. After determining the IP to be activated, assign the IP to be activated to the container instance of the newly added grayscale application.
- the S106 includes the following steps S1061-S1063.
- S1061 Determine, according to the information of the gray-scale application and the number of IPs to be activated, the host where the container instance to be added to the gray-scale application is located. Specifically, according to the information of the grayscale application, the area where the container instance of the grayscale application needs to be added is determined, and the host of the same number of container instances for the grayscale application to be added is determined from the area according to the number of IPs to be activated. Host (Host IP). Among them, the number of hosts is the same as the number of newly added container instances, and the number of newly added container instances is the same as the number of IPs that need to be enabled.
- S1062 Create a container instance of the grayscale application on the determined host computer. Specifically, the new command is sent to the orchestration tool to push the new command to the corresponding host computer through the orchestration tool, and the container instance corresponding to the grayscale application is created on the corresponding host computer through the new command.
- the new command includes information such as application mirroring of grayscale applications.
- the layout tools of different regions are different, and the layout tools that need to be used are determined according to the region where the grayscale is located.
- the orchestration tool is located in the same area as the grayscale application, and is also located in the same area as the host of the newly added container instance of the grayscale application, which improves the speed of the newly added container instance.
- the container instance of is used as a new container instance for grayscale applications.
- S1063 Assign the IP to be activated to the newly created container instance of the grayscale application. Specifically, an operation and maintenance tool such as ansible is used to connect the container instance, and the created container instance is bound to the IP to be enabled.
- the number of container instances of the original application is 8, and the number of container instances of the gray-scale application is 1 (assuming this 1 container instance is the container instance created by default).
- Use the IP of the container instance of the original application and the IP of the container instance of the grayscale application as the preset IP address pool set the container instance of the original application and the container instance of the grayscale application to share the preset IP address pool, and the preset IP address pool
- the number of IPs in is 9. If the first preset number is 3, determine 3 IP addresses from the container instance IP of the original application, destroy the container instance corresponding to the 3 IP addresses, and reclaim the 3 IP addresses to the preset IP address Pool.
- the second preset number is determined (less than or equal to the first preset number), and the second preset number may be 1, or 2 or 3. If the second preset number is 3, it can be understood that all recovered IP will be reused. Add 3 new container instances for grayscale applications, and assign 3 recovered IPs to 3 container instances for grayscale applications. In this way, it can also be simply understood as switching the 3 container instances and container instance IP of the original application to grayscale applications. In this way, there is no change when the user visits. You can access 5 container instances of the original application and 3 new container instances of the gray-scale application through the same URL or domain name (access domain name of the original application). The access domain name of the application can access both the original application and the grayscale application. It should be pointed out that the user will not access the container instance created by the grayscale application by default when accessing through the access domain name of the original application, that is, will not access the original container instance of the grayscale application.
- the above method embodiment disables the container instance of the original application and the container instance IP, and adds the container instance of the gray-scale application.
- the preset IP address pool shared by the original application and the container instance of the gray-scale application, from the preset IP address
- the pool obtains the disabled container instance IP, determines the second preset number of IPs from the disabled container instance IP, and allocates the second preset number of IPs to the newly added container instance of the grayscale application. In this way, the container instance and the container instance IP of the deactivated original application are switched to the grayscale application.
- the container instance IP of the configuration file is still the original IP, but the application corresponding to the IP includes the original application and the grayscale application
- the domain name of the load balancing application the user uses the corresponding domain name and URL of the original application, that is, the user uses the same domain name or the same URL, and can access both the original application and the gray-scale application, which can facilitate the gray-scale application test.
- the switching speed of switching the container instance and the container instance IP of the disabled original application to the gray-scale application is very fast, and can reach the second-level switching, which improves the efficiency and efficiency of switching the container container and the container instance IP. speed.
- the container instance IP switching method may only include steps S101, S103-S106.
- the IP in the preset IP address pool is understood to include the IP of the container instance of the original application that is disabled.
- the IP in the preset IP address pool is an IP dedicated to the application.
- the IP in the preset IP address pool can only be used by the application, such as the original application and the gray-scale application. In this way, the reclaimed IP of the container instance of the original application will not be reclaimed by the idle IP address pool.
- the grayscale application is tested, the grayscale application is released to the production environment, and the above-mentioned embodiments are also applicable to this case. It can be understood that some users are suitable for the version of the grayscale application, and some users are still suitable for the version of the original application.
- the configuration file of the load balancing application corresponding to the original application can be modified to control the user's access. Specifically, as shown in FIG. 1, this embodiment further includes steps S107-S108.
- the load balancing application types of the original application include F5, LVS, Haproxy, Nginx, etc.
- the load balancing application type of the original application can be obtained in the PaaS platform database.
- S108 According to the type of the load balancing application of the original application, obtain the configuration file of the load balancing application in a manner matching the type, and add an access control configuration code to the configuration file.
- the access control configuration The code is used to determine the user type according to the user access request, and determine whether to switch the user access request to the original application or the grayscale application according to the application type.
- F5 load balancing applications are hard load balancing applications, which are created on specific F5 devices, while LVS, Haproxy, and Nginx load balancing applications are soft load balancing applications, so F5 load balancing applications and LVS, Haproxy, Nginx load balancing
- LVS, Haproxy, Nginx load balancing applications are soft load balancing applications, so F5 load balancing applications and LVS, Haproxy, Nginx load balancing
- step S108 includes: if the type of the load balancing application is F5, determining the F5 device where the F5 load balancing application is located according to the original application; obtaining the F5 load balancing application's information on the F5 device Configuration file, and adding access control configuration code to the configuration file.
- the corresponding load balancing application container is determined according to the original application, where the non-F5 load balancing application is LVS load balancing application, Haproxy load balancing application or Nginx load balancing application;
- the configuration file is obtained from the container of the load balancing application, and the obtained configuration file is downloaded locally;
- the access control configuration code is added to the configuration file;
- the configuration file with the access control configuration code added is pushed to the corresponding load balancing application In the container; restart the load balancing service of the corresponding load balancing application container to make the configuration file added to the access control configuration code take effect.
- the type of the load balancing application is not F5
- determine the corresponding load balancing application container according to the original application and obtain the configuration file of the load balancing application from the load balancing application container; Download the configuration file to a local preset directory.
- downloading the obtained configuration file locally to modify the configuration file is to consider if the configuration file is modified in the process If the network is interrupted, the rewriting process will also be interrupted, that is, to eliminate the impact of unexpected situations in the remote rewriting process on the rewriting.
- rewriting the configuration file locally is faster than rewriting the configuration file remotely. fast.
- the access control configuration code can implement the functions exemplified below, but it should be pointed out that the functions exemplified below are only examples, and the access control configuration code in the embodiments of the present application can also implement other functions.
- the access control configuration code can be realized: judge whether the user is a new user or a VIP user according to the user information of the user's access request; if the user is a new user or a VIP user, switch the user access request to the gray application, that is, The user allocates the IP address corresponding to the gray-scale application to provide services to the user through the container instance corresponding to the IP address; if the user is not a new user or VIP user, the user access request is switched to the original application, which is the The user allocates the IP address corresponding to the original application to provide services to the user through the container corresponding to the IP address.
- VIP users and new users use grayscale applications, and ordinary users use the original application.
- the access control configuration code can be realized: the user is determined to be a mobile user, a Unicom user, or a telecommunications user according to the IP information of the user's access request. If the user is a mobile user, switch the user access request to the grayscale application; if the user is a Unicom user or The telecommunications user switches the user access request to the original application. It can be understood that the services provided to mobile users are different from those of China Unicom users and telecom users, or it can be understood that certain functions have been added to mobile users, but there is no need for China Unicom users and telecom users to add corresponding functions. .
- This embodiment can implement access control flexibly. Whether the user access request is switched to the grayscale application or the original application can be determined according to the user type, which realizes the access control of the grayscale application and the original application and improves the user experience.
- the container instance IP switching method includes S201-S210.
- steps S203-S210 correspond to steps S101-S108 in the embodiment of FIG. 1.
- S201-S202 will be described in detail below.
- S201 Clone the original application, and on the basis of the cloned original application version, add codes corresponding to the new function or the improved function to generate a gray-scale application image.
- Clone the original application including the code of the original application, the configuration file, the system file, the allocated memory and the number of CPUs and so on.
- Clone the original version of the application to get an application that is exactly the same as the original application.
- code corresponding to new or improved functions is added to generate a gray-scale application mirror.
- S202 According to the creation area of the container instance of the original application and the gray-scale application mirroring, create a container instance of the gray-scale application in the area under the test environment, and the container instance of the gray-scale application includes the gray-scale application.
- the original application can provide services externally, so the original application has created a corresponding container instance and a load balancing application corresponding to the original application. In this way, the creation area of the original application container instance can be obtained, where the creation area refers to the location of the computer room of the created container instance, etc.
- each different computer room corresponds to a mirror warehouse of different application environments, such as development environment (the container instance of the application is successfully created for internal development and use), production environment (meaning that the container instance of the application is created After success, it is connected to the external environment, or for external users to access), test environment (meaning that the container instance of the application is successfully created for testing).
- development environment the container instance of the application is successfully created for internal development and use
- production environment meaning that the container instance of the application is created After success, it is connected to the external environment, or for external users to access
- test environment meaning that the container instance of the application is successfully created for testing).
- the load balancing application corresponding to the grayscale application will be created at the same time as the container instance of the grayscale application is created, and the created The relationship between the gray scale application and the created load balancing application will automatically generate the created configuration file of the load balancing application and the domain name corresponding to the load balancing application. If in the process of creating a container instance of a grayscale application, no load balancing application is selected, after the container instance of the grayscale application is created, a load balancing application will be created for the grayscale application. When the load balancing application of the gray scale application is created, the configuration file of the created load balancing application and the domain name corresponding to the load balancing application are automatically generated.
- This embodiment further defines how to create a container instance of a grayscale application.
- Fig. 5 is a schematic block diagram of a container instance IP switching device provided by an embodiment of the present application.
- the device includes a unit for executing the IP switching method of the container instance.
- the device 100 includes an IP acquisition unit 101, an address pool determination unit 102, a deactivation IP determination unit 103, a deactivation unit 104, an activation IP determination unit 105, and an activation unit 106.
- the IP obtaining unit 101 is used to obtain the container instance IP and the number of container instances of the original application, and the information of the grayscale application, wherein the information of the grayscale application includes the container instance IP of the grayscale application, and the grayscale application is An application generated after adding a new function or an improved function to the version of the original application.
- the address pool determining unit 102 is configured to use the container instance IP of the original application and the container instance IP of the grayscale application as a preset IP address pool.
- the deactivated IP determining unit 103 is configured to determine a first preset number of IPs from the container instance IPs of the original application according to a first preset rule, where the first preset number is smaller than the container of the original application Number of instances.
- the deactivation unit 104 is configured to deactivate the determined first preset number of IPs and the container instance corresponding to the first preset number of IPs, where the deactivated first preset number of IPs Reclaimed to the default IP address pool.
- the deactivation unit 104 includes: an IP status setting unit 1041, a destruction unit 1042, a recovery unit 1043, and a quantity modification unit 1044.
- the IP status setting unit 1041 is configured to set the determined use status identifier of the first preset number of IPs as a disabled status.
- the destruction unit 1042 is configured to destroy the container instance corresponding to the first preset number of IPs.
- the reclaiming unit 1043 is configured to reclaim the IP whose use status is marked as inactive to a preset IP address pool.
- the quantity modification unit 1044 is configured to modify the quantity of container instances of the original application according to the first preset quantity.
- the activation IP determining unit 105 is configured to determine a second preset number of IPs to be activated from among the container instance IPs of the original application disabled by the preset IP address pool according to a second preset rule, wherein the second preset Set the number to be less than or equal to the number of disabled IPs.
- the activation unit 106 is configured to assign the IP to be activated to the newly-added container instance of the gray-scale application according to the information of the gray-scale application, so that the original application can be accessed through the access domain name of the original application, and the gray-scale can also be accessed. application.
- the activation unit 106 includes a host determination unit 1061, a creation unit 1062, and an allocation activation unit 1063.
- the host determining unit 1061 is configured to determine the host where the container instance to be added to the grayscale application is located according to the information of the grayscale application and the number of IPs to be activated.
- the creating unit 1062 is configured to create a container instance of the grayscale application on the determined host computer.
- the allocation enabling unit 1063 is configured to allocate the IP to be enabled to the newly created container instance of the grayscale application.
- the container instance IP switching device 100 may only include the IP obtaining unit 101, the deactivated IP determining unit 103, the deactivated unit 104, the activated IP determining unit 105, and the activation unit 106.
- the container instance IP switching device 100 further includes a load type determination unit 107 and a control configuration unit 108. among them,
- the load type determining unit 107 is configured to, if an access control modification instruction is received, obtain the load balancing application of the original application, and detect the type of the load balancing application of the original application.
- the control configuration unit 108 is configured to obtain the configuration file of the load balancing application in a manner matching the type according to the type of the load balancing application of the original application, and add an access control configuration code to the configuration file,
- the access control configuration code is used to determine the user type according to the user access request, and determine whether to switch the user access request to the original application or the gray-scale application according to the user type.
- control configuration unit 108 includes a device determination unit, a configuration code adding unit, a container determination unit, a configuration download unit, a push unit, and a restart unit.
- the device determining unit is configured to determine the F5 device where the F5 load balancing application is located according to the original application if the type of the load balancing application is F5;
- the configuration code adding unit is configured to obtain the F5 device on the F5 device F5 load balancing application configuration file, and add access control configuration code to the configuration file.
- the container determining unit is configured to determine the container of the corresponding load balancing application according to the original application if the type of the load balancing application is non-F5, where the non-F5 load balancing application is an LVS load balancing application, a Haproxy load balancing application or Nginx Load balancing application; configuration download unit, used to obtain configuration files from the container of the corresponding load balancing application, and download the obtained configuration files locally; configuration code adding unit, also used to add access control to the configuration file Configuration code; push unit, used to push the configuration file with access control configuration code added to the corresponding load balancing application container; restart unit, used to restart the load balancing service of the corresponding load balancing application container, so as to join The configuration file of the access control configuration code takes effect.
- the container instance IP switching device further includes: a gray-scale mirror generation unit and a gray-scale application creation unit.
- the gray-scale image generation unit is used to clone the original application, and on the basis of the cloned original application version, add codes corresponding to new or improved functions to generate the gray-scale application image.
- the gray-scale application creation unit is configured to create a gray-scale application container instance in the area under the test environment according to the creation area of the original application container instance and the gray-scale application mirroring, and the gray-scale application container The instance includes the container instance IP and the number of container instances of the grayscale application.
- FIG. 8 is a schematic block diagram of a computer device provided by an embodiment of the application.
- the equipment is a terminal and other equipment, such as a server in the PaaS platform.
- the device 200 includes a processor 202, a memory, and a network interface 203 connected through a system bus 201, where the memory may include a non-volatile storage medium 204 and an internal memory 205.
- the non-volatile storage medium 204 can store an operating system 2041 and a computer program 2042.
- the aforementioned container instance IP switching method can be implemented.
- the processor 202 is used to provide computing and control capabilities, and support the operation of the entire device 200.
- the internal memory 205 provides an environment for the running of the computer program in the non-volatile storage medium.
- the processor 202 can make the processor 202 execute the aforementioned container instance IP switching method.
- the network interface 203 is used for network communication.
- the structure shown in the figure is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the device to which the solution of the present application is applied.
- the specific device may include a diagram More or fewer components are shown in, or some components are combined, or have different component arrangements.
- the processor 202 is configured to run a computer program stored in a memory to implement any embodiment of the IP switching method of the container instance of this application.
- the application also provides a storage medium.
- the storage medium may be a computer-readable storage medium, and the computer-readable storage medium includes a non-volatile computer-readable storage medium.
- the storage medium stores a computer program that, when executed by a processor, implements any embodiment of the IP switching method of the container instance of the present application.
- the storage medium is a physical, non-transitory storage medium, such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk or an optical disk, and other physical storage that can store computer programs. medium.
- ROM Read-Only Memory
- the above are only specific implementations of this application, but the protection scope of this application is not limited to this.
- Teen familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本申请实施例提供一种容器实例IP切换方法、装置、计算机设备及存储介质,其涉及云计算技术领域,可应用于PaaS平台中。所述方法包括:停用原应用的部分容器实例,以及该部分容器实例的IP,再新增灰度应用的容器实例,该部分容器实例的IP回收到预设IP地址池,从预设IP地址池所停用的IP中获取第二预设数量的IP,并将第二预设数量的IP分配给灰度应用新增的容器实例。如此,实现了将停用的原应用的容器实例以及容器实例IP切换到灰度应用,通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。
Description
本申请要求于2019年05月17日提交中国专利局、申请号为201910413829.7、申请名称为“容器实例IP切换方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及云计算技术领域,尤其涉及一种容器实例IP切换方法、装置、计算机设备及存储介质。
若一个应用在原版本的基础上添加了新功能或者改进了原版本的某些功能,那么会涉及到灰度发布。灰度发布主要是按照一定策略选取部分用户,让这部分用户先行体验的新版本的应用,通过收集这部分用户对新版本应用的反馈以及对新版本功能、性能、稳定性等指标进行评论,进而决定继续放大新版本投放范围直至全量升级或回滚至老版本。如此,将灰度发布所对应的新版本的应用称为灰度应用,可以在灰度应用上进行测试。目前发布灰度应用,需要先申请服务器,在服务器上搭建中间件,再发布灰度应用的版本。发布灰度应用的版本时会为该灰度应用创建负载均衡应用,并为该负载均衡应用分配一个配置文件和对应的域名等。如此,原应用和灰度应用的负载均衡应用对应两个不同的配置文件和两个不同的域名(从资源分配上看,也可以理解为,原应用和灰度应用是不同的应用,中间没有任何关联)。而用户来访问该应用(包括原应用和灰度应用)时,使用的是同一个域名,同一个网址。如此,对灰度应用的测试、灰度应用对外提供服务带来诸多不便。如若想实现对灰度应用的测试,需要修改对应的配置文件、修改路由等才可以实现。而修改需要较高的专业知识,且修改的内容多,操作繁琐,需要大量的时间成本,同时很容易出现错误。
发明内容
本申请实施例提供一种容器实例IP切换方法、装置、计算机设备及存储介质,可在无需修改原应用的配置文件的情况下,通过原应用的访问域名,即可访问原应用,又可访问灰度应用。
第一方面,本申请实施例提供了一种容器实例IP切换方法,该方法包括:
获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息,其中,所述灰度应用是在所述原应用的版本上添加新功能或者改进功能之后所生成的应用;根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP,其中,所述第一预设数量小于所述原应用的容器实例数量;停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,其中,所停用的所述第一预设数量的IP被回收到预设IP地址池;根据第二预设规则从预设IP地址池所停用的原应用的容器实例IP中确定第二预设数量的需启用的IP,其中,所述第二预设数量小于或者等于所停用的IP数量;根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例,从而通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。
第二方面,本申请实施例提供了一种容器实例IP切换装置,该容器实例IP切换装置包括用于执行上述第一方面所述的方法对应的单元。
第三方面,本申请实施例提供了一种计算机设备,所述计算机设备包括存储器,以及与所述存储器相连的处理器;所述存储器用于存储计算机程序,所述处理器用于运行所述存储器中存储的计算机程序,以执行上述第一方面所述的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现上述第一方面所述的方法。
本申请实施例无需修改原应用的配置文件(配置文件的容器实例IP仍然是原来的IP,但是该IP所对应的应用包括原应用和灰度应用),也无需修改原应用所对应的负载均衡应用的域名,用户使用原应用的所对应的域名和网址,即用户使用同一个域名或者同一个网址,既可访问原应用,又可访问灰度应用,可方便的进行灰度应用的测试。另外,本申请实施例中将停用的原应用的容器 实例以及IP切换到灰度应用的切换速度非常快,可达到秒级的切换,提高了切换容器实例以及容器实例IP的效率和速度。
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的容器实例IP切换方法的流程示意图;
图2是本申请实施例提供的容器实例IP切换方法的子流程示意图;
图3是本申请实施例提供的容器实例IP切换方法的子流程示意图;
图4是本申请另一实施例提供的容器实例IP切换方法的流程示意图;
图5是本申请实施例提供的容器实例IP切换装置的示意性框图;
图6是本申请实施例提供的停用单元的示意性框图;
图7是本申请实施例提供的启用单元的示意性框图;
图8是本申请实施例提供的计算机设备的示意性框图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
图1是本申请实施例提供的容器实例IP切换方法的流程示意图。如图1所示,该方法包括S101-S106。
S101,获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息,其中,所述灰度应用的信息包括灰度应用的容器实例IP,其中,所述灰度应用是在所述原应用的版本上添加新功能或者改进功能之后所生成的应用。获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息可通过多种方式。一般情况下,在该PaaS平台的服务器中保存有所有应用所创建的容器实例IP和 容器实例数量,如此可从保存应用所创建的容器实例IP和容器实例数量的数据库或者文件中直接获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息。其中,灰度应用的信息包括灰度应用的容器实例IP、灰度应用的容器实例数量、灰度应用的应用环境、灰度应用的区域等信息。
S102,将所述原应用的容器实例IP和灰度应用的容器实例IP作为预设IP地址池。将原应用的容器实例IP和灰度应用的容器实例IP作为预设IP地址池,并设置原应用的容器实例和灰度应用的容器实例共享该预设IP地址池。如此,一旦一个IP被分配给原应用的容器实例和原应用的灰度应用的容器实例,那么该IP加入到共享的预设IP地址池中,同时该IP不能被其他应用占用,只可供原应用的容器实例和灰度应用的容器实例使用。
设置原应用的容器实例IP和灰度应用的容器实例IP共享预设IP地址池是因为,一般情况下,一个应用的容器实例IP被停用之后,会被回收到空闲IP地址池,而空闲IP地址池的IP可以分配给任意一个容器应用使用。如此,若停用原应用的容器实例IP或者灰度应用的容器实例IP之后,停用的IP被回收到空闲IP地址池,不再属于原应用或者灰度应用了。而将原应用的容器实例IP和灰度应用的容器实例IP作为预设IP地址池,并设置原应用的容器实例IP和灰度应用的容器实例IP共享该预设IP地址池,那么预设IP地址池中的IP只属于原应用的容器实例和灰度应用的容器实例,不会被其他应用占用。
S103,根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP,其中,所述第一预设数量小于所述原应用的容器实例数量。如可以从原应用的容器实例IP中随机确定第一预设数量的容器实例IP,也可以从原应用的容器实例IP中按照容器实例IP分配的先后顺序确定第一预设数量的容器实例IP,还可以从原应用的容器实例IP中优先确定不属于同一个网段中的容器实例IP、再按照随机或者容器实例IP分配的选后顺序确定第一预设数量的IP,还可以根据预估的灰度应用的用户访问数量确定第一预设数量的IP,还按照其他的规则选择第一预设数量的IP。其中,第一预设数量小于原应用的容器实例数量,如原应用的容器实例数量为8个,第一预设数量可以为4个等。其中,第一预设数量小于原应用的容器实例数量,是为了保留原应用的部分容器实例,以供用户访问。
在一实施例中,可开发一个对应的管理面板,以在管理面板上显示应用与应用的容器实例IP的对应关系。如此,获取在管理面板上显示的原应用以及原应用的容器实例IP。从显示的原应用的容器实例IP中按照第一预设规则选择第一预设数量的容器实例IP,并接收按照第一预设规则选择的第一预设数量的容器实例IP作为所确定的第一预设数量的IP。
S104,停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,其中,所停用的所述第一预设数量的IP被回收到预设IP地址池。确定了第一预设数量的容器实例IP后,停用所确定的容器实例IP以及容器实例IP所对应的容器实例。
在一实施例中,如图2所示,步骤S104包括以下步骤S1041-S1044。
S1041,设置所确定的第一预设数量的IP的使用状态标识为停用状态。需要注意的是,将第一预设数量的IP设置的使用状态设置为停用状态,理解为该IP仍然属于该应用,不可以被其他应用使用。
S1042,销毁所述第一预设数量的IP所对应的容器实例。如通过编排工具下发销毁指令到容器实例所对应的宿主机,销毁指令如docker stop指令,在所对应的宿主机上将对应的容器实例进行销毁。其中,销毁容器实例也可理解为缩容容器实例,销毁容器实例将会释放该容器实例所占用的所有资源,如包括容器实例所对应的环境信息、关闭文件输入输出流、关闭与数据库的连接、修改其他数据库中保存的该容器实例的相关信息等。其中,编排工具如marathon等。
需要注意的是,首先停用容器实例的IP再销毁容器实例,而不是先销毁容器实例再停用容器实例的IP,是为了以防容器实例的IP有效,而容器实例无效,原应用的负载均衡应用将接收到的用户访问请求分配到该容器实例,而实际上该容器实例已经无效了,那么会导致用户访问请求的请求失败。
S1043,回收使用状态标识为停用状态的IP到预设IP地址池。需要注意的是,该预设IP地址池中的IP是原应用与灰度应用可共享的IP。在该预设IP地址池中,使用状态标识为停用的IP不能被其他应用占用。
S1044,根据所述第一预设数量修改所述原应用的容器实例数量。其中,修改后的容器实例数量为原应用的原容器实例数量减去第一预设数量。
需要注意的是,步骤S1043与步骤S1044的执行顺序并不严格限制,也可以先执行步骤S1044再执行步骤S1043。
S105,根据第二预设规则从预设IP地址池所停用的原应用的容器实例IP中确定第二预设数量的需启用的IP,其中,所述第二预设数量小于或者等于所停用的IP数量。如可以从预设IP地址池中的使用状态标识为停用的原应用的容器实例IP中随机确定第二预设数量的容器实例IP,也可以从使用状态标识为停用的原应用的容器实例IP中按照IP使用状态标识改变为停用状态的先后顺序确定第二预设数量的容器实例IP等,还可以根据其他的规则确定第二预设数量的容器实例IP。其中,若第二预设数量小于所停用的IP数量,意味着将所停用的一部分IP用来分配给灰度应用新增的容器实例,意味着灰度应用需要新增容器实例的数量小于原应用销毁的容器实例的数量。若第二预设数量等于所停用的IP数量,意味着将所停用的所有IP用来分配给灰度应用新增的容器实例。那么意味着原应用有多少个容器实例销毁,那么灰度应用就需要新增多少个容器实例。
在一实施例中,预设IP地址池中所停用的IP可能大于本次所停用的第一预设数量的IP。那么可以理解为,在本次停用原应用的容器实例IP之前,还停用过原应用的容器实例IP,如此,导致预设IP地址池中所停用的原应用的容器实例IP大于本次所停用的第一预设数量的IP。
在一实施例中,若已开发对应的管理面板,在管理面板上可显示应用与应用的容器实例IP的对应关系、以及IP的使用状态标识。如此,获取并在管理面板上显示原应用和灰度应用所对应的容器IP以及容器IP的使用状态标识;从使用状态标识为停用的IP中选择第二预设数量的需启用的IP,接收所选择的需启用的IP作为所确定的需启用的IP。并从应用信息中选择灰度应用,如根据灰度应用所对应的应用名选择灰度应用,接收所选择的灰度应用,以进一步将需启用的IP分配给灰度应用。
S106,根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例。从而通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。确定了需启用的IP后,将需启用的IP分配给新增的灰度应用的容器实例。
在一实施例中,如图3所示,所述S106包括以下步骤S1061-S1063。
S1061,根据所述灰度应用的信息以及需启用的IP数量确定所述灰度应用需新增的容器实例所在的宿主机。具体地,根据灰度应用的信息确定灰度应用需新增的容器实例所在的区域,根据需启用的IP数量从所述区域中确定相同数量的需新增的灰度应用的容器实例的宿主机(宿主机IP)。其中,宿主机的数量与新增的容器实例的数量相同,新增的容器实例的数量与需启用的IP数量相同。
S1062,在所确定的宿主机上创建所述灰度应用的容器实例。具体地,发送新建命令到编排工具,以通过编排工具推送新建命令到对应的宿主机,并通过新建命令在对应的宿主机上新建灰度应用所对应的容器实例。其中,新建命令中包括有灰度应用的应用镜像等信息。
需要注意的是,不同区域的编排工具是不同的,根据灰度所在的区域确定所需要使用的编排工具。如此,编排工具与灰度应用所在的区域相同,也与新增灰度应用的容器实例的宿主机所在的区域相同,提高了新增容器实例的速度。将新建命令发送到所需要使用的编排工具上,以通过编排工具推送新建命令到对应的宿主机,并在对应的宿主机上创建灰度应用所对应的容器实例,将所创建的灰度应用的容器实例作为灰度应用新增的容器实例。
S1063,将需启用的IP分配给所述灰度应用新创建的容器实例。具体地,通过运维工具如ansible工具去连接容器实例,将所创建的容器实例与需启用的IP进行绑定。
以下举例对本实施例的方案进行简单的说明。如原应用的容器实例数量为8个,灰度应用的容器实例数量为1个(假设该1个容器实例为默认创建的容器实例)。将原应用的容器实例的IP和灰度应用的容器实例的IP作为预设IP地址池,设置原应用的容器实例和灰度应用的容器实例共享该预设IP地址池,预设IP地址池中的IP数量为9个。若第一预设数量为3个,那么从原应用的容器实例IP中确定3个IP地址,销毁该3个IP地址所对应的容器实例,并将该3个IP地址回收到预设IP地址池。确定第二预设数量(小于或者等于第一预设数量),第二预设数量可以为1、或者2或者3。若第二预设数量为3个,那么可理解为所有回收的IP将被重新利用。新增3个灰度应用的容器实例,将3个回收的IP分配给3个灰度应用的容器实例。如此,也可以简单理解为将该 原应用的3个容器实例以及容器实例IP切换到灰度应用。如此,用户访问时不发生任何改变,通过同一个网址或者域名(访问原应用的访问域名)即可访问5个原应用的容器实例和新增的3个灰度应用的容器实例,即通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。需要指出的是,用户通过原应用的访问域名访问时不会访问到灰度应用默认创建的容器实例,即不会访问灰度应用的原容器实例。
上述方法实施例停用原应用的容器实例,以及该容器实例IP,新增灰度应用的容器实例,通过原应用和灰度应用的容器实例共享的预设IP地址池,从预设IP地址池中获取停用的容器实例IP,并从所停用的容器实例IP中确定第二预设数量的IP,将第二预设数量的IP分配给灰度应用新增的容器实例。如此,实现了将停用的原应用的容器实例以及容器实例IP切换到灰度应用。在该实施例中,无需修改原应用的配置文件(配置文件的容器实例IP仍然是原来的IP,但是该IP所对应的应用包括原应用和灰度应用),也无需修改原应用所对应的负载均衡应用的域名,用户使用原应用的所对应的域名和网址,即用户使用同一个域名或者同一个网址,既可访问原应用,又可访问灰度应用,可方便的进行灰度应用的测试。另外,本申请实施例中将停用的原应用的容器实例以及容器实例IP切换到灰度应用的切换速度非常快,可达到秒级的切换,提高了切换容器容器以及容器实例IP的效率和速度。
在一实施例中,该容器实例IP切换方法可只包括步骤S101、S103-S106。如此,对应的,预设IP地址池中的IP理解为包括停用的原应用的容器实例的IP,需要注意的是,预设IP地址池中的IP是专属于该应用的IP。该预设IP地址池中的IP只可供该应用使用,如该原应用和灰度应用使用。如此,回收的原应用的容器实例的IP不会被空闲IP地址池回收。
若灰度应用完成了测试,将灰度应用发布到生产环境,上述所述的实施例同样应用于该种情况。那么可以理解为,有一部分的用户适用于灰度应用的版本,有一部分的用户仍然适用于原应用的版本。
在一实施例中,可通过修改原应用所对应的负载均衡应用的配置文件,以对用户的访问进行控制。具体地,如图1所示,该实施例还包括步骤S107-S108。
S107,若接收到访问控制修改指令,获取所述原应用的负载均衡应用,并 检测所述原应用的负载均衡应用的类型。其中,原应用的负载均衡应用的类型包括F5、LVS、Haproxy、Nginx等。原应用的负载均衡应用的类型可以在PaaS平台数据库中获取。
S108,根据所述原应用的负载均衡应用的类型,通过与所述类型相匹配的方式获取所述负载均衡应用的配置文件并在所述配置文件中加入访问控制配置代码,所述访问控制配置代码用于根据用户访问请求确定用户类型,并根据所述应用类型确定将该用户访问请求切换至所述原应用或所述灰度应用。其中,F5负载均衡应用是硬负载均衡应用,是在具体的F5设备上创建的,而LVS、Haproxy、Nginx负载均衡应用是软负载均衡应用,因此F5负载均衡应用和LVS、Haproxy、Nginx负载均衡应用获取配置文件的方式、对配置文件修改的方式以及使配置文件生效的方式不同。
在一实施例中,步骤S108包括:若所述负载均衡应用的类型为F5,根据所述原应用确定F5负载均衡应用所在的F5设备;在所述F5设备上获取所述F5负载均衡应用的配置文件,并在所述配置文件中加入访问控制配置代码。若所述负载均衡应用的类型为非F5,根据所述原应用确定对应的负载均衡应用的容器,其中非F5负载均衡应用为LVS负载均衡应用、Haproxy负载均衡应用或Nginx负载均衡应用;从对应的负载均衡应用的容器中获取配置文件,将所获取的配置文件下载到本地;在所述配置文件中加入访问控制配置代码;将加入了访问控制配置代码的配置文件推送至对应的负载均衡应用的容器中;重启对应的负载均衡应用的容器的负载均衡服务,以使得加入访问控制配置代码的配置文件生效。
其中,若所述负载均衡应用的类型为非F5,根据原应用确定所对应的负载均衡应用的容器,并从所述负载均衡应用的容器中获取所述负载均衡应用的配置文件;将所获取的配置文件下载到本地的一个预设目录。需要注意的是,将所获取的配置文件下载到本地,以对配置文件进行修改,而不是直接远程在所述负载均衡应用的容器上进行修改,是考虑到若在对配置文件进行修改的过程中,网络出现中断,那么改写的过程也会出现中断,即排除远程改写的过程中出现的意外情况对改写造成的影响,另一方面,在本地改写配置文件比在远程改写配置文件的速度要快。其中,重启LVS负载均衡应用或者Haproxy负载均 衡应用或者Nginx负载均衡应用的服务,可以用restart命令重启所对应的负载均衡应用的服务。
其中,访问控制配置代码可实现如下所例举的功能,但是需要提出的是,以下例举的功能只是示例,本申请实施例中的访问控制配置代码还可以实现其他的功能。
如访问控制配置代码可实现:根据用户访问请求的用户信息判断该用户是否为新用户或者VIP用户;若该用户为新用户或者VIP用户,将该用户访问请求切换至灰度应用,即为该用户分配灰度应用所对应的IP地址,以通过该IP地址所对应的容器实例为用户提供服务;若该用户不为新用户或者VIP用户,将该用户访问请求切换至原应用,即为该用户分配原应用所对应的IP地址,以通过该IP地址所对应的容器为用户提供服务。可以理解为VIP用户和新用户使用灰度应用,普通用户使用原应用。
如访问控制配置代码可实现:根据用户访问请求的IP信息确定用户是移动用户、联通用户、电信用户,若用户为移动用户,将该用户访问请求切换至灰度应用,若用户为联通用户或者电信用户,将该用户访问请求切换至原应用。可以理解为,为移动用户所提供服务是不同于联通用户和电信用户的,或者也可以理解为,为移动用户新增了某些功能,但是联通用户和电信用户没必要新增所对应的功能。
该实施例可灵活的实现访问控制。可根据用户类型确定将用户访问请求切换至灰度应用还是原应用,实现了灰度应用和原应用的访问控制,提高了用户体验。
在一实施例中,如图4所示,所述容器实例IP切换方法包括S201-S210。其中,步骤S203-S210与图1实施例中的步骤S101-S108相对应,具体请参看图1实施例中的描述,下面将具体介绍S201-S202。
S201,克隆原应用,并在克隆的原应用版本的基础上,添加新功能或者改进功能所对应的代码,以生成灰度应用镜像。克隆原应用,包括克隆原应用的代码,原应用所对应的配置文件、系统文件、分配的内存和CPU个数等等。克隆原版本的应用,以得到一个与原应用完全相同的应用。在该克隆的原应用版本的基础上,添加新功能或者改进功能所对应的代码,以生成灰度应用镜像。
S202,根据所述原应用的容器实例的创建区域以及所述灰度应用镜像,在测试环境下所述区域中创建灰度应用的容器实例,所述灰度应用的容器实例包括所述灰度应用的容器实例IP和容器实例数量。需要注意的是,原应用是可以对外提供服务的,因此原应用已经创建了对应的容器实例以及原应用所对应的负载均衡应用。如此,可获取原应用容器实例的创建区域,其中,创建区域指的是所创建的容器实例的机房位置等。在灰度应用通过简单测试(如开发人员的简单测试)后,将灰度应用推送到测试环境下与原应用容器实例创建区域相同区域下的灰度应用所对应的镜像仓库中。需要注意的是,每个不同的机房中会对应有不同应用环境的镜像仓库,如开发环境(该应用的容器实例创建成功后供内部开发使用)、生产环境(意味着该应用的容器实例创建成功后对接外部环境,或者供外部用户进行访问)、测试环境(意味着该应用的容器实例创建成功后供测试使用)。在创建灰度应用的容器实例时,可根据设置灰度应用容器实例数量(如果不进行设置,那么会使用默认的值,默认的值为1,即默认的灰度应用容器实例数量为1)并从对应镜像仓库中选择的灰度应用镜像,在所述区域创建对应数量的容器实例,并为所创建的容器实例分配相同数量的容器实例IP。
另外,若在创建灰度应用的容器实例的过程中,选择了创建负载均衡应用,那么会在创建灰度应用的容器实例的同时创建灰度应用所对应的负载均衡应用,并设置所创建的灰度应用和所创建的负载均衡应用的关联关系,同时会自动生成所创建的负载均衡应用的配置文件以及负载均衡应用所对应的域名。若在创建灰度应用的容器实例的过程中,没有选择创建负载均衡应用,那么在灰度应用的容器实例创建完成后,会为该灰度应用创建负载均衡应用。创建该灰度应用的负载均衡应用时会自动生成所创建的负载均衡应用的配置文件以及负载均衡应用所对应的域名。
该实施例进一步限定如何创建灰度应用的容器实例。
图5是本申请实施例提供的容器实例IP切换装置的示意性框图。该装置包括用于执行上述容器实例IP切换方法所对应的单元。具体地,如图5所示,该装置100包括IP获取单元101、地址池确定单元102、停用IP确定单元103、停用单元104、启用IP确定单元105、启用单元106。
IP获取单元101,用于获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息,其中,所述灰度应用的信息包括灰度应用的容器实例IP,所述灰度应用是在所述原应用的版本上添加新功能或者改进功能之后所生成的应用。地址池确定单元102,用于将所述原应用的容器实例IP和灰度应用的容器实例IP作为预设IP地址池。停用IP确定单元103,用于根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP,其中,所述第一预设数量小于所述原应用的容器实例数量。停用单元104,用于停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,其中,所停用的所述第一预设数量的IP被回收到预设IP地址池。
在一实施例中,如图6所示,停用单元104包括:IP状态设置单元1041、销毁单元1042、回收单元1043、数量修改单元1044。其中,IP状态设置单元1041,用于设置所确定的第一预设数量的IP的使用状态标识为停用状态。销毁单元1042,用于销毁所述第一预设数量的IP所对应的容器实例。回收单元1043,用于回收使用状态标识为停用状态的IP到预设IP地址池。数量修改单元1044,用于根据所述第一预设数量修改所述原应用的容器实例数量。
启用IP确定单元105,用于根据第二预设规则从预设IP地址池所停用的原应用的容器实例IP中确定第二预设数量的需启用的IP,其中,所述第二预设数量小于或者等于所停用的IP数量。启用单元106,用于根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例,从而通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。
在一实施例中,如图7所示,启用单元106包括宿主机确定单元1061、创建单元1062、分配启用单元1063。其中,宿主机确定单元1061,用于根据所述灰度应用的信息以及需启用的IP数量确定所述灰度应用需新增的容器实例所在的宿主机。创建单元1062,用于在所确定的宿主机上创建所述灰度应用的容器实例。分配启用单元1063,用于将需启用的IP分配给所述灰度应用新创建的容器实例。
在一实施例中,该容器实例IP切换装置100可只包括IP获取单元101、停用IP确定单元103、停用单元104、启用IP确定单元105、启用单元106。
在一实施例中,如图5所示,所述容器实例IP切换装置100还包括负载类 型确定单元107、控制配置单元108。其中,
负载类型确定单元107,用于若接收到访问控制修改指令,获取所述原应用的负载均衡应用,并检测所述原应用的负载均衡应用的类型。控制配置单元108,用于根据所述原应用的负载均衡应用的类型,通过与所述类型相匹配的方式获取所述负载均衡应用的配置文件并在所述配置文件中加入访问控制配置代码,所述访问控制配置代码用于根据用户访问请求确定用户类型,并根据所述用户类型确定将该用户访问请求切换至所述原应用或所述灰度应用。
在一实施例中,控制配置单元108包括设备确定单元、配置代码加入单元、容器确定单元、配置下载单元、推送单元以及重启单元。其中,设备确定单元,用于若所述负载均衡应用的类型为F5,根据所述原应用确定F5负载均衡应用所在的F5设备;配置代码加入单元,用于在所述F5设备上获取所述F5负载均衡应用的配置文件,并在所述配置文件中加入访问控制配置代码。容器确定单元,用于若所述负载均衡应用的类型为非F5,根据所述原应用确定对应的负载均衡应用的容器,其中非F5负载均衡应用为LVS负载均衡应用、Haproxy负载均衡应用或Nginx负载均衡应用;配置下载单元,用于从对应的负载均衡应用的容器中获取配置文件,将所获取的配置文件下载到本地;配置代码加入单元,还用于在所述配置文件中加入访问控制配置代码;推送单元,用于将加入了访问控制配置代码的配置文件推送至对应的负载均衡应用的容器中;重启单元,用于重启对应额负载均衡应用的容器的负载均衡服务,以使得加入访问控制配置代码的配置文件生效。
在一实施例中,所述容器实例IP切换装置还包括:灰度镜像生成单元、灰度应用创建单元。其中,灰度镜像生成单元,用于克隆原应用,并在克隆的原应用版本的基础上,添加新功能或者改进功能所对应的代码,以生成灰度应用镜像。灰度应用创建单元,用于根据所述原应用的容器实例的创建区域以及所述灰度应用镜像,在测试环境下所述区域中创建灰度应用的容器实例,所述灰度应用的容器实例包括所述灰度应用的容器实例IP和容器实例数量。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述装置和各单元的具体实现过程,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
上述装置可以实现为一种计算机程序的形式,计算机程序可以在如图8所示的计算机设备上运行。图8为本申请实施例提供的一种计算机设备的示意性框图。该设备为终端等设备,如PaaS平台中的服务器等。该设备200包括通过系统总线201连接的处理器202、存储器和网络接口203,其中,存储器可以包括非易失性存储介质204和内存储器205。
该非易失性存储介质204可存储操作系统2041和计算机程序2042。该非易失性存储介质中所存储的计算机程序2042被处理器202执行时,可实现上述所述的容器实例IP切换方法。该处理器202用于提供计算和控制能力,支撑整个设备200的运行。该内存储器205为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器202执行时,可使得处理器202执行上述所述的容器实例IP切换方法。该网络接口203用于进行网络通信。本领域技术人员可以理解,图中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的设备的限定,具体的设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器202用于运行存储在存储器中的计算机程序,以实现本申请容器实例IP切换方法的任意实施例。
本申请还提供了一种存储介质。该存储介质可以为计算机可读存储介质,该计算机可读存储介质包括非易失性计算机可读存储介质。该存储介质存储有计算机程序,该计算机程序当被处理器执行时实现本申请容器实例IP切换方法的任意实施例。
所述存储介质为实体的、非瞬时性的存储介质,例如可以是U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、磁碟或者光盘等各种可以存储计算机程序的实体存储介质。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置、设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
Claims (20)
- 一种容器实例IP切换方法,包括:获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息,其中,所述灰度应用是在所述原应用的版本上添加新功能或者改进功能之后所生成的应用;根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP,其中,所述第一预设数量小于所述原应用的容器实例数量;停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,其中,所停用的所述第一预设数量的IP被回收到预设IP地址池;根据第二预设规则从预设IP地址池所停用的原应用的容器实例IP中确定第二预设数量的需启用的IP,其中,所述第二预设数量小于或者等于所停用的IP数量;根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例,从而通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。
- 根据权利要求1所述的方法,其中,所述停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,包括:设置所确定的第一预设数量的IP的使用状态标识为停用状态;销毁所述第一预设数量的IP所对应的容器实例;回收使用状态标识为停用状态的IP到预设IP地址池;根据所述第一预设数量修改所述原应用的容器实例数量。
- 根据权利要求1所述的方法,其中,所述根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例,包括:根据所述灰度应用的信息以及需启用的IP数量确定所述灰度应用需新增的容器实例所在的宿主机;在所确定的宿主机上创建所述灰度应用的容器实例;将需启用的IP分配给所述灰度应用新创建的容器实例。
- 根据权利要求3所述的方法,其中,所述在所确定的宿主机上创建所述灰度应用的容器实例,包括:发送新建命令到编排工具,以通过所述编排工具推送所述新建命令到所确 定的宿主机,并通过所述新建命令在对应的宿主机上创建所述灰度应用所对应的容器实例。
- 根据权利要求1所述的方法,其中,在所述获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息之前,所述方法还包括:克隆原应用,并在克隆的原应用版本的基础上,添加新功能或者改进功能所对应的代码,以生成灰度应用镜像;根据所述原应用的容器实例的创建区域以及所述灰度应用镜像,在测试环境下所述区域中创建灰度应用的容器实例,所述灰度应用的容器实例包括所述灰度应用的容器实例IP和容器实例数量。
- 根据权利要求1所述的方法,其中,在根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP之前,所述方法还包括:将所述原应用的容器实例IP和灰度应用的容器实例IP作为预设IP地址池。
- 根据权利要求1所述的方法,其中,所述方法还包括:若接收到访问控制修改指令,获取所述原应用的负载均衡应用,并检测所述原应用的负载均衡应用的类型;根据所述原应用的负载均衡应用的类型,通过与所述类型相匹配的方式获取所述负载均衡应用的配置文件并在所述配置文件中加入访问控制配置代码,所述访问控制配置代码用于根据用户访问请求确定用户类型,并根据所述用户类型确定将该用户访问请求切换至所述原应用或所述灰度应用。
- 根据权利要求7所述的方法,其中,所述根据所述原应用的负载均衡应用的类型,通过与所述类型相匹配的方式获取所述负载均衡应用的配置文件并在所述配置文件中加入访问控制配置代码,包括:若所述负载均衡应用的类型为F5,根据所述原应用确定F5负载均衡应用所在的F5设备;在所述F5设备上获取所述F5负载均衡应用的配置文件,并在所述配置文件中加入访问控制配置代码;若所述负载均衡应用的类型为非F5,根据所述原应用确定对应的负载均衡应用的容器,其中非F5负载均衡应用为LVS负载均衡应用、Haproxy负载均衡应用或Nginx负载均衡应用;从对应的负载均衡应用的容器中获取配置文件,将所获取的配置文件下载到本地;在所述配置文件中加入访问控制配置代码;将加入了访问控制配置代码的配置文件推送至对应的负载均衡应用的容器中;重启对应的负载均衡应用的容器的负载均衡服务,以使得加入访问控制配置代码的配置文件生效。
- 一种容器实例IP切换装置,所述容器实例IP切换装置包括:IP获取单元,用于获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息,其中,所述灰度应用是在所述原应用的版本上添加新功能或者改进功能之后所生成的应用;停用IP确定单元,用于根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP,其中,所述第一预设数量小于所述原应用的容器实例数量;停用单元,用于停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,其中,所停用的所述第一预设数量的IP被回收到预设IP地址池;启用IP确定单元,用于根据第二预设规则从预设IP地址池所停用的原应用的容器实例IP中确定第二预设数量的需启用的IP,其中,所述第二预设数量小于或者等于所停用的IP数量;启用单元,用于根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例,从而通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。
- 根据权利要求9所述的容器实例IP切换装置,其中,所述停用单元包括:IP状态设置单元,用于设置所确定的第一预设数量的IP的使用状态标识为停用状态;销毁单元,用于销毁所述第一预设数量的IP所对应的容器实例;回收单元,用于回收使用状态标识为停用状态的IP到预设IP地址池;数量修改单元,用于根据所述第一预设数量修改所述原应用的容器实例数量
- 一种计算机设备,包括存储器,以及与所述存储器相连的处理器;其中,所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息,其中,所述灰度应用是在所述原应用的版本上添加新功能或者改进功能之后所生成的应用;根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP,其中,所述第一预设数量小于所述原应用的容器实例数量;停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,其中,所停用的所述第一预设数量的IP被回收到预设IP地址池;根据第二预设规则从预设IP地址池所停用的原应用的容器实例IP中确定第二预设数量的需启用的IP,其中,所述第二预设数量小于或者等于所停用的IP数量;根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例,从而通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。
- 根据权利要求11所述的计算机设备,其中,所述停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,包括:设置所确定的第一预设数量的IP的使用状态标识为停用状态;销毁所述第一预设数量的IP所对应的容器实例;回收使用状态标识为停用状态的IP到预设IP地址池;根据所述第一预设数量修改所述原应用的容器实例数量。
- 根据权利要求11所述的计算机设备,其中,所述根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例,包括:根据所述灰度应用的信息以及需启用的IP数量确定所述灰度应用需新增的容器实例所在的宿主机;在所确定的宿主机上创建所述灰度应用的容器实例;将需启用的IP分配给所述灰度应用新创建的容器实例。
- 根据权利要求13所述的计算机设备,其中,所述在所确定的宿主机上创建所述灰度应用的容器实例,包括:发送新建命令到编排工具,以通过所述编排工具推送所述新建命令到所确定的宿主机,并通过所述新建命令在对应的宿主机上创建所述灰度应用所对应的容器实例。
- 根据权利要求11所述的计算机设备,其中,在所述获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息之前,所述处理器还执行如下步骤:克隆原应用,并在克隆的原应用版本的基础上,添加新功能或者改进功能所对应的代码,以生成灰度应用镜像;根据所述原应用的容器实例的创建区域以及所述灰度应用镜像,在测试环境下所述区域中创建灰度应用的容器实例,所述灰度应用的容器实例包括所述灰度应用的容器实例IP和容器实例数量。
- 根据权利要求11所述的计算机设备,其中,在根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP之前,所述处理器还执行如下步骤:将所述原应用的容器实例IP和灰度应用的容器实例IP作为预设IP地址池。
- 根据权利要求11所述的计算机设备,其中,所述处理器还执行如下步骤:若接收到访问控制修改指令,获取所述原应用的负载均衡应用,并检测所述原应用的负载均衡应用的类型;根据所述原应用的负载均衡应用的类型,通过与所述类型相匹配的方式获取所述负载均衡应用的配置文件并在所述配置文件中加入访问控制配置代码,所述访问控制配置代码用于根据用户访问请求确定用户类型,并根据所述用户类型确定将该用户访问请求切换至所述原应用或所述灰度应用。
- 根据权利要求17所述的计算机设备,其中,所述根据所述原应用的负载均衡应用的类型,通过与所述类型相匹配的方式获取所述负载均衡应用的配置文件并在所述配置文件中加入访问控制配置代码,包括:若所述负载均衡应用的类型为F5,根据所述原应用确定F5负载均衡应用 所在的F5设备;在所述F5设备上获取所述F5负载均衡应用的配置文件,并在所述配置文件中加入访问控制配置代码;若所述负载均衡应用的类型为非F5,根据所述原应用确定对应的负载均衡应用的容器,其中非F5负载均衡应用为LVS负载均衡应用、Haproxy负载均衡应用或Nginx负载均衡应用;从对应的负载均衡应用的容器中获取配置文件,将所获取的配置文件下载到本地;在所述配置文件中加入访问控制配置代码;将加入了访问控制配置代码的配置文件推送至对应的负载均衡应用的容器中;重启对应的负载均衡应用的容器的负载均衡服务,以使得加入访问控制配置代码的配置文件生效。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现如下步骤:获取原应用的容器实例IP和容器实例数量,以及灰度应用的信息,其中,所述灰度应用是在所述原应用的版本上添加新功能或者改进功能之后所生成的应用;根据第一预设规则从所述原应用的容器实例IP中确定第一预设数量的IP,其中,所述第一预设数量小于所述原应用的容器实例数量;停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,其中,所停用的所述第一预设数量的IP被回收到预设IP地址池;根据第二预设规则从预设IP地址池所停用的原应用的容器实例IP中确定第二预设数量的需启用的IP,其中,所述第二预设数量小于或者等于所停用的IP数量;根据所述灰度应用的信息将需启用的IP分配给所述灰度应用新增的容器实例,从而通过原应用的访问域名既可以访问原应用,也可以访问灰度应用。
- 根据权利要求19所述的计算机可读存储介质,其中,所述停用所确定的第一预设数量的IP以及所述第一预设数量的IP所对应的容器实例,包括:设置所确定的第一预设数量的IP的使用状态标识为停用状态;销毁所述第一预设数量的IP所对应的容器实例;回收使用状态标识为停用状态的IP到预设IP地址池;根据所述第一预设数量修改所述原应用的容器实例数量。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910413829.7 | 2019-05-17 | ||
| CN201910413829.7A CN110286996B (zh) | 2019-05-17 | 2019-05-17 | 容器实例ip切换方法、装置、计算机设备及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020233002A1 true WO2020233002A1 (zh) | 2020-11-26 |
Family
ID=68002095
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/117360 Ceased WO2020233002A1 (zh) | 2019-05-17 | 2019-11-12 | 容器实例ip切换方法、装置、计算机设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110286996B (zh) |
| WO (1) | WO2020233002A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113766043A (zh) * | 2021-05-11 | 2021-12-07 | 腾讯科技(深圳)有限公司 | 配置目标容器的方法、装置、计算机设备及存储介质 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110286996B (zh) * | 2019-05-17 | 2023-08-18 | 平安科技(深圳)有限公司 | 容器实例ip切换方法、装置、计算机设备及存储介质 |
| CN116132366B (zh) * | 2022-07-01 | 2024-09-24 | 马上消费金融股份有限公司 | 流量管理方法、装置、电子设备及存储介质 |
| CN116016449B (zh) * | 2022-12-12 | 2025-08-19 | 上海道客网络科技有限公司 | 基于容器云平台的统一分配ip地址的方法和系统 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170199770A1 (en) * | 2014-06-23 | 2017-07-13 | Getclouder Ltd. | Cloud hosting systems featuring scaling and load balancing with containers |
| CN108829494A (zh) * | 2018-06-25 | 2018-11-16 | 杭州谐云科技有限公司 | 基于负载预测的容器云平台智能资源优化方法 |
| CN110225094A (zh) * | 2019-05-17 | 2019-09-10 | 平安科技(深圳)有限公司 | 负载均衡应用虚拟ip切换方法、装置、计算机设备及存储介质 |
| CN110286996A (zh) * | 2019-05-17 | 2019-09-27 | 平安科技(深圳)有限公司 | 容器实例ip切换方法、装置、计算机设备及存储介质 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9734174B1 (en) * | 2013-06-28 | 2017-08-15 | Google Inc. | Interactive management of distributed objects |
| US10455413B2 (en) * | 2016-12-14 | 2019-10-22 | International Business Machines Corporation | Systems and methods to anonymize web browsing |
| CN109032755B (zh) * | 2018-06-29 | 2020-12-01 | 优刻得科技股份有限公司 | 一种容器服务托管系统及提供容器服务的方法 |
| CN109343963B (zh) * | 2018-10-30 | 2021-12-07 | 杭州数梦工场科技有限公司 | 一种容器集群的应用访问方法、装置及相关设备 |
-
2019
- 2019-05-17 CN CN201910413829.7A patent/CN110286996B/zh active Active
- 2019-11-12 WO PCT/CN2019/117360 patent/WO2020233002A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170199770A1 (en) * | 2014-06-23 | 2017-07-13 | Getclouder Ltd. | Cloud hosting systems featuring scaling and load balancing with containers |
| CN108829494A (zh) * | 2018-06-25 | 2018-11-16 | 杭州谐云科技有限公司 | 基于负载预测的容器云平台智能资源优化方法 |
| CN110225094A (zh) * | 2019-05-17 | 2019-09-10 | 平安科技(深圳)有限公司 | 负载均衡应用虚拟ip切换方法、装置、计算机设备及存储介质 |
| CN110286996A (zh) * | 2019-05-17 | 2019-09-27 | 平安科技(深圳)有限公司 | 容器实例ip切换方法、装置、计算机设备及存储介质 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113766043A (zh) * | 2021-05-11 | 2021-12-07 | 腾讯科技(深圳)有限公司 | 配置目标容器的方法、装置、计算机设备及存储介质 |
| CN113766043B (zh) * | 2021-05-11 | 2024-02-23 | 腾讯科技(深圳)有限公司 | 配置目标容器的方法、装置、计算机设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110286996B (zh) | 2023-08-18 |
| CN110286996A (zh) | 2019-09-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP2344953B1 (en) | Provisioning virtual resources using name resolution | |
| US11392363B2 (en) | Implementing application entrypoints with containers of a bundled application | |
| CN107534570B (zh) | 用于虚拟化网络功能监控的计算机系统、方法和介质 | |
| RU2653292C2 (ru) | Перенос служб через границы кластеров | |
| US20170083357A1 (en) | Managing a server template | |
| CN110225094B (zh) | 负载均衡应用虚拟ip切换方法、装置、计算机设备及存储介质 | |
| WO2020233002A1 (zh) | 容器实例ip切换方法、装置、计算机设备及存储介质 | |
| US11221866B2 (en) | Accelerator loading method, system, and apparatus | |
| CN109558212B (zh) | 一种物理设备的虚拟化管理方法、系统、物理设备及介质 | |
| WO2016199232A1 (ja) | ストレージ管理計算機、及びストレージ装置の管理方法 | |
| WO2012056596A1 (ja) | 計算機システム及び処理制御方法 | |
| JP2010282447A (ja) | 仮想計算機システム、そのアクセス制御方法及び通信装置 | |
| CN103294765A (zh) | 用于供应和转换虚拟设备的基于策略的方法的方法和系统 | |
| WO2020232887A1 (zh) | 容器应用的配置修改方法、装置、计算机设备及存储介质 | |
| JP6003590B2 (ja) | データセンタ,仮想システムの複写サービスの提供方法,データセンタの管理サーバ及び仮想システムの複写プログラム | |
| WO2020252921A1 (zh) | 多活负载均衡应用的扩容方法、装置、设备及存储介质 | |
| EP3531282A1 (en) | Accelerator loading method and system, and accelerator loading apparatus | |
| JP2016126364A (ja) | システムのバックアップ装置及びバックアップ方法 | |
| CN108369503A (zh) | 对外部场可更换单元(fru)过程的自动系统响应 | |
| US11582168B2 (en) | Fenced clone applications | |
| US10491674B2 (en) | Network topology templates for internal states of management and control planes | |
| CN116820686B (zh) | 物理机的部署方法、虚拟机和容器统一监控的方法及装置 | |
| CN107800810A (zh) | 一种服务器远程控制方法和系统 | |
| TWI681299B (zh) | 跨虛擬平台之自動虛擬機移轉及環境設定操作系統與方法 | |
| CN107357634A (zh) | 一种参数配置管理方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19929266 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19929266 Country of ref document: EP Kind code of ref document: A1 |