accessing gluster ufo_-_eco_willson

Download Accessing gluster ufo_-_eco_willson

If you can't read please download the document

Upload: glusterorg

Post on 08-Jan-2017

66 views

Category:

Technology


0 download

TRANSCRIPT

Introduction to accessing Gluster volumes

Eco WillsonGluster Communities

A bit about me

Systems administration and DevOps background.

Joined Gluster in September of 2010

Current role is a technical liaison to GlusterFS upstream viathe Open Source and Standards organization (OSAS) within Red Hat.

Fun by example! (cont.)

6) Upload a new picturecurl -v -X PUT -T CoolLinuxConfPic.jpg -H 'X-Auth-Token: AUTH_tk3b615e3c5ada4e06b2354ed10a129ecb' -k https://127.0.0.1:443/v1/AUTH_test/conference_pictures/pic8675309.jpg

7) Tag new picture with metadata curl -v -X POST -H 'X-Auth-Token: AUTH_tk3b615e3c5ada4e06b2354ed10a129ecb' -k https://127.0.0.1:443/v1/AUTH_test/conference_pictures -H 'X-Container-Meta-Demo-Venue: LinuxCon EU 2012' -H 'X-Container-Meta-Creator: Eco' -H 'X-Container-Meta-Creator-Taskmaster: John Mark Walker'

8) Ask the intern to verify the backups worked correctly since you need to step out and the boss will ask while you are away

Overview of Gluster philosphy

Your data should be yours, always

We enable a framework of methods to allow data accessany way that suits you

This includes * Traditional filesystem mounts* Mount via NFS or CIFS* Access via REST using our Unified File and Object (UFO) feature * xlator framework for times when you need data to work better for the particular needs of your environment or application

Accessing using traditional filesystem mounts

Requires the Gluster packages to be installed on the client

Including _netdev option in fstab will help avoid accidentally fillingup / partition

It is recommended that your mount points are clearly separate from your export folders on the Gluster servers Consider the confusion that can occur if you have the brick mounted on /mnt/export/gluster, and the client mount on /mnt/gluster...

Accessing via NFS/CIFS

Gluster has it's own NFS server inline. Due to this, it is not recommended to run native NFS on the Gluster servers

No additional Gluster packages need to be installed, although you may need to add additional packages (e.g. nfs-common in ubuntu or rpcbind)

Many distributions use NFS by default now. Due to this, use the -o vers=3 option when mounting

Include the _netdev option in fstab as you would with regular NFS

Don't forget that automatic failover does not occur when not using the Gluster native client (but can still be achieved via carp or CTDB)

Accessing via Unified File and Object

Additional setup is required vs the standard Gluster setup

See Kalebs' post on Gluster.org:http://www.gluster.org/2012/09/howto-using-ufo-swift-a-quick-and-dirty-setup-guide/

Allows simultaneous access to your data from both developers and data consumers (users and applications)

Why use UFO on Gluster?No 5GB limit on transfer size

Takes advantage of the Gluster features you have already set up in your volume (e.g., replication, automatic fail over and self-heal)

Global access to the same data, using the same namespace, at the same time

Ease of use and management versus other clustering solutions

How does simultaneous access help me?By being able to access the same data via both the REST API and traditional file system access methods, you can work on the same data via the method you choose, and using multiple methods, simultaneously, on the same data. This allows you to use the newer cloud based storage without having to sacrifice functionality for older programs that may be dependent on direct access to the filesystem, for example, using anti-virus scanners on uploaded files. This also means the changes I make via the filesystem, or via UFO, are being done against the same exact object.

What do I need to test UFO with GlusterFS?At least two nodes with Gluster installed already. For testing, virtual machines are fine.

Some knowledge of the REST API or cURL to be able to address the Gluster volume and files within it

What do I need to test UFO with GlusterFS?At least two nodes with Gluster installed already. For testing, virtual machines are fine.

Some knowledge of the REST API or cURL to be able to address the Gluster volume and files within it

Common CommandsCreate an authentication tokencurl -v -H 'X-Storage-User: gv0:admin' -H 'X-Storage-Pass:admin' -k https://127.0.0.1:443/auth/v1.0/

Create a new containercurl -v -X PUT -H 'X-Auth-Token: AUTH_tkde3ad38b087b49bbbac0494f7600a554'https://example.storage.com:443/v1/AUTH_test/pictures -k

Display existing containerscurl -v -X GET -H 'X-Auth-Token: AUTH_tkde3ad38b087b49bbbac0494f7600a554'https://example.storage.com:443/v1/AUTH_test -k

Common CommandsCreate a new object in a containercurl -v -X PUT -H 'X-Auth-Token: AUTH_tkde3ad38b087b49bbbac0494f7600a554'https://example.storage.com:443/v1/AUTH_test/pictures/dog -H 'Content-Length: 0' -k

List all objects in a containercurl -v -X GET-H 'X-Auth-Token: AUTH_tkde3ad38b087b49bbbac0494f7600a554'https://example.storage.com:443/v1/AUTH_test/images -k

Common CommandsDelete a containercurl -v -X DELETE -H 'X-Auth-Token: AUTH_tkde3ad38b087b49bbbac0494f7600a554'https://example.storage.com:443/v1/AUTH_test/pictures/dog -H 'Content-Length: 0' -k

Delete an object in a containercurl -v -X DELETE -H 'X-Auth-Token:AUTH_tkde3ad38b087b49bbbac0494f7600a554' https://example.storage.com:443/v1/AUTH_test/pictures/cat -k

Some things to remember for Gluster with SWIFTWhen we reference account, we are referring to the gluster volumeWhen adding users, the second field is where you specify the Gluster volume. In the following string:user_test_tester = testing .adminReplace test with the Gluster volumeA container lives within a Gluster volume, and can be thought of as a logically separated space to execute commandsThe Container Server handles listing objectsThe Account Server handles listing the Gluster volumes (remember 'accounts' from above)

Fun by example!

1) Get an auth token:curl -v -H 'X-Storage-User: ufo:test' -H 'X-Storage-Pass: test' -k https://127.0.0.1:443/auth/v1.0

2) List containers in a Gluster volume named testcurl -v -X GET -H 'X-Auth-Token: AUTH_tkde3ad38b087b49bbbac0494f7600a554' https://127.0.0.1:443/v1/AUTH_test -k

3) Create a new container to for uploading more picturescurl -v -X PUT -H 'X-Auth-Token: AUTH_tkde3ad38b087b49bbbac0494f7600a554' https://127.0.0.1:443/v1/AUTH_test/conference_pictures -k

Fun by example! (cont.)

4) List new containercurl -v -X GET -H 'X-Auth-Token: AUTH_tkde3ad38b087b49bbbac0494f7600a554' https://127.0.0.1:443/v1/AUTH_test -k

5) Haze the intern by telling them to back up the container. Make sure to point out how critical the data is. Do not ruin the fun by letting them know you backed it up properly already (using the Gluster volume already mounted on their machine)sudo rm -rf /mnt/ufo/halloween_pix/*

Thanks!

[email protected] chat with us at #gluster on freenode IRC

Joe Julians' HTML UFO Demohttps://github.com/joejulian/ufopilot

Click to edit the title text formatClick to edit Master title style

11/8/12

Click to edit the title text formatClick to edit Master title style

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline LevelEighth Outline Level

Ninth Outline LevelClick to edit Master text stylesSecond levelThird levelFourth levelFifth level

11/8/12