...
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 "Download EC2 View Credentials". This will trigger a zip file to be downloaded to your workstation.
Using Unzip the file and look inside the ec2rc.sh
file using a text editor of your choice. Inside this file, you will see a bunch of variables, including'll want to create a new file (eg. s3cred.sh) with the following details:
Code Block |
---|
export EC2AWS_ACCESS_KEY_ID=foo export EC2AWS_SECRET_ACCESS_KEY=bar |
These are your EC2 credentials.
...
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
...
- 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.
...