From 13b31a2104043b3fc736327aa5cac416d1ac967d Mon Sep 17 00:00:00 2001 From: Tim Olow Date: Tue, 3 Dec 2024 14:27:52 -0600 Subject: [PATCH 1/6] Create storage-object-store-swift-3rd-party.md --- docs/storage-object-store-swift-3rd-party.md | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 docs/storage-object-store-swift-3rd-party.md diff --git a/docs/storage-object-store-swift-3rd-party.md b/docs/storage-object-store-swift-3rd-party.md new file mode 100644 index 00000000..1bd5bf10 --- /dev/null +++ b/docs/storage-object-store-swift-3rd-party.md @@ -0,0 +1,45 @@ +# Swift 3rd party client use + +## Getting started with S3 + +Using the openstack CLI issue the following command to generate a S3 token + +``` shell +openstack ec2 credentials create +``` + +To view all ec2 credentials use issue the following command: + +``` shell +openstack credential list +``` + +To view access and secret keys issue the following command: + +``` shell +openstack credential show +``` + +!!! note +credential-id is obtained from credentials list command + +## Using S3 boto3 + +Using the access and secret keys from the commands above you can start using Flex Object storage in your python application. An example of using S3 Boto3 in python can be found here: + +``` python +import boto3 +import botocore +boto3.set_stream_logger(name='botocore') # this enables debug tracing +session = boto3.session.Session() +s3_client = session.client( + service_name='s3', + aws_access_key_id='ACCESS', + aws_secret_access_key='SECRET', + endpoint_url='https://YOUR.ENDPOINT.HOST/', + # The next option is only required because my provider only offers "version 2" + # authentication protocol. Otherwise this would be 's3v4' (the default, version 4). + config=botocore.client.Config(signature_version='s3'), +) +s3_client.list_objects(Bucket='bucket_name') +``` From 10a601dbd1df08e3aa09043d23730bcd2f95c8db Mon Sep 17 00:00:00 2001 From: Tim Olow Date: Wed, 4 Dec 2024 10:56:01 -0600 Subject: [PATCH 2/6] Update storage-object-store-swift-3rd-party.md --- docs/storage-object-store-swift-3rd-party.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/storage-object-store-swift-3rd-party.md b/docs/storage-object-store-swift-3rd-party.md index 1bd5bf10..d3b616bd 100644 --- a/docs/storage-object-store-swift-3rd-party.md +++ b/docs/storage-object-store-swift-3rd-party.md @@ -1,4 +1,8 @@ -# Swift 3rd party client use +# Swift 3rd party clients, SDK's and API + +## Openstack Swift SDK and Projects + +A complete list of SDKs, intergrations and libraries can be found here [Swift Associated Projects](https://docs.openstack.org/swift/latest/associated_projects.html) ## Getting started with S3 @@ -25,6 +29,8 @@ credential-id is obtained from credentials list command ## Using S3 boto3 +S3 boto3 is a python library that can be imported into your python code to perform object tasks such as, uploading, deleting and reading objects from a Flex Object endpoint. + Using the access and secret keys from the commands above you can start using Flex Object storage in your python application. An example of using S3 Boto3 in python can be found here: ``` python @@ -43,3 +49,13 @@ s3_client = session.client( ) s3_client.list_objects(Bucket='bucket_name') ``` + +More information on boto3 can be found here: [S3 Boto3 Reference](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html) + +## Rclone + +Rclone is a powerful sync tool, much like rsync, rclone can sync local and remote containers and buckets. + +Setup is simple, download rclone from [Rclone Download](https://rclone.org/downloads/) Once downloaded configuration for Flex Object / Swift can be found here: [Rclone setup for Swift](https://rclone.org/swift/) + + From 826acc389a82a0a7dfc34ff167b63ab34e06b516 Mon Sep 17 00:00:00 2001 From: Tim Olow Date: Wed, 4 Dec 2024 10:59:34 -0600 Subject: [PATCH 3/6] Update storage-object-store-swift-3rd-party.md spelling errors --- docs/storage-object-store-swift-3rd-party.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/storage-object-store-swift-3rd-party.md b/docs/storage-object-store-swift-3rd-party.md index d3b616bd..4598d5d6 100644 --- a/docs/storage-object-store-swift-3rd-party.md +++ b/docs/storage-object-store-swift-3rd-party.md @@ -2,7 +2,7 @@ ## Openstack Swift SDK and Projects -A complete list of SDKs, intergrations and libraries can be found here [Swift Associated Projects](https://docs.openstack.org/swift/latest/associated_projects.html) +A complete list of SDKs, integrations and libraries can be found here [Swift Associated Projects](https://docs.openstack.org/swift/latest/associated_projects.html) ## Getting started with S3 From c61784871ff3b91f7b8a98b90b52b76d8c04c412 Mon Sep 17 00:00:00 2001 From: Tim Olow Date: Wed, 4 Dec 2024 11:01:32 -0600 Subject: [PATCH 4/6] Update mkdocs.yml update index with storage-object-store-swift-3rd-party.md --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index cf648d77..901058cc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -296,6 +296,7 @@ nav: - Openstack Object Store Swift CLI: storage-object-store-swift-cli.md - Openstack Object Store Openstack CLI: storage-object-store-openstack-cli.md - Openstack Object Store Skyline GUI: storage-object-store-skyline-gui.md + - Openstack Object Store 3rd Party SDK, Tools: storage-object-store-swift-3rd-party.md - Openstack Snapshot: openstack-snapshot.md - Openstack Volumes: openstack-volumes.md - Openstack Load Balancers: openstack-load-balancer.md From 61bcb7fd75399b15deb4dc346d6e7328fb302771 Mon Sep 17 00:00:00 2001 From: Tim Olow Date: Wed, 4 Dec 2024 11:06:30 -0600 Subject: [PATCH 5/6] Update storage-object-store-swift-3rd-party.md fix end of file --- docs/storage-object-store-swift-3rd-party.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/storage-object-store-swift-3rd-party.md b/docs/storage-object-store-swift-3rd-party.md index 4598d5d6..eb6dcdd7 100644 --- a/docs/storage-object-store-swift-3rd-party.md +++ b/docs/storage-object-store-swift-3rd-party.md @@ -57,5 +57,3 @@ More information on boto3 can be found here: [S3 Boto3 Reference](https://boto3. Rclone is a powerful sync tool, much like rsync, rclone can sync local and remote containers and buckets. Setup is simple, download rclone from [Rclone Download](https://rclone.org/downloads/) Once downloaded configuration for Flex Object / Swift can be found here: [Rclone setup for Swift](https://rclone.org/swift/) - - From f5e86af2e929666f7b984463d9d32026fb60358f Mon Sep 17 00:00:00 2001 From: Tim Olow Date: Wed, 4 Dec 2024 12:01:40 -0600 Subject: [PATCH 6/6] Update storage-object-store-swift-3rd-party.md fix case on Rclone --- docs/storage-object-store-swift-3rd-party.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/storage-object-store-swift-3rd-party.md b/docs/storage-object-store-swift-3rd-party.md index eb6dcdd7..9a1aa3af 100644 --- a/docs/storage-object-store-swift-3rd-party.md +++ b/docs/storage-object-store-swift-3rd-party.md @@ -54,6 +54,6 @@ More information on boto3 can be found here: [S3 Boto3 Reference](https://boto3. ## Rclone -Rclone is a powerful sync tool, much like rsync, rclone can sync local and remote containers and buckets. +Rclone is a powerful sync tool, much like rsync, Rclone can sync local and remote containers and buckets. Setup is simple, download rclone from [Rclone Download](https://rclone.org/downloads/) Once downloaded configuration for Flex Object / Swift can be found here: [Rclone setup for Swift](https://rclone.org/swift/)