...
You can create, delete, copy, and download objects and containers using the RAC Dashboard. Additional features such as setting metadata which is used for most advanced features are not available via the Dashboard.
Command Line (swift client)
...
Additionally your application can leverage the Swift API directly - either using curl or existing libraries (such as Boto for Python).
GUI Applications
Cyberduck
Cyberduck is available for Mac OS X and Windows.
In order to use Cyberduck with RAC’s Object Storage you’ll need to download a special profile to set some extra settings for bookmarks in Cyberduck. You can download the generic profile or a profile we have created that is specific to RAC.
1. Download the additional profile from Cyberduck’s website called OpenStack Swift (Keystone). Double click on this file and enter the following details in a new bookmark using the OpenStack Swift (Keystone) preset to access the object storage:
Server | keystone-yyc.cloud.cybera.ca or keystone-yeg.cloud.cybera.ca |
Port | 35357 |
Username | project-name:user-name (eg. joe@cybera.ca:joe@cybera.ca - note the colon in between the project and user name) |
Password/Secret Key | Your Password |
This method does have the occasional issue where you need reset the port number (it will also display a warning about sending the password as clear text)
...
S3 API
Our OpenStack Swift environment has support for S3 API compatibility. This means that any application or library which supports Amazon S3 should be able to be used in our Swift environment.
To begin using the S3 API, you first need to obtain a set of "EC2 Credentials". This is a set of credentials formatted in the same way as Amazon's credentials. You can download your EC2 Credentials by going here (https://cloud.cybera.ca/project/api_access/) and clicking "View Credentials".
Using a text editor of your choice, you'll want to create a new file (eg. s3cred.sh) with the following details:
Code Block |
---|
export AWS_ACCESS_KEY_ID=foo
export AWS_SECRET_ACCESS_KEY=bar |
Alternatively you can find these credentials via the OpenStack CLI tools with the command openstack ec2 credentials list
.
The endpoint will be dependent on which region you are wishing to use - either yyc.cloud.cybera.ca:8080
or yeg.cloud.cybera.ca:8080
s3cmd
For s3cmd the following example .cfg file can be used:
Code Block |
---|
host_base = https://swift-yyc.cloud.cybera.ca:8080
host_bucket = %(bucket)s.swift-yyc.cloud.cybera.ca:8080
access_key = <access key>
secret_key = <secret key>
use_https = True |
To use the Edmonton region, change the yyc in the URLs to yeg.
GUI Applications
Cyberduck
Cyberduck is available for Mac OS X and Windows.
S3 Compatibility
To use Cyberaduck using the standard S3 compatibility, first obtain your EC2 Credentials, as described in the S3 API of this document.
Open Cyberduck and create a new Amazon S3 connection. Fill in the following information:
- Server:
yyc.cloud.cybera.ca
(for the Calgary region) oryeg.cloud.cybera.ca
(for the Edmonton region). - Port: 8080
- Access Key ID: Your
EC2_ACCESS_KEY
- Secret Access Key: Your
EC2_SECRET_KEY
OpenStack Swift Native
Cyberduck provides built in support OpenStack Swift with Keystone V3. To create a connection, create a new OpenStack Swift (Version 3) connection with the details below:
More documentation is available on the Cyberduck Website.
Server | keystone-yyc.cloud.cybera.ca (Calgary) or keystone-yeg.cloud.cybera.ca (Edmonton) |
Port | 5000 |
Username | project-name:Default:user-name (eg. joe@cybera.ca:Default:joe@cybera.ca - note the colons in between the project, domain name, and user name) |
Password/Secret Key | Your Password |
Note |
---|
DO NOT upload files larger than 2 GB using Cyberduck if you wish to share them via the Web. |
...
Code Block |
---|
swift post -m 'X-Versions-Location: myContainer-versions' myContainer |
Temporary URLs for Objects
One last feature we wanted to highlight is the ability to offer temporary URLs for objects or expiring URLs as they are also called. This allows you to provide a URL that will stop functioning after a certain amount of time.
...
To use swift-temp-url - download the file to your computer, and set the file to be executable. You can then run it and get your URL. eg. a link that lasts for 10 minutes minutes (600 seconds)
Code Block |
---|
echo https://swift-REGION.cloud.cybera.ca:8080`swift8080$(swift-temp-url GET 600 /v1/AUTH_xxxx/public_container/my_fancy_object secretkeygoeshere`secretkeygoeshere) |
Results in a shareable link:
...
Swift segments files to support objects larger than 5 GB. If you want to upload a file larger than 5GB using the Swift CLI you will need to ensure you use the -S flag and set a segment size (below is 4GB segment size).
Code Block |
---|
swift upload container_name -S 4294967296 my_large_fils.tar |
By default Swift splits files larger than 5 GB while Cyberduck performs this for if the file is larger than 2GB. There are a couple caveats with the different approaches the two applications take take to handling large files when it comes to accessing these files via a web browser (completely unrelated to the size they use to split files).
...