WO2017166513A1 - 基于容器技术的应用服务无缝迁移方法和系统 - Google Patents

基于容器技术的应用服务无缝迁移方法和系统 Download PDF

Info

Publication number
WO2017166513A1
WO2017166513A1 PCT/CN2016/089247 CN2016089247W WO2017166513A1 WO 2017166513 A1 WO2017166513 A1 WO 2017166513A1 CN 2016089247 W CN2016089247 W CN 2016089247W WO 2017166513 A1 WO2017166513 A1 WO 2017166513A1
Authority
WO
WIPO (PCT)
Prior art keywords
container
original
server
application service
address
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
Application number
PCT/CN2016/089247
Other languages
English (en)
French (fr)
Inventor
张增
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
LeCloud Computing Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
LeCloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Le Holdings Beijing Co Ltd, LeCloud Computing Co Ltd filed Critical Le Holdings Beijing Co Ltd
Publication of WO2017166513A1 publication Critical patent/WO2017166513A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration

Definitions

  • the present invention relates to the field of application service migration technologies, and in particular, to a container technology-based seamless migration method and system for application services.
  • cluster systems have gradually become the focus of the computer industry with its low cost, powerful computing power and robust fault tolerance mechanism.
  • the cluster application can run on thousands of ordinary servers, and the cluster size is dynamically expanded along with the business growth, but it also has to bear the high failure rate of the ordinary computer, which requires the system to ensure high availability in the event of hardware and software failure.
  • the Failover cluster method is usually used to transfer the application to another identical physical device.
  • the traditional Failover clustering method has many limitations. For example, some applications require an IP protocol. If data sharing is required, the data must be on a shared chassis resource such as iSCSILUN, SerialAttachedSCSI, or FibreChannel, and on the physical device. Network, bandwidth and operating system are required. Therefore, this method has certain limitations on the fault migration of the application.
  • An object of the present invention is to provide a seamless migration method of an application service based on a container technology.
  • the present invention generates a container image file by sending an original container corresponding to an application service on an original server, and then sends the container image file to a mirrored warehouse for temporary storage.
  • the target server creates a target container based on the container image file obtained from the mirrored warehouse, and then changes the IP address of the target container to the IP address of the original container corresponding thereto, and finally changes the IP address of the target server to the original server. IP address, through this migration mode, seamless migration of application services.
  • a container service-based application service seamless migration method includes: an original server receiving an application service migration request sent by a user terminal, where the application service migration request includes an application to be migrated The location information of the service; the original server determines the corresponding original container based on the location information, generates a container image file of the original container corresponding to the application service to be migrated, and sends the container image file to the mirror warehouse, where The original container is a container where the application to be migrated is located on the original server; the target server obtains the container image file from the mirrored warehouse, creates a target container based on the container image file, and sets an IP address of the target container Change to the IP address of the original container corresponding to it; change the IP address of the target server to the IP address of the original server.
  • the method further includes: stopping all the application services to be migrated in the original server in batches.
  • the method further includes: stopping, according to the location information, all the original containers corresponding to the application service to be migrated in the original server .
  • the method further includes: stopping the original server.
  • a container service-based application service seamless migration system comprising: a user terminal, configured to send an application service migration request to an original server; and an original server, configured to receive the user terminal to send An application service migration request, where the application service migration request includes location information of the application service to be migrated; and determining a corresponding original container based on the location information, and generating a container image file by using the original container corresponding to the application service to be migrated, And sending the container image file to the mirrored warehouse, where the original container is a container where the application to be migrated is located on the original server; and the target server is configured to obtain the container image file from the mirrored warehouse.
  • the target server includes an IP management module, configured to use an IP address of the target server Change to the IP address of the original server.
  • the original server includes: a first processing module, configured to batch stop all the application services to be migrated in the original server.
  • the target server further includes: a second processing module, configured to manually stop all the original containers corresponding to the application services to be migrated in the original server based on the location information.
  • the target server further includes: a third processing module, configured to stop the original server.
  • a computer storage medium is further provided, wherein the computer storage medium can store a program, and when executed, the program can implement a container technology-based application service seamless migration method provided by the present invention. Some or all of the steps in each implementation.
  • the container image file is generated by sending the original container corresponding to the application service on the original server, and then the container image file is sent to the mirror warehouse for temporary storage, and the target server creates the target container based on the container image file obtained from the mirror warehouse. Then, the IP address of the target container is changed to the IP address of the original container corresponding thereto, and finally the IP address of the target server is changed to the IP address of the original server, and the migration of the application service is realized through the migration mode. .
  • FIG. 1 is a flow chart showing a seamless migration method of an application service based on a container technology according to the present invention
  • FIG. 2 is a schematic structural diagram of a container technology-based application service seamless migration system according to the present invention.
  • the original server and the target server may be the same local area network or different local area networks.
  • the application service migration under normal circumstances is all within the same LAN.
  • FIG. 1 is a flow chart showing a seamless migration method of an application service based on a container technology according to the present invention.
  • the container technology-based application service seamless migration method of the present invention includes:
  • Step S100 The original server receives an application service migration request sent by the user terminal, where the application service migration request includes location information of the application service to be migrated.
  • the user terminal sends an application service migration request to the original server, and the original server receives the application service migration request sent by the user terminal, where the application service migration request includes the location information of the application service to be migrated.
  • the application service migration request records the type of the application service, the container and the container IP address where the application service is located, and the IP address of the server where the application service is located.
  • the container is a container that is run on the server and virtualized by the docker technology.
  • the application service refers to a service program running inside the container.
  • step S200 the original server determines a corresponding original container based on the location information, generates a container image file of the original container corresponding to the application service to be migrated, and sends the container image file to the image warehouse, where the original container The container where the application to be migrated is located on the original server.
  • the original server extracts the location information of the application service to be migrated from the application service migration request, determines the corresponding container according to the storage location information, and corresponding the application service to be migrated.
  • the original container generates a container image file one-to-one, and sends the container image file to a mirrored warehouse for temporary storage, wherein the original container is a container where the application to be migrated is located on the original server.
  • a container will be mirrored, so that the IP address of the target container can be directly changed to the IP address of the original container, and the migration is convenient and seamlessly migrated.
  • the method further includes: stopping all the application services to be migrated in the original server in batches.
  • Step S300 the target server obtains the container image file from the mirrored warehouse, creates a target container based on the container image file, and changes the IP address of the target container to its original content.
  • the IP address of the device is not limited to the container image file.
  • the target server obtains the container image file from the mirrored warehouse, and further creates a target container one-to-one based on the container image file, that is, one container image file corresponds to one target container, and then the target container is The IP address is changed to the IP address of the original container corresponding to it.
  • the container image file is a mirror made by docker technology.
  • the container creation depends on a container image file.
  • the container image file can be regarded as all running environments of the container, and the application service is running in the container.
  • all the original containers corresponding to the application services to be migrated in the original server need to be stopped in batches.
  • the method further includes: stopping, according to the location information, all the originals corresponding to the application service to be migrated in the original server container.
  • Step S400 changing the IP address of the target server to the IP address of the original server.
  • the method further includes: stopping the original server.
  • the present invention generates a container image file by sending the container image file to the original container corresponding to the application service on the original server, and then sends the container image file to the mirror warehouse temporarily.
  • the target server creates a target container based on the container image file obtained from the mirrored warehouse, and then changes the IP address of the target container to the IP address of the original container corresponding thereto, and finally changes the IP address of the target server to the original one.
  • the server's IP address through this migration, enables seamless migration of application services.
  • FIG. 2 is a schematic structural diagram of a container technology-based application service seamless migration system according to the present invention.
  • the container technology-based application service seamless migration system of the present invention As shown in FIG. 2, the container technology-based application service seamless migration system of the present invention, the system package The user terminal 10, the original server 20, the target server 30, and the IP management module 40 are included.
  • the user terminal 10 is configured to send an application service migration request to the original server 20.
  • step S100 For a detailed description of the module, refer to the aforementioned step S100.
  • the original server 20 is connected to the user terminal 10, and is configured to receive an application service migration request sent by the user terminal 10, where the application service migration request includes location information of the application service to be migrated, and determine a corresponding original based on the location information.
  • the container generates a container image file of the original container corresponding to the application to be migrated, and sends the container image file to the mirror warehouse, where the original container is a container where the application to be migrated is located on the original server.
  • the original server 20 includes: a first processing module 21, configured to batch stop all the application services to be migrated in the original server.
  • step S200 For a detailed description of the module, refer to the aforementioned step S200.
  • the target server 30 is connected to the original server 20, and is configured to obtain the container image file from the mirror warehouse, create a target container based on the container image file, and change an IP address of the target container to be corresponding thereto.
  • the IP address of the original container further includes: a second processing module 31, configured to manually stop all the original containers corresponding to the application services to be migrated in the original server based on the location information.
  • step S300 For a detailed description of the module, refer to the aforementioned step S300.
  • the target server 30 includes an IP management module 40 for changing the IP address of the target server to the IP address of the original server.
  • the target server 30 further includes: a third processing module 32, configured to stop the original server.
  • step S300 For a detailed description of the module, refer to the aforementioned step S300.
  • the present invention generates a container image file by sending the container image file to the original container corresponding to the application service on the original server, and then sends the container image file to the mirror warehouse temporarily.
  • the target server creates a target container based on the container image file obtained from the mirrored warehouse, and then changes the IP address of the target container to the IP address of the original container corresponding thereto, and finally changes the IP address of the target server to the original one.
  • the server's IP address through this migration, enables seamless migration of application services.
  • the container technology-based application service seamless migration method and system of the present invention are described in detail, and the seamless migration can be realized by the application service migration method of the present invention.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and when the program is executed, the container service-based application service seamless migration method provided by the embodiment shown in FIG. 1 can be implemented. Some or all of the steps in each implementation.

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种基于容器技术的应用服务无缝迁移方法和系统,所述方法包括:原服务器接收用户终端发送的应用服务迁移请求,所述应用服务迁移请求中包含待迁移应用服务的位置信息;原服务器基于所述位置信息确定对应的原容器,将所述待迁移应用服务对应的原容器生成容器镜像文件,并将所述容器镜像文件发送至镜像仓库,其中,所述原容器为所述待迁移应用服务在原服务器上所在的容器;目标服务器从所述镜像仓库中获取所述容器镜像文件,基于所述容器镜像文件创建目标容器,并将所述目标容器的IP地址改为与其对应的原容器的IP地址;将所述目标服务器的IP地址改为所述原服务器的IP地址。本发明通过上述迁移方式,能够实现无缝迁移。

Description

基于容器技术的应用服务无缝迁移方法和系统
本申请要求于2016年03月31日提交中国专利局、申请号为201610201580X、发明名称为“基于容器技术的应用服务无缝迁移方法和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及应用服务迁移技术领域,尤其涉及一种基于容器技术的应用服务无缝迁移方法和系统。
背景技术
随着计算机技术和互联网的快速发展,集群系统以其低廉的成本、强大的运算能力和健壮的容错机制逐渐成为了计算机行业的焦点。集群应用可以运行在上千台普通的服务器上,伴随业务增长动态扩大集群规模,但也要承受普通计算机较高的故障率,这要求系统在发生软硬件故障的时候仍能保证高度的可用性。
目前,对于集群的故障迁移,通常采用的是Failover(失效转移)集群的方法,将应用转移到另外一台完全一样的物理设备上。传统的Failover集群方法有很多局限性,比如有些要求应用必须是IP协议,如果有数据共享,则要求数据必须是在共享底盘资源上如iSCSILUN,SerialAttachedSCSI,或FibreChannel,在物理设备上也对CPU,网络,带宽和操作系统有要求。因此,这种方法对应用的故障迁移有一定的局限性。
发明内容
本发明的目的是提供一种基于容器技术的应用服务无缝迁移方法,本发明通过将原服务器上的应用服务对应的原容器生成容器镜像文件,再将容器镜像文件发送至镜像仓库暂时保存,目标服务器基于从镜像仓库中获取到的容器镜像文件创建目标容器,然后将所述目标容器的IP地址改为与其对应的原容器的IP地址,最后再将目标服务器的IP地址改为原服务器的IP地址,通过这种迁移方式,实现了应用服务的无缝迁移。
根据本发明的一个方面,提供了一种基于容器技术的应用服务无缝迁移方法,所述方法包括:原服务器接收用户终端发送的应用服务迁移请求,所述应用服务迁移请求中包含待迁移应用服务的位置信息;原服务器基于所述位置信息确定对应的原容器,将所述待迁移应用服务对应的原容器生成容器镜像文件,并将所述容器镜像文件发送至镜像仓库,其中,所述原容器为所述待迁移应用服务在原服务器上所在的容器;目标服务器从所述镜像仓库中获取所述容器镜像文件,基于所述容器镜像文件创建目标容器,并将所述目标容器的IP地址改为与其对应的原容器的IP地址;将所述目标服务器的IP地址改为所述原服务器的IP地址。
其中,在所述将所述待迁移应用服务对应的原容器生成容器镜像文件的步骤之前,还包括:批量停掉原服务器中所有的待迁移应用服务。
其中,在所述目标服务器从所述镜像仓库中获取所述容器镜像文件的步骤之前,还包括:基于所述位置信息,批量停掉所述原服务器中所有的待迁移应用服务对应的原容器。
其中,在所述将所述目标服务器的IP地址改为所述原服务器的IP地址的步骤之前,还包括:停掉所述原服务器。
根据本发明的另一个方面,提供了一种基于容器技术的应用服务无缝迁移系统,所述系统包括:用户终端,用于向原服务器发送应用服务迁移请求;原服务器,用于接收用户终端发送的应用服务迁移请求,所述应用服务迁移请求中包含待迁移应用服务的位置信息;并基于所述位置信息确定对应的原容器,将所述待迁移应用服务对应的原容器生成容器镜像文件,并将所述容器镜像文件发送至镜像仓库,其中,所述原容器为所述待迁移应用服务在原服务器上所在的容器;目标服务器,用于从所述镜像仓库中获取所述容器镜像文件,基于所述容器镜像文件创建目标容器,并将所述目标容器的IP地址改为与其对应的原容器的IP地址;所述目标服务器包括IP管理模块,其用于将所述目标服务器的IP地址改为所述原服务器的IP地址。
其中,所述原服务器包括:第一处理模块,用于批量停掉原服务器中所有的待迁移应用服务。
其中,所述目标服务器还包括:第二处理模块,用于基于所述位置信息,批量停掉所述原服务器中所有的待迁移应用服务对应的原容器。
其中,所述目标服务器还包括:第三处理模块,用于停掉所述原服务器。
根据本发明的又一个方面,还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可实现本发明提供的一种基于容器技术的应用服务无缝迁移方法的各实现方式中的部分或全部步骤。
本发明实施例通过将原服务器上的应用服务对应的原容器生成容器镜像文件,再将容器镜像文件发送至镜像仓库暂时保存,目标服务器基于从镜像仓库中获取到的容器镜像文件创建目标容器,然后将所述目标容器的IP地址改为与其对应的原容器的IP地址,最后再将目标服务器的IP地址改为原服务器的IP地址,通过这种迁移方式,实现了应用服务的无缝迁移。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。
附图说明
图1是根据本发明的基于容器技术的应用服务无缝迁移方法的流程示意图;
图2是根据本发明的基于容器技术的应用服务无缝迁移系统的结构示意图。
具体实施方式
为使本发明的目的、方法方案和优点更加清楚明了,下面结合具体实施方式并参照附图,对本发明进一步详细说明。应该理解,这些描述只是示例性的,而并非要限制本发明的范围。此外,在以下说明中,省略了对公知结构和方法的描述,以避免不必要地混淆本发明的概念。
需要说明的是,在进行应用服务器的迁移时,原服务器与目标服务器可以是同一局域网的也可以是不同局域网的。通常情况下的应用服务迁移,都是同一局域网内迁移。
图1是根据本发明的基于容器技术的应用服务无缝迁移方法的流程示意图。
如图1所示,本发明的基于容器技术的应用服务无缝迁移方法,所述方法包括:
步骤S100,原服务器接收用户终端发送的应用服务迁移请求,所述应用服务迁移请求中包含待迁移应用服务的位置信息。
本步骤中,用户终端向原服务器发送应用服务迁移请求,原服务器接收用户终端发送的应用服务迁移请求,所述应用服务迁移请求中包含待迁移应用服务的位置信息。
作为本发明的一种实施方式,所述应用服务迁移请求记录了应用服务的类型,应用服务所在的容器及容器IP地址和应用服务所在的服务器的IP地址。需要说明的是:容器是运行在服务器上的通过docker技术虚拟化出来的容器,应用服务是指运行在容器内部的服务程序。
步骤S200,原服务器基于所述位置信息确定对应的原容器,将所述待迁移应用服务对应的原容器生成容器镜像文件,并将所述容器镜像文件发送至镜像仓库,其中,所述原容器为所述待迁移应用服务在原服务器上所在的容器。
本步骤中,原服务器接收到所述应用服务迁移请求后,从该应用服务迁移请求中提取出待迁移应用服务的位置信息,根据存储位置信息确定对应的容器,将所述待迁移应用服务对应的原容器一对一生成容器镜像文件,并将所述容器镜像文件发送至镜像仓库中进行暂时保存,其中,所述原容器为所述待迁移应用服务在原服务器上所在的容器。在容器镜像文件生成过程中,会将一个容器生成一个容器镜像,这样,直接将目标容器的IP地址改为原容器的IP地址即可,迁移方便同时做到了无缝迁移。
这里,为了保证应用服务正常关闭,需要批量停掉原服务器中所有的待迁移应用服务。具体的,在所述将所述待迁移应用服务对应的原容器生成容器镜像文件的步骤之前,还包括:批量停掉原服务器中所有的待迁移应用服务。
在集群系统中,为了保证应用服务的高可用性,通常情况下,一个容器可能包括多种应用服务,同一种应用服务分散设置在不同的容器中。例如,web应用服务,将web应用服务分散设置在多个容器或多个服务器上对外提供服务,目的是当一个容器或服务器故障时,另一个容器或者服务器仍能对外提供同种web服务。
步骤S300,目标服务器从所述镜像仓库中获取所述容器镜像文件,基于所述容器镜像文件创建目标容器,并将所述目标容器的IP地址改为与其对应的原容 器的IP地址。
本步骤中,目标服务器从所述镜像仓库中获取所述容器镜像文件,进一步基于所述容器镜像文件一对一创建目标容器,即一个容器镜像文件对应一个目标容器,然后将所述目标容器的IP地址改为与其对应的原容器的IP地址。其中,容器镜像文件是通过docker技术制作的镜像,容器的创建需要依赖一个容器镜像文件,容器镜像文件可以看成容器的所有运行环境,而应用服务是运行在容器中的。这里,为了进一步保证迁移成功,需要批量停掉所述原服务器中所有的待迁移应用服务对应的原容器。具体的,在所述目标服务器从所述镜像仓库中获取所述容器镜像文件的步骤之前,还包括:基于所述位置信息,批量停掉所述原服务器中所有的待迁移应用服务对应的原容器。
步骤S400,将所述目标服务器的IP地址改为所述原服务器的IP地址。
本步骤中,为了做到无缝迁移,需要将将所述目标服务器的IP地址改为所述原服务器的IP地址。
这里,为了进一步保证迁移成功,需要停掉所述原服务器。具体的,在所述将所述目标服务器的IP地址改为所述原服务器的IP地址的步骤之前,还包括:停掉所述原服务器。
最后,在所述将所述目标服务器的IP地址改为所述原服务器的IP地址的步骤之后,需要确保所有的迁移到目标服务器上的所有应用服务是否迁移成功。具体的,在所述将所述目标服务器的IP地址改为所述原服务器的IP地址的步骤之后,检验所述目标服务器中所有的待迁移应用服务是否迁移成功。
综上所述,详细介绍了一种基于容器技术的应用服务无缝迁移方法,本发明通过将原服务器上的应用服务对应的原容器生成容器镜像文件,再将容器镜像文件发送至镜像仓库暂时保存,目标服务器基于从镜像仓库中获取到的容器镜像文件创建目标容器,然后将所述目标容器的IP地址改为与其对应的原容器的IP地址,最后再将目标服务器的IP地址改为原服务器的IP地址,通过这种迁移方式,实现了应用服务的无缝迁移。
图2是根据本发明的基于容器技术的应用服务无缝迁移系统的结构示意图。
如图2所示,本发明的基于容器技术的应用服务无缝迁移系统,所述系统包 括:用户终端10、原服务器20、目标服务器30和IP管理模块40。
用户终端10,用于向原服务器20发送应用服务迁移请求。
该模块的具体描述参见前述步骤S100。
原服务器20与所述用户终端10连接,用于接收用户终端10发送的应用服务迁移请求,所述应用服务迁移请求中包含待迁移应用服务的位置信息;并基于所述位置信息确定对应的原容器,将所述待迁移应用服务对应的原容器生成容器镜像文件,并将所述容器镜像文件发送至镜像仓库,其中,所述原容器为所述待迁移应用服务在原服务器上所在的容器。其中,所述原服务器20包括:第一处理模块21,用于批量停掉原服务器中所有的待迁移应用服务。
该模块的具体描述参见前述步骤S200。
目标服务器30与所述原服务器20连接,用于从所述镜像仓库中获取所述容器镜像文件,基于所述容器镜像文件创建目标容器,并将所述目标容器的IP地址改为与其对应的原容器的IP地址。其中,所述目标服务器30还包括:第二处理模块31,用于基于所述位置信息,批量停掉所述原服务器中所有的待迁移应用服务对应的原容器。
该模块的具体描述参见前述步骤S300。
所述目标服务器30包括IP管理模块40,其用于将所述目标服务器的IP地址改为所述原服务器的IP地址。其中,所述目标服务器30还包括:第三处理模块32,用于停掉所述原服务器。
该模块的具体描述参见前述步骤S300。
综上所述,详细介绍了一种基于容器技术的应用服务无缝迁移系统,本发明通过将原服务器上的应用服务对应的原容器生成容器镜像文件,再将容器镜像文件发送至镜像仓库暂时保存,目标服务器基于从镜像仓库中获取到的容器镜像文件创建目标容器,然后将所述目标容器的IP地址改为与其对应的原容器的IP地址,最后再将目标服务器的IP地址改为原服务器的IP地址,通过这种迁移方式,实现了应用服务的无缝迁移。
如上所述,详细介绍了本发明的基于容器技术的应用服务无缝迁移方法和系统,通过本发明的应用服务迁移方法,能够实现无缝迁移。
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可实现图1所示实施例提供的一种基于容器技术的应用服务无缝迁移方法的各实现方式中的部分或全部步骤。
应当理解的是,本发明的上述具体实施方式仅仅用于示例性说明或解释本发明的原理,而不构成对本发明的限制。因此,在不偏离本发明的精神和范围的情况下所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。此外,本发明所附权利要求旨在涵盖落入所附权利要求范围和边界、或者这种范围和边界的等同形式内的全部变化和修改例。

Claims (8)

  1. 一种基于容器技术的应用服务无缝迁移方法,其特征在于,所述方法包括:
    原服务器接收用户终端发送的应用服务迁移请求,所述应用服务迁移请求中包含待迁移应用服务的位置信息;
    原服务器基于所述位置信息确定对应的原容器,将所述待迁移应用服务对应的原容器生成容器镜像文件,并将所述容器镜像文件发送至镜像仓库,其中,所述原容器为所述待迁移应用服务在原服务器上所在的容器;
    目标服务器从所述镜像仓库中获取所述容器镜像文件,基于所述容器镜像文件创建目标容器,并将所述目标容器的IP地址改为与其对应的原容器的IP地址;
    将所述目标服务器的IP地址改为所述原服务器的IP地址。
  2. 根据权利要求1所述的方法,其中,在所述将所述待迁移应用服务对应的原容器生成容器镜像文件的步骤之前,还包括:批量停掉原服务器中所有的待迁移应用服务。
  3. 根据权利要求1-2任一项所述的方法,其中,在所述目标服务器从所述镜像仓库中获取所述容器镜像文件的步骤之前,还包括:
    基于所述位置信息,批量停掉所述原服务器中所有的待迁移应用服务对应的原容器。
  4. 根据权利要求1-2任一项所述的方法,其中,在所述将所述目标服务器的IP地址改为所述原服务器的IP地址的步骤之前,还包括:停掉所述原服务器。
  5. 一种基于容器技术的应用服务无缝迁移系统,其特征在于,所述系统包括:
    用户终端(10),用于向原服务器(20)发送应用服务迁移请求;
    原服务器(20),用于接收用户终端(10)发送的应用服务迁移请求,所述应用服务迁移请求中包含待迁移应用服务的位置信息;并基于所述位置信息确定对应的原容器,将所述待迁移应用服务对应的原容器生成容器镜像文件,并将所述容器镜像文件发送至镜像仓库,其中,所述原容器为所述待 迁移应用服务在原服务器上所在的容器;
    目标服务器(30),用于从所述镜像仓库中获取所述容器镜像文件,基于所述容器镜像文件创建目标容器,并将所述目标容器的IP地址改为与其对应的原容器的IP地址;
    所述目标服务器(30)包括IP管理模块(40),其用于将所述目标服务器的IP地址改为所述原服务器的IP地址。
  6. 根据权利要求5所述的系统,其中,所述原服务器(20)包括:
    第一处理模块(21),用于批量停掉原服务器中所有的待迁移应用服务。
  7. 根据权利要求5-6任一项所述的系统,其中,所述目标服务器(30)还包括:
    第二处理模块(31),用于基于所述位置信息,批量停掉所述原服务器中所有的待迁移应用服务对应的原容器。
  8. 根据权利要求5-6任一项所述的系统,其中,所述目标服务器(30)还包括:
    第三处理模块(32),用于停掉所述原服务器。
PCT/CN2016/089247 2016-03-31 2016-07-07 基于容器技术的应用服务无缝迁移方法和系统 Ceased WO2017166513A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610201580.XA CN105893133A (zh) 2016-03-31 2016-03-31 基于容器技术的应用服务无缝迁移方法和系统
CN201610201580.X 2016-03-31

Publications (1)

Publication Number Publication Date
WO2017166513A1 true WO2017166513A1 (zh) 2017-10-05

Family

ID=57011798

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/089247 Ceased WO2017166513A1 (zh) 2016-03-31 2016-07-07 基于容器技术的应用服务无缝迁移方法和系统

Country Status (2)

Country Link
CN (1) CN105893133A (zh)
WO (1) WO2017166513A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871222A (zh) * 2017-12-05 2019-06-11 柯尼卡美能达株式会社 应用的更新方法以及记录介质
CN110908671A (zh) * 2018-09-18 2020-03-24 北京京东尚科信息技术有限公司 构建docker镜像的方法、装置及计算机可读存储介质
CN111684419A (zh) * 2018-02-01 2020-09-18 西门子股份公司 在计算节点之间迁移容器编排平台中的容器的方法和系统
CN113010206A (zh) * 2021-02-26 2021-06-22 山东英信计算机技术有限公司 一种web应用系统的容器化方法、系统及装置
CN113672337A (zh) * 2021-07-16 2021-11-19 广东浪潮智慧计算技术有限公司 一种应用迁移方法、装置、设备及计算机可读存储介质
CN115510163A (zh) * 2022-09-29 2022-12-23 苏州浪潮智能科技有限公司 镜像文件的同步方法、装置、存储介质及电子设备

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107580083B (zh) * 2017-09-20 2020-11-03 北京京东尚科信息技术有限公司 一种容器ip地址分配的方法和系统
CN107734019B (zh) * 2017-09-29 2020-12-25 中国石油化工股份有限公司 勘探开发容器在线迁移的系统和方法
CN109587281B (zh) * 2017-09-29 2020-07-28 华为技术有限公司 容器配置方法和计算节点
CN107728947A (zh) * 2017-10-13 2018-02-23 郑州云海信息技术有限公司 一种容器冷迁移方法与系统
CN108762882B (zh) * 2018-04-02 2021-12-21 杭州朗和科技有限公司 一种Docker容器的迁移方法、迁移装置、介质和计算设备
CN108628664A (zh) * 2018-05-11 2018-10-09 北京辰森世纪科技股份有限公司 一种容器处理的方法及装置
CN111352689B (zh) * 2018-12-21 2023-04-07 中国电信股份有限公司 实现应用容器化部署无缝迁移的方法和装置
CN111736944A (zh) * 2019-03-25 2020-10-02 北京奇虎科技有限公司 基于Kubernetes的Docker容器定位方法及装置
CN110119377B (zh) * 2019-04-24 2021-01-15 华中科技大学 面向Docker容器的在线迁移系统实现和优化方法
CN110401729B (zh) * 2019-06-28 2022-12-23 苏州浪潮智能科技有限公司 一种云平台服务器网络迁移方法、系统、终端及存储介质
CN113986871A (zh) * 2021-09-15 2022-01-28 新华三大数据技术有限公司 一种数据迁移方法、装置、服务器及可读存储介质
CN115729674A (zh) * 2022-11-21 2023-03-03 北京计算机技术及应用研究所 基于容器的负载迁移系统设计方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2053509A2 (en) * 2007-09-30 2009-04-29 Symantec Corporation System for and method of migrating one or more virtual machines
CN103685368A (zh) * 2012-09-10 2014-03-26 中国电信股份有限公司 用于迁移数据的方法及系统
CN104660441A (zh) * 2013-11-25 2015-05-27 北京信威通信技术股份有限公司 实现服务器高可靠性的方法、装置和系统
CN104965757A (zh) * 2015-01-21 2015-10-07 深圳市腾讯计算机系统有限公司 虚拟机热迁移的方法、虚拟机迁移管理装置及系统
CN105138389A (zh) * 2015-07-30 2015-12-09 北京京东尚科信息技术有限公司 一种集群中虚拟设备的管理方法及系统
CN105227374A (zh) * 2015-10-23 2016-01-06 浪潮(北京)电子信息产业有限公司 一种集群应用的故障迁移方法和系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9003006B2 (en) * 2011-03-14 2015-04-07 Mash5 Technologies, Inc. Intercloud application virtualization
CN105245373B (zh) * 2015-10-12 2017-08-04 天津市普迅电力信息技术有限公司 一种容器云平台系统的搭建及运行方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2053509A2 (en) * 2007-09-30 2009-04-29 Symantec Corporation System for and method of migrating one or more virtual machines
CN103685368A (zh) * 2012-09-10 2014-03-26 中国电信股份有限公司 用于迁移数据的方法及系统
CN104660441A (zh) * 2013-11-25 2015-05-27 北京信威通信技术股份有限公司 实现服务器高可靠性的方法、装置和系统
CN104965757A (zh) * 2015-01-21 2015-10-07 深圳市腾讯计算机系统有限公司 虚拟机热迁移的方法、虚拟机迁移管理装置及系统
CN105138389A (zh) * 2015-07-30 2015-12-09 北京京东尚科信息技术有限公司 一种集群中虚拟设备的管理方法及系统
CN105227374A (zh) * 2015-10-23 2016-01-06 浪潮(北京)电子信息产业有限公司 一种集群应用的故障迁移方法和系统

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871222A (zh) * 2017-12-05 2019-06-11 柯尼卡美能达株式会社 应用的更新方法以及记录介质
CN111684419A (zh) * 2018-02-01 2020-09-18 西门子股份公司 在计算节点之间迁移容器编排平台中的容器的方法和系统
US11809900B2 (en) 2018-02-01 2023-11-07 Siemens Aktiengesellschaft Method and system for migration of containers in a container orchestration platform between compute nodes
CN111684419B (zh) * 2018-02-01 2024-06-04 西门子股份公司 在计算节点之间迁移容器编排平台中的容器的方法和系统
CN110908671A (zh) * 2018-09-18 2020-03-24 北京京东尚科信息技术有限公司 构建docker镜像的方法、装置及计算机可读存储介质
CN113010206A (zh) * 2021-02-26 2021-06-22 山东英信计算机技术有限公司 一种web应用系统的容器化方法、系统及装置
CN113672337A (zh) * 2021-07-16 2021-11-19 广东浪潮智慧计算技术有限公司 一种应用迁移方法、装置、设备及计算机可读存储介质
CN113672337B (zh) * 2021-07-16 2024-02-13 广东浪潮智慧计算技术有限公司 一种应用迁移方法、装置、设备及计算机可读存储介质
CN115510163A (zh) * 2022-09-29 2022-12-23 苏州浪潮智能科技有限公司 镜像文件的同步方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN105893133A (zh) 2016-08-24

Similar Documents

Publication Publication Date Title
WO2017166513A1 (zh) 基于容器技术的应用服务无缝迁移方法和系统
US10700979B2 (en) Load balancing for a virtual networking system
US10554607B2 (en) Heterogeneous cloud controller
US11392402B1 (en) Coordinated migration of network-accessible services while maintaining service availability in prior environment
US20190238636A1 (en) Systems and methods for synchronizing microservice data stores
US10552191B2 (en) Distributed hybrid cloud orchestration model
US9854045B2 (en) Generic cloud enabling of stateful applications
CN111290828A (zh) 使用容器编排服务进行动态路由
CN110417842A (zh) 用于网关服务器的故障处理方法和装置
US12321835B1 (en) Federated learning service in a provider network and training machine learning models using devices external to the provider network
WO2018019262A1 (zh) 云桌面系统、云桌面、云终端及组播方法
US11706298B2 (en) Multichannel virtual internet protocol address affinity
US9591079B2 (en) Method and apparatus for managing sessions of different websites
CN105554143A (zh) 一种高可用缓存服务器及其数据处理方法和系统
WO2021098819A1 (zh) 一种路由更新方法和用户集群
CN108063813A (zh) 一种集群环境下密码服务网络并行化的方法与系统
US20200112510A1 (en) Redirecting data packets between overlay network and underlay network
WO2018019302A1 (zh) 云桌面系统、云终端、及申请加入组播组的方法
US20240195796A1 (en) Remote certificate authority management
CN114760360B (zh) 请求响应方法、装置、电子设备及计算机可读存储介质
CN110505074B (zh) 一种应用模块化集成方法和装置
US11941385B1 (en) Transforming data between cloud entities in an event architecture
CN106209933A (zh) 源主机、迁移架构及数据迁移方法
CA3135722C (en) Sharing resources between client devices in a virtual workspace environment
US11778025B1 (en) Cross-region directory service

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16896285

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896285

Country of ref document: EP

Kind code of ref document: A1