Using Ozone2 S3 Gateway

Ozone provides an S3-compatible REST interface through Ozone2 S3 Gateway to use the object store data with any S3-compatible tools.

Although Ozone2 S3 Gateway is an addition to the regular Ozone2 components, in Acceldata’s ODP mpack, Ozone2 S3 Gateway is installed and started as part of the Ozone2 service. S3 buckets are stored under the /s3v volume.

Prerequisites

To use an S3 endpoint, configuring access key and secret for AWS-compatible tools is required. Here, taking the example of awscli.

  • Generate Access Key and Secret for AWS: If security is not enabled, you can use any AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. If security is enabled, you can get the key and the secret with the ozone2 s3 getsecret command (Kerberos-based authentication is required)
Bash
Copy
  • Export these credentials on your S3 endpoint. Here, I’m updating the credentials as a new profile.
Bash
Copy

Alternatively, you may create a new profile with ozone related credentials and use ozone profile to run

S3 utility tasks on awscli.

Bash
Copy
  • Verify your S3 endpoint from S3 Gateway UI.

Starting in Ozone 2.1.0, the secret will be shown only once when generated with getsecret. If the secret is lost, the user would have to revokesecret first before regenerating a new secret with getsecret.

Ozone2 S3 Gateway to work with AWS CLI

Ozone S3 Gateway supports various bucket and object operations that the Amazon S3 API provides. Amazon Web Services (AWS) command-line interface (CLI) is one such utility tool, used to interact with S3 Gateway and work with various Ozone storage elements.

Examples of using AWS CLI for Ozone S3 Gateway :

  • Create new bucket
Bash
Copy
  • Upload key to new bucket
Bash
Copy
Bash
Copy
  • Confirm key upload
Bash
Copy
  • Verify file content through ozone
Bash
Copy

SSL enabled Ozone2 S3 Gateway to work with AWS CLI

In case of SSL-enabled Ozone, S3 Gateway has https endpoint. Python SSL supported with AWS CLI honors certificates in the PEM format. Hence, convert your CA certificate to PEM if using any other format, on all required client nodes.

Bash
Copy

Pass the certificate in PEM file format to the aws s3api commands to perform S3 utility tasks. For example :

  • Create new bucket
SQL
Copy
  • Upload key to new bucket
Bash
Copy
Bash
Copy
  • Confirm key upload
Bash
Copy
  • Verify file content through ozone
Bash
Copy

Revoke access to the generated AWS credentials

Revoke access to AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_ KEY once your use case is completed.

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated