In this tutorial, we are going to show you how to publish a volume as an S3 bucket, create a user, login as a user, create an access key, configure s3cmd and access a volume, and lastly, upload an object and edit the object as a file.
1
|
First, go ahead and create a volume.
![]() ![]() ![]() ![]() |
2
|
Now go to your terminal and cd into the volume you just created: cd object-volume/![]() |
3
|
Create a text file using vi:
![]() |
4
|
Now, open a new tab in your terminal and ssh into a second client: ![]() |
5
|
We need to configure the s3cmd which will allow you to manage your S3 objects. First, install the s3cmd with the following line of code: sudo yum install -y s3cmd![]() |
6
|
To configure the s3cmd, run the following command: s3cmd --configure![]() |
7
|
At this point, you will be asked to enter your Access Key. In order to obtain an access key, first you need to create a new user in the Quobyte console.
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
8
|
Click on the three dots next to the name of the new user you just created, and a dropdown menu will appear.
![]() ![]() ![]() |
9
|
Copy the “Access key ID” and enter it in your terminal. ![]() |
10
|
You will also be asked to provide a secret key. Go back to your Quobyte web console and copy the “Secret access key” and enter it in the terminal. ![]() |
11
|
You can leave the “Default Region [US]:” empty. |
12
|
Now you will be asked to provide an “S3 Endpoint.”
![]() ![]() |
13
|
Now, to access a bucket you need to use “%(bucket)s.” followed the target S3, i.e., the S3 endpoint you used in the previous step. %(bucket)s.s3.example_target.myquobyte.net![]() |
14
|
You can just skip the “Encryption password” and “Path to GPG program” by pressing the enter key. |
15
|
When asked if you want to “Use HTTPS protocol [Yes]” type “No.” |
16
|
You can skip the HTTP Proxy server name by pressing enter. |
17
|
Answer with “Y” when asked to “Test access with supplied credentials [Y/n].” ![]() |
18
|
Next, save your settings by answering with “y” to the last question. ![]() |
19
|
You can now check the buckets available: s3cmd ls s3://![]() |
20
|
You can check what is actually in the “object-volume” bucket: s3cmd ls s3://object-volume![]() |
21
|
You can download the file as an object: s3cmd get s3://object-volume/file.txt![]() |
22
|
Let’s edit the object using vi: vi file.txt![]()
![]() |
23
|
To upload the object, run the following command: s3cmd put file.txt s3://test/file.txt![]() |
24
|
Go back to the first client and do an “ls” to make sure the file is still there. |
25
|
And now, let’s inspect the file to see what has happened: cat file.txt![]() |
As you can see, with Quobyte’s unified namespace, a file can be both a file and an object.