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 to ID: 810615
Download The PPT/PDF document "Cross-Cloud Migration of Container Persi..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site 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.
Slide1
Cross-Cloud Migration of Container Persistent Data
Huawei: xiang xinyong 99Cloud: zhu rong
Slide2Agenda
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
c
ross-
c
loud?
Demo
What’s next?
Slide3What is Container Persistent Data?
Containers
Stateless
Ephemeral Data
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.
Slide4Container Data E
xample
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.
Slide5Container Union File System
Slide6Container 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.
Slide7When do we need Container Persistent Data?
Containers
Persistent Data
Audit Logs
Database Data
Containers
...
Slide8When 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.
……
Slide9What 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.
Slide10Create Data Volume Container(eg: Postgres)
sudo docker run -i -t -v /dbdata --name dbdata training/postgres /bin/bashRefer 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
Data Volume Container
Slide11Flocker
Flocker provides migration containers and persistent volume features between hosts.
Image is ref from ClusterHQ
Slide12Container
Persistent Data integrated with OpenStackMagnum
Zun
Cinder
Fuxi
…….
Slide13How to migrate Container Persistent Data cross-cloud?
Slide14What’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.
Slide15Karbor 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
Slide16Karbor 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
Providers
API
Checkpoint
API
Restoration
API
Trigger
API
RPC Triggers
Checkpoints
Workflow
Engine
Resource Plugin
Protection Plugin
Slide17Migrate 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
Slide18Environment exi
sts in OpenStack Cloud #1 OpenStack Cloud #1
Database
Volumes
Kubernetes
Hosts
Docker
Conta
i
ners
Slide19Migrate
Persistent Data into Bank by Karbor Karbor
Cinder
OpenStack Cloud #1
Swift Bank
Checkpoint
Bank
Migrate
Database
Volume
Slide20Deploy environment in OpenStack Cloud #2
Nova
Heat
Magnum
Cinder
OpenStack Cloud #2
Kubernetes
Docker
Host VM
Volume
Slide21Restore
Persistent Data from Bank by KarborCinder
OpenStack Cloud #2
Volume
Karbor
Checkpoint
Bank
Restore
Slide22Deploy database containers in OpenStack Cloud #2
Database
Volume
Kubernetes
Host VM
Docker
Containers
Mount
OpenStack Cloud #2
Slide23Check whether new database containers work?
Slide24Demo
Slide25What’s next?
Slide26Data Migration as a Service?
Slide27All Resources could be migrated in OpenStack
Cloud #1
Migration
Share
VM
Volume
Container
Image
…….
Cloud #
2
Share
VM
Volume
Container
Image
…….
Slide28Proposed
Migration WorkFlowFind
Source
Entities
Specify
Migration Target
Create
Migration Group
Launch Migration
Create
Migration Task
Migration Finished
Slide29Discuss 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
Slide30Thank you!