Skip to content

Getting started

Once you get your public cloud credentials, you can create a container (bucket) and store objects. An object stores data content, such as documents, images...

Requirements : Swift Client

Some commands are not available through the OpenStack CLI, so you will need to install the Swift Client.

Ubuntu / Debian apt install python3-swiftclient

Centos / Red Hat yum install python3-swiftclient

Create a container

I'll create a container named public:

taylor@laptop:~ (pub1|taylor)$ openstack container create public
+---------------------------------------+-----------+------------------------------------+
| account                               | container | x-trans-id                         |
+---------------------------------------+-----------+------------------------------------+
| AUTH_d7a1d09c0323488aa00d9e163f3655bf | public    | tx59c2735e9bfd4a5181079-006048ddc8 |
+---------------------------------------+-----------+------------------------------------+

List your containers

taylor@laptop:~ (pub1|taylor)$ openstack container list 
+--------+
| Name   |
+--------+
| public |
+--------+

Store your first object

taylor@laptop:~ (pub1|taylor)$ openstack object create --name 'eBooks/Cuisine/Les Crêpes du Monde.pdf' public 'Documents/Ebooks/Cuisine/Les Crêpes du Monde.pdf'
+----------------------------------------+-----------+----------------------------------+
| object                                 | container | etag                             |
+----------------------------------------+-----------+----------------------------------+
| eBooks/Cuisine/Les Crêpes du Monde.pdf | public    | a87f8e432d5c0c163d575a7fde411be8 |
+----------------------------------------+-----------+----------------------------------+

Here with --name option I override the final object name, but it's not mandatory. By default it uses your local object name (Documents/Ebooks/Cuisine/Les Crêpes du Monde.pdf)

List your objects

You need to specify your container name...

taylor@laptop:~ (pub1|taylor)$ openstack object list public
+----------------------------------------+
| Name                                   |
+----------------------------------------+
| eBooks/Cuisine/Les Crêpes du Monde.pdf |
+----------------------------------------+

View your account statistics

taylor@laptop:~ (pub1|taylor)$ openstack object store account show
+------------+---------------------------------------+
| Field      | Value                                 |
+------------+---------------------------------------+
| Account    | AUTH_d7a1d09c0323488aa00d9e163f3655bf |
| Bytes      | 9149046                               |
| Containers | 1                                     |
| Objects    | 1                                     |
+------------+---------------------------------------+

Display capabilities

To know enabled plugins (middlewares) on our cluster, you can use:

$ swift capabilities
Back to top