Skip to main content

EMC ViPR data-services: NFS mount scripts for object buckets

Project description

======================================
= EMC ViPR Data Services - CLI Tools =
======================================

To Install:

# python setup.py install

On Windows you will also need to import the WinNFSClient.reg file. Double-click
the file and allow the import. This will set the NFS anonymous UID to match
the exported UID so you can access the files. After this action, you must
restart the OS.

==================
= viprfileaccess =
==================

EMC ViPR data services includes an option to export S3 buckets and Swift
containers over NFS. The set of objects exported in this manor is fixed and new
objects added via the REST protocol will not be visible in existing exports.
Conversely, you cannot create or delete objects in the exported mount points,
although when mounted read-write, you can modify existing objects. While
objects are available over NFS, they are inaccessible via REST and vice versa.

The set of objects to be exported is defined by a start-token and an end-token,
which represent specific points in time for the bucket. These tokens are
returned from any call ("get" or "set"). Only one token may be used in "set"
calls with the following outcome:

when setting mode to readOnly or readWrite and a token is included,
only enable access for objects *newer* than (created since) the
specified token.

when setting mode to disabled and a token is included, only disable
access for objects *older* than (created before) the specified token.

Leaving out the token signifies that all objects in the bucket should be
affected by the operation.

Using the "set" call to enable access for new objects and disable access for
old objects, you can effectively establish a sliding window (over time) of
objects available via NFS for a given bucket. However, you cannot enable access
for older objects without enabling it for the entire bucket.

usage:
viprfileaccess -k <access_key> -s <secret_key> [..] <action> <bucket> [mode]
options:
-h : print this help text
-e <endpoint> : specify the data node endpoint (required if
the BOURNE_DATA_IPADDR env var is not set)
-k <access_key> : specify your vipr access_key (this key must
own the bucket)
-s <secret_key> : the secret key associated with the access key
-n <namespace> : specify the namespace of the tenant (optional)
-t <token> : specify the token; will only export objects
newer than or disable objects older than the
token
-d <minutes> : specify the duration the export will last
in minutes (defaults to 60 minutes)
-u <local_uid> : specify the client uid which should have
access to the mounted files (defaults to the
uid running this script)
-H <hosts> : specify the set of hosts allowed to access
the exports (defaults to the host running
this script)
action : the action to perform. can be one of [getmode,
setmode, getaccess]
bucket : the bucket containing the objects to export
mode : the access mode to set for the objects. may
be one of [readOnly, readWrite, disabled].
*required for the setmode action.

Example:

$ viprfileaccess -e 10.247.103.204 -k wuser1@SANITY.LOCAL -s c7orEkAqaDN151691rYMVn+u3ZMmI0DyetDUQkvD getaccess test.vipr-fileaccess-basic-read-only
all exports:
--lglw6132:/ifs/sos/ProviderTenant_wsisilonobje_e38718cd-a819-4bca-a1a6-65c75d7f4062

objects under export
--lglw6132:/ifs/sos/ProviderTenant_wsisilonobje_e38718cd-a819-4bca-a1a6-65c75d7f4062:
----object_name: d49bb75a850aa75a6792b76a15022de78317390f94c77b637c143a7124343699
------object_path: vipr/customDir/FileAccess/s3.test.vipr-fileaccess-basic-read-only/1/d49bb75a850aa75a6792b76a15022de78317390f94c77b637c143a7124343699/data

$

=============
= viprmount =
=============

This package includes a script to enable NFS access for a set of objects and
automatically mount them locally (viprmount). It also includes a script to
reverse this action (viprumount), unmounting and removing the NFS exports for
the same set of objects.


usage:
viprmount -b <bucket> -k <access_key> -s <secret_key> [..] [local_dir]
other options:
-h : print this help text
-r : mount read-only
-e <endpoint> : specify the data node endpoint (required if
the BOURNE_DATA_IPADDR env var is not set)
-k <access_key> : specify your vipr access_key (this key must
own the bucket)
-s <secret_key> : the secret key associated with the access key
-b <bucket> : the bucket containing the objects to export
-t <token> : specify the accessmode token; will only
mount objects newer than the token
-d <minutes> : specify the duration the mount will last
in minutes (defaults to 60 minutes)
local_dir : specify the local directory under which mount
points will be created (defaults to .)

usage: viprumount [-h] [local_dir]
options:
-h : print this help text
local_dir : the local directory under which mount points
were created (defaults to .)

Example:

$ viprmount -e 10.247.103.202 -k wuser1@SANITY.LOCAL -s dtyRWLrmqxwPiBJNFXUgpuADx7BBaVSbIGFAPMml -b test-fileaccess tmp
exporting wuser1@SANITY.LOCAL:/test-fileaccess to 10.96.45.187:tmp as 501
waiting for bucket test-fileaccess to be in mode readWrite
switched to readWrite
mounting lglw6132:/ifs/sos/ProviderTenant_wsisilonobje_7fc8fed2-207a-407e-b9e7-33c41be5acbb to tmp/mount1

---------------object paths---------------------
623e1a06959d13206600f73786fc6d0aa4aa66efcda1c8c696e474683d155146 tmp/mount1/webstorage/customDir/FileAccess/s3.test-fileaccess/1/623e1a06959d13206600f73786fc6d0aa4aa66efcda1c8c696e474683d155146/data

token for new objects: 31

$

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vipr-data-cli-0.4.2.tar.gz (10.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page