Skip to content

bash library to access Clodo Cloud Storage. Should fit any OpenStack Swift installation.

Notifications You must be signed in to change notification settings

kinxnet/SwiftBash

 
 

Repository files navigation

- User scripts after exporting the following env variables:
```
export OS_TENANT_NAME=tenant
export OS_USERNAME=user
export OS_PASSWORD=pass
export OS_AUTH_URL=https://localhost:5000/v2.0/
export OS_AUTH_VERSION=2
```
```
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_TENANT_NAME=tenant
export OS_USERNAME=user
export OS_PASSWORD=pass
export OS_AUTH_URL=https://localhost:5000/v3/
export OS_AUTH_VERSION=3
```

- Modified to work with keystone v2 and v3.
- downloader.sh, upload_file.sh uploader.sh are works fine though test.sh result shows:
```
ERROR:Object not found!
+ CONT_create Failed
ERROR:Object not found!
+ OBJ_put Failed
ERROR:Object not found!
+ OBJ_get Failed
ERROR:Object not found!
+ OBJ_copy Failed
ERROR:Object not found!
+ OBJ_delete Failed
ERROR:Object not found!
+ OBJ_delete.copy Failed
ERROR:Object not found!
+ CONT_delete Failed
```


======================================================================
SwiftBash: bash interface to OpenStack Swift
======================================================================

DESCRIPTION
===========
SwiftBash is a bash functions library which provides access to Clodo
Cloud Storage (http://www.clodo.ru/cloud-storage/review/) and any
other OpenStack Swift (http://swift.openstack.org/) compatible
storage, like Rackspace Cloud Files.

This library is not intended to be the full API implementation but a
set of handy functions for everyday use in scripts.

REQUIREMENTS
============
curl (tested on 7.21.0)
mktemp (any)
bash (tested on 4.1)
grep
sed
cut

Operating Systems
=================
Should work on any unix-like OS with tools listed in requirements.
I use it on Debian GNU/Linux stable (6.0) and testing distributions.

INSTALL
=======
Just put it where you can source it from later.

USAGE
======
Helper scripts:
Both uploader.sh and deleter.sh require username and secret key to
access the storage in  $STORAGE_USER and $STORAGE_KEY variables
respectively. You may create file ~/.swiftbash.sh and declare them
there like this:

realloc@motoko:~/projects/SwiftBash$ cat ~/.swiftbash.sh 
STORAGE_USER='storage_6681_1'
STORAGE_KEY='62027a8e6n29ft3b00d586fb7865f22b'

Make sure access permissions on that file meet your security needs.
Helper scripts will source that file and use provided credentials to
access your cloud storage.

Run test.sh to make sure that everything works.

realloc@motoko:~/projects/clodo/SwiftBash$ ./test.sh 2>test.log
+ AUTH Passed
+ ACC_meta Passed
+ ACC_cont_list Passed
+ CONT_meta Passed
+ CONT_obj_list Passed
+ CONT_create Passed
+ OBJ_put Passed
+ OBJ_get Passed
+ OBJ_delete Passed
+ CONT_delete Passed

The library:
Please read helper scripts ans use them as example.

SUPPORT
=======
This tool is not officially supported by clodo.ru, but we will be
happy to help you as much as possible. 

Please report bugs and feature requests in the github issue
tracker:
http://github.com/ClodoCorp/SwiftBash/issues

Author
======
Stanislav Bogatyrev <[email protected]>

Contributors
============

About

bash library to access Clodo Cloud Storage. Should fit any OpenStack Swift installation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%