integration of flexible storage with the api of...

20
Integration of Flexible Storage with the API of Gluster Niels de Vos GlusterFS co-maintainer [email protected] ndevos on IRC @nixpanic on Twitter

Upload: others

Post on 25-Jun-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

Integration of Flexible Storage with the API of Gluster

Niels de VosGlusterFS co-maintainer

[email protected] on IRC@nixpanic on Twitter

Page 2: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

● Introduction and Gluster basics

● Different approaches for automation

● The Gluster API

● Applications using the Gluster API

Agenda

Page 3: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

3#IDI2017, March 10, Bologna

What is GlusterFS?

● Scalable, general-purpose storage platform

● POSIX-y Distributed File System● Object Storage● Distributed block storage● Flexible storage accessible through an API

● No Metadata Server

● Heterogeneous Commodity Hardware

● Flexible and Agile Scaling

● Capacity – Petabytes and beyond● Performance – Thousands of Clients

Page 4: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

4#IDI2017, March 10, Bologna

Distributed Replicated Volume

● Distributes files across replicated bricks

Page 5: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

5#IDI2017, March 10, Bologna

Disperse / Erasure Coding

● Similar to RAID 5/6 over the network

● Encoded fragments of files

Page 6: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

6#IDI2017, March 10, Bologna

● Available in Fedora, Debian, NetBSD and others

● CentOS Storage SIG packages and add-ons

● Community packages in multiple versions for different distributions on http://download.gluster.org/

● Quick Start guides on http://gluster.org and CentOS wiki

Distribution Integration

Page 7: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

Automation Options

Page 8: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

8#IDI2017, March 10, Bologna

● Ansible

● Gdeploy based on Ansible

● Kubernetes with Heketi

● oVirt for VMs on Gluster and Gluster management UI

● Storhaug for High-Availability NFS-Ganesha (+Samba)

● gluster-block for configuring iSCSI-targets

Automated Deployment and Management

Page 9: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

9#IDI2017, March 10, Bologna

● Dynamic persistent storage provisioning for containers

● Heketi handles storage requests from Kubernetes

● Creation, snapshots, deletion, ...● See presentation and demo from FOSDEM

https://fosdem.org/2017/schedule/event/glustercontainer/

● Try it with gluster-kubernetes (uses Vagrant)https://github.com/gluster/gluster-kubernetes

Example: Kubernetes and Heketi

Page 10: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

10#IDI2017, March 10, Bologna

● Creates a disk image on a Gluster Volumes

● Configured (multipath) iSCSI

● Small file workloads are horrible for network filesystems

● Many network procedures cause for slow performance

● Pro: reduce the number of procedures

● Con: not a shared filesystem, single system/container

Example: gluster-block

Page 11: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

Gluster API introduction

Page 12: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

12#IDI2017, March 10, Bologna

● Best performance for accessing data on Gluster

● No need to run applications as root

● libgfapi is a library written in C

● Python interface with libgfapi-python

● Java support through glusterfs-java-filesystem and libgfapi-jni

● New Golang bindings with gogfapi

Language Bindings

Page 13: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

13#IDI2017, March 10, Bologna

● Create a Volume to access the contents

● A volume acts like a directory

● Well documented APIhttp://libgfapi-python.readthedocs.io/

$ python>>> from gluster import gfapi>>> v = gfapi.Volume('vm122-180.example.com', 'objects')>>> v.mount()>>> v.mkdir('/idi2017')>>> v.listdir('/')['idi2017']>>> fd = v.fopen('/idi2017/schedule.html', 'w')>>> ret = fd.write('Welcome to Bologna!\n')>>> fd.close()

Example: gfapi in Python

Page 14: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

Existing Use-Cases

Page 15: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

15#IDI2017, March 10, Bologna

● Network filesystem

● Standard applications, no modifcation needed● Much overhead due to POSIX filesystem API

● Object Storage

● Simplified interface for GET/PUT data● (virtual) block device

● Large files for virtual machines● Loopback mounted filesystems for containers

● API for tight integration in other projects

Approaches to use Gluster

Page 16: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

16#IDI2017, March 10, Bologna

● Backup to and from Gluster

● Bareos● Virtual Machine

● QEMU, libvirt, oVirt, OpenStack, CloudStack, Proxmox● Network Filesystem

● Samba, NFS-Ganesha● Object Storage

● gluster-swift with S3 option

Applications using the API

Page 17: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

17#IDI2017, March 10, Bologna

● qemu-img with gluster:// URL$ qemu-img create \ -f qcow2 \ gluster://vm122-180.example.com/vms/idi2017.qcow2 \ 2G

Example: QEMU

Page 18: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

18#IDI2017, March 10, Bologna

● Object Storage

● Proof of concept gluster-swift container with S3 optionhttp://uyirpodiru.blogspot.com/2017/03/building-gluster-object-in-docker.html

● s3curl example tool in Perlhttps://aws.amazon.com/code/128

$ ./s3curl.pl --id demo \ -- http://172.17.0.2:8080/ $ ./s3curl.pl --id demo --createBucket \ -- http://172.17.0.2:8080/idi2017 $ ./s3curl.pl --id demo --put README \ -- http://172.17.0.2:8080/idi2017/README

Example: S3 Object Storage

Page 19: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

19#IDI2017, March 10, Bologna

Mailing lists:[email protected]@gluster.org

IRC:#gluster and #gluster-dev on Freenode

Links:http://gluster.org/http://gluster.readthedocs.io/https://github.com/gluster/

Resources

Page 20: Integration of Flexible Storage with the API of Glusterpeople.redhat.com/ndevos/talks/2017-03-IDI/20170310-Guster-API.pdf · Integration of Flexible Storage with the API of Gluster

Thank you!

Niels de [email protected]

ndevos on IRC@nixpanic on Twitter