IBM Spectrum Scale™ object storage supports S3 API for accessing object data using Swift3 Middleware for OpenStack Swift. When the S3 API is enabled, the object service also recognizes S3 API requests sent to the TCP port used by the object service (8080).
For enabling S3 API on IBM Spectrum Scale™ refer:
https://www.ibm.com/support/knowledgecenter/en/STXKQY_5.0.1/com.ibm.spectrum.scale.v5r01.doc/bl1ins_S3APIemulation.htmThis blog provides help to users getting started with the
AWS S3 command line client using IBM Spectrum Scale™ object storage. The AWS CLI allows to use the different APIs provided by AWS, including the S3 and S3API ones.
Note : AWS S3 signature version V4 is only supported on IBM Spectrum Scale 5.0.1 or later release. Installing the AWS Command Line InterfaceFollow the steps which are given in below guide (based on your operating system configuration)
https://docs.aws.amazon.com/cli/latest/userguide/installing.html
Configuration: Step1: Configure OpenStack EC2 credentialshttps://www.ibm.com/support/knowledgecenter/en/STXKQY_5.0.1/com.ibm.spectrum.scale.v5r01.doc/bl1adm_ConfigureOpenstackEC2credentials.htmStep2: Configure credentials for awscli client Use “AWS Access Key ID” & “AWS Secret Access Key” same as you configured while creating credentials using
“openstack credential create” in Step1
[root@awsclient ~]# aws configure
AWS Access Key ID [****************ser1]: Administrator
AWS Secret Access Key [****************w0rd]: *********
Default region name [None]: US
Default output format [None]: textNote: awsclient uses s3v4 signature_version as default and in this case, it is necessary to match "region name” in awsclient configuration with "location" property of the "filter:swift3" section of proxy-server.conf.
Use below command for setting region in proxy-server.conf :
mmobj config change --ccrfile proxy-server.conf --section filter:swift3 --property location --value 'The default value in swift is "location = US", so you can configure region name as “US” in awsclient configuration without changing proxy-server.conf settings.
Step3: Verify config files creation [root@awsclient ~]# cat .aws/config
[default]
output = text
region = US
[root@awsclient ~]# cat .aws/credentials
[default]
aws_access_key_id = Administrator
aws_secret_access_key = *********Note: awsclient cli works without configuring region name by setting AWS to V2 protocol using
“aws configure set default.s3.signature_version s3" command.
In this case “.aws/config” would look like this :
[root@awsclient ~]# cat .aws/config
[default]
output = text
region = US
s3 =
signature_version = s3Step4: Verify s3 Operations Listing using S3:[root@awsclient ~]# aws --endpoint-url http://10.0.100.43:8080 --no-verify-ssl s3 ls
2009-02-03 11:45:09 bukcet1
2009-02-03 11:45:09 bucket2
Listing using s3api:[root@probot ~]# aws --endpoint-url http://10.0.100.43:8080 --profile default --no-verify-ssl s3api list-buckets
{
"Owner": {
"DisplayName": "admin:Administrator",
"ID": "admin:Administrator"
},
"Buckets": [
{
"CreationDate": "2009-02-03T16:45:09.000Z",
"Name": "bucket1"
},
{
"CreationDate": "2009-02-03T16:45:09.000Z",
"Name": "bucket2"
}
]
} Create new bucket:[root@awsclient ~]# aws --endpoint-url http://10.0.100.43:8080 --no-verify-ssl s3api create-bucket --bucket newbucket
{
"Location": "/newbucket"
}
[root@awsclient ~]# aws --endpoint-url http://10.0.100.43:8080 --no-verify-ssl s3 ls
2009-02-03 11:45:09 bukcet1
2009-02-03 11:45:09 bucket2
2009-02-03 11:45:09 newbucketNote: Due to the limitations of the swift3 module, the date for the bucket will always be '2009-02-03 11:45:09' regardless of when it was actually created.PS: Thanks Brian(brnelson@us.ibm.com) for your acknowledgement
#Softwaredefinedinfrastructure#Softwaredefinedstorage#ibmstorage#IBMSoftwareDefinedStorage#IBMSpectrumScale