6
edits
Vrocheleau (talk | contribs) (API endpoints and S3 credentials) |
|||
Line 7: | Line 7: | ||
== Prerequisites == | == Prerequisites == | ||
* Install and configure your [[OpenStack_Client|OpenStack CLI]] | * Install and configure your [[OpenStack_Client|OpenStack CLI]] | ||
== API endpoints == | |||
{| class="wikitable" | |||
|+Object Store API Endpoints | |||
!Object Store API | |||
!Endpoint | |||
|- | |||
|'''Swift''' | |||
|<code><nowiki>https://objets.juno.calculquebec.ca/swift/v1</nowiki></code> | |||
|- | |||
|'''S3''' | |||
|<code><nowiki>https://objets.juno.calculquebec.ca</nowiki></code> | |||
|} | |||
{| class="wikitable" | |||
|+Project Specific Endpoint Patterns | |||
!Object Store API | |||
!Project endpoint pattern | |||
|- | |||
|'''Swift''' | |||
|<code><endpoint>/'''AUTH_<PROJECT ID>/<CONTAINER>/<OBJECT>'''</code> | |||
|- | |||
|'''S3''' | |||
|<code><endpoint>/'''<PROJECT ID>:<CONTAINER>/<OBJECT>'''</code> | |||
|} | |||
== Getting credentials for the object store == | == Getting credentials for the object store == | ||
=== The Swift Api === | === The Swift Api === | ||
You can get access to the [https://docs.openstack.org/swift/latest/api/object_api_v1_overview.html Object Store swift Api] directly with the same RC file credential that you created for the Openstack client in the prerequisites step, and the official [https://pypi.org/project/python-swiftclient/ Openstack Swift client]. | |||
Note that while the S3 Api is more feature rich and has better support, some operations can only be done with the Swift Api which is the native OpenStack Object Store Api. For example, to get the Quota of you account: | |||
<syntaxhighlight ,lang="bash"> | <syntaxhighlight ,lang="bash"> | ||
Line 43: | Line 67: | ||
=== The S3 Api === | === The S3 Api === | ||
While the Switft API can be accessed with the OpenStack RC file credentials, the S3 object store maintains its own set of credentials. | |||
To create S3 credentials for a project/user:<syntaxhighlight> | |||
openstack ec2 credentials create | |||
+------------+--------------------------------------------------------------------------------------------------+ | |||
| Field | Value | | |||
+------------+--------------------------------------------------------------------------------------------------+ | |||
| access | <S3 ACCESS KEY> | | |||
| links | {'self': 'https://juno.calculquebec.ca:5000/v3/users/<USER ID>/credentials/OS-EC2/<ACCESS KEY>'} | | |||
| project_id | <OPENSTACK PROJECT ID> | | |||
| secret | <S3 SECRET KEY> | | |||
| trust_id | None | | |||
| user_id | <USER ID> | | |||
+------------+--------------------------------------------------------------------------------------------------+ | |||
</syntaxhighlight>Usage details coming soon! | |||
==What an Object Store is and isn't== | ==What an Object Store is and isn't== |
edits