Containers in OpenStack: Leverage OpenStack services to make the most of Docker, Kubernetes and Mesos by Pradeep Kumar Singh & Madhuri Kumari

Containers in OpenStack: Leverage OpenStack services to make the most of Docker, Kubernetes and Mesos by Pradeep Kumar Singh & Madhuri Kumari

Author:Pradeep Kumar Singh & Madhuri Kumari [Singh, Pradeep Kumar]
Language: eng
Format: epub
Tags: COM011000 - COMPUTERS / Systems Architecture / General, COM088000 - COMPUTERS / System Administration / General, COM091000 - COMPUTERS / Cloud Computing *
Publisher: Packt Publishing
Published: 2017-12-21T00:00:00+00:00


Uploading an image to Swift

We will try to upload an image to Swift. First, check the account details:

$ openstack object store account show +------------+---------------------------------------+ | Field | Value | +------------+---------------------------------------+ | Account | AUTH_8ef89519b0454b57a038b6f044fa0101 | | Bytes | 0 | | Containers | 0 | | Objects | 0 | +------------+---------------------------------------+

We will create an images container to store all our images. Similarly, we can create multiple containers inside an account with any logical name to store different types of data:

$ openstack container create images +---------------------------------------+-----------+------------------------------------+ | account | container | x-trans-id | +---------------------------------------+-----------+------------------------------------+ | AUTH_8ef89519b0454b57a038b6f044fa0101 | images | tx3f28728ccbbe4fcabfe1b-0059b3af9b | +---------------------------------------+-----------+------------------------------------+ $ openstack container list +--------+ | Name | +--------+ | images | +--------+

Now that we have a container, let's upload an image to the container:

$ openstack object create images sunrise.jpeg +--------------+-----------+----------------------------------+ | object | container | etag | +--------------+-----------+----------------------------------+ | sunrise.jpeg | images | 243f98a9d31d140bb123e56624703106 | +--------------+-----------+----------------------------------+ $ openstack object list images +--------------+ | Name | +--------------+ | sunrise.jpeg | +--------------+ $ openstack container show images +--------------+---------------------------------------+ | Field | Value | +--------------+---------------------------------------+ | account | AUTH_8ef89519b0454b57a038b6f044fa0101 | | bytes_used | 2337288 | | container | images | | object_count | 1 | +--------------+---------------------------------------+

You can see that the image was successfully uploaded to the Swift object store.

There are many more features that are available in OpenStack, which you can read about in the user guides available for each project.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.