Object Storage (Containers)
Every project in OpenStack also provides an Object Store by means of containers. These are similar to AWS S3 and may also interact with S3. Use containers to store any kind of files and optionally share them via a public URL.
Creating a Container
To create a container, navigate to the container page found under the Object Store
section on the
left. From here you will see a simple interface that shows your containers and allows you to create
new ones.
Use the +Container
button and enter your container's name as well as select the visibility
in the popup.
Adding data
Add data either by using the OpenStack dashboard or the CLI. We will go over both ways here. We start with using the dashboard.
Using the dashboard
In the container overview click on the container you want to manage. The contents of the container are displayed on the right, where you will also find the upload button.
Here you can also modify the container visibility and copy the share link if it is a public container.
Using the CLI
To interact with your containers via the CLI you must install the Swift client
package. Use pip
to install it on any system that has python installed already. Install the swift client using the following command.
After installing the client, you must configure the client using the steps described in general CLI configuration. Afterwards, you are able to interact with existing containers or create new ones.
Note
Segmentation is required when uploading larger files. Specify the segment size using the
-S <seg_size>
option when invoking the upload command. Swift will split up your file and then
create a manifest file that will download all the segments as if it were the original file.
To see all available commands use either the swift --help
command for a general overview or
swift <cmd> --help
for a specific sub-command. the official Swift Documentation provide
a full overview.
Using the S3-compatible interface
We also provide an alternative interface to the object storage service that is compatible with Amazon's S3. This allows one to use the plethora of software written for the S3 API.
Use the OpenStack CLI to generate a set of AWS-style credentials for your project:
The access
and secret
fields in the output are used for AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
, respectively, when configuring your S3 client
software.
To invalidate a set of previously-generated AWS credentials, use openstack ec2
credentials delete $AWS_ACCESS_KEY_ID
.