From 3944f8370ee49b9cc7ae190c6752b311d49cc2ac Mon Sep 17 00:00:00 2001 From: terrywu510 Date: Fri, 2 Jan 2026 20:16:45 +0800 Subject: [PATCH 1/3] Add object detail --- .../docs/service/storage/06-object.mdx | 119 ++++++++++++++++-- 1 file changed, 109 insertions(+), 10 deletions(-) diff --git a/src/content/docs/service/storage/06-object.mdx b/src/content/docs/service/storage/06-object.mdx index 200c127..9f1a164 100644 --- a/src/content/docs/service/storage/06-object.mdx +++ b/src/content/docs/service/storage/06-object.mdx @@ -19,7 +19,9 @@ At the top of the page, you will find a dashboard summarizing the state of S3 st - The total number of S3 buckets currently defined in the system. + The total number of S3 buckets currently defined in the system. + + The RGW endpoint IP that clients use to access the bucket via S3-compatible APIs. The combined storage consumption across all buckets, including object data and metadata overhead. @@ -30,12 +32,12 @@ At the top of the page, you will find a dashboard summarizing the state of S3 st The Bucket table displays a list of all buckets. The table includes the following information: -| Column | Description | -| :--------------- | :---------------------------------------------- | -| **Name** | The name of the bucket. | -| **Owner** | The user ID of the bucket owner. | -| **Usage** | The total size of objects stored in the bucket. | -| **Created Time** | The creation timestamp of the bucket. | +| Column | Description | +| :--------------- | :-------------------------------------------------------------------------- | +| **Name** | The name of the bucket. | +| **Owner** | The user ID of the bucket owner. | +| **Usage** | The total size of objects stored in the bucket. | +| **Created Time** | Displays how long ago the bucket was created, relative to the current time. | ### Create Bucket @@ -52,6 +54,103 @@ You can create new buckets to store your data. +### Access Bucket + +Use the following example to access a bucket and verify that the user’s access keys can perform basic S3 operations. + +#### Prerequisites + +- The RGW endpoint IP is reachable from the client. +- A client machine with: + - Python 3 + - The boto3 library installed. +```bash + pip install boto3 +``` + + + +1. Create a user in User section. +2. Create an access key for the user and copy the secret key. +3. Create a bucket and assign the user as the owner. The bucket owner always has full control of the bucket regardless of the selected ACL. +4. Export the RGW endpoint IP and credentials as environment variables: + ```bash + export RGW_ENDPOINT="http://:80" + export AWS_ACCESS_KEY_ID="" + export AWS_SECRET_ACCESS_KEY="" + export BUCKET_NAME="" + export AWS_DEFAULT_REGION="us-east-1" + ``` +5. Create a script file (for example, rgw_test.py) and run it to test PUT / GET / DELETE: + ```Python + #!/usr/bin/env python3 + import os + import uuid + import boto3 + from botocore.client import Config + from botocore.exceptions import ClientError + + RGW_ENDPOINT = os.environ["RGW_ENDPOINT"] + ACCESS_KEY = os.environ["AWS_ACCESS_KEY_ID"] + SECRET_KEY = os.environ["AWS_SECRET_ACCESS_KEY"] + BUCKET_NAME = os.environ["BUCKET_NAME"] + REGION = os.environ.get("AWS_DEFAULT_REGION", "us-east-1") + + def main(): + s3 = boto3.client( + "s3", + endpoint_url=RGW_ENDPOINT, + aws_access_key_id=ACCESS_KEY, + aws_secret_access_key=SECRET_KEY, + region_name=REGION, + config=Config(signature_version="s3v4"), + ) + + test_key = f"rgw-test-{uuid.uuid4()}.txt" + body = "Hello Ceph RGW via boto3!\nThis is a test object.\n" + + # 1) PUT + print(f"[1] PUT: s3://{BUCKET_NAME}/{test_key}") + s3.put_object(Bucket=BUCKET_NAME, Key=test_key, Body=body.encode("utf-8")) + print(" ✅ PUT OK") + + # 2) GET + print(f"[2] GET: s3://{BUCKET_NAME}/{test_key}") + resp = s3.get_object(Bucket=BUCKET_NAME, Key=test_key) + print(" ✅ GET OK") + _ = resp["Body"].read() + + # 3) DELETE + print(f"[4] DELETE: {test_key} and {test_key}") + s3.delete_object(Bucket=BUCKET_NAME, Key=test_key) + print(" ✅ DELETE OK") + + print("[✔] Verification completed successfully.") + + if __name__ == "__main__": + try: + main() + except ClientError as e: + print("❌ S3 operation failed:") + print(e) + raise + ``` + ```bash + python3 rgw_test.py + ``` + +6. Confirm that all steps return success messages. + + The script should print: + + - PUT OK + - GET OK + - DELETE OK + + + + + ### Manage Buckets You can modify or delete existing buckets using the **Actions** menu. @@ -81,7 +180,7 @@ Permanently removes a bucket and all its objects. ## User @@ -152,7 +251,7 @@ Permanently removes a user. ### Manage Keys @@ -190,5 +289,5 @@ Permanently removes an access key. \ No newline at end of file From 8fa3f887b8a059cf20a811502564d2c7840d228a Mon Sep 17 00:00:00 2001 From: terrywu510 Date: Fri, 2 Jan 2026 20:24:54 +0800 Subject: [PATCH 2/3] Fix create step --- src/content/docs/service/storage/02-pool.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/service/storage/02-pool.mdx b/src/content/docs/service/storage/02-pool.mdx index 04d7145..f5a12aa 100644 --- a/src/content/docs/service/storage/02-pool.mdx +++ b/src/content/docs/service/storage/02-pool.mdx @@ -43,9 +43,9 @@ The create dialog includes configuration fields for pool type, replica size or e - **Replicated Size**: Specify the number of replicas (e.g., 3). - **Erasure**: Uses erasure coding to save space. Ideal for cold storage or large datasets. - **EC Overwrite**: Enable if you need to support overwrites (required for RBD/CephFS on EC pools). -4. **Applications**: Select one or more applications that will use this pool (e.g., `rbd`, `cephfs`, `rgw`). -5. **Quota**: Optionally set limits on the pool's usage: +4. **Quota**: Optionally set limits on the pool's usage: - **Max Bytes**: The maximum amount of data (in GB or TB) the pool can store. +5. **Advanced Settings (Optional)**: - **Max Objects**: The maximum number of objects the pool can store. 6. Click **Confirm** to create the pool. @@ -62,7 +62,7 @@ Allows you to modify the pool's configuration, such as quotas. 1. Select **Edit** from the actions menu (pencil icon). -2. Update the **Name**, **Quota Size**, or **Quota Objects** as needed. +2. Update the **Quota Size**, or **Quota Objects** as needed. 3. Click **Confirm** to save changes. From 709c33edc603c87ef5dafa0f629235f07e575e55 Mon Sep 17 00:00:00 2001 From: terrywu510 Date: Mon, 5 Jan 2026 07:28:13 +0800 Subject: [PATCH 3/3] Use S3 browser access RGW --- .../docs/service/storage/06-object.mdx | 95 +++---------------- 1 file changed, 12 insertions(+), 83 deletions(-) diff --git a/src/content/docs/service/storage/06-object.mdx b/src/content/docs/service/storage/06-object.mdx index 9f1a164..9c0d6c1 100644 --- a/src/content/docs/service/storage/06-object.mdx +++ b/src/content/docs/service/storage/06-object.mdx @@ -54,98 +54,27 @@ You can create new buckets to store your data. -### Access Bucket +### Access Bucket with S3 Browser -Use the following example to access a bucket and verify that the user’s access keys can perform basic S3 operations. +This section demonstrates how to access a Ceph Object Gateway (RGW) bucket using S3 Browser, a graphical S3 client. +This approach is useful for manual verification, browsing objects, and basic upload/download operations without writing code. #### Prerequisites - -- The RGW endpoint IP is reachable from the client. -- A client machine with: - - Python 3 - - The boto3 library installed. -```bash - pip install boto3 -``` +- S3 Browser installed on the client machine (Windows). 1. Create a user in User section. 2. Create an access key for the user and copy the secret key. 3. Create a bucket and assign the user as the owner. The bucket owner always has full control of the bucket regardless of the selected ACL. -4. Export the RGW endpoint IP and credentials as environment variables: - ```bash - export RGW_ENDPOINT="http://:80" - export AWS_ACCESS_KEY_ID="" - export AWS_SECRET_ACCESS_KEY="" - export BUCKET_NAME="" - export AWS_DEFAULT_REGION="us-east-1" - ``` -5. Create a script file (for example, rgw_test.py) and run it to test PUT / GET / DELETE: - ```Python - #!/usr/bin/env python3 - import os - import uuid - import boto3 - from botocore.client import Config - from botocore.exceptions import ClientError - - RGW_ENDPOINT = os.environ["RGW_ENDPOINT"] - ACCESS_KEY = os.environ["AWS_ACCESS_KEY_ID"] - SECRET_KEY = os.environ["AWS_SECRET_ACCESS_KEY"] - BUCKET_NAME = os.environ["BUCKET_NAME"] - REGION = os.environ.get("AWS_DEFAULT_REGION", "us-east-1") - - def main(): - s3 = boto3.client( - "s3", - endpoint_url=RGW_ENDPOINT, - aws_access_key_id=ACCESS_KEY, - aws_secret_access_key=SECRET_KEY, - region_name=REGION, - config=Config(signature_version="s3v4"), - ) - - test_key = f"rgw-test-{uuid.uuid4()}.txt" - body = "Hello Ceph RGW via boto3!\nThis is a test object.\n" - - # 1) PUT - print(f"[1] PUT: s3://{BUCKET_NAME}/{test_key}") - s3.put_object(Bucket=BUCKET_NAME, Key=test_key, Body=body.encode("utf-8")) - print(" ✅ PUT OK") - - # 2) GET - print(f"[2] GET: s3://{BUCKET_NAME}/{test_key}") - resp = s3.get_object(Bucket=BUCKET_NAME, Key=test_key) - print(" ✅ GET OK") - _ = resp["Body"].read() - - # 3) DELETE - print(f"[4] DELETE: {test_key} and {test_key}") - s3.delete_object(Bucket=BUCKET_NAME, Key=test_key) - print(" ✅ DELETE OK") - - print("[✔] Verification completed successfully.") - - if __name__ == "__main__": - try: - main() - except ClientError as e: - print("❌ S3 operation failed:") - print(e) - raise - ``` - ```bash - python3 rgw_test.py - ``` - -6. Confirm that all steps return success messages. - - The script should print: - - - PUT OK - - GET OK - - DELETE OK +4. Open S3 Browser. +5. Fill in the account settings: + - Account type: S3 compatible storage + - API endpoint: RGW endpoint + - Access Key ID: User’s access key. + - Secret Access Key: The copied secret key. + - Use secure transfer: Disable SSL +6. Add new account