UMobj: Difference between revisions

From UMIACS
Jump to navigation Jump to search
Line 20: Line 20:
==lsobj==
==lsobj==


To list the object store you can use the <b>lsobj</b> command.  If given without a argument it will list your buckets (this will only list buckets that you created).  You can then give it a bucket to list the contents within the bucket (if you were granted access to a bucket you didn't create you can also use it).
To list the object store you can use the <b>lsobj</b> command.  If given without a argument it will list your buckets (this will only list buckets that you created).   


<pre>
<pre>
Line 28: Line 28:
zeta
zeta
</pre>
</pre>
You can then give it a bucket to list the contents within the bucket (if you were granted access to a bucket you didn't create you can also use it).  This will list all the keys in your bucket which can take a long time.


<pre>
<pre>
Line 39: Line 41:
================================================================================
================================================================================
TOTAL:    353.3 KB 6 Files
TOTAL:    353.3 KB 6 Files
</pre>
===Directories===
In a object store there are only buckets and keys (key=value store).  This means your traditional posix directory structure is somewhat faked out using the UNIX <b>/</b> character.  Any key in the bucket ending in a / will be interpreted by the <code>lsobj</code> and website as a directory.  You can list only sub directories with the <code>lsobj</code> utility.
<pre>
$ lsobj test:foo/
foo/
-rwx--- 2013-10-04T15:27:39.000Z     0.0 b foo/
-rwx--- 2013-10-04T15:27:40.000Z     0.0 b foo/bar
================================================================================
TOTAL:      0.0 b  2 Files
</pre>
</pre>

Revision as of 15:32, 4 October 2013

This is a set of console utilities that are available on all UMIACS supported machines. They are provided to support our Ceph Object Stores so our users may interact with them on the command line. In addition each Ceph Object Store in UMIACS has fully functional web application that allows access to your storage from any web browser.

For UMIACS support machines these utilities are installed at /opt/UMobj/bin however they should already be available in your path.

Prerequisites

To use any of these utilities you either have to pass in on the command line your access and secret keys or you need to set some appropriate environmental variables. You can obtain your access and secret keys (which are different from your username and password) by visiting the appropriate Ceph Object Store. The default store is https://obj.umiacs.umd.edu/UMobjstore/user.

In that page will be your access and secret keys for that Ceph Object Store. You can then set for example in bash the following environment variables.

  export OBJ_ACCESS_KEY_ID="31sdfadDFAHFDN+344qOEIS"
  export OBJ_SECRET_ACCESS_KEY="NDSMK3233adfahadflkkPDSH092DSJKDKDJKFDLSFLNK"

If you are not using the default Ceph Object Store you can tell the utilities to use an alternative server.

  export OBJ_SERVER="gembox.cbcb.umd.edu"

You can optionally use the --access_key, --secret_key and --server switches to the utilities.

lsobj

To list the object store you can use the lsobj command. If given without a argument it will list your buckets (this will only list buckets that you created).

$ lsobj
bob
test
zeta

You can then give it a bucket to list the contents within the bucket (if you were granted access to a bucket you didn't create you can also use it). This will list all the keys in your bucket which can take a long time.

$ lsobj test
-rwx---	2013-10-04T15:25:09.000Z	    1.8 KB	UMIACSCA.pem
-rwx---	2013-10-04T15:25:24.000Z	  311.4 KB	cover.jpg
-rwx---	2013-10-04T15:27:39.000Z	    0.0 b 	foo/
-rwx---	2013-10-04T15:27:40.000Z	    0.0 b 	foo/bar
-rwx---	2013-10-04T15:25:32.000Z	   31.8 KB	screenshot.jpg
-rwx---	2013-10-04T15:26:48.000Z	    8.3 KB	thunderbird.xpm
================================================================================
		TOTAL:  	  353.3 KB 	6 Files

Directories

In a object store there are only buckets and keys (key=value store). This means your traditional posix directory structure is somewhat faked out using the UNIX / character. Any key in the bucket ending in a / will be interpreted by the lsobj and website as a directory. You can list only sub directories with the lsobj utility.

$ lsobj test:foo/
foo/
-rwx---	2013-10-04T15:27:39.000Z	    0.0 b 	foo/
-rwx---	2013-10-04T15:27:40.000Z	    0.0 b 	foo/bar
================================================================================
		TOTAL:  	    0.0 b  	2 Files