Cross-Cloud Migration of Container Persistent Data Huawei: xiang xinyong 99Cloud: zhu rong Agenda What is Container Persistent Data? When do we need Container Persistent Data? When do we migrate Container Persistent Data? What can be used
"Cross-Cloud Migration of Container Persistent Data" is the property of its rightful owner. Permission is granted to
download and print the materials on this website for personal, non-commercial use only, and to display it
on your personal computer provided you do not modify the materials and that you retain all copyright
notices contained in the materials. By downloading content from our website, you accept the terms of this
agreement.
Presentation Transcript
01
Cross-Cloud Migration of Container Persistent Data Huawei: xiang xinyong
99Cloud: zhu rong<br>
02
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?<br>
03
What is Container Persistent Data? Actually containers are stateless, only data is stateful. When a container is removed, the data is still available. When a container is removed, the data is lost.<br>
04
Container Data Example Container Union File System Container Volume Ephemeral Data Persistent Data For Docker, Union File System uses Docker Storage Driver..
Docker Volume uses Docker Volume Driver.<br>
05
Container Union File System<br>
06
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.<br>
07
When do we need Container Persistent Data? Containers Persistent Data Audit Logs Database Data Containers ...<br>
08
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.
……<br>
09
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.<br>
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 Data Volume Container<br>
11
Flocker Flocker provides migration containers and persistent volume features between hosts. Image is ref from ClusterHQ<br>
12
Container Persistent Data integrated with OpenStack Magnum
Zun
Cinder
Fuxi
…….<br>
13
How to migrate Container Persistent Data cross-cloud?<br>
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.<br>
15
Karbor API How to protect? What can be protected? Where to protect? What was protected? Protection
Plan Protectable Checkpoint Protection
Plugins &
Bank
(Admin) Protection Provider When To protect? Scheduled
Operations How to restore? Restoration<br>
16
Karbor Architecture v Protection Service DB Operation Engine Service Trigger
Engine Bank Plugin Operation
Workflow Time Event RPC Scheduled
Operation Providers
Manager RPC Providers RPC RPC Checkpoints Protectable
Resource Type RPC Protectable Checkpoint Restore RPC Restoration API Service Plan
API Protectable
API Scheduled
Operation
API Restoration
API Trigger
API RPC Triggers Checkpoints Workflow
Engine Resource Plugin Protection Plugin<br>
17
Migrate Container Persistent Data cross-cloud using Karbor Database Volumes Hosts OpenStack Cloud #1 Karbor Bank Checkpoint ……. Migrate Restore Containers Database Volumes OpenStack Cloud #2 Containers Hosts Karbor Karbor<br>
Migrate Persistent Data into Bank by Karbor Karbor Cinder OpenStack Cloud #1 Swift Bank Checkpoint Bank Migrate Database Volume<br>
20
Deploy environment in OpenStack Cloud #2 Nova Heat Magnum Cinder OpenStack Cloud #2 Kubernetes Docker Host VM Volume<br>
21
Restore Persistent Data from Bank by Karbor Cinder OpenStack Cloud #2 Volume Karbor Checkpoint Bank Restore<br>
22
Deploy database containers in OpenStack Cloud #2 Database Volume Kubernetes Host VM Docker Containers Mount OpenStack Cloud #2<br>
23
Check whether new database containers work?<br>
24
Demo<br>
25
What’s next?<br>
26
Data Migration as a Service?<br>
27
All Resources could be migrated in OpenStack Cloud #1 Migration Cloud #2<br>
28
Proposed Migration WorkFlow<br>
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<br>