Access Object Storage

Red Cloud 2 Object Storage can be accessed using the following methods:

Horizon Web Console

Red Cloud object storage is accessible via Horizon web console. After logging into the web interface,

Horizon Container

Upload a File

  1. Select the container to which you want to upload a file. Horizon Select a Container
  2. Click on the Upload button. Horizon Click on Upload
  3. Click on the Choose File button to select the file on your computer to upload. Then name the new file and click on the Upload File button to start the upload process. Horizon Upload File Window

Download a File

Navigate to the file you want to download and click on the Download button.

Horizon Download a File

Create a New Folder

  1. Select the container in which you want to create the new folder. Horizon Select a Container
  2. Click on the +Folder button. Horizon Click on Upload
  3. Name the new folder and click on the +Create Folder button. Horizon Upload File Window

S3

Create EC2 Credentials

You need an ec2 credential to authenticate in the S3 interface.

ec2 credentials are managed using the OpenStack CLI client. Use the openstack ec2 credential list command to list all your existing ec2 credentials (If you belong to multiple projects, ec2 credentials in all your projects will be listed). If you don't have an existing ec2 credential, create one.

You can use any s3 client or SDK to access the object storage using the ec2 credential.

For reference, here's a configuration file for s3cmd:

 [default]
 access_key = <<ACCESS KEY>>
 secret_key = <<SECRET KEY>>
 host_base = redcloud2.cac.cornell.edu:8443
 host_bucket = redcloud2.cac.cornell.edu:8443
 signature_v2 = True
 bucket_location = US
 default_mime_type = binary/octet-stream
 delete_removed = False
 dry_run = False
 encoding = UTF-8
 encrypt = False
 follow_symlinks = False
 force = False
 get_continue = False
 gpg_command = /usr/local/bin/gpg
 gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
 gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
 gpg_passphrase =
 guess_mime_type = True
 human_readable_sizes = False
 list_md5 = False
 preserve_attrs = True
 progress_meter = True
 recursive = False
 recv_chunk = 4096
 reduced_redundancy = False
 send_chunk = 4096
 skip_existing = False
 socket_timeout = 300 
 urlencoding_mode = normal
 use_https = True
 verbosity = WARNING

S3 SDK

You should be able to use any S3 SDK to access Red Cloud object storage. For example, boto3 in AWS SDK.

Globus

Red Cloud object storage is accessible via the cac#redcloud2 Globus collection. See documentation here on Globus access.

Access Red Cloud Object Storage via Globus

  1. Create a new or locate an existing ec2 credential.
    • If you have multiple Red Cloud accounts, you can only configure one account for Globus access at any given time.
  2. Follow Globus instructions on how to access files on AWS S3 with Globus using
    • The cac#redcloud2 Globus collection, and
    • The ec2 credentials you obtained using the openstack ec2 credentials list command in the previous step.

Note

If you are in multiple projects, only one ec2 credential can be configured for Globus access at any given time.

Swift

CLI client

The swift command is part of the OpenStack CLI client.

  1. Install the OpenStack CLI client. Download and source the openrc file per instructions.
  2. List the available buckets to confirm connectivity and authentication: swift list

Additional swift commands

Operation Command
Delete a container or object swift delete <container> or swift delete <container> <object>
Download a container or object swift download <container> or swift download <containter> <object>
Create a container swift post <container>
Update ACL/metadata on a container or object swift post <ACL or metadata options> <container> [<object>]
Copy an object swift copy <source container> <source object> <new object>
Display account usage swift stat
Get info on a container or object swift stat <container> [<object>]
Upload a directory or file to a container swift upload <container> <file or directory> [<file or directory>]....
Display available object store features swift capabilities
Display authentication information swift auth

Use the -h option for detailed usage information.

Swift SDK

Swift SDKs are available in a variety of programming languages.