300 likes | 586 Views
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?
E N D
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 to migrate Container Persistent Data? How to migrate Container Persistent Data cross-cloud? Demo What’s next?
What is Container Persistent Data? Actually containers are stateless, only data is stateful. Stateless Containers When a container is removed, the data is still available. When a container is removed, the data is lost. Ephemeral Data Persistent Data
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.
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.
When do we need Container Persistent Data? Containers Containers Persistent Data Audit Logs Database Data ...
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. ……
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.
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
Flocker Image is ref from ClusterHQ Flocker provides migration containers and persistent volume features between hosts.
Container Persistent Data integrated with OpenStack Magnum Zun Cinder Fuxi …….
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.
Karbor API How to protect? Protection Provider What can be protected? How to restore? When To protect? Where to protect? What was protected? Protection Plan Restoration Protectable Scheduled Operations Protection Plugins & Bank (Admin) Checkpoint
Karbor Architecture Providers API v API Service Checkpoint API DB Plan API Trigger API Scheduled Operation API Protectable API Restoration API RPC RPCProtectable RPCCheckpoints RPCRestoration RPC Scheduled Operation RPC Triggers RPCProviders Operation Engine Service Protection Service Restore Providers Manager Protectable Resource Type Operation Workflow Trigger Engine Checkpoints Workflow Engine Resource Plugin Time Event Protection Plugin Bank Plugin Checkpoint
Migrate Container Persistent Data cross-cloud using Karbor OpenStack Cloud #2 OpenStack Cloud #1 Hosts Hosts Containers Containers Karbor Bank Checkpoint ……. Volumes Volumes Migrate Restore Database Database Karbor Karbor
Environment exists in OpenStack Cloud #1 OpenStack Cloud #1 Hosts Volumes Containers Database Kubernetes Docker
Migrate Persistent Data into Bank by Karbor OpenStack Cloud #1 Karbor Cinder Volume Migrate Bank Database Checkpoint Swift Bank
Deploy environment in OpenStack Cloud #2 OpenStack Cloud #2 Magnum Heat Nova Cinder Host VM Volume Kubernetes Docker
Restore Persistent Data from Bank by Karbor OpenStack Cloud #2 Karbor Cinder Restore Bank Volume Checkpoint
Deploy database containers in OpenStack Cloud #2 OpenStack Cloud #2 Host VM Volume Mount Containers Database Kubernetes Docker
All Resources could be migrated in OpenStack Cloud #1 Cloud #2 Container Container VM VM Volume Volume Share Share Migration Image Image ……. …….
Proposed Migration WorkFlow Find Source Entities Specify Migration Target Create Migration Group Launch Migration Migration Finished Create Migration Task
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