After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 121 of 317

Chapter 5 111 Creating containers A container can be thought of as a root folder under OpenStack Storage. They allow for objects to be stored within them. Under S3, they are known as buckets. Creating objects and containers can be achieved in a number of ways. A simple way is by using the swift client tool. We run this client tool against OpenStack Identity Service, which in turn has been configured to communicate to our OpenStack Storage proxy server and allows us to create, delete, and modify containers and objects in our OpenStack Storage environment. Getting ready Log in to a computer or a server that has the swift client package installed. How to do it... Carry out the following steps to create a container under OpenStack Storage: 1. To create a container named test, under our OpenStack Storage server, using the swift tool, we do the following: swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U cookbook:demo -K openstack post test 2. To verify the creation of our container, we can list the containers in our OpenStack Storage environment, as follows: swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U demo:cookbook -K openstack list This will simply list the containers in our OpenStack Storage environment. How it works... Creation of containers using the supplied swift tool is very simple. The syntax is as follows: swift -V 2.0 -A http://keystone_server:5000/v2.0 -U tenant:user -K password post container This authenticates our user through OpenStack Identity Service using Version 2.0 authentication, which in turn connects to the OpenStack Storage endpoint configured for this tenant and executes the required command to create the container. www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook