Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cross-Cloud Migration of Container Persistent Data

Similar presentations


Presentation on theme: "Cross-Cloud Migration of Container Persistent Data"— Presentation transcript:

1 Cross-Cloud Migration of Container Persistent Data
Huawei: xiang xinyong 99Cloud: zhu rong Hello everyone, Good afternoon. Hola. My name is xiang xinyong, also you can call me xiang. I am from huawei company. I have worked more than 8 years and have contributed in OpenStack more than one year. I love OpenStack and containers very much. This is my partner zhurong. My name is zhurong, I am from 99cloud. I am the core member of murano and solum in OpenStack. It’s our pleasure to talk about this presentation about the container persistent data.

2 Agenda What is Container Persistent Data?
When do we need Container Persistent Data? When do we migrate Container Persistent Data? What can be used to migrate Container Persistent Data? How to migrate Container Persistent Data cross-cloud? Demo What’s next? Before we start to this presentation, we could make some research about it. How many people have knew about docker volume driver? How many people have used magnum to deploy a cluster with volume in OpenStack?

3 What is Container Persistent Data?
Actually containers are stateless, only data is stateful. Containers Stateless Ephemeral Data Persistent Data When a container is removed, the data is lost. When a container is removed, the data is still available. Let look at this pic, Actually the containers itselfs are stateless, only the data is stateful. There two types of the data, the ephemeral data and the persistent, the ephemeral data will be lost after the container removed, but the persistent data will still available after the container removed.

4 Container Data Example
Union File System Container Volume Ephemeral Data Persistent Data For Docker, Union File System uses Docker Storage Driver.. Docker Volume uses Docker Volume Driver. in this case the ephemeral data we will using union file system for the example and the persistent data will using volume for the example.

5 Container Union File System
Look at the first pic, When a container is initiated, a read/write layer is added on top of the read-only image layers. Any changes made to the container while it is running are reflected in the container layer; the underlying image layers are never affected. As soon as a change is initiated to an underlying layer, a new read-write layer is added. This is referred to as copy on write. Using a container layer provides several benefits, the most two is: speed and minimizing the storage space needed. When a new container is started, Docker does not clone the read-only base image, it simply creates a new container layer and links that to the existing base image. This can be done very quickly. And next about union file system, union file system is used to: 1)avoid duplicating a complete set of files each time you run an image as a new container. 2)seperate changes to a container filesystem in its own layer. If you didn't have UnionFS, an 200 mirc-bytes image run five times as five separates containers would mean 1Gigebyte of disk space.

6 Container Volume Volumes are not controlled by the storage driver.
Volumes are initialized when a container is created. If the container’s base image contains data at the specified mount point, that existing data is copied into the new volume upon volume initialization. Volumes can be shared and reused among containers. Changes to a volume are made directly. Changes to a volume will not be included when you update an image. Volumes persist even if the container itself is deleted. About the container volume

7 When do we need Container Persistent Data?
Containers Containers Persistent Data Audit Logs Database Data ... The ephemeral nature of containers offers a myriad of possibilities when it comes to scaling and disaster recovery, but it also has some risks. The risk is the data inside the container. If a container dies, anything in the read-write layer is lost. But usually the applications need persistent data storage, whether it’s maybe a database, or audit logs.

8 When do we migrate Container Persistent Data?
Business change -- acquisition and merger of business unit. Workload balance -- improve efficiency, performance and scalability of apps. Hardware/System upgrade -- adapt new changes of technology, practice … Cost cutting -- cut down the cost of data movement. Fault -- networking,  disk … do not work well. …… So when we need to migrate container persistent data, there maybe have the scenes below, such as ...

9 What can be used to migrate Container Persistent Data?
Data Volume Container If you share some continuously updated data to the container, the simplest way is use data volume container, the data volume container is a common container, providing data for other container using the mount. Flocker Docker specify a particular volume driver to perform the actual work. This volume can be mounted when a container is created. Flocker is one kind of third-party Docker Volume Driver for Data Volume. Next is about what can be used to migrate container persistent data, usually there are two ways, data volume container and flocker

10 Data Volume Container Create Data Volume Container(eg: Postgres)
sudo docker run -i -t -v /dbdata --name dbdata training/postgres /bin/bash Refer to Data Volume Container sudo docker run -i -t  --volumes-from dbdata --name db1 training/postgres /bin/bash Backup Data Volume Container sudo docker run --volumes-from dbdata -v $(pwd):/backup training/postgres tar cvf /backup/backup.tar /dbdata Prepare new Data Volume Container sudo docker run -v /dbdata --name dbdata2  training/postgres /bin/bash Restore Data Volume Container sudo docker run --volumes-from dbdata2 -v $(pwd):/backup training/postgres tar xvf /backup/backup.tar This is about how to backup and restore a data volume container

11 Flocker Image is ref from ClusterHQ Flocker is an open-source container data volume manager for your Dockerized applications. By providing tools for data migrations, Flocker gives ops teams the tools they need to run containerized stateful services like databases. Flocker manages Docker containers and data volumes together. When you use Flocker to manage your stateful microservice, your volumes will follow your containers when they move between different hosts in your cluster. Flocker provides migration containers and persistent volume features between hosts.

12 Container Persistent Data integrated with OpenStack
Magnum Zun Cinder Fuxi ……. Thanks my partner. Zhurong. He introduced what’s container persistent data and the senario to use container persistent data. and the background to migrate container persistent data. Let’s take a look at the relationship between container and openstack. There are lots of OpenStack projects which are connected with container. For example, we can use magnum to deploy container cluster. And magnum use container orchestration engines like Docker Swarm, Kubenetes and Mesos. Also there is a project named Zun, it could manage the container api. About the container persistent data and OpenStack. You know in OpenStack Cinder provider the block storage service Manila provides the file system service. Swift provides the object storage service. Docker provides the storage interface to integrated with volume drivers. Like Flocker, Convoy and REX-Ray and so on. OpenStack also has a project to implement the docker volume driver. This project is Fuxi. This project makes a connection bewteen containers and Cinder. We could use Fuxi to create and mount the cinder volume to the containers.

13 How to migrate Container Persistent Data cross-cloud?
So let’s back to the topic How to migrate container persistent data cross cloud. If we have serveral OpenStack clouds like this in the Sky. You know there are lots of ways to migrate. For example, we could use the storage devices self abillity to finish the migration. Also we could use hard copy to finish the migration. Also we could use backup and restore to migrate the persistent data. So How could we do that in the OpenStack?

14 What’s Karbor? Karbor is an OpenStack official project,
and it’s former name is Smaug. The koala is an arboreal herbivorous marsupial native to Australia, and Karbor is koala's indigenous name. Karbor deals with protecting Data and MetaData  that comprises an OpenStack-deployed Application. Karbor is designed to provide a high-level framework to integrated with plugins. OK. I will introduce an OpenStack official project. Its name is Karbor, and its former name is Smaug. The Karbor’s name is from the koala. You know this kind of animal is live in Australia. Karbor is koalla’s native name. Karbor is aim to protect any resources in OpenStack.

15 Karbor API What can be protected? How to protect? Protection Provider
When To protect? How to restore? Where to protect? What was protected? Protectable Protection Plan Protection Plugins & Bank (Admin) Checkpoint Scheduled Operations Restoration

16 Operation Engine Service
Karbor Architecture v API Service DB Protectable API Trigger API Scheduled Operation API Plan API Providers API Checkpoint API Restoration API RPC RPC Scheduled Operation RPC Triggers RPC Providers RPC Checkpoints RPC Restoration RPC Protectable Operation Engine Service Protection Service Operation Workflow Trigger Engine Providers Manager Restore Protectable Resource Type Workflow Engine Checkpoints Resource Plugin Time Event Protection Plugin Bank Plugin Checkpoint 2min RunC There

17 Migrate Container Persistent Data cross-cloud using Karbor
OpenStack Cloud #1 OpenStack Cloud #2 Hosts Hosts Containers Containers Karbor Bank Checkpoint ……. Volumes Volumes Migrate Restore Database Database The container persistent data is stored in Cinder’s volume The Karbor Bank could be swfit s3 ceph and so on. Karbor Karbor

18 Environment exists in OpenStack Cloud #1
Hosts Volumes Containers Database Kubernetes Docker Deploy database container cluster in cloud #1

19 Migrate Persistent Data into Bank by Karbor
OpenStack Cloud #1 Cinder Karbor Volume Migrate Bank Database Swift Bank Checkpoint Migrate persistent data to Bank by Karbor

20 Deploy environment in OpenStack Cloud #2
Magnum Heat Nova Cinder Host VM Kubernetes Volume Docker In the OpenStack cloud #2 we use magnum to deploy the containers cluster And also we used kubuernetes as the container orestration engine

21 Restore Persistent Data from Bank by Karbor
OpenStack Cloud #2 Cinder Karbor Restore Bank Volume Checkpoint Restore persistent data from Karbor Bank

22 Deploy database containers in OpenStack Cloud #2
Host VM Volume Mount Containers Database Kubernetes Docker Deploy database container cluster in cloud #2 Include mount volume to container

23 Check whether new database containers work?

24 Demo

25 What’s next?

26 Data Migration as a Service?

27 All Resources could be migrated in OpenStack
Cloud #1 Cloud #2 Share VM Volume Container Image ……. Share VM Volume Container Image ……. Migration Container, VM, Bare Metal, Volume, Share, Image Do we need to manage all the resources entity migration in OpenStack? There are vms、volumes、containers migration. and should be migrate cross-cloud. Do we need a new project? “Data migration as a Service” provide a framework to manage all the migrations

28 Proposed Migration WorkFlow
Find Source Entities Specify Migration Target Create Migration Group Launch Migration Migration Task Migration Finished

29 Discuss more in details
Karbor Design Session: Wed 26  5:05pm-5:45pm AC Hotel - P3 - Montjuic Thu 27  4:40pm-5:20pm CCIB - Centre de Convencions Internacional de Barcelona - P1 - Room 127 Fri 28  9:00am-9:40am CCIB - Centre de Convencions Internacional de Barcelona - P1 - Room 123 Fri 28  9:50am-10:30am CCIB - Centre de Convencions Internacional de Barcelona - P1 - Room 123 Fri 28  11:00am-11:40am CCIB - Centre de Convencions Internacional de Barcelona - P1 - Room 123 Fri 28  11:50am-12:30pm CCIB - Centre de Convencions Internacional de Barcelona - P1 - Room 123 IRC:#openstack-karbor

30 Thank you!


Download ppt "Cross-Cloud Migration of Container Persistent Data"

Similar presentations


Ads by Google